From 2fb491711188d413f65bdd8193644d25ae03c2c2 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 27 Sep 2015 13:29:04 +0100 Subject: Changes to go with cleaned up archive library --- src/SConscript | 6 ++- src/installationmanager.cpp | 113 +++++++++++++++++++++----------------------- src/installationmanager.h | 12 ++--- src/selfupdater.cpp | 50 +++++++------------- src/selfupdater.h | 9 ++-- 5 files changed, 85 insertions(+), 105 deletions(-) diff --git a/src/SConscript b/src/SConscript index 6783fd8b..540b2343 100644 --- a/src/SConscript +++ b/src/SConscript @@ -72,7 +72,11 @@ env.AppendUnique(CPPDEFINES = [ 'QT_MESSAGELOGCONTEXT' ]) -env.AppendUnique(CPPFLAGS = [ '-wd4100', '-wd4127', '-wd4512', '-wd4189' ]) +# Boost produces very long names with msvc truncates. Doesn't seem to cause +# problems. +# Also note to remove the -wd4100 I hacked the boost headers (tagged_argument.hpp) +# appropriately. +env.AppendUnique(CPPFLAGS = [ '-wd4503' ]) env.AppendUnique(LINKFLAGS = [ '/SUBSYSTEM:WINDOWS', diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 75abd750..ead9b3dc 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -81,9 +81,9 @@ InstallationManager::InstallationManager() CreateArchiveType CreateArchiveFunc = resolveFunction(archiveLib, "CreateArchive"); - m_CurrentArchive = CreateArchiveFunc(); - if (!m_CurrentArchive->isValid()) { - throw MyException(getErrorString(m_CurrentArchive->getLastError())); + m_ArchiveHandler = CreateArchiveFunc(); + if (!m_ArchiveHandler->isValid()) { + throw MyException(getErrorString(m_ArchiveHandler->getLastError())); } m_InstallationProgress.setWindowFlags(m_InstallationProgress.windowFlags() & (~Qt::WindowContextHelpButtonHint)); @@ -92,7 +92,7 @@ InstallationManager::InstallationManager() InstallationManager::~InstallationManager() { - delete m_CurrentArchive; + delete m_ArchiveHandler; } void InstallationManager::setParentWidget(QWidget *widget) @@ -104,34 +104,32 @@ void InstallationManager::setParentWidget(QWidget *widget) } -void InstallationManager::queryPassword(LPSTR password) +void InstallationManager::queryPassword(QString *password) { - QString result = QInputDialog::getText(nullptr, tr("Password required"), tr("Password"), QLineEdit::Password); - strncpy(password, result.toLocal8Bit().constData(), MAX_PASSWORD_LENGTH); + *password = QInputDialog::getText(nullptr, tr("Password required"), tr("Password"), QLineEdit::Password); } -void InstallationManager::mapToArchive(const DirectoryTree::Node *node, std::wstring path, FileData * const *data) +void InstallationManager::mapToArchive(const DirectoryTree::Node *node, QString path, FileData * const *data) { if (path.length() > 0) { // when using a long windows path (starting with \\?\) we apparently can have redundant // . components in the path. This wasn't a problem with "regular" path names. - if (path == L".") { + if (path == ".") { path.clear(); } else { - path.append(L"\\"); + path.append("\\"); } } for (DirectoryTree::const_leaf_iterator iter = node->leafsBegin(); iter != node->leafsEnd(); ++iter) { - std::wstring temp = path + iter->getName().toStdWString(); - data[iter->getIndex()]->addOutputFileName(temp.c_str()); + data[iter->getIndex()]->addOutputFileName(path + iter->getName().toQString()); } for (DirectoryTree::const_node_iterator iter = node->nodesBegin(); iter != node->nodesEnd(); ++iter) { - std::wstring temp = path + (*iter)->getData().name.toStdWString(); + QString temp = path + (*iter)->getData().name.toQString(); if ((*iter)->getData().index != -1) { - data[(*iter)->getData().index]->addOutputFileName(temp.c_str()); + data[(*iter)->getData().index]->addOutputFileName(temp); } mapToArchive(*iter, temp, data); } @@ -142,11 +140,9 @@ void InstallationManager::mapToArchive(const DirectoryTree::Node *baseNode) { FileData* const *data; size_t size; - m_CurrentArchive->getFileList(data, size); + m_ArchiveHandler->getFileList(data, size); - std::wstring currentPath; - - mapToArchive(baseNode, currentPath, data); + mapToArchive(baseNode, "", data); } @@ -154,15 +150,15 @@ bool InstallationManager::unpackSingleFile(const QString &fileName) { FileData* const *data; size_t size; - m_CurrentArchive->getFileList(data, size); + m_ArchiveHandler->getFileList(data, size); QString baseName = QFileInfo(fileName).fileName(); bool available = false; for (size_t i = 0; i < size; ++i) { - if (_wcsicmp(data[i]->getFileName(), ToWString(fileName).c_str()) == 0) { + if (data[i]->getFileName().compare(fileName, Qt::CaseInsensitive) == 0) { available = true; - data[i]->addOutputFileName(ToWString(baseName).c_str()); + data[i]->addOutputFileName(baseName); m_TempFilesToDelete.insert(baseName); } } @@ -177,10 +173,10 @@ bool InstallationManager::unpackSingleFile(const QString &fileName) m_InstallationProgress.setWindowModality(Qt::WindowModal); m_InstallationProgress.show(); - bool res = m_CurrentArchive->extract(ToWString(QDir::toNativeSeparators(QDir::tempPath())).c_str(), + bool res = m_ArchiveHandler->extract(QDir::tempPath(), new MethodCallback(this, &InstallationManager::updateProgress), - new MethodCallback(this, &InstallationManager::dummyProgressFile), - new MethodCallback(this, &InstallationManager::report7ZipError)); + nullptr, + new MethodCallback(this, &InstallationManager::report7ZipError)); m_InstallationProgress.hide(); @@ -223,25 +219,30 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool FileData* const *data; size_t size; - m_CurrentArchive->getFileList(data, size); + m_ArchiveHandler->getFileList(data, size); for (size_t i = 0; i < size; ++i) { - if (files.contains(ToQString(data[i]->getFileName()), Qt::CaseInsensitive)) { - const wchar_t *targetFile = data[i]->getFileName(); + //FIXME Use qstring all the way through + if (files.contains(data[i]->getFileName(), Qt::CaseInsensitive)) { + std::wstring temp = data[i]->getFileName().toStdWString(); + wchar_t const * const origFile = temp.c_str(); + const wchar_t *targetFile = origFile; + //Note: I don't think 'flatten' is ever set to true. so this code + //might never be executed if (flatten) { - targetFile = wcsrchr(data[i]->getFileName(), '\\'); + targetFile = wcsrchr(origFile/*data[i]->getFileName()*/, '\\'); if (targetFile == nullptr) { - targetFile = wcsrchr(data[i]->getFileName(), '/'); + targetFile = wcsrchr(origFile/*data[i]->getFileName()*/, '/'); } if (targetFile == nullptr) { - qCritical("failed to find backslash in %ls", data[i]->getFileName()); + qCritical() << "Failed to find backslash in " << data[i]->getFileName(); continue; } else { // skip the slash ++targetFile; } } - data[i]->addOutputFileName(targetFile); + data[i]->addOutputFileName(ToQString(targetFile)); result.append(QDir::tempPath().append("/").append(ToQString(targetFile))); @@ -256,12 +257,12 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool m_InstallationProgress.show(); // unpack only the files we need for the installer - if (!m_CurrentArchive->extract(ToWString(QDir::toNativeSeparators(QDir::tempPath())).c_str(), + if (!m_ArchiveHandler->extract(QDir::tempPath(), new MethodCallback(this, &InstallationManager::updateProgress), - new MethodCallback(this, &InstallationManager::dummyProgressFile), - new MethodCallback(this, &InstallationManager::report7ZipError))) { + nullptr, + new MethodCallback(this, &InstallationManager::report7ZipError))) { m_InstallationProgress.hide(); - throw MyException(QString("extracting failed (%1)").arg(m_CurrentArchive->getLastError())); + throw MyException(QString("extracting failed (%1)").arg(m_ArchiveHandler->getLastError())); } m_InstallationProgress.hide(); @@ -286,7 +287,7 @@ DirectoryTree *InstallationManager::createFilesTree() { FileData* const *data; size_t size; - m_CurrentArchive->getFileList(data, size); + m_ArchiveHandler->getFileList(data, size); QScopedPointer result(new DirectoryTree); @@ -296,7 +297,7 @@ DirectoryTree *InstallationManager::createFilesTree() // grouping the filenames first, but so far there doesn't seem to be an actual performance problem DirectoryTree::Node *currentNode = result.data(); - QString fileName = ToQString(data[i]->getFileName()); + QString fileName = data[i]->getFileName(); QStringList components = fileName.split("\\"); // iterate over all path-components of this filename (including the filename itself) @@ -389,26 +390,22 @@ void InstallationManager::updateProgress(float percentage) { m_InstallationProgress.setValue(static_cast(percentage * 100.0)); if (m_InstallationProgress.wasCanceled()) { - m_CurrentArchive->cancel(); + m_ArchiveHandler->cancel(); m_InstallationProgress.reset(); } } -void InstallationManager::updateProgressFile(LPCWSTR fileName) +void InstallationManager::updateProgressFile(QString const &fileName) { -#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) - m_InstallationProgress.setLabelText(QString::fromWCharArray(fileName)); -#else - m_InstallationProgress.setLabelText(QString::fromUtf16(fileName)); -#endif + m_InstallationProgress.setLabelText(fileName); } -void InstallationManager::report7ZipError(LPCWSTR errorMessage) +void InstallationManager::report7ZipError(QString const &errorMessage) { - reportError(QString::fromWCharArray(errorMessage)); - m_CurrentArchive->cancel(); + reportError(errorMessage); + m_ArchiveHandler->cancel(); } @@ -538,15 +535,15 @@ bool InstallationManager::doInstall(GuessedValue &modName, int modID, m_InstallationProgress.setValue(0); m_InstallationProgress.setWindowModality(Qt::WindowModal); m_InstallationProgress.show(); - if (!m_CurrentArchive->extract(ToWString("\\\\?\\" + targetDirectoryNative).c_str(), + if (!m_ArchiveHandler->extract(targetDirectory, new MethodCallback(this, &InstallationManager::updateProgress), - new MethodCallback(this, &InstallationManager::updateProgressFile), - new MethodCallback(this, &InstallationManager::report7ZipError))) { + new MethodCallback(this, &InstallationManager::updateProgressFile), + new MethodCallback(this, &InstallationManager::report7ZipError))) { m_InstallationProgress.hide(); - if (m_CurrentArchive->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) { + if (m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) { return false; } else { - throw MyException(QString("extracting failed (%1)").arg(m_CurrentArchive->getLastError())); + throw MyException(QString("extracting failed (%1)").arg(m_ArchiveHandler->getLastError())); } } @@ -587,13 +584,13 @@ bool InstallationManager::doInstall(GuessedValue &modName, int modID, bool InstallationManager::wasCancelled() { - return m_CurrentArchive->getLastError() == Archive::ERROR_EXTRACT_CANCELLED; + return m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED; } void InstallationManager::postInstallCleanup() { - m_CurrentArchive->close(); + m_ArchiveHandler->close(); // directories we may want to remove. sorted from longest to shortest to ensure we remove subdirectories first. auto longestFirst = [](const QString &LHS, const QString &RHS) -> bool { @@ -679,13 +676,13 @@ bool InstallationManager::install(const QString &fileName, GuessedValue //If there's an archive already open, close it. This happens with the bundle //installer when it uncompresses a split archive, then finds it has a real archive //to deal with. - m_CurrentArchive->close(); + m_ArchiveHandler->close(); // open the archive and construct the directory tree the installers work on - bool archiveOpen = m_CurrentArchive->open(ToWString(QDir::toNativeSeparators(fileName)).c_str(), - new MethodCallback(this, &InstallationManager::queryPassword)); + bool archiveOpen = m_ArchiveHandler->open(fileName, + new MethodCallback(this, &InstallationManager::queryPassword)); if (!archiveOpen) { - qDebug("integrated archiver can't open %s. errorcode %d", qPrintable(fileName), m_CurrentArchive->getLastError()); + qDebug("integrated archiver can't open %s. errorcode %d", qPrintable(fileName), m_ArchiveHandler->getLastError()); } ON_BLOCK_EXIT(std::bind(&InstallationManager::postInstallCleanup, this)); diff --git a/src/installationmanager.h b/src/installationmanager.h index d4b4f7dc..d73f4653 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -147,12 +147,10 @@ public: private: - void queryPassword(LPSTR password); + void queryPassword(QString *password); void updateProgress(float percentage); - void updateProgressFile(LPCWSTR fileName); - void report7ZipError(LPCWSTR errorMessage); - - void dummyProgressFile(LPCWSTR) {} + void updateProgressFile(const QString &fileName); + void report7ZipError(const QString &errorMessage); MOBase::DirectoryTree *createFilesTree(); @@ -161,7 +159,7 @@ private: void mapToArchive(const MOBase::DirectoryTree::Node *baseNode); // recursive worker function for mapToArchive - void mapToArchive(const MOBase::DirectoryTree::Node *node, std::wstring path, FileData * const *data); + void mapToArchive(const MOBase::DirectoryTree::Node *node, QString path, FileData * const *data); bool unpackSingleFile(const QString &fileName); @@ -205,7 +203,7 @@ private: std::vector m_Installers; std::set m_SupportedExtensions; - Archive *m_CurrentArchive; + Archive *m_ArchiveHandler; QString m_CurrentFile; QProgressDialog m_InstallationProgress; diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index ed34bfc2..724b89db 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -73,9 +73,9 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface) CreateArchiveType CreateArchiveFunc = resolveFunction(archiveLib, "CreateArchive"); - m_CurrentArchive = CreateArchiveFunc(); - if (!m_CurrentArchive->isValid()) { - throw MyException(InstallationManager::getErrorString(m_CurrentArchive->getLastError())); + m_ArchiveHandler = CreateArchiveFunc(); + if (!m_ArchiveHandler->isValid()) { + throw MyException(InstallationManager::getErrorString(m_ArchiveHandler->getLastError())); } connect(&m_Progress, SIGNAL(canceled()), this, SLOT(downloadCancel())); @@ -90,7 +90,7 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface) SelfUpdater::~SelfUpdater() { - delete m_CurrentArchive; + delete m_ArchiveHandler; } void SelfUpdater::setUserInterface(QWidget *widget) @@ -238,26 +238,25 @@ void SelfUpdater::installUpdate() QDir().mkdir(backupPath); // rename files that are currently open so we can unpack the update - if (!m_CurrentArchive->open(ToWString(QDir::toNativeSeparators(m_UpdateFile.fileName())).c_str(), - new MethodCallback(this, &SelfUpdater::queryPassword))) { + if (!m_ArchiveHandler->open(m_UpdateFile.fileName(), nullptr)) { throw MyException(tr("failed to open archive \"%1\": %2") .arg(m_UpdateFile.fileName()) - .arg(InstallationManager::getErrorString(m_CurrentArchive->getLastError()))); + .arg(InstallationManager::getErrorString(m_ArchiveHandler->getLastError()))); } // move all files contained in the archive out of the way, // otherwise we can't overwrite everything FileData* const *data; size_t size; - m_CurrentArchive->getFileList(data, size); + m_ArchiveHandler->getFileList(data, size); for (size_t i = 0; i < size; ++i) { - QString outputName = ToQString(data[i]->getFileName()); + QString outputName = data[i]->getFileName(); if (outputName.startsWith("ModOrganizer\\", Qt::CaseInsensitive)) { outputName = outputName.mid(13); - data[i]->addOutputFileName(ToWString(outputName).c_str()); + data[i]->addOutputFileName(outputName); } else if (outputName != "ModOrganizer") { - data[i]->addOutputFileName(ToWString(outputName).c_str()); + data[i]->addOutputFileName(outputName); } QFileInfo file(mopath + "/" + outputName); if (file.exists() && file.isFile()) { @@ -270,14 +269,14 @@ void SelfUpdater::installUpdate() } // now unpack the archive into the mo directory - if (!m_CurrentArchive->extract(GameInfo::instance().getOrganizerDirectory().c_str(), - new MethodCallback(this, &SelfUpdater::updateProgress), - new MethodCallback(this, &SelfUpdater::updateProgressFile), - new MethodCallback(this, &SelfUpdater::report7ZipError))) { + if (!m_ArchiveHandler->extract(QString::fromStdWString(GameInfo::instance().getOrganizerDirectory()), + nullptr, + nullptr, + new MethodCallback(this, &SelfUpdater::report7ZipError))) { throw std::runtime_error("extracting failed"); } - m_CurrentArchive->close(); + m_ArchiveHandler->close(); m_UpdateFile.remove(); @@ -292,24 +291,9 @@ void SelfUpdater::installUpdate() emit restart(); } -void SelfUpdater::queryPassword(LPSTR) +void SelfUpdater::report7ZipError(QString const &errorMessage) { - // nop -} - -void SelfUpdater::updateProgress(float) -{ - // nop -} - -void SelfUpdater::updateProgressFile(LPCWSTR) -{ - // nop -} - -void SelfUpdater::report7ZipError(LPCWSTR errorMessage) -{ - QMessageBox::critical(m_Parent, tr("Error"), ToQString(errorMessage)); + QMessageBox::critical(m_Parent, tr("Error"), errorMessage); } diff --git a/src/selfupdater.h b/src/selfupdater.h index b5bbc406..ac9bddb3 100644 --- a/src/selfupdater.h +++ b/src/selfupdater.h @@ -65,7 +65,7 @@ public: * @param parent parent widget * @todo passing the nexus interface is unneccessary **/ - SelfUpdater(NexusInterface *nexusInterface); + explicit SelfUpdater(NexusInterface *nexusInterface); virtual ~SelfUpdater(); @@ -115,10 +115,7 @@ private: void download(const QString &downloadLink, const QString &fileName); void installUpdate(); - void queryPassword(LPSTR password); - void updateProgress(float percentage); - void updateProgressFile(LPCWSTR fileName); - void report7ZipError(LPCWSTR errorMessage); + void report7ZipError(const QString &errorMessage); QString retrieveNews(const QString &description); void showProgress(); @@ -142,7 +139,7 @@ private: bool m_Canceled; int m_Attempts; - Archive *m_CurrentArchive; + Archive *m_ArchiveHandler; }; -- cgit v1.3.1 From 9a7b0ee2c78f1807d34e754d1f051c88b55a2f0c Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 11 Oct 2015 21:12:37 +0100 Subject: Fixes for quotes in module names: Treat the module name from Nexus as HTML and convert into plain text. Allow ' in a module name Also removed the ::tr1:: namespace in the regexs --- src/downloadmanager.cpp | 13 ++++++++++--- src/nexusinterface.cpp | 11 ++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index bc78cdc6..0cc45183 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -37,6 +37,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include #include #include @@ -909,10 +910,10 @@ QString DownloadManager::getDownloadFileName(const QString &baseName) const QString DownloadManager::getFileNameFromNetworkReply(QNetworkReply *reply) { if (reply->hasRawHeader("Content-Disposition")) { - std::tr1::regex exp("filename=\"(.*)\""); + std::regex exp("filename=\"(.*)\""); - std::tr1::cmatch result; - if (std::tr1::regex_search(reply->rawHeader("Content-Disposition").constData(), result, exp)) { + std::cmatch result; + if (std::regex_search(reply->rawHeader("Content-Disposition").constData(), result, exp)) { return QString::fromUtf8(result.str(1).c_str()); } } @@ -1128,6 +1129,12 @@ void DownloadManager::nxmFilesAvailable(int, QVariant userData, QVariant resultD if (!info->m_FileInfo->version.isValid()) { info->m_FileInfo->version = info->m_FileInfo->newestVersion; } + //Nexus has HTMLd these so unhtml them if necessary + QTextDocument doc; + doc.setHtml(info->m_FileInfo->modName); + info->m_FileInfo->modName = doc.toPlainText(); + doc.setHtml(info->m_FileInfo->name); + info->m_FileInfo->name = doc.toPlainText(); info->m_FileInfo->fileCategory = convertFileCategory(fileInfo["category_id"].toInt()); info->m_FileInfo->fileTime = matchDate(fileInfo["date"].toString()); info->m_FileInfo->fileID = fileInfo["id"].toInt(); diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index dc027be4..25f3d1b4 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -196,12 +196,13 @@ void NexusInterface::loginCompleted() void NexusInterface::interpretNexusFileName(const QString &fileName, QString &modName, int &modID, bool query) { - static std::tr1::regex exp("^([a-zA-Z0-9_\\- ]*?)([-_ ][VvRr]?[0-9_]+)?-([1-9][0-9]+).*"); - static std::tr1::regex simpleexp("^([a-zA-Z0-9_]+)"); + //Look for something along the lines of modulename-Vn-m + any old rubbish. + static std::regex exp("^([a-zA-Z0-9_'\"\\- ]*?)([-_ ][VvRr]?[0-9_]+)?-([1-9][0-9]+).*"); + static std::regex simpleexp("^([a-zA-Z0-9_]+)"); QByteArray fileNameUTF8 = fileName.toUtf8(); - std::tr1::cmatch result; - if (std::tr1::regex_search(fileNameUTF8.constData(), result, exp)) { + std::cmatch result; + if (std::regex_search(fileNameUTF8.constData(), result, exp)) { modName = QString::fromUtf8(result[1].str().c_str()); modName = modName.replace('_', ' ').trimmed(); @@ -231,7 +232,7 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo modID = strtol(candidate.c_str(), nullptr, 10); } qDebug("mod id guessed: %s -> %d", qPrintable(fileName), modID); - } else if (std::tr1::regex_search(fileNameUTF8.constData(), result, simpleexp)) { + } else if (std::regex_search(fileNameUTF8.constData(), result, simpleexp)) { qDebug("simple expression matched, using name only"); modName = QString::fromUtf8(result[1].str().c_str()); modName = modName.replace('_', ' ').trimmed(); -- cgit v1.3.1 From 9d88ca13b9b6a193dfb17a1ee3ea5e5cbed8a7e9 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 15 Oct 2015 13:34:01 +0100 Subject: Added functionality to use the web page link in a fomod to supply an optional web page. Also refactored modinfo into multiple files (as the actual types are opaque anyway) and cleaned up the headers a bit I also changed 'visit on nexus' from the menu not to open the downloads tab because it was a little confusing --- src/CMakeLists.txt | 10 + src/installationmanager.cpp | 5 + src/installationmanager.h | 5 +- src/mainwindow.cpp | 21 +- src/mainwindow.h | 1 + src/modinfo.cpp | 787 +--------------------------------------- src/modinfo.h | 561 +--------------------------- src/modinfobackup.cpp | 20 + src/modinfobackup.h | 40 ++ src/modinfoforeign.cpp | 50 +++ src/modinfoforeign.h | 67 ++++ src/modinfooverwrite.cpp | 53 +++ src/modinfooverwrite.h | 59 +++ src/modinforegular.cpp | 571 +++++++++++++++++++++++++++++ src/modinforegular.h | 349 ++++++++++++++++++ src/modinfowithconflictinfo.cpp | 130 +++++++ src/modinfowithconflictinfo.h | 64 ++++ src/organizer.pro | 14 +- 18 files changed, 1479 insertions(+), 1328 deletions(-) create mode 100644 src/modinfobackup.cpp create mode 100644 src/modinfobackup.h create mode 100644 src/modinfoforeign.cpp create mode 100644 src/modinfoforeign.h create mode 100644 src/modinfooverwrite.cpp create mode 100644 src/modinfooverwrite.h create mode 100644 src/modinforegular.cpp create mode 100644 src/modinforegular.h create mode 100644 src/modinfowithconflictinfo.cpp create mode 100644 src/modinfowithconflictinfo.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22b725de..e8acd89d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,6 +35,11 @@ SET(organizer_SRCS modlist.cpp modinfodialog.cpp modinfo.cpp + modinfobackup.cpp + modinfoforeign.cpp + modinfooverwrite.cpp + modinforegular.cpp + modinfowithconflictinfo.cpp messagedialog.cpp mainwindow.cpp main.cpp @@ -125,6 +130,11 @@ SET(organizer_HDRS modlist.h modinfodialog.h modinfo.h + modinfobackup.h + modinfoforeign.h + modinfooverwrite.h + modinforegular.h + modinfowithconflictinfo.h messagedialog.h mainwindow.h loghighlighter.h diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index a6af1a7f..3b1703d0 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -100,6 +100,10 @@ void InstallationManager::setParentWidget(QWidget *widget) } } +void InstallationManager::setURL(QString const &url) +{ + m_URL = url; +} void InstallationManager::queryPassword(LPSTR password) { @@ -581,6 +585,7 @@ bool InstallationManager::doInstall(GuessedValue &modName, int modID, } settingsFile.setValue("installationFile", m_CurrentFile); settingsFile.setValue("repository", repository); + settingsFile.setValue("url", m_URL); if (!merge) { // this does not clear the list we have in memory but the mod is going to have to be re-read anyway diff --git a/src/installationmanager.h b/src/installationmanager.h index 111b41f5..e5e5346f 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -59,6 +59,8 @@ public: void setParentWidget(QWidget *widget); + void setURL(const QString &url); + /** * @brief update the directory where mods are to be installed * @param modsDirectory the mod directory @@ -168,8 +170,6 @@ private: bool isSimpleArchiveTopLayer(const MOBase::DirectoryTree::Node *node, bool bainStyle); MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree); - //bool testOverwrite(const QString &modsDirectory, MOBase::GuessedValue &modName, bool *merge = nullptr); - bool doInstall(MOBase::GuessedValue &modName, int modID, const QString &version, const QString &newestVersion, int categoryID, const QString &repository); @@ -212,6 +212,7 @@ private: std::set m_TempFilesToDelete; + QString m_URL; }; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 26ff4b98..1dca599d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2525,12 +2525,22 @@ void MainWindow::visitOnNexus_clicked() { int modID = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(m_ContextRow, 0), Qt::UserRole).toInt(); if (modID > 0) { - nexusLinkActivated(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID)); + linkClicked(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID)); } else { MessageDialog::showMessage(tr("Nexus ID for this Mod is unknown"), this); } } +void MainWindow::visitWebPage_clicked() +{ + ModInfo::Ptr info = ModInfo::getByIndex(m_ContextRow); + if (info->getURL() != "") { + linkClicked(info->getURL()); + } else { + MessageDialog::showMessage(tr("Web page for this mod is unknown"), this); + } +} + void MainWindow::openExplorer_clicked() { ModInfo::Ptr modInfo = ModInfo::getByIndex(m_ContextRow); @@ -3106,7 +3116,14 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addAction(tr("Ignore missing data"), this, SLOT(ignoreMissingData_clicked())); } - menu->addAction(tr("Visit on Nexus"), this, SLOT(visitOnNexus_clicked())); + if (info->getNexusID() > 0) { + menu->addAction(tr("Visit on Nexus"), this, SLOT(visitOnNexus_clicked())); + } + + if (info->getURL() != "") { + menu->addAction(tr("Visit web page"), this, SLOT(visitWebPage_clicked())); + } + menu->addAction(tr("Open in explorer"), this, SLOT(openExplorer_clicked())); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 55ae40b9..3c7f2258 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -361,6 +361,7 @@ private slots: void unendorse_clicked(); void ignoreMissingData_clicked(); void visitOnNexus_clicked(); + void visitWebPage_clicked(); void openExplorer_clicked(); void information_clicked(); // savegame context menu diff --git a/src/modinfo.cpp b/src/modinfo.cpp index e0d888e6..fe5098e8 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -19,29 +19,23 @@ along with Mod Organizer. If not, see . #include "modinfo.h" -#include "utility.h" +#include "modinfobackup.h" +#include "modinforegular.h" +#include "modinfoforeign.h" +#include "modinfooverwrite.h" + #include "installationtester.h" #include "categories.h" -#include "report.h" #include "modinfodialog.h" #include "overwriteinfodialog.h" #include "json.h" -#include "messagedialog.h" #include "filenamestring.h" - -#include -#include -#include -#include -#include +#include "versioninfo.h" #include - #include #include #include -#include - using namespace MOBase; using namespace MOShared; @@ -386,772 +380,3 @@ void ModInfo::testValid() dirIter.next(); } } - - -ModInfoWithConflictInfo::ModInfoWithConflictInfo(DirectoryEntry **directoryStructure) - : m_DirectoryStructure(directoryStructure) {} - -void ModInfoWithConflictInfo::clearCaches() -{ - m_LastConflictCheck = QTime(); -} - -std::vector ModInfoWithConflictInfo::getFlags() const -{ - std::vector result; - switch (isConflicted()) { - case CONFLICT_MIXED: { - result.push_back(ModInfo::FLAG_CONFLICT_MIXED); - } break; - case CONFLICT_OVERWRITE: { - result.push_back(ModInfo::FLAG_CONFLICT_OVERWRITE); - } break; - case CONFLICT_OVERWRITTEN: { - result.push_back(ModInfo::FLAG_CONFLICT_OVERWRITTEN); - } break; - case CONFLICT_REDUNDANT: { - result.push_back(ModInfo::FLAG_CONFLICT_REDUNDANT); - } break; - default: { /* NOP */ } - } - return result; -} - - -void ModInfoWithConflictInfo::doConflictCheck() const -{ - m_OverwriteList.clear(); - m_OverwrittenList.clear(); - - bool providesAnything = false; - - int dataID = 0; - if ((*m_DirectoryStructure)->originExists(L"data")) { - dataID = (*m_DirectoryStructure)->getOriginByName(L"data").getID(); - } - - std::wstring name = ToWString(this->name()); - - m_CurrentConflictState = CONFLICT_NONE; - - if ((*m_DirectoryStructure)->originExists(name)) { - FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name); - std::vector files = origin.getFiles(); - // for all files in this origin - for (FileEntry::Ptr file : files) { - const std::vector &alternatives = file->getAlternatives(); - if ((alternatives.size() == 0) || (alternatives[0] == dataID)) { - // no alternatives -> no conflict - providesAnything = true; - } else { - if (file->getOrigin() != origin.getID()) { - FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(file->getOrigin()); - unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); - m_OverwrittenList.insert(altIndex); - } else { - providesAnything = true; - } - - // for all non-providing alternative origins - for (int altId : alternatives) { - if ((altId != dataID) && (altId != origin.getID())) { - FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(altId); - unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); - if (origin.getPriority() > altOrigin.getPriority()) { - m_OverwriteList.insert(altIndex); - } else { - m_OverwrittenList.insert(altIndex); - } - } - } - } - } - m_LastConflictCheck = QTime::currentTime(); - - if (files.size() != 0) { - if (!providesAnything) - m_CurrentConflictState = CONFLICT_REDUNDANT; - else if (!m_OverwriteList.empty() && !m_OverwrittenList.empty()) - m_CurrentConflictState = CONFLICT_MIXED; - else if (!m_OverwriteList.empty()) - m_CurrentConflictState = CONFLICT_OVERWRITE; - else if (!m_OverwrittenList.empty()) - m_CurrentConflictState = CONFLICT_OVERWRITTEN; - } - } -} - -ModInfoWithConflictInfo::EConflictType ModInfoWithConflictInfo::isConflicted() const -{ - // this is costy so cache the result - QTime now = QTime::currentTime(); - if (m_LastConflictCheck.isNull() || (m_LastConflictCheck.secsTo(now) > 10)) { - doConflictCheck(); - } - - return m_CurrentConflictState; -} - - -bool ModInfoWithConflictInfo::isRedundant() const -{ - std::wstring name = ToWString(this->name()); - if ((*m_DirectoryStructure)->originExists(name)) { - FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name); - std::vector files = origin.getFiles(); - bool ignore = false; - for (auto iter = files.begin(); iter != files.end(); ++iter) { - if ((*iter)->getOrigin(ignore) == origin.getID()) { - return false; - } - } - return true; - } else { - return false; - } -} - - - -ModInfoRegular::ModInfoRegular(const QDir &path, DirectoryEntry **directoryStructure) - : ModInfoWithConflictInfo(directoryStructure) - , m_Name(path.dirName()) - , m_Path(path.absolutePath()) - , m_Repository() - , m_MetaInfoChanged(false) - , m_EndorsedState(ENDORSED_UNKNOWN) - , m_NexusBridge() -{ - testValid(); - m_CreationTime = QFileInfo(path.absolutePath()).created(); - // read out the meta-file for information - readMeta(); - - connect(&m_NexusBridge, SIGNAL(descriptionAvailable(int,QVariant,QVariant)) - , this, SLOT(nxmDescriptionAvailable(int,QVariant,QVariant))); - connect(&m_NexusBridge, SIGNAL(endorsementToggled(int,QVariant,QVariant)) - , this, SLOT(nxmEndorsementToggled(int,QVariant,QVariant))); - connect(&m_NexusBridge, SIGNAL(requestFailed(int,int,QVariant,QString)) - , this, SLOT(nxmRequestFailed(int,int,QVariant,QString))); -} - - -ModInfoRegular::~ModInfoRegular() -{ - try { - saveMeta(); - } catch (const std::exception &e) { - qCritical("failed to save meta information for \"%s\": %s", - m_Name.toUtf8().constData(), e.what()); - } -} - -bool ModInfoRegular::isEmpty() const -{ - QDirIterator iter(m_Path, QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); - if (!iter.hasNext()) return true; - iter.next(); - if ((iter.fileName() == "meta.ini") && !iter.hasNext()) return true; - return false; -} - - -void ModInfoRegular::readMeta() -{ - QSettings metaFile(m_Path + "/meta.ini", QSettings::IniFormat); - m_Notes = metaFile.value("notes", "").toString(); - m_NexusID = metaFile.value("modid", -1).toInt(); - m_Version.parse(metaFile.value("version", "").toString()); - m_NewestVersion = metaFile.value("newestVersion", "").toString(); - m_IgnoredVersion = metaFile.value("ignoredVersion", "").toString(); - m_InstallationFile = metaFile.value("installationFile", "").toString(); - m_NexusDescription = metaFile.value("nexusDescription", "").toString(); - m_Repository = metaFile.value("repository", "Nexus").toString(); - m_LastNexusQuery = QDateTime::fromString(metaFile.value("lastNexusQuery", "").toString(), Qt::ISODate); - if (metaFile.contains("endorsed")) { - if (metaFile.value("endorsed").canConvert()) { - switch (metaFile.value("endorsed").toInt()) { - case ENDORSED_FALSE: m_EndorsedState = ENDORSED_FALSE; break; - case ENDORSED_TRUE: m_EndorsedState = ENDORSED_TRUE; break; - case ENDORSED_NEVER: m_EndorsedState = ENDORSED_NEVER; break; - default: m_EndorsedState = ENDORSED_UNKNOWN; break; - } - } else { - m_EndorsedState = metaFile.value("endorsed", false).toBool() ? ENDORSED_TRUE : ENDORSED_FALSE; - } - } - - QString categoriesString = metaFile.value("category", "").toString(); - - QStringList categories = categoriesString.split(',', QString::SkipEmptyParts); - for (QStringList::iterator iter = categories.begin(); iter != categories.end(); ++iter) { - bool ok = false; - int categoryID = iter->toInt(&ok); - if (categoryID < 0) { - // ignore invalid id - continue; - } - if (ok && (categoryID != 0) && (CategoryFactory::instance().categoryExists(categoryID))) { - m_Categories.insert(categoryID); - if (iter == categories.begin()) { - m_PrimaryCategory = categoryID; - } - } - } - - int numFiles = metaFile.beginReadArray("installedFiles"); - for (int i = 0; i < numFiles; ++i) { - metaFile.setArrayIndex(i); - m_InstalledFileIDs.insert(std::make_pair(metaFile.value("modid").toInt(), metaFile.value("fileid").toInt())); - } - metaFile.endArray(); - - m_MetaInfoChanged = false; -} - -void ModInfoRegular::saveMeta() -{ - // only write meta data if the mod directory exists - if (m_MetaInfoChanged && QFile::exists(absolutePath())) { - QSettings metaFile(absolutePath().append("/meta.ini"), QSettings::IniFormat); - if (metaFile.status() == QSettings::NoError) { - std::set temp = m_Categories; - temp.erase(m_PrimaryCategory); - metaFile.setValue("category", QString("%1").arg(m_PrimaryCategory) + "," + SetJoin(temp, ",")); - metaFile.setValue("newestVersion", m_NewestVersion.canonicalString()); - metaFile.setValue("ignoredVersion", m_IgnoredVersion.canonicalString()); - metaFile.setValue("version", m_Version.canonicalString()); - metaFile.setValue("installationFile", m_InstallationFile); - metaFile.setValue("repository", m_Repository); - metaFile.setValue("modid", m_NexusID); - metaFile.setValue("notes", m_Notes); - metaFile.setValue("nexusDescription", m_NexusDescription); - metaFile.setValue("lastNexusQuery", m_LastNexusQuery.toString(Qt::ISODate)); - if (m_EndorsedState != ENDORSED_UNKNOWN) { - metaFile.setValue("endorsed", m_EndorsedState); - } - - metaFile.beginWriteArray("installedFiles"); - int idx = 0; - for (auto iter = m_InstalledFileIDs.begin(); iter != m_InstalledFileIDs.end(); ++iter) { - metaFile.setArrayIndex(idx++); - metaFile.setValue("modid", iter->first); - metaFile.setValue("fileid", iter->second); - } - metaFile.endArray(); - - metaFile.sync(); // sync needs to be called to ensure the file is created - - if (metaFile.status() == QSettings::NoError) { - m_MetaInfoChanged = false; - } else { - reportError(tr("failed to write %1/meta.ini: error %2").arg(absolutePath()).arg(metaFile.status())); - } - } else { - reportError(tr("failed to write %1/meta.ini: error %2").arg(absolutePath()).arg(metaFile.status())); - } - } -} - - -bool ModInfoRegular::updateAvailable() const -{ - if (m_IgnoredVersion.isValid() && (m_IgnoredVersion == m_NewestVersion)) { - return false; - } - return m_NewestVersion.isValid() && (m_Version < m_NewestVersion); -} - - -bool ModInfoRegular::downgradeAvailable() const -{ - if (m_IgnoredVersion.isValid() && (m_IgnoredVersion == m_NewestVersion)) { - return false; - } - return m_NewestVersion.isValid() && (m_NewestVersion < m_Version); -} - - -void ModInfoRegular::nxmDescriptionAvailable(int, QVariant, QVariant resultData) -{ - QVariantMap result = resultData.toMap(); - setNewestVersion(VersionInfo(result["version"].toString())); - setNexusDescription(result["description"].toString()); - - if ((m_EndorsedState != ENDORSED_NEVER) && (result.contains("voted_by_user"))) { - setEndorsedState(result["voted_by_user"].toBool() ? ENDORSED_TRUE : ENDORSED_FALSE); - } - m_LastNexusQuery = QDateTime::currentDateTime(); - //m_MetaInfoChanged = true; - saveMeta(); - emit modDetailsUpdated(true); -} - - -void ModInfoRegular::nxmEndorsementToggled(int, QVariant, QVariant resultData) -{ - m_EndorsedState = resultData.toBool() ? ENDORSED_TRUE : ENDORSED_FALSE; - m_MetaInfoChanged = true; - saveMeta(); - emit modDetailsUpdated(true); -} - - -void ModInfoRegular::nxmRequestFailed(int, int, QVariant userData, const QString &errorMessage) -{ - QString fullMessage = errorMessage; - if (userData.canConvert() && (userData.toInt() == 1)) { - fullMessage += "\nNexus will reject endorsements within 15 Minutes of a failed attempt, the error message may be misleading."; - } - if (QApplication::activeWindow() != nullptr) { - MessageDialog::showMessage(fullMessage, QApplication::activeWindow()); - } - emit modDetailsUpdated(false); -} - - -bool ModInfoRegular::updateNXMInfo() -{ - if (m_NexusID > 0) { - m_NexusBridge.requestDescription(m_NexusID, QVariant()); - return true; - } - return false; -} - - -void ModInfoRegular::setCategory(int categoryID, bool active) -{ - m_MetaInfoChanged = true; - - if (active) { - m_Categories.insert(categoryID); - if (m_PrimaryCategory == -1) { - m_PrimaryCategory = categoryID; - } - } else { - std::set::iterator iter = m_Categories.find(categoryID); - if (iter != m_Categories.end()) { - m_Categories.erase(iter); - } - if (categoryID == m_PrimaryCategory) { - if (m_Categories.size() == 0) { - m_PrimaryCategory = -1; - } else { - m_PrimaryCategory = *(m_Categories.begin()); - } - } - } -} - - -bool ModInfoRegular::setName(const QString &name) -{ - if (name.contains('/') || name.contains('\\')) { - return false; - } - - QString newPath = m_Path.mid(0).replace(m_Path.length() - m_Name.length(), m_Name.length(), name); - QDir modDir(m_Path.mid(0, m_Path.length() - m_Name.length())); - - if (m_Name.compare(name, Qt::CaseInsensitive) == 0) { - QString tempName = name; - tempName.append("_temp"); - while (modDir.exists(tempName)) { - tempName.append("_"); - } - if (!modDir.rename(m_Name, tempName)) { - return false; - } - if (!modDir.rename(tempName, name)) { - qCritical("rename to final name failed after successful rename to intermediate name"); - modDir.rename(tempName, m_Name); - return false; - } - } else { - if (!shellRename(modDir.absoluteFilePath(m_Name), modDir.absoluteFilePath(name))) { - qCritical("failed to rename mod %s (errorcode %d)", - qPrintable(name), ::GetLastError()); - return false; - } - } - - std::map::iterator nameIter = s_ModsByName.find(m_Name); - if (nameIter != s_ModsByName.end()) { - unsigned int index = nameIter->second; - s_ModsByName.erase(nameIter); - - m_Name = name; - m_Path = newPath; - - s_ModsByName[m_Name] = index; - - std::sort(s_Collection.begin(), s_Collection.end(), ByName); - updateIndices(); - } else { // otherwise mod isn't registered yet? - m_Name = name; - m_Path = newPath; - } - - return true; -} - -void ModInfoRegular::setNotes(const QString ¬es) -{ - m_Notes = notes; - m_MetaInfoChanged = true; -} - -void ModInfoRegular::setNexusID(int modID) -{ - m_NexusID = modID; - m_MetaInfoChanged = true; -} - -void ModInfoRegular::setVersion(const VersionInfo &version) -{ - m_Version = version; - m_MetaInfoChanged = true; -} - -void ModInfoRegular::setNewestVersion(const VersionInfo &version) -{ - if (version != m_NewestVersion) { - m_NewestVersion = version; - m_MetaInfoChanged = true; - } -} - -void ModInfoRegular::setNexusDescription(const QString &description) -{ - if (qHash(description) != qHash(m_NexusDescription)) { - m_NexusDescription = description; - m_MetaInfoChanged = true; - } -} - -void ModInfoRegular::setEndorsedState(EEndorsedState endorsedState) -{ - if (endorsedState != m_EndorsedState) { - m_EndorsedState = endorsedState; - m_MetaInfoChanged = true; - } -} - -void ModInfoRegular::setInstallationFile(const QString &fileName) -{ - m_InstallationFile = fileName; - m_MetaInfoChanged = true; -} - -void ModInfoRegular::addNexusCategory(int categoryID) -{ - m_Categories.insert(CategoryFactory::instance().resolveNexusID(categoryID)); -} - -void ModInfoRegular::setIsEndorsed(bool endorsed) -{ - if (m_EndorsedState != ENDORSED_NEVER) { - m_EndorsedState = endorsed ? ENDORSED_TRUE : ENDORSED_FALSE; - m_MetaInfoChanged = true; - } -} - - -void ModInfoRegular::setNeverEndorse() -{ - m_EndorsedState = ENDORSED_NEVER; - m_MetaInfoChanged = true; -} - - -bool ModInfoRegular::remove() -{ - m_MetaInfoChanged = false; - return shellDelete(QStringList(absolutePath()), true); -} - -void ModInfoRegular::endorse(bool doEndorse) -{ - if (doEndorse != (m_EndorsedState == ENDORSED_TRUE)) { - m_NexusBridge.requestToggleEndorsement(getNexusID(), doEndorse, QVariant(1)); - } -} - - -QString ModInfoRegular::absolutePath() const -{ - return m_Path; -} - -void ModInfoRegular::ignoreUpdate(bool ignore) -{ - if (ignore) { - m_IgnoredVersion = m_NewestVersion; - } else { - m_IgnoredVersion.clear(); - } - m_MetaInfoChanged = true; -} - - -std::vector ModInfoRegular::getFlags() const -{ - std::vector result = ModInfoWithConflictInfo::getFlags(); - if ((m_NexusID > 0) && (endorsedState() == ENDORSED_FALSE)) { - result.push_back(ModInfo::FLAG_NOTENDORSED); - } - if (!isValid()) { - result.push_back(ModInfo::FLAG_INVALID); - } - if (m_Notes.length() != 0) { - result.push_back(ModInfo::FLAG_NOTES); - } - return result; -} - - -std::vector ModInfoRegular::getContents() const -{ - QTime now = QTime::currentTime(); - if (m_LastContentCheck.isNull() || (m_LastContentCheck.secsTo(now) > 60)) { - m_CachedContent.clear(); - QDir dir(absolutePath()); - if (dir.entryList(QStringList() << "*.esp" << "*.esm").size() > 0) { - m_CachedContent.push_back(CONTENT_PLUGIN); - } - if (dir.entryList(QStringList() << "*.bsa").size() > 0) { - m_CachedContent.push_back(CONTENT_BSA); - } - - ScriptExtender *extender = qApp->property("managed_game").value()->feature(); - - if (extender != nullptr) { - QString sePluginPath = extender->name() + "/plugins"; - if (dir.exists(sePluginPath)) m_CachedContent.push_back(CONTENT_SKSE); - } - if (dir.exists("textures")) m_CachedContent.push_back(CONTENT_TEXTURE); - if (dir.exists("meshes")) m_CachedContent.push_back(CONTENT_MESH); - if (dir.exists("interface") - || dir.exists("menus")) m_CachedContent.push_back(CONTENT_INTERFACE); - if (dir.exists("music")) m_CachedContent.push_back(CONTENT_MUSIC); - if (dir.exists("sound")) m_CachedContent.push_back(CONTENT_SOUND); - if (dir.exists("scripts")) m_CachedContent.push_back(CONTENT_SCRIPT); - if (dir.exists("strings")) m_CachedContent.push_back(CONTENT_STRING); - if (dir.exists("SkyProc Patchers")) m_CachedContent.push_back(CONTENT_SKYPROC); - - m_LastContentCheck = QTime::currentTime(); - } - - return m_CachedContent; - -} - - -int ModInfoRegular::getHighlight() const -{ - return isValid() ? HIGHLIGHT_NONE: HIGHLIGHT_INVALID; -} - - -QString ModInfoRegular::getDescription() const -{ - if (!isValid()) { - return tr("%1 contains no esp/esm and no asset (textures, meshes, interface, ...) directory").arg(name()); - } else { - const std::set &categories = getCategories(); - std::wostringstream categoryString; - categoryString << ToWString(tr("Categories:
")); - CategoryFactory &categoryFactory = CategoryFactory::instance(); - for (std::set::const_iterator catIter = categories.begin(); - catIter != categories.end(); ++catIter) { - if (catIter != categories.begin()) { - categoryString << " , "; - } - categoryString << "" << ToWString(categoryFactory.getCategoryName(categoryFactory.getCategoryIndex(*catIter))) << ""; - } - - return ToQString(categoryString.str()); - } -} - -QString ModInfoRegular::notes() const -{ - return m_Notes; -} - -QDateTime ModInfoRegular::creationTime() const -{ - return m_CreationTime; -} - -QString ModInfoRegular::getNexusDescription() const -{ - return m_NexusDescription; -} - -QString ModInfoRegular::repository() const -{ - return m_Repository; -} - -ModInfoRegular::EEndorsedState ModInfoRegular::endorsedState() const -{ - return m_EndorsedState; -} - -QDateTime ModInfoRegular::getLastNexusQuery() const -{ - return m_LastNexusQuery; -} - - -QStringList ModInfoRegular::archives() const -{ - QStringList result; - QDir dir(this->absolutePath()); - for (const QString &archive : dir.entryList(QStringList("*.bsa"))) { - result.append(this->absolutePath() + "/" + archive); - } - return result; -} - -void ModInfoRegular::addInstalledFile(int modId, int fileId) -{ - m_InstalledFileIDs.insert(std::make_pair(modId, fileId)); - m_MetaInfoChanged = true; -} - -std::vector ModInfoRegular::getIniTweaks() const -{ - QString metaFileName = absolutePath().append("/meta.ini"); - QSettings metaFile(metaFileName, QSettings::IniFormat); - - std::vector result; - - int numTweaks = metaFile.beginReadArray("INI Tweaks"); - - if (numTweaks != 0) { - qDebug("%d active ini tweaks in %s", - numTweaks, QDir::toNativeSeparators(metaFileName).toUtf8().constData()); - } - - for (int i = 0; i < numTweaks; ++i) { - metaFile.setArrayIndex(i); - QString filename = absolutePath().append("/INI Tweaks/").append(metaFile.value("name").toString()); - result.push_back(filename); - } - metaFile.endArray(); - return result; -} - -std::vector ModInfoBackup::getFlags() const -{ - std::vector result = ModInfoRegular::getFlags(); - result.insert(result.begin(), ModInfo::FLAG_BACKUP); - return result; -} - - -QString ModInfoBackup::getDescription() const -{ - return tr("This is the backup of a mod"); -} - - -ModInfoBackup::ModInfoBackup(const QDir &path, DirectoryEntry **directoryStructure) - : ModInfoRegular(path, directoryStructure) -{ -} - - -ModInfoOverwrite::ModInfoOverwrite() -{ - testValid(); -} - - -bool ModInfoOverwrite::isEmpty() const -{ - QDirIterator iter(absolutePath(), QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); - if (!iter.hasNext()) return true; - iter.next(); - if ((iter.fileName() == "meta.ini") && !iter.hasNext()) return true; - return false; -} - -QString ModInfoOverwrite::absolutePath() const -{ - return QDir::fromNativeSeparators(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::overwritePath())); -} - -std::vector ModInfoOverwrite::getFlags() const -{ - std::vector result; - result.push_back(FLAG_OVERWRITE); - return result; -} - -int ModInfoOverwrite::getHighlight() const -{ - return (isValid() ? HIGHLIGHT_IMPORTANT : HIGHLIGHT_INVALID) | HIGHLIGHT_CENTER; -} - -QString ModInfoOverwrite::getDescription() const -{ - return tr("This pseudo mod contains files from the virtual data tree that got " - "modified (i.e. by the construction kit)"); -} - -QStringList ModInfoOverwrite::archives() const -{ - QStringList result; - QDir dir(this->absolutePath()); - for (const QString &archive : dir.entryList(QStringList("*.bsa"))) { - result.append(this->absolutePath() + "/" + archive); - } - return result; -} - -QString ModInfoForeign::name() const -{ - return m_Name; -} - -QDateTime ModInfoForeign::creationTime() const -{ - return m_CreationTime; -} - -QString ModInfoForeign::absolutePath() const -{ - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"; -} - -std::vector ModInfoForeign::getFlags() const -{ - std::vector result = ModInfoWithConflictInfo::getFlags(); - result.push_back(FLAG_FOREIGN); - - return result; -} - -int ModInfoForeign::getHighlight() const -{ - return 0; -} - -QString ModInfoForeign::getDescription() const -{ - return tr("This pseudo mod represents content managed outside MO. It isn't modified by MO."); -} - -ModInfoForeign::ModInfoForeign(const QString &referenceFile, const QStringList &archives, - DirectoryEntry **directoryStructure) - : ModInfoWithConflictInfo(directoryStructure) - , m_ReferenceFile(referenceFile) - , m_Archives(archives) -{ - m_CreationTime = QFileInfo(referenceFile).created(); - m_Name = "Unmanaged: " + QFileInfo(m_ReferenceFile).baseName(); -} diff --git a/src/modinfo.h b/src/modinfo.h index da97b09b..7d305c11 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -20,22 +20,23 @@ along with Mod Organizer. If not, see . #ifndef MODINFO_H #define MODINFO_H -#include "nexusinterface.h" -#include -#include +#include "imodinterface.h" +#include "versioninfo.h" -#include +class QDateTime; +class QDir; #include -#include -#include #include -#include +#include +#include + +#include + #include #include #include -#include -using MOBase::ModRepositoryFileInfo; +namespace MOShared { class DirectoryEntry; } /** * @brief Represents meta information about a single mod. @@ -556,6 +557,16 @@ public: */ virtual void doConflictCheck() const {} + /** + * @brief set the URL for a mod + */ + virtual void setURL(QString const &) {} + + /** + * @returns the URL for a mod + */ + virtual QString getURL() const { return ""; } + signals: /** @@ -596,536 +607,4 @@ private: }; -class ModInfoWithConflictInfo : public ModInfo -{ - -public: - - ModInfoWithConflictInfo(MOShared::DirectoryEntry **directoryStructure); - - std::vector getFlags() const; - - /** - * @brief clear all caches held for this mod - */ - virtual void clearCaches(); - - virtual std::set getModOverwrite() { return m_OverwriteList; } - - virtual std::set getModOverwritten() { return m_OverwrittenList; } - - virtual void doConflictCheck() const; - -private: - - enum EConflictType { - CONFLICT_NONE, - CONFLICT_OVERWRITE, - CONFLICT_OVERWRITTEN, - CONFLICT_MIXED, - CONFLICT_REDUNDANT - }; - -private: - - /** - * @return true if there is a conflict for files in this mod - */ - EConflictType isConflicted() const; - - /** - * @return true if this mod is completely replaced by others - */ - bool isRedundant() const; - -private: - - MOShared::DirectoryEntry **m_DirectoryStructure; - - mutable EConflictType m_CurrentConflictState; - mutable QTime m_LastConflictCheck; - - mutable std::set m_OverwriteList; // indices of mods overritten by this mod - mutable std::set m_OverwrittenList; // indices of mods overwriting this mod - -}; - - -/** - * @brief Represents meta information about a single mod. - * - * Represents meta information about a single mod. The class interface is used - * to manage the mod collection - * - **/ -class ModInfoRegular : public ModInfoWithConflictInfo -{ - - Q_OBJECT - - friend class ModInfo; - -public: - - ~ModInfoRegular(); - - virtual bool isRegular() const { return true; } - - virtual bool isEmpty() const; - - /** - * @brief test if there is a newer version of the mod - * - * test if there is a newer version of the mod. This does NOT cause - * information to be retrieved from the nexus, it will only test version information already - * available locally. Use checkAllForUpdate() to update this version information - * - * @return true if there is a newer version - **/ - bool updateAvailable() const; - - /** - * @return true if the current update is being ignored - */ - virtual bool updateIgnored() const { return m_IgnoredVersion == m_NewestVersion; } - - /** - * @brief test if there is a newer version of the mod - * - * test if there is a newer version of the mod. This does NOT cause - * information to be retrieved from the nexus, it will only test version information already - * available locally. Use checkAllForUpdate() to update this version information - * - * @return true if there is a newer version - **/ - bool downgradeAvailable() const; - - /** - * @brief request an update of nexus description for this mod. - * - * This requests mod information from the nexus. This is an asynchronous request, - * so there is no immediate effect of this call. - * - * @return returns true if information for this mod will be updated, false if there is no nexus mod id to use - **/ - bool updateNXMInfo(); - - /** - * @brief assign or unassign the specified category - * - * Every mod can have an arbitrary number of categories assigned to it - * - * @param categoryID id of the category to set - * @param active determines wheter the category is assigned or unassigned - * @note this function does not test whether categoryID actually identifies a valid category - **/ - void setCategory(int categoryID, bool active); - - /** - * @brief set the name of this mod - * - * set the name of this mod. This will also update the name of the - * directory that contains this mod - * - * @param name new name of the mod - * @return true on success, false if the new name can't be used (i.e. because the new - * directory name wouldn't be valid) - **/ - bool setName(const QString &name); - - /** - * @brief change the notes (manually set information) for this mod - * @param notes new notes - */ - void setNotes(const QString ¬es); - - /** - * @brief set/change the nexus mod id of this mod - * - * @param modID the nexus mod id - **/ - void setNexusID(int modID); - - /** - * @brief set the version of this mod - * - * this can be used to overwrite the version of a mod without actually - * updating the mod - * - * @param version the new version to use - **/ - void setVersion(const MOBase::VersionInfo &version); - - /** - * @brief set the newest version of this mod on the nexus - * - * this can be used to overwrite the version of a mod without actually - * updating the mod - * - * @param version the new version to use - * @todo this function should be made obsolete. All queries for mod information should go through - * this class so no public function for this change is required - **/ - void setNewestVersion(const MOBase::VersionInfo &version); - - /** - * @brief changes/updates the nexus description text - * @param description the current description text - */ - virtual void setNexusDescription(const QString &description); - - virtual void setInstallationFile(const QString &fileName); - - /** - * @brief sets the category id from a nexus category id. Conversion to MO id happens internally - * @param categoryID the nexus category id - * @note if a mapping is not possible, the category is set to the default value - */ - virtual void addNexusCategory(int categoryID); - - /** - * @brief sets the new primary category of the mod - * @param categoryID the category to set - */ - virtual void setPrimaryCategory(int categoryID) { m_PrimaryCategory = categoryID; m_MetaInfoChanged = true; } - - /** - * @brief sets the download repository - * @param repository - */ - virtual void setRepository(const QString &repository) { m_Repository = repository; } - - /** - * update the endorsement state for the mod. This only changes the - * buffered state, it does not sync with Nexus - * @param endorsed the new endorsement state - */ - virtual void setIsEndorsed(bool endorsed); - - /** - * set the mod to "i don't intend to endorse". The mod will not show as unendorsed but can still be endorsed - */ - virtual void setNeverEndorse(); - - /** - * @brief delete the mod from the disc. This does not update the global ModInfo structure or indices - * @return true if the mod was successfully removed - **/ - bool remove(); - - /** - * @brief endorse or un-endorse the mod - * @param doEndorse if true, the mod is endorsed, if false, it's un-endorsed. - * @note if doEndorse doesn't differ from the current value, nothing happens. - */ - virtual void endorse(bool doEndorse); - - /** - * @brief getter for the mod name - * - * @return the mod name - **/ - QString name() const { return m_Name; } - - /** - * @brief getter for the mod path - * - * @return the (absolute) path to the mod - **/ - QString absolutePath() const; - - /** - * @brief getter for the newest version number of this mod - * - * @return newest version of the mod - **/ - MOBase::VersionInfo getNewestVersion() const { return m_NewestVersion; } - - /** - * @brief ignore the newest version for updates - */ - void ignoreUpdate(bool ignore); - - /** - * @brief getter for the installation file - * - * @return file used to install this mod from - */ - virtual QString getInstallationFile() const { return m_InstallationFile; } - /** - * @brief getter for the nexus mod id - * - * @return the nexus mod id. may be 0 if the mod id isn't known or doesn't exist - **/ - int getNexusID() const { return m_NexusID; } - - /** - * @return the fixed priority of mods of this type or INT_MIN if the priority of mods - * needs to be user-modifiable - */ - virtual int getFixedPriority() const { return INT_MIN; } - - /** - * @return true if the mod can be updated - */ - virtual bool canBeUpdated() const { return m_NexusID > 0; } - - /** - * @return true if the mod can be enabled/disabled - */ - virtual bool canBeEnabled() const { return true; } - - /** - * @return a list of flags for this mod - */ - virtual std::vector getFlags() const; - - virtual std::vector getContents() const; - - /** - * @return an indicator if and how this mod should be highlighted by the UI - */ - virtual int getHighlight() const; - - /** - * @return list of names of ini tweaks - **/ - std::vector getIniTweaks() const; - - /** - * @return a description about the mod, to be displayed in the ui - */ - virtual QString getDescription() const; - - /** - * @return manually set notes for this mod - */ - virtual QString notes() const; - - /** - * @return time this mod was created (file time of the directory) - */ - virtual QDateTime creationTime() const; - - /** - * @return nexus description of the mod (html) - */ - QString getNexusDescription() const; - - /** - * @return repository from which the file was downloaded - */ - virtual QString repository() const; - - /** - * @return true if the file has been endorsed on nexus - */ - virtual EEndorsedState endorsedState() const; - - /** - * @return last time nexus was queried for infos on this mod - */ - virtual QDateTime getLastNexusQuery() const; - - virtual QStringList archives() const; - - virtual void addInstalledFile(int modId, int fileId); - - /** - * @brief stores meta information back to disk - */ - virtual void saveMeta(); - - void readMeta(); - -private: - - void setEndorsedState(EEndorsedState endorsedState); - -private slots: - - void nxmDescriptionAvailable(int modID, QVariant userData, QVariant resultData); - void nxmEndorsementToggled(int, QVariant userData, QVariant resultData); - void nxmRequestFailed(int modID, int fileID, QVariant userData, const QString &errorMessage); - -protected: - - ModInfoRegular(const QDir &path, MOShared::DirectoryEntry **directoryStructure); - -private: - - QString m_Name; - QString m_Path; - QString m_InstallationFile; - QString m_Notes; - QString m_NexusDescription; - QString m_Repository; - - QDateTime m_CreationTime; - QDateTime m_LastNexusQuery; - - int m_NexusID; - std::set> m_InstalledFileIDs; - - bool m_MetaInfoChanged; - MOBase::VersionInfo m_NewestVersion; - MOBase::VersionInfo m_IgnoredVersion; - - EEndorsedState m_EndorsedState; - - NexusBridge m_NexusBridge; - - mutable std::vector m_CachedContent; - mutable QTime m_LastContentCheck; - -}; - - -class ModInfoBackup : public ModInfoRegular -{ - - friend class ModInfo; - -public: - - virtual bool updateAvailable() const { return false; } - virtual bool updateIgnored() const { return false; } - virtual bool downgradeAvailable() const { return false; } - virtual bool updateNXMInfo() { return false; } - virtual void setNexusID(int) {} - virtual void endorse(bool) {} - virtual int getFixedPriority() const { return -1; } - virtual void ignoreUpdate(bool) {} - virtual bool canBeUpdated() const { return false; } - virtual bool canBeEnabled() const { return false; } - virtual std::vector getIniTweaks() const { return std::vector(); } - virtual std::vector getFlags() const; - virtual QString getDescription() const; - virtual QDateTime getLastNexusQuery() const { return QDateTime(); } - virtual void getNexusFiles(QList::const_iterator&, - QList::const_iterator&) {} - virtual QString getNexusDescription() const { return QString(); } - - virtual void addInstalledFile(int, int) {} - -private: - - ModInfoBackup(const QDir &path, MOShared::DirectoryEntry **directoryStructure); - -}; - - -class ModInfoOverwrite : public ModInfo -{ - - Q_OBJECT - - friend class ModInfo; - -public: - - virtual bool updateAvailable() const { return false; } - virtual bool updateIgnored() const { return false; } - virtual bool downgradeAvailable() const { return false; } - virtual bool updateNXMInfo() { return false; } - virtual void setCategory(int, bool) {} - virtual bool setName(const QString&) { return false; } - virtual void setNotes(const QString&) {} - virtual void setNexusID(int) {} - virtual void setNewestVersion(const MOBase::VersionInfo&) {} - virtual void ignoreUpdate(bool) {} - virtual void setNexusDescription(const QString&) {} - virtual void setInstallationFile(const QString&) {} - virtual void addNexusCategory(int) {} - virtual void setIsEndorsed(bool) {} - virtual void setNeverEndorse() {} - virtual bool remove() { return false; } - virtual void endorse(bool) {} - virtual bool alwaysEnabled() const { return true; } - virtual bool isEmpty() const; - virtual QString name() const { return "Overwrite"; } - virtual QString notes() const { return ""; } - virtual QDateTime creationTime() const { return QDateTime(); } - virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } - virtual QString getInstallationFile() const { return ""; } - virtual int getFixedPriority() const { return INT_MAX; } - virtual int getNexusID() const { return -1; } - virtual std::vector getIniTweaks() const { return std::vector(); } - virtual std::vector getFlags() const; - virtual int getHighlight() const; - virtual QString getDescription() const; - virtual QDateTime getLastNexusQuery() const { return QDateTime(); } - virtual QString getNexusDescription() const { return QString(); } - virtual QStringList archives() const; - virtual void addInstalledFile(int, int) {} - -private: - - ModInfoOverwrite(); - -}; - - -class ModInfoForeign : public ModInfoWithConflictInfo -{ - - Q_OBJECT - - friend class ModInfo; - -public: - - virtual bool updateAvailable() const { return false; } - virtual bool updateIgnored() const { return false; } - virtual bool downgradeAvailable() const { return false; } - virtual bool updateNXMInfo() { return false; } - virtual void setCategory(int, bool) {} - virtual bool setName(const QString&) { return false; } - virtual void setNotes(const QString&) {} - virtual void setNexusID(int) {} - virtual void setNewestVersion(const MOBase::VersionInfo&) {} - virtual void ignoreUpdate(bool) {} - virtual void setNexusDescription(const QString&) {} - virtual void setInstallationFile(const QString&) {} - virtual void addNexusCategory(int) {} - virtual void setIsEndorsed(bool) {} - virtual void setNeverEndorse() {} - virtual bool remove() { return false; } - virtual void endorse(bool) {} - virtual bool isEmpty() const { return false; } - virtual QString name() const; - virtual QString internalName() const { return name(); } - virtual QString notes() const { return ""; } - virtual QDateTime creationTime() const; - virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } - virtual QString getInstallationFile() const { return ""; } - virtual int getNexusID() const { return -1; } - virtual std::vector getIniTweaks() const { return std::vector(); } - virtual std::vector getFlags() const; - virtual int getHighlight() const; - virtual QString getDescription() const; - virtual QDateTime getLastNexusQuery() const { return QDateTime(); } - virtual QString getNexusDescription() const { return QString(); } - virtual int getFixedPriority() const { return INT_MIN; } - virtual QStringList archives() const { return m_Archives; } - virtual QStringList stealFiles() const { return m_Archives + QStringList(m_ReferenceFile); } - virtual bool alwaysEnabled() const { return true; } - virtual void addInstalledFile(int, int) {} - -protected: - - ModInfoForeign(const QString &referenceFile, const QStringList &archives, MOShared::DirectoryEntry **directoryStructure); - -private: - - QString m_Name; - QString m_ReferenceFile; - QStringList m_Archives; - QDateTime m_CreationTime; - int m_Priority; - -}; - #endif // MODINFO_H diff --git a/src/modinfobackup.cpp b/src/modinfobackup.cpp new file mode 100644 index 00000000..a57b84fe --- /dev/null +++ b/src/modinfobackup.cpp @@ -0,0 +1,20 @@ +#include "modinfobackup.h" + +std::vector ModInfoBackup::getFlags() const +{ + std::vector result = ModInfoRegular::getFlags(); + result.insert(result.begin(), ModInfo::FLAG_BACKUP); + return result; +} + + +QString ModInfoBackup::getDescription() const +{ + return tr("This is the backup of a mod"); +} + + +ModInfoBackup::ModInfoBackup(const QDir &path, MOShared::DirectoryEntry **directoryStructure) + : ModInfoRegular(path, directoryStructure) +{ +} diff --git a/src/modinfobackup.h b/src/modinfobackup.h new file mode 100644 index 00000000..adbac783 --- /dev/null +++ b/src/modinfobackup.h @@ -0,0 +1,40 @@ +#ifndef MODINFOBACKUP_H +#define MODINFOBACKUP_H + +#include "modinforegular.h" + +class ModInfoBackup : public ModInfoRegular +{ + + friend class ModInfo; + +public: + + virtual bool updateAvailable() const { return false; } + virtual bool updateIgnored() const { return false; } + virtual bool downgradeAvailable() const { return false; } + virtual bool updateNXMInfo() { return false; } + virtual void setNexusID(int) {} + virtual void endorse(bool) {} + virtual int getFixedPriority() const { return -1; } + virtual void ignoreUpdate(bool) {} + virtual bool canBeUpdated() const { return false; } + virtual bool canBeEnabled() const { return false; } + virtual std::vector getIniTweaks() const { return std::vector(); } + virtual std::vector getFlags() const; + virtual QString getDescription() const; + virtual QDateTime getLastNexusQuery() const { return QDateTime(); } + virtual void getNexusFiles(QList::const_iterator&, + QList::const_iterator&) {} + virtual QString getNexusDescription() const { return QString(); } + + virtual void addInstalledFile(int, int) {} + +private: + + ModInfoBackup(const QDir &path, MOShared::DirectoryEntry **directoryStructure); + +}; + + +#endif // MODINFOBACKUP_H diff --git a/src/modinfoforeign.cpp b/src/modinfoforeign.cpp new file mode 100644 index 00000000..c0e769c9 --- /dev/null +++ b/src/modinfoforeign.cpp @@ -0,0 +1,50 @@ +#include "modinfoforeign.h" + +#include "gameinfo.h" +#include "utility.h" + +using namespace MOBase; +using namespace MOShared; + +QString ModInfoForeign::name() const +{ + return m_Name; +} + +QDateTime ModInfoForeign::creationTime() const +{ + return m_CreationTime; +} + +QString ModInfoForeign::absolutePath() const +{ + return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"; +} + +std::vector ModInfoForeign::getFlags() const +{ + std::vector result = ModInfoWithConflictInfo::getFlags(); + result.push_back(FLAG_FOREIGN); + + return result; +} + +int ModInfoForeign::getHighlight() const +{ + return 0; +} + +QString ModInfoForeign::getDescription() const +{ + return tr("This pseudo mod represents content managed outside MO. It isn't modified by MO."); +} + +ModInfoForeign::ModInfoForeign(const QString &referenceFile, const QStringList &archives, + DirectoryEntry **directoryStructure) + : ModInfoWithConflictInfo(directoryStructure) + , m_ReferenceFile(referenceFile) + , m_Archives(archives) +{ + m_CreationTime = QFileInfo(referenceFile).created(); + m_Name = "Unmanaged: " + QFileInfo(m_ReferenceFile).baseName(); +} diff --git a/src/modinfoforeign.h b/src/modinfoforeign.h new file mode 100644 index 00000000..b8ff2671 --- /dev/null +++ b/src/modinfoforeign.h @@ -0,0 +1,67 @@ +#ifndef MODINFOFOREIGN_H +#define MODINFOFOREIGN_H + +#include "modinfowithconflictinfo.h" + +class ModInfoForeign : public ModInfoWithConflictInfo +{ + + Q_OBJECT + + friend class ModInfo; + +public: + + virtual bool updateAvailable() const { return false; } + virtual bool updateIgnored() const { return false; } + virtual bool downgradeAvailable() const { return false; } + virtual bool updateNXMInfo() { return false; } + virtual void setCategory(int, bool) {} + virtual bool setName(const QString&) { return false; } + virtual void setNotes(const QString&) {} + virtual void setNexusID(int) {} + virtual void setNewestVersion(const MOBase::VersionInfo&) {} + virtual void ignoreUpdate(bool) {} + virtual void setNexusDescription(const QString&) {} + virtual void setInstallationFile(const QString&) {} + virtual void addNexusCategory(int) {} + virtual void setIsEndorsed(bool) {} + virtual void setNeverEndorse() {} + virtual bool remove() { return false; } + virtual void endorse(bool) {} + virtual bool isEmpty() const { return false; } + virtual QString name() const; + virtual QString internalName() const { return name(); } + virtual QString notes() const { return ""; } + virtual QDateTime creationTime() const; + virtual QString absolutePath() const; + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual QString getInstallationFile() const { return ""; } + virtual int getNexusID() const { return -1; } + virtual std::vector getIniTweaks() const { return std::vector(); } + virtual std::vector getFlags() const; + virtual int getHighlight() const; + virtual QString getDescription() const; + virtual QDateTime getLastNexusQuery() const { return QDateTime(); } + virtual QString getNexusDescription() const { return QString(); } + virtual int getFixedPriority() const { return INT_MIN; } + virtual QStringList archives() const { return m_Archives; } + virtual QStringList stealFiles() const { return m_Archives + QStringList(m_ReferenceFile); } + virtual bool alwaysEnabled() const { return true; } + virtual void addInstalledFile(int, int) {} + +protected: + + ModInfoForeign(const QString &referenceFile, const QStringList &archives, MOShared::DirectoryEntry **directoryStructure); + +private: + + QString m_Name; + QString m_ReferenceFile; + QStringList m_Archives; + QDateTime m_CreationTime; + int m_Priority; + +}; + +#endif // MODINFOFOREIGN_H diff --git a/src/modinfooverwrite.cpp b/src/modinfooverwrite.cpp new file mode 100644 index 00000000..4380a255 --- /dev/null +++ b/src/modinfooverwrite.cpp @@ -0,0 +1,53 @@ +#include "modinfooverwrite.h" + +#include "appconfig.h" + +#include +#include + +ModInfoOverwrite::ModInfoOverwrite() +{ + testValid(); +} + +bool ModInfoOverwrite::isEmpty() const +{ + QDirIterator iter(absolutePath(), QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); + if (!iter.hasNext()) return true; + iter.next(); + if ((iter.fileName() == "meta.ini") && !iter.hasNext()) return true; + return false; +} + +QString ModInfoOverwrite::absolutePath() const +{ + return QDir::fromNativeSeparators(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::overwritePath())); +} + +std::vector ModInfoOverwrite::getFlags() const +{ + std::vector result; + result.push_back(FLAG_OVERWRITE); + return result; +} + +int ModInfoOverwrite::getHighlight() const +{ + return (isValid() ? HIGHLIGHT_IMPORTANT : HIGHLIGHT_INVALID) | HIGHLIGHT_CENTER; +} + +QString ModInfoOverwrite::getDescription() const +{ + return tr("This pseudo mod contains files from the virtual data tree that got " + "modified (i.e. by the construction kit)"); +} + +QStringList ModInfoOverwrite::archives() const +{ + QStringList result; + QDir dir(this->absolutePath()); + for (const QString &archive : dir.entryList(QStringList("*.bsa"))) { + result.append(this->absolutePath() + "/" + archive); + } + return result; +} diff --git a/src/modinfooverwrite.h b/src/modinfooverwrite.h new file mode 100644 index 00000000..9184a90c --- /dev/null +++ b/src/modinfooverwrite.h @@ -0,0 +1,59 @@ +#ifndef MODINFOOVERWRITE_H +#define MODINFOOVERWRITE_H + +#include "modinfo.h" + +#include + +class ModInfoOverwrite : public ModInfo +{ + + Q_OBJECT + + friend class ModInfo; + +public: + + virtual bool updateAvailable() const { return false; } + virtual bool updateIgnored() const { return false; } + virtual bool downgradeAvailable() const { return false; } + virtual bool updateNXMInfo() { return false; } + virtual void setCategory(int, bool) {} + virtual bool setName(const QString&) { return false; } + virtual void setNotes(const QString&) {} + virtual void setNexusID(int) {} + virtual void setNewestVersion(const MOBase::VersionInfo&) {} + virtual void ignoreUpdate(bool) {} + virtual void setNexusDescription(const QString&) {} + virtual void setInstallationFile(const QString&) {} + virtual void addNexusCategory(int) {} + virtual void setIsEndorsed(bool) {} + virtual void setNeverEndorse() {} + virtual bool remove() { return false; } + virtual void endorse(bool) {} + virtual bool alwaysEnabled() const { return true; } + virtual bool isEmpty() const; + virtual QString name() const { return "Overwrite"; } + virtual QString notes() const { return ""; } + virtual QDateTime creationTime() const { return QDateTime(); } + virtual QString absolutePath() const; + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual QString getInstallationFile() const { return ""; } + virtual int getFixedPriority() const { return INT_MAX; } + virtual int getNexusID() const { return -1; } + virtual std::vector getIniTweaks() const { return std::vector(); } + virtual std::vector getFlags() const; + virtual int getHighlight() const; + virtual QString getDescription() const; + virtual QDateTime getLastNexusQuery() const { return QDateTime(); } + virtual QString getNexusDescription() const { return QString(); } + virtual QStringList archives() const; + virtual void addInstalledFile(int, int) {} + +private: + + ModInfoOverwrite(); + +}; + +#endif // MODINFOOVERWRITE_H diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp new file mode 100644 index 00000000..b1f73a37 --- /dev/null +++ b/src/modinforegular.cpp @@ -0,0 +1,571 @@ +#include "modinforegular.h" + +#include "categories.h" +#include "iplugingame.h" +#include "messagedialog.h" +#include "report.h" +#include "scriptextender.h" + +#include +#include +#include + +#include + +using namespace MOBase; +using namespace MOShared; + +namespace { + //Arguably this should be a class static or we should be using FileString rather + //than QString for the names. Or both. + static bool ByName(const ModInfo::Ptr &LHS, const ModInfo::Ptr &RHS) + { + return QString::compare(LHS->name(), RHS->name(), Qt::CaseInsensitive) < 0; + } +} + +ModInfoRegular::ModInfoRegular(const QDir &path, DirectoryEntry **directoryStructure) + : ModInfoWithConflictInfo(directoryStructure) + , m_Name(path.dirName()) + , m_Path(path.absolutePath()) + , m_Repository() + , m_MetaInfoChanged(false) + , m_EndorsedState(ENDORSED_UNKNOWN) + , m_NexusBridge() +{ + testValid(); + m_CreationTime = QFileInfo(path.absolutePath()).created(); + // read out the meta-file for information + readMeta(); + + connect(&m_NexusBridge, SIGNAL(descriptionAvailable(int,QVariant,QVariant)) + , this, SLOT(nxmDescriptionAvailable(int,QVariant,QVariant))); + connect(&m_NexusBridge, SIGNAL(endorsementToggled(int,QVariant,QVariant)) + , this, SLOT(nxmEndorsementToggled(int,QVariant,QVariant))); + connect(&m_NexusBridge, SIGNAL(requestFailed(int,int,QVariant,QString)) + , this, SLOT(nxmRequestFailed(int,int,QVariant,QString))); +} + + +ModInfoRegular::~ModInfoRegular() +{ + try { + saveMeta(); + } catch (const std::exception &e) { + qCritical("failed to save meta information for \"%s\": %s", + m_Name.toUtf8().constData(), e.what()); + } +} + +bool ModInfoRegular::isEmpty() const +{ + QDirIterator iter(m_Path, QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs); + if (!iter.hasNext()) return true; + iter.next(); + if ((iter.fileName() == "meta.ini") && !iter.hasNext()) return true; + return false; +} + + +void ModInfoRegular::readMeta() +{ + QSettings metaFile(m_Path + "/meta.ini", QSettings::IniFormat); + m_Notes = metaFile.value("notes", "").toString(); + m_NexusID = metaFile.value("modid", -1).toInt(); + m_Version.parse(metaFile.value("version", "").toString()); + m_NewestVersion = metaFile.value("newestVersion", "").toString(); + m_IgnoredVersion = metaFile.value("ignoredVersion", "").toString(); + m_InstallationFile = metaFile.value("installationFile", "").toString(); + m_NexusDescription = metaFile.value("nexusDescription", "").toString(); + m_Repository = metaFile.value("repository", "Nexus").toString(); + m_URL = metaFile.value("url", "").toString(); + m_LastNexusQuery = QDateTime::fromString(metaFile.value("lastNexusQuery", "").toString(), Qt::ISODate); + if (metaFile.contains("endorsed")) { + if (metaFile.value("endorsed").canConvert()) { + switch (metaFile.value("endorsed").toInt()) { + case ENDORSED_FALSE: m_EndorsedState = ENDORSED_FALSE; break; + case ENDORSED_TRUE: m_EndorsedState = ENDORSED_TRUE; break; + case ENDORSED_NEVER: m_EndorsedState = ENDORSED_NEVER; break; + default: m_EndorsedState = ENDORSED_UNKNOWN; break; + } + } else { + m_EndorsedState = metaFile.value("endorsed", false).toBool() ? ENDORSED_TRUE : ENDORSED_FALSE; + } + } + + QString categoriesString = metaFile.value("category", "").toString(); + + QStringList categories = categoriesString.split(',', QString::SkipEmptyParts); + for (QStringList::iterator iter = categories.begin(); iter != categories.end(); ++iter) { + bool ok = false; + int categoryID = iter->toInt(&ok); + if (categoryID < 0) { + // ignore invalid id + continue; + } + if (ok && (categoryID != 0) && (CategoryFactory::instance().categoryExists(categoryID))) { + m_Categories.insert(categoryID); + if (iter == categories.begin()) { + m_PrimaryCategory = categoryID; + } + } + } + + int numFiles = metaFile.beginReadArray("installedFiles"); + for (int i = 0; i < numFiles; ++i) { + metaFile.setArrayIndex(i); + m_InstalledFileIDs.insert(std::make_pair(metaFile.value("modid").toInt(), metaFile.value("fileid").toInt())); + } + metaFile.endArray(); + + m_MetaInfoChanged = false; +} + +void ModInfoRegular::saveMeta() +{ + // only write meta data if the mod directory exists + if (m_MetaInfoChanged && QFile::exists(absolutePath())) { + QSettings metaFile(absolutePath().append("/meta.ini"), QSettings::IniFormat); + if (metaFile.status() == QSettings::NoError) { + std::set temp = m_Categories; + temp.erase(m_PrimaryCategory); + metaFile.setValue("category", QString("%1").arg(m_PrimaryCategory) + "," + SetJoin(temp, ",")); + metaFile.setValue("newestVersion", m_NewestVersion.canonicalString()); + metaFile.setValue("ignoredVersion", m_IgnoredVersion.canonicalString()); + metaFile.setValue("version", m_Version.canonicalString()); + metaFile.setValue("installationFile", m_InstallationFile); + metaFile.setValue("repository", m_Repository); + metaFile.setValue("modid", m_NexusID); + metaFile.setValue("notes", m_Notes); + metaFile.setValue("nexusDescription", m_NexusDescription); + metaFile.setValue("url", m_URL); + metaFile.setValue("lastNexusQuery", m_LastNexusQuery.toString(Qt::ISODate)); + if (m_EndorsedState != ENDORSED_UNKNOWN) { + metaFile.setValue("endorsed", m_EndorsedState); + } + + metaFile.beginWriteArray("installedFiles"); + int idx = 0; + for (auto iter = m_InstalledFileIDs.begin(); iter != m_InstalledFileIDs.end(); ++iter) { + metaFile.setArrayIndex(idx++); + metaFile.setValue("modid", iter->first); + metaFile.setValue("fileid", iter->second); + } + metaFile.endArray(); + + metaFile.sync(); // sync needs to be called to ensure the file is created + + if (metaFile.status() == QSettings::NoError) { + m_MetaInfoChanged = false; + } else { + reportError(tr("failed to write %1/meta.ini: error %2").arg(absolutePath()).arg(metaFile.status())); + } + } else { + reportError(tr("failed to write %1/meta.ini: error %2").arg(absolutePath()).arg(metaFile.status())); + } + } +} + + +bool ModInfoRegular::updateAvailable() const +{ + if (m_IgnoredVersion.isValid() && (m_IgnoredVersion == m_NewestVersion)) { + return false; + } + return m_NewestVersion.isValid() && (m_Version < m_NewestVersion); +} + + +bool ModInfoRegular::downgradeAvailable() const +{ + if (m_IgnoredVersion.isValid() && (m_IgnoredVersion == m_NewestVersion)) { + return false; + } + return m_NewestVersion.isValid() && (m_NewestVersion < m_Version); +} + + +void ModInfoRegular::nxmDescriptionAvailable(int, QVariant, QVariant resultData) +{ + QVariantMap result = resultData.toMap(); + setNewestVersion(VersionInfo(result["version"].toString())); + setNexusDescription(result["description"].toString()); + + if ((m_EndorsedState != ENDORSED_NEVER) && (result.contains("voted_by_user"))) { + setEndorsedState(result["voted_by_user"].toBool() ? ENDORSED_TRUE : ENDORSED_FALSE); + } + m_LastNexusQuery = QDateTime::currentDateTime(); + //m_MetaInfoChanged = true; + saveMeta(); + emit modDetailsUpdated(true); +} + + +void ModInfoRegular::nxmEndorsementToggled(int, QVariant, QVariant resultData) +{ + m_EndorsedState = resultData.toBool() ? ENDORSED_TRUE : ENDORSED_FALSE; + m_MetaInfoChanged = true; + saveMeta(); + emit modDetailsUpdated(true); +} + + +void ModInfoRegular::nxmRequestFailed(int, int, QVariant userData, const QString &errorMessage) +{ + QString fullMessage = errorMessage; + if (userData.canConvert() && (userData.toInt() == 1)) { + fullMessage += "\nNexus will reject endorsements within 15 Minutes of a failed attempt, the error message may be misleading."; + } + if (QApplication::activeWindow() != nullptr) { + MessageDialog::showMessage(fullMessage, QApplication::activeWindow()); + } + emit modDetailsUpdated(false); +} + + +bool ModInfoRegular::updateNXMInfo() +{ + if (m_NexusID > 0) { + m_NexusBridge.requestDescription(m_NexusID, QVariant()); + return true; + } + return false; +} + + +void ModInfoRegular::setCategory(int categoryID, bool active) +{ + m_MetaInfoChanged = true; + + if (active) { + m_Categories.insert(categoryID); + if (m_PrimaryCategory == -1) { + m_PrimaryCategory = categoryID; + } + } else { + std::set::iterator iter = m_Categories.find(categoryID); + if (iter != m_Categories.end()) { + m_Categories.erase(iter); + } + if (categoryID == m_PrimaryCategory) { + if (m_Categories.size() == 0) { + m_PrimaryCategory = -1; + } else { + m_PrimaryCategory = *(m_Categories.begin()); + } + } + } +} + + +bool ModInfoRegular::setName(const QString &name) +{ + if (name.contains('/') || name.contains('\\')) { + return false; + } + + QString newPath = m_Path.mid(0).replace(m_Path.length() - m_Name.length(), m_Name.length(), name); + QDir modDir(m_Path.mid(0, m_Path.length() - m_Name.length())); + + if (m_Name.compare(name, Qt::CaseInsensitive) == 0) { + QString tempName = name; + tempName.append("_temp"); + while (modDir.exists(tempName)) { + tempName.append("_"); + } + if (!modDir.rename(m_Name, tempName)) { + return false; + } + if (!modDir.rename(tempName, name)) { + qCritical("rename to final name failed after successful rename to intermediate name"); + modDir.rename(tempName, m_Name); + return false; + } + } else { + if (!shellRename(modDir.absoluteFilePath(m_Name), modDir.absoluteFilePath(name))) { + qCritical("failed to rename mod %s (errorcode %d)", + qPrintable(name), ::GetLastError()); + return false; + } + } + + std::map::iterator nameIter = s_ModsByName.find(m_Name); + if (nameIter != s_ModsByName.end()) { + unsigned int index = nameIter->second; + s_ModsByName.erase(nameIter); + + m_Name = name; + m_Path = newPath; + + s_ModsByName[m_Name] = index; + + std::sort(s_Collection.begin(), s_Collection.end(), ByName); + updateIndices(); + } else { // otherwise mod isn't registered yet? + m_Name = name; + m_Path = newPath; + } + + return true; +} + +void ModInfoRegular::setNotes(const QString ¬es) +{ + m_Notes = notes; + m_MetaInfoChanged = true; +} + +void ModInfoRegular::setNexusID(int modID) +{ + m_NexusID = modID; + m_MetaInfoChanged = true; +} + +void ModInfoRegular::setVersion(const VersionInfo &version) +{ + m_Version = version; + m_MetaInfoChanged = true; +} + +void ModInfoRegular::setNewestVersion(const VersionInfo &version) +{ + if (version != m_NewestVersion) { + m_NewestVersion = version; + m_MetaInfoChanged = true; + } +} + +void ModInfoRegular::setNexusDescription(const QString &description) +{ + if (qHash(description) != qHash(m_NexusDescription)) { + m_NexusDescription = description; + m_MetaInfoChanged = true; + } +} + +void ModInfoRegular::setEndorsedState(EEndorsedState endorsedState) +{ + if (endorsedState != m_EndorsedState) { + m_EndorsedState = endorsedState; + m_MetaInfoChanged = true; + } +} + +void ModInfoRegular::setInstallationFile(const QString &fileName) +{ + m_InstallationFile = fileName; + m_MetaInfoChanged = true; +} + +void ModInfoRegular::addNexusCategory(int categoryID) +{ + m_Categories.insert(CategoryFactory::instance().resolveNexusID(categoryID)); +} + +void ModInfoRegular::setIsEndorsed(bool endorsed) +{ + if (m_EndorsedState != ENDORSED_NEVER) { + m_EndorsedState = endorsed ? ENDORSED_TRUE : ENDORSED_FALSE; + m_MetaInfoChanged = true; + } +} + + +void ModInfoRegular::setNeverEndorse() +{ + m_EndorsedState = ENDORSED_NEVER; + m_MetaInfoChanged = true; +} + + +bool ModInfoRegular::remove() +{ + m_MetaInfoChanged = false; + return shellDelete(QStringList(absolutePath()), true); +} + +void ModInfoRegular::endorse(bool doEndorse) +{ + if (doEndorse != (m_EndorsedState == ENDORSED_TRUE)) { + m_NexusBridge.requestToggleEndorsement(getNexusID(), doEndorse, QVariant(1)); + } +} + + +QString ModInfoRegular::absolutePath() const +{ + return m_Path; +} + +void ModInfoRegular::ignoreUpdate(bool ignore) +{ + if (ignore) { + m_IgnoredVersion = m_NewestVersion; + } else { + m_IgnoredVersion.clear(); + } + m_MetaInfoChanged = true; +} + + +std::vector ModInfoRegular::getFlags() const +{ + std::vector result = ModInfoWithConflictInfo::getFlags(); + if ((m_NexusID > 0) && (endorsedState() == ENDORSED_FALSE)) { + result.push_back(ModInfo::FLAG_NOTENDORSED); + } + if (!isValid()) { + result.push_back(ModInfo::FLAG_INVALID); + } + if (m_Notes.length() != 0) { + result.push_back(ModInfo::FLAG_NOTES); + } + return result; +} + + +std::vector ModInfoRegular::getContents() const +{ + QTime now = QTime::currentTime(); + if (m_LastContentCheck.isNull() || (m_LastContentCheck.secsTo(now) > 60)) { + m_CachedContent.clear(); + QDir dir(absolutePath()); + if (dir.entryList(QStringList() << "*.esp" << "*.esm").size() > 0) { + m_CachedContent.push_back(CONTENT_PLUGIN); + } + if (dir.entryList(QStringList() << "*.bsa").size() > 0) { + m_CachedContent.push_back(CONTENT_BSA); + } + + ScriptExtender *extender = qApp->property("managed_game").value()->feature(); + + if (extender != nullptr) { + QString sePluginPath = extender->name() + "/plugins"; + if (dir.exists(sePluginPath)) m_CachedContent.push_back(CONTENT_SKSE); + } + if (dir.exists("textures")) m_CachedContent.push_back(CONTENT_TEXTURE); + if (dir.exists("meshes")) m_CachedContent.push_back(CONTENT_MESH); + if (dir.exists("interface") + || dir.exists("menus")) m_CachedContent.push_back(CONTENT_INTERFACE); + if (dir.exists("music")) m_CachedContent.push_back(CONTENT_MUSIC); + if (dir.exists("sound")) m_CachedContent.push_back(CONTENT_SOUND); + if (dir.exists("scripts")) m_CachedContent.push_back(CONTENT_SCRIPT); + if (dir.exists("strings")) m_CachedContent.push_back(CONTENT_STRING); + if (dir.exists("SkyProc Patchers")) m_CachedContent.push_back(CONTENT_SKYPROC); + + m_LastContentCheck = QTime::currentTime(); + } + + return m_CachedContent; + +} + + +int ModInfoRegular::getHighlight() const +{ + return isValid() ? HIGHLIGHT_NONE: HIGHLIGHT_INVALID; +} + + +QString ModInfoRegular::getDescription() const +{ + if (!isValid()) { + return tr("%1 contains no esp/esm and no asset (textures, meshes, interface, ...) directory").arg(name()); + } else { + const std::set &categories = getCategories(); + std::wostringstream categoryString; + categoryString << ToWString(tr("Categories:
")); + CategoryFactory &categoryFactory = CategoryFactory::instance(); + for (std::set::const_iterator catIter = categories.begin(); + catIter != categories.end(); ++catIter) { + if (catIter != categories.begin()) { + categoryString << " , "; + } + categoryString << "" << ToWString(categoryFactory.getCategoryName(categoryFactory.getCategoryIndex(*catIter))) << ""; + } + + return ToQString(categoryString.str()); + } +} + +QString ModInfoRegular::notes() const +{ + return m_Notes; +} + +QDateTime ModInfoRegular::creationTime() const +{ + return m_CreationTime; +} + +QString ModInfoRegular::getNexusDescription() const +{ + return m_NexusDescription; +} + +QString ModInfoRegular::repository() const +{ + return m_Repository; +} + +ModInfoRegular::EEndorsedState ModInfoRegular::endorsedState() const +{ + return m_EndorsedState; +} + +QDateTime ModInfoRegular::getLastNexusQuery() const +{ + return m_LastNexusQuery; +} + +void ModInfoRegular::setURL(QString const &url) +{ + m_URL = url; + m_MetaInfoChanged = true; +} + +QString ModInfoRegular::getURL() const +{ + return m_URL; +} + + + +QStringList ModInfoRegular::archives() const +{ + QStringList result; + QDir dir(this->absolutePath()); + for (const QString &archive : dir.entryList(QStringList("*.bsa"))) { + result.append(this->absolutePath() + "/" + archive); + } + return result; +} + +void ModInfoRegular::addInstalledFile(int modId, int fileId) +{ + m_InstalledFileIDs.insert(std::make_pair(modId, fileId)); + m_MetaInfoChanged = true; +} + +std::vector ModInfoRegular::getIniTweaks() const +{ + QString metaFileName = absolutePath().append("/meta.ini"); + QSettings metaFile(metaFileName, QSettings::IniFormat); + + std::vector result; + + int numTweaks = metaFile.beginReadArray("INI Tweaks"); + + if (numTweaks != 0) { + qDebug("%d active ini tweaks in %s", + numTweaks, QDir::toNativeSeparators(metaFileName).toUtf8().constData()); + } + + for (int i = 0; i < numTweaks; ++i) { + metaFile.setArrayIndex(i); + QString filename = absolutePath().append("/INI Tweaks/").append(metaFile.value("name").toString()); + result.push_back(filename); + } + metaFile.endArray(); + return result; +} diff --git a/src/modinforegular.h b/src/modinforegular.h new file mode 100644 index 00000000..a94d0363 --- /dev/null +++ b/src/modinforegular.h @@ -0,0 +1,349 @@ +#ifndef MODINFOREGULAR_H +#define MODINFOREGULAR_H + +#include "modinfowithconflictinfo.h" + +#include "nexusinterface.h" + +/** + * @brief Represents meta information about a single mod. + * + * Represents meta information about a single mod. The class interface is used + * to manage the mod collection + * + **/ +class ModInfoRegular : public ModInfoWithConflictInfo +{ + + Q_OBJECT + + friend class ModInfo; + +public: + + ~ModInfoRegular(); + + virtual bool isRegular() const { return true; } + + virtual bool isEmpty() const; + + /** + * @brief test if there is a newer version of the mod + * + * test if there is a newer version of the mod. This does NOT cause + * information to be retrieved from the nexus, it will only test version information already + * available locally. Use checkAllForUpdate() to update this version information + * + * @return true if there is a newer version + **/ + bool updateAvailable() const; + + /** + * @return true if the current update is being ignored + */ + virtual bool updateIgnored() const { return m_IgnoredVersion == m_NewestVersion; } + + /** + * @brief test if there is a newer version of the mod + * + * test if there is a newer version of the mod. This does NOT cause + * information to be retrieved from the nexus, it will only test version information already + * available locally. Use checkAllForUpdate() to update this version information + * + * @return true if there is a newer version + **/ + bool downgradeAvailable() const; + + /** + * @brief request an update of nexus description for this mod. + * + * This requests mod information from the nexus. This is an asynchronous request, + * so there is no immediate effect of this call. + * + * @return returns true if information for this mod will be updated, false if there is no nexus mod id to use + **/ + bool updateNXMInfo(); + + /** + * @brief assign or unassign the specified category + * + * Every mod can have an arbitrary number of categories assigned to it + * + * @param categoryID id of the category to set + * @param active determines wheter the category is assigned or unassigned + * @note this function does not test whether categoryID actually identifies a valid category + **/ + void setCategory(int categoryID, bool active); + + /** + * @brief set the name of this mod + * + * set the name of this mod. This will also update the name of the + * directory that contains this mod + * + * @param name new name of the mod + * @return true on success, false if the new name can't be used (i.e. because the new + * directory name wouldn't be valid) + **/ + bool setName(const QString &name); + + /** + * @brief change the notes (manually set information) for this mod + * @param notes new notes + */ + void setNotes(const QString ¬es); + + /** + * @brief set/change the nexus mod id of this mod + * + * @param modID the nexus mod id + **/ + void setNexusID(int modID); + + /** + * @brief set the version of this mod + * + * this can be used to overwrite the version of a mod without actually + * updating the mod + * + * @param version the new version to use + **/ + void setVersion(const MOBase::VersionInfo &version); + + /** + * @brief set the newest version of this mod on the nexus + * + * this can be used to overwrite the version of a mod without actually + * updating the mod + * + * @param version the new version to use + * @todo this function should be made obsolete. All queries for mod information should go through + * this class so no public function for this change is required + **/ + void setNewestVersion(const MOBase::VersionInfo &version); + + /** + * @brief changes/updates the nexus description text + * @param description the current description text + */ + virtual void setNexusDescription(const QString &description); + + virtual void setInstallationFile(const QString &fileName); + + /** + * @brief sets the category id from a nexus category id. Conversion to MO id happens internally + * @param categoryID the nexus category id + * @note if a mapping is not possible, the category is set to the default value + */ + virtual void addNexusCategory(int categoryID); + + /** + * @brief sets the new primary category of the mod + * @param categoryID the category to set + */ + virtual void setPrimaryCategory(int categoryID) { m_PrimaryCategory = categoryID; m_MetaInfoChanged = true; } + + /** + * @brief sets the download repository + * @param repository + */ + virtual void setRepository(const QString &repository) { m_Repository = repository; } + + /** + * update the endorsement state for the mod. This only changes the + * buffered state, it does not sync with Nexus + * @param endorsed the new endorsement state + */ + virtual void setIsEndorsed(bool endorsed); + + /** + * set the mod to "i don't intend to endorse". The mod will not show as unendorsed but can still be endorsed + */ + virtual void setNeverEndorse(); + + /** + * @brief delete the mod from the disc. This does not update the global ModInfo structure or indices + * @return true if the mod was successfully removed + **/ + bool remove(); + + /** + * @brief endorse or un-endorse the mod + * @param doEndorse if true, the mod is endorsed, if false, it's un-endorsed. + * @note if doEndorse doesn't differ from the current value, nothing happens. + */ + virtual void endorse(bool doEndorse); + + /** + * @brief getter for the mod name + * + * @return the mod name + **/ + QString name() const { return m_Name; } + + /** + * @brief getter for the mod path + * + * @return the (absolute) path to the mod + **/ + QString absolutePath() const; + + /** + * @brief getter for the newest version number of this mod + * + * @return newest version of the mod + **/ + MOBase::VersionInfo getNewestVersion() const { return m_NewestVersion; } + + /** + * @brief ignore the newest version for updates + */ + void ignoreUpdate(bool ignore); + + /** + * @brief getter for the installation file + * + * @return file used to install this mod from + */ + virtual QString getInstallationFile() const { return m_InstallationFile; } + /** + * @brief getter for the nexus mod id + * + * @return the nexus mod id. may be 0 if the mod id isn't known or doesn't exist + **/ + int getNexusID() const { return m_NexusID; } + + /** + * @return the fixed priority of mods of this type or INT_MIN if the priority of mods + * needs to be user-modifiable + */ + virtual int getFixedPriority() const { return INT_MIN; } + + /** + * @return true if the mod can be updated + */ + virtual bool canBeUpdated() const { return m_NexusID > 0; } + + /** + * @return true if the mod can be enabled/disabled + */ + virtual bool canBeEnabled() const { return true; } + + /** + * @return a list of flags for this mod + */ + virtual std::vector getFlags() const; + + virtual std::vector getContents() const; + + /** + * @return an indicator if and how this mod should be highlighted by the UI + */ + virtual int getHighlight() const; + + /** + * @return list of names of ini tweaks + **/ + std::vector getIniTweaks() const; + + /** + * @return a description about the mod, to be displayed in the ui + */ + virtual QString getDescription() const; + + /** + * @return manually set notes for this mod + */ + virtual QString notes() const; + + /** + * @return time this mod was created (file time of the directory) + */ + virtual QDateTime creationTime() const; + + /** + * @return nexus description of the mod (html) + */ + QString getNexusDescription() const; + + /** + * @return repository from which the file was downloaded + */ + virtual QString repository() const; + + /** + * @return true if the file has been endorsed on nexus + */ + virtual EEndorsedState endorsedState() const; + + /** + * @return last time nexus was queried for infos on this mod + */ + virtual QDateTime getLastNexusQuery() const; + + virtual QStringList archives() const; + + virtual void addInstalledFile(int modId, int fileId); + + /** + * @brief stores meta information back to disk + */ + virtual void saveMeta(); + + void readMeta(); + + /** + * @brief set the URL for a mod + */ + virtual void setURL(QString const &); + + /** + * @returns the URL for a mod + */ + virtual QString getURL() const; + +private: + + void setEndorsedState(EEndorsedState endorsedState); + +private slots: + + void nxmDescriptionAvailable(int modID, QVariant userData, QVariant resultData); + void nxmEndorsementToggled(int, QVariant userData, QVariant resultData); + void nxmRequestFailed(int modID, int fileID, QVariant userData, const QString &errorMessage); + +protected: + + ModInfoRegular(const QDir &path, MOShared::DirectoryEntry **directoryStructure); + +private: + + QString m_Name; + QString m_Path; + QString m_InstallationFile; + QString m_Notes; + QString m_NexusDescription; + QString m_Repository; + QString m_URL; + + QDateTime m_CreationTime; + QDateTime m_LastNexusQuery; + + int m_NexusID; + std::set> m_InstalledFileIDs; + + bool m_MetaInfoChanged; + MOBase::VersionInfo m_NewestVersion; + MOBase::VersionInfo m_IgnoredVersion; + + EEndorsedState m_EndorsedState; + + NexusBridge m_NexusBridge; + + mutable std::vector m_CachedContent; + mutable QTime m_LastContentCheck; + +}; + + +#endif // MODINFOREGULAR_H diff --git a/src/modinfowithconflictinfo.cpp b/src/modinfowithconflictinfo.cpp new file mode 100644 index 00000000..fbf2345f --- /dev/null +++ b/src/modinfowithconflictinfo.cpp @@ -0,0 +1,130 @@ +#include "modinfowithconflictinfo.h" + +#include "directoryentry.h" +#include "utility.h" + +using namespace MOBase; +using namespace MOShared; + +ModInfoWithConflictInfo::ModInfoWithConflictInfo(DirectoryEntry **directoryStructure) + : m_DirectoryStructure(directoryStructure) {} + +void ModInfoWithConflictInfo::clearCaches() +{ + m_LastConflictCheck = QTime(); +} + +std::vector ModInfoWithConflictInfo::getFlags() const +{ + std::vector result; + switch (isConflicted()) { + case CONFLICT_MIXED: { + result.push_back(ModInfo::FLAG_CONFLICT_MIXED); + } break; + case CONFLICT_OVERWRITE: { + result.push_back(ModInfo::FLAG_CONFLICT_OVERWRITE); + } break; + case CONFLICT_OVERWRITTEN: { + result.push_back(ModInfo::FLAG_CONFLICT_OVERWRITTEN); + } break; + case CONFLICT_REDUNDANT: { + result.push_back(ModInfo::FLAG_CONFLICT_REDUNDANT); + } break; + default: { /* NOP */ } + } + return result; +} + + +void ModInfoWithConflictInfo::doConflictCheck() const +{ + m_OverwriteList.clear(); + m_OverwrittenList.clear(); + + bool providesAnything = false; + + int dataID = 0; + if ((*m_DirectoryStructure)->originExists(L"data")) { + dataID = (*m_DirectoryStructure)->getOriginByName(L"data").getID(); + } + + std::wstring name = ToWString(this->name()); + + m_CurrentConflictState = CONFLICT_NONE; + + if ((*m_DirectoryStructure)->originExists(name)) { + FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name); + std::vector files = origin.getFiles(); + // for all files in this origin + for (FileEntry::Ptr file : files) { + const std::vector &alternatives = file->getAlternatives(); + if ((alternatives.size() == 0) || (alternatives[0] == dataID)) { + // no alternatives -> no conflict + providesAnything = true; + } else { + if (file->getOrigin() != origin.getID()) { + FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(file->getOrigin()); + unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); + m_OverwrittenList.insert(altIndex); + } else { + providesAnything = true; + } + + // for all non-providing alternative origins + for (int altId : alternatives) { + if ((altId != dataID) && (altId != origin.getID())) { + FilesOrigin &altOrigin = (*m_DirectoryStructure)->getOriginByID(altId); + unsigned int altIndex = ModInfo::getIndex(ToQString(altOrigin.getName())); + if (origin.getPriority() > altOrigin.getPriority()) { + m_OverwriteList.insert(altIndex); + } else { + m_OverwrittenList.insert(altIndex); + } + } + } + } + } + m_LastConflictCheck = QTime::currentTime(); + + if (files.size() != 0) { + if (!providesAnything) + m_CurrentConflictState = CONFLICT_REDUNDANT; + else if (!m_OverwriteList.empty() && !m_OverwrittenList.empty()) + m_CurrentConflictState = CONFLICT_MIXED; + else if (!m_OverwriteList.empty()) + m_CurrentConflictState = CONFLICT_OVERWRITE; + else if (!m_OverwrittenList.empty()) + m_CurrentConflictState = CONFLICT_OVERWRITTEN; + } + } +} + +ModInfoWithConflictInfo::EConflictType ModInfoWithConflictInfo::isConflicted() const +{ + // this is costy so cache the result + QTime now = QTime::currentTime(); + if (m_LastConflictCheck.isNull() || (m_LastConflictCheck.secsTo(now) > 10)) { + doConflictCheck(); + } + + return m_CurrentConflictState; +} + + +bool ModInfoWithConflictInfo::isRedundant() const +{ + std::wstring name = ToWString(this->name()); + if ((*m_DirectoryStructure)->originExists(name)) { + FilesOrigin &origin = (*m_DirectoryStructure)->getOriginByName(name); + std::vector files = origin.getFiles(); + bool ignore = false; + for (auto iter = files.begin(); iter != files.end(); ++iter) { + if ((*iter)->getOrigin(ignore) == origin.getID()) { + return false; + } + } + return true; + } else { + return false; + } +} diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h new file mode 100644 index 00000000..be31f20f --- /dev/null +++ b/src/modinfowithconflictinfo.h @@ -0,0 +1,64 @@ +#ifndef MODINFOWITHCONFLICTINFO_H +#define MODINFOWITHCONFLICTINFO_H + +#include "modinfo.h" + +#include + +class ModInfoWithConflictInfo : public ModInfo +{ + +public: + + ModInfoWithConflictInfo(MOShared::DirectoryEntry **directoryStructure); + + std::vector getFlags() const; + + /** + * @brief clear all caches held for this mod + */ + virtual void clearCaches(); + + virtual std::set getModOverwrite() { return m_OverwriteList; } + + virtual std::set getModOverwritten() { return m_OverwrittenList; } + + virtual void doConflictCheck() const; + +private: + + enum EConflictType { + CONFLICT_NONE, + CONFLICT_OVERWRITE, + CONFLICT_OVERWRITTEN, + CONFLICT_MIXED, + CONFLICT_REDUNDANT + }; + +private: + + /** + * @return true if there is a conflict for files in this mod + */ + EConflictType isConflicted() const; + + /** + * @return true if this mod is completely replaced by others + */ + bool isRedundant() const; + +private: + + MOShared::DirectoryEntry **m_DirectoryStructure; + + mutable EConflictType m_CurrentConflictState; + mutable QTime m_LastConflictCheck; + + mutable std::set m_OverwriteList; // indices of mods overritten by this mod + mutable std::set m_OverwrittenList; // indices of mods overwriting this mod + +}; + + + +#endif // MODINFOWITHCONFLICTINFO_H diff --git a/src/organizer.pro b/src/organizer.pro index 261e3c1c..adc606fb 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -91,7 +91,12 @@ SOURCES += \ organizerproxy.cpp \ viewmarkingscrollbar.cpp \ plugincontainer.cpp \ - organizercore.cpp + organizercore.cpp \ + modinfowithconflictinfo.cpp \ + modinforegular.cpp \ + modinfobackup.cpp \ + modinfooverwrite.cpp \ + modinfoforeign.cpp HEADERS += \ @@ -167,7 +172,12 @@ HEADERS += \ viewmarkingscrollbar.h \ plugincontainer.h \ organizercore.h \ - iuserinterface.h + iuserinterface.h \ + modinfowithconflictinfo.h \ + modinforegular.h \ + modinfobackup.h \ + modinfooverwrite.h \ + modinfoforeign.h FORMS += \ transfersavesdialog.ui \ -- cgit v1.3.1 From d4754f4d3ca7451d784e89ae1ddef240666dfdf8 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 15 Oct 2015 18:44:39 +0100 Subject: Fix for some nexus fomods having the old version of the mod link and not the new version. Also fixed a lot of const correctness things --- src/mainwindow.cpp | 4 ++- src/shared/SConscript | 10 +++---- src/shared/fallout3info.cpp | 17 ++++++++---- src/shared/fallout3info.h | 31 ++++++++++----------- src/shared/falloutnvinfo.cpp | 17 ++++++++---- src/shared/falloutnvinfo.h | 63 ++++++++++-------------------------------- src/shared/gameinfo.cpp | 13 +++++++++ src/shared/gameinfo.h | 30 +++++++++++--------- src/shared/oblivioninfo.cpp | 31 ++++++++------------- src/shared/oblivioninfo.h | 65 ++++++++++---------------------------------- src/shared/skyriminfo.cpp | 17 ++++++++---- src/shared/skyriminfo.h | 26 ++++++++++-------- 12 files changed, 138 insertions(+), 186 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1dca599d..9982e928 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3120,7 +3120,9 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addAction(tr("Visit on Nexus"), this, SLOT(visitOnNexus_clicked())); } - if (info->getURL() != "") { + if (info->getURL() != "" && + !GameInfo::instance().isValidModURL(info->getNexusID(), + info->getURL().toStdWString())) { menu->addAction(tr("Visit web page"), this, SLOT(visitWebPage_clicked())); } diff --git a/src/shared/SConscript b/src/shared/SConscript index 69a95289..24ca5b19 100644 --- a/src/shared/SConscript +++ b/src/shared/SConscript @@ -1,8 +1,6 @@ -Import('qt_env') +Import('env') -env = qt_env.Clone() - -env.EnableQtModules('Core', 'Gui') +env = env.Clone() env.AppendUnique(CPPDEFINES = [ 'UNICODE', @@ -21,5 +19,5 @@ env.AppendUnique(CPPPATH = [ # Not sure if renaming this helps much as it's static env.StaticLibrary('mo_shared', env.Glob('*.cpp')) -res = env['QT_USED_MODULES'] -Return('res') +#res = env['QT_USED_MODULES'] +#Return('res') diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 0b369b50..f0776a7d 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -63,7 +63,7 @@ std::wstring Fallout3Info::getRegPathStatic() } -std::vector Fallout3Info::getDLCPlugins() +std::vector Fallout3Info::getDLCPlugins() const { return boost::assign::list_of (L"ThePitt.esm") (L"Anchorage.esm") @@ -73,22 +73,22 @@ std::vector Fallout3Info::getDLCPlugins() ; } -std::vector Fallout3Info::getSavegameAttachmentExtensions() +std::vector Fallout3Info::getSavegameAttachmentExtensions() const { return std::vector(); } -std::vector Fallout3Info::getIniFileNames() +std::vector Fallout3Info::getIniFileNames() const { return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini"); } -std::wstring Fallout3Info::getReferenceDataFile() +std::wstring Fallout3Info::getReferenceDataFile() const { return L"Fallout - Meshes.bsa"; } -std::wstring Fallout3Info::getNexusPage(bool nmmScheme) +std::wstring Fallout3Info::getNexusPage(bool nmmScheme) const { if (nmmScheme) { return L"http://nmm.nexusmods.com/fallout3"; @@ -107,7 +107,7 @@ int Fallout3Info::getNexusModIDStatic() return 16348; } -bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) +bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; @@ -119,4 +119,9 @@ bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) return false; } +bool Fallout3Info::isValidModURL(int modID, const std::wstring &url) const +{ + return GameInfo::isValidModURL(modID, url, L"http://fallout3.nexusmods.com"); +} + } // namespace MOShared diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 0045581d..0a2b0ebe 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -20,7 +20,6 @@ along with Mod Organizer. If not, see . #ifndef FALLOUT3INFO_H #define FALLOUT3INFO_H - #include "gameinfo.h" namespace MOShared { @@ -36,36 +35,34 @@ public: virtual ~Fallout3Info() {} static std::wstring getRegPathStatic(); - virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"Fallout3.exe"; } + virtual std::wstring getRegPath() const { return getRegPathStatic(); } + virtual std::wstring getBinaryName() const { return L"Fallout3.exe"; } - virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } + virtual GameInfo::Type getType() const { return TYPE_FALLOUT3; } virtual std::wstring getGameName() const { return L"Fallout 3"; } virtual std::wstring getGameShortName() const { return L"Fallout3"; } - virtual std::vector getDLCPlugins(); - virtual std::vector getSavegameAttachmentExtensions(); + virtual std::vector getDLCPlugins() const; + virtual std::vector getSavegameAttachmentExtensions() const; // file name of this games ini (no path) - virtual std::vector getIniFileNames(); + virtual std::vector getIniFileNames() const; - virtual std::wstring getReferenceDataFile(); + virtual std::wstring getReferenceDataFile() const; - virtual std::wstring getNexusPage(bool nmmScheme = true); + virtual std::wstring getNexusPage(bool nmmScheme = true) const; static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } + virtual std::wstring getNexusInfoUrl() const { return getNexusInfoUrlStatic(); } static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } - virtual int getNexusGameID() { return 120; } + virtual int getNexusModID() const { return getNexusModIDStatic(); } + virtual int getNexusGameID() const { return 120; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); + virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const; - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to - // the game directory - //virtual std::vector getExecutables(); + virtual std::wstring archiveListKey() const { return L"SArchiveList"; } - virtual std::wstring archiveListKey() { return L"SArchiveList"; } + virtual bool isValidModURL(int modID, std::wstring const &url) const; private: diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 1203bd25..f6de72e3 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -63,7 +63,7 @@ std::wstring FalloutNVInfo::getRegPathStatic() } } -std::vector FalloutNVInfo::getDLCPlugins() +std::vector FalloutNVInfo::getDLCPlugins() const { return boost::assign::list_of (L"DeadMoney.esm") (L"HonestHearts.esm") @@ -77,22 +77,22 @@ std::vector FalloutNVInfo::getDLCPlugins() ; } -std::vector FalloutNVInfo::getSavegameAttachmentExtensions() +std::vector FalloutNVInfo::getSavegameAttachmentExtensions() const { return std::vector(); } -std::vector FalloutNVInfo::getIniFileNames() +std::vector FalloutNVInfo::getIniFileNames() const { return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini"); } -std::wstring FalloutNVInfo::getReferenceDataFile() +std::wstring FalloutNVInfo::getReferenceDataFile() const { return L"Fallout - Meshes.bsa"; } -std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme) +std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme) const { if (nmmScheme) { return L"http://nmm.nexusmods.com/newvegas"; @@ -114,7 +114,7 @@ int FalloutNVInfo::getNexusModIDStatic() } -bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) +bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; @@ -126,4 +126,9 @@ bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) return false; } +bool FalloutNVInfo::isValidModURL(int modID, std::wstring const &url) const +{ + return GameInfo::isValidModURL(modID, url, L"http://newvegas.nexusmods.com"); +} + } // namespace MOShared diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index e1a614d2..d03add9c 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -36,69 +36,34 @@ public: virtual ~FalloutNVInfo() {} static std::wstring getRegPathStatic(); - virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"FalloutNV.exe"; } + virtual std::wstring getRegPath() const { return getRegPathStatic(); } + virtual std::wstring getBinaryName() const { return L"FalloutNV.exe"; } - virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } + virtual GameInfo::Type getType() const { return TYPE_FALLOUTNV; } virtual std::wstring getGameName() const { return L"New Vegas"; } virtual std::wstring getGameShortName() const { return L"FalloutNV"; } -// virtual bool requiresSteam() const { return true; } - -/* virtual std::wstring getInvalidationBSA() - { - return L"Fallout - Invalidation.bsa"; - } - - virtual bool isInvalidationBSA(const std::wstring &bsaName) - { - static LPCWSTR invalidation[] = { L"Fallout - AI!.bsa", L"Fallout - Invalidation.bsa", nullptr }; - - for (int i = 0; invalidation[i] != nullptr; ++i) { - if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) { - return true; - } - } - return false; - } - - virtual std::vector getVanillaBSAs() - { - return boost::assign::list_of (L"Fallout - Textures.bsa") - (L"Fallout - Textures2.bsa") - (L"Fallout - Meshes.bsa") - (L"Fallout - Voices1.bsa") - (L"Fallout - Sound.bsa") - (L"Fallout - Misc.bsa"); - } - - virtual std::vector getPrimaryPlugins() - { - return boost::assign::list_of(L"falloutnv.esm"); - }*/ - virtual std::vector getDLCPlugins(); - virtual std::vector getSavegameAttachmentExtensions(); + virtual std::vector getDLCPlugins() const; + virtual std::vector getSavegameAttachmentExtensions() const; // file name of this games ini (no path) - virtual std::vector getIniFileNames(); + virtual std::vector getIniFileNames() const; - virtual std::wstring getReferenceDataFile(); + virtual std::wstring getReferenceDataFile() const; - virtual std::wstring getNexusPage(bool nmmScheme = true); + virtual std::wstring getNexusPage(bool nmmScheme = true) const; static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } + virtual std::wstring getNexusInfoUrl() const { return getNexusInfoUrlStatic(); } static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } - virtual int getNexusGameID() { return 130; } + virtual int getNexusModID() const { return getNexusModIDStatic(); } + virtual int getNexusGameID() const { return 130; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); + virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const; - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to - // the game directory - //virtual std::vector getExecutables(); + virtual std::wstring archiveListKey() const { return L"SArchiveList"; } - virtual std::wstring archiveListKey() { return L"SArchiveList"; } + virtual bool isValidModURL(int modID, const std::wstring &url) const; private: diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 1f25cec1..5338c069 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -86,6 +86,19 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) } } +bool GameInfo::isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const +{ + std::wostringstream os; + os << getNexusPage(false) << "/mods/" << modID; + if (url == os.str()) { + return true; + } + os.clear(); + os.str(L""); + os << alt << "/mods/" << modID; + return url == os.str(); +} + bool GameInfo::identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath) { diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index a32b6b82..8caa5937 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -56,12 +56,12 @@ public: virtual ~GameInfo() {} - std::wstring getOrganizerDirectory() { return m_OrganizerDirectory; } + std::wstring getOrganizerDirectory() const { return m_OrganizerDirectory; } - virtual std::wstring getRegPath() = 0; - virtual std::wstring getBinaryName() = 0; + virtual std::wstring getRegPath() const = 0; + virtual std::wstring getBinaryName() const = 0; - virtual GameInfo::Type getType() = 0; + virtual GameInfo::Type getType() const = 0; virtual std::wstring getGameName() const = 0; virtual std::wstring getGameShortName() const = 0; @@ -75,22 +75,24 @@ public: virtual bool requiresSteam() const; // get a list of file extensions for additional files belonging to a save game - virtual std::vector getSavegameAttachmentExtensions() = 0; + virtual std::vector getSavegameAttachmentExtensions() const = 0; // get a set of esp/esm files that are part of known dlcs - virtual std::vector getDLCPlugins() = 0; + virtual std::vector getDLCPlugins() const = 0; // file name of this games ini file(s) - virtual std::vector getIniFileNames() = 0; + virtual std::vector getIniFileNames() const = 0; - virtual std::wstring getReferenceDataFile() = 0; + virtual std::wstring getReferenceDataFile() const = 0; - virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; - virtual std::wstring getNexusInfoUrl() = 0; - virtual int getNexusModID() = 0; - virtual int getNexusGameID() = 0; + virtual std::wstring getNexusPage(bool nmmScheme = true) const = 0; + virtual std::wstring getNexusInfoUrl() const = 0; + virtual int getNexusModID() const = 0; + virtual int getNexusGameID() const = 0; - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; + virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const = 0; + + virtual bool isValidModURL(int modID, std::wstring const &url) const = 0; public: @@ -108,6 +110,8 @@ protected: const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; } void identifyMyGamesDirectory(const std::wstring &file); + bool isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const; + private: static bool identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath); diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 16748f58..730c186b 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -63,17 +63,7 @@ std::wstring OblivionInfo::getRegPathStatic() } } - - - - - - - - - - -std::vector OblivionInfo::getDLCPlugins() +std::vector OblivionInfo::getDLCPlugins() const { return boost::assign::list_of (L"DLCShiveringIsles.esp") (L"Knights.esp") @@ -89,22 +79,18 @@ std::vector OblivionInfo::getDLCPlugins() } -std::vector OblivionInfo::getSavegameAttachmentExtensions() +std::vector OblivionInfo::getSavegameAttachmentExtensions() const { return boost::assign::list_of(L"obse"); } -std::vector OblivionInfo::getIniFileNames() +std::vector OblivionInfo::getIniFileNames() const { return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini"); } - - - - -std::wstring OblivionInfo::getNexusPage(bool nmmScheme) +std::wstring OblivionInfo::getNexusPage(bool nmmScheme) const { if (nmmScheme) { return L"http://nmm.nexusmods.com/oblivion"; @@ -125,7 +111,7 @@ int OblivionInfo::getNexusModIDStatic() return 38277; } -bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) +bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const { static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr }; @@ -137,9 +123,14 @@ bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) return false; } -std::wstring OblivionInfo::getReferenceDataFile() +std::wstring OblivionInfo::getReferenceDataFile() const { return L"Oblivion - Meshes.bsa"; } +bool OblivionInfo::isValidModURL(int modID, const std::wstring &url) const +{ + return GameInfo::isValidModURL(modID, url, L"http://oblivion.nexusmods.com"); +} + } // namespace MOShared diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 87ba26ff..1adf9cab 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -34,69 +34,34 @@ public: virtual ~OblivionInfo() {} static std::wstring getRegPathStatic(); - virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"Oblivion.exe"; } + virtual std::wstring getRegPath() const { return getRegPathStatic(); } + virtual std::wstring getBinaryName() const { return L"Oblivion.exe"; } - virtual GameInfo::Type getType() { return TYPE_OBLIVION; } + virtual GameInfo::Type getType() const { return TYPE_OBLIVION; } virtual std::wstring getGameName() const { return L"Oblivion"; } virtual std::wstring getGameShortName() const { return L"Oblivion"; } -/* - virtual std::wstring getInvalidationBSA() - { - return L"Oblivion - Invalidation.bsa"; - } - - virtual bool isInvalidationBSA(const std::wstring &bsaName) - { - static LPCWSTR invalidation[] = { L"Oblivion - Invalidation.bsa", L"ArchiveInvalidationInvalidated!.bsa", - L"BSARedirection.bsa", nullptr }; - - for (int i = 0; invalidation[i] != nullptr; ++i) { - if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) { - return true; - } - } - return false; - } - - virtual std::vector getVanillaBSAs() - { - return boost::assign::list_of(L"Oblivion - Meshes.bsa") - (L"Oblivion - Textures - Compressed.bsa") - (L"Oblivion - Sounds.bsa") - (L"Oblivion - Voices1.bsa") - (L"Oblivion - Voices2.bsa") - (L"Oblivion - Misc.bsa"); - } - - virtual std::vector getPrimaryPlugins() - { - return boost::assign::list_of(L"oblivion.esm"); - }*/ - - virtual std::vector getDLCPlugins(); - virtual std::vector getSavegameAttachmentExtensions(); + + virtual std::vector getDLCPlugins() const; + virtual std::vector getSavegameAttachmentExtensions() const; // file name of this games ini (no path) - virtual std::vector getIniFileNames(); + virtual std::vector getIniFileNames() const; - virtual std::wstring getReferenceDataFile(); + virtual std::wstring getReferenceDataFile() const; - virtual std::wstring getNexusPage(bool nmmScheme = true); + virtual std::wstring getNexusPage(bool nmmScheme = true) const; static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } + virtual std::wstring getNexusInfoUrl() const { return getNexusInfoUrlStatic(); } static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } - virtual int getNexusGameID() { return 101; } + virtual int getNexusModID() const { return getNexusModIDStatic(); } + virtual int getNexusGameID() const { return 101; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); + virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const; - // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to - // the game directory - //virtual std::vector getExecutables(); + virtual std::wstring archiveListKey() const { return L"SArchiveList"; } - virtual std::wstring archiveListKey() { return L"SArchiveList"; } + virtual bool isValidModURL(int modID, std::wstring const &url) const; private: diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f66fcef4..7c85fe10 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -91,7 +91,7 @@ GameInfo::LoadOrderMechanism SkyrimInfo::getLoadOrderMechanism() const } } -std::vector SkyrimInfo::getDLCPlugins() +std::vector SkyrimInfo::getDLCPlugins() const { return boost::assign::list_of (L"Dawnguard.esm") (L"Dragonborn.esm") @@ -102,23 +102,23 @@ std::vector SkyrimInfo::getDLCPlugins() ; } -std::vector SkyrimInfo::getSavegameAttachmentExtensions() +std::vector SkyrimInfo::getSavegameAttachmentExtensions() const { return boost::assign::list_of(L"skse"); } -std::vector SkyrimInfo::getIniFileNames() +std::vector SkyrimInfo::getIniFileNames() const { return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini"); } -std::wstring SkyrimInfo::getReferenceDataFile() +std::wstring SkyrimInfo::getReferenceDataFile() const { return L"Skyrim - Meshes.bsa"; } -std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) +std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) const { if (nmmScheme) { return L"http://nmm.nexusmods.com/skyrim"; @@ -139,7 +139,7 @@ int SkyrimInfo::getNexusModIDStatic() return 1334; } -bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) +bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const { static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr }; @@ -157,5 +157,10 @@ bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPa return false; } +bool SkyrimInfo::isValidModURL(int modID, const std::wstring &url) const +{ + return GameInfo::isValidModURL(modID, url, L"http://skyrim.nexusmods.com"); +} + } // namespace MOShared diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 5951f910..e2766688 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -36,35 +36,37 @@ public: virtual ~SkyrimInfo() {} static std::wstring getRegPathStatic(); - virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"TESV.exe"; } + virtual std::wstring getRegPath() const { return getRegPathStatic(); } + virtual std::wstring getBinaryName() const { return L"TESV.exe"; } - virtual GameInfo::Type getType() { return TYPE_SKYRIM; } + virtual GameInfo::Type getType() const { return TYPE_SKYRIM; } virtual std::wstring getGameName() const { return L"Skyrim"; } virtual std::wstring getGameShortName() const { return L"Skyrim"; } virtual LoadOrderMechanism getLoadOrderMechanism() const; - virtual std::vector getDLCPlugins(); + virtual std::vector getDLCPlugins() const; - virtual std::vector getSavegameAttachmentExtensions(); + virtual std::vector getSavegameAttachmentExtensions() const; // file name of this games ini (no path) - virtual std::vector getIniFileNames(); + virtual std::vector getIniFileNames() const; - virtual std::wstring getReferenceDataFile(); + virtual std::wstring getReferenceDataFile() const; - virtual std::wstring getNexusPage(bool nmmScheme = true); + virtual std::wstring getNexusPage(bool nmmScheme = true) const; static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } + virtual std::wstring getNexusInfoUrl() const { return getNexusInfoUrlStatic(); } static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } + virtual int getNexusModID() const { return getNexusModIDStatic(); } static int getNexusGameIDStatic() { return 110; } - virtual int getNexusGameID() { return getNexusGameIDStatic(); } + virtual int getNexusGameID() const { return getNexusGameIDStatic(); } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); + virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const; + + virtual bool isValidModURL(int modID, std::wstring const &url) const; private: -- cgit v1.3.1 From 0f8ae514592c46dc8465bc5830d7a830b68affe2 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 17 Oct 2015 19:05:00 +0100 Subject: Added support for include-what-you-use in a very simplistic fashion to the Scons build. This isn't exactly production ready because the qt headers are a nightmarish web of interdependencies but it's useful for checking. I've also removed a few unused include files it detected and corrected some things that upset clang in a big way. --- qtmappings.imp | 195 ++++++++++++++++++++++++++++++++++++++++++++ scons_configure_template.py | 3 + src/SConscript | 14 +++- src/bbcode.cpp | 4 +- src/browserdialog.cpp | 2 - src/browserview.h | 4 +- src/downloadmanager.cpp | 1 - src/helper.h | 2 +- src/loadmechanism.cpp | 2 +- src/loadmechanism.h | 2 +- src/modinfo.cpp | 1 - src/modinfo.h | 4 +- src/nxmaccessmanager.cpp | 1 - src/settings.cpp | 1 - src/settings.h | 10 +-- 15 files changed, 223 insertions(+), 23 deletions(-) create mode 100644 qtmappings.imp diff --git a/qtmappings.imp b/qtmappings.imp new file mode 100644 index 00000000..3dc2e5f5 --- /dev/null +++ b/qtmappings.imp @@ -0,0 +1,195 @@ +[ +# Overrides. Some classes are defined by the spec to reside in their own headers but actually use the same +# header as another class. It might make some sense using this for every class in QT... + { symbol: [ "QAbstractTableModel", "private", "", "public" ] }, + { symbol: [ "QAtomicInt", "private", "", "public"] }, + { symbol: [ "QDate", "private", "", "public"] }, + { symbol: [ "QKeyEvent", "private", "", "public" ] }, + { symbol: [ "QDragEnterEvent", "private", "", "public" ] }, + { symbol: [ "QListWidgetItem", "private", "", "public" ] }, + { symbol: [ "QModelIndex", "private", "", "public" ] }, + { symbol: [ "QMouseEvent", "private", "", "public" ] }, + { symbol: [ "QMutableHashIterator", "private", "", "public" ] }, + { symbol: [ "QScopedArrayPointer", "private", "", "public" ] }, + { symbol: [ "QStyleOptionSlider", "private", "", "public" ] }, + { symbol: [ "QStyleOptionViewItem", "private", "", "public" ] }, + { symbol: [ "QTime", "private", "", "public"] }, + { symbol: [ "QTableWidgetItem", "private", "", "public" ] }, + { symbol: [ "QTreeWidgetItem", "private", "", "public" ] }, + { symbol: [ "QVBoxLayout", "private", "", "public" ] }, + { symbol: [ "QWebHitTestResult", "private", "", "public" ] }, + { symbol: [ "qobject_cast", "private", "", "public"] }, + + +# these are in QMetaType but the documentation is slightly unclear as to where they are meant to be defined. + { symbol: [ "QVariantMap", "private", "", "public" ] }, + { symbol: [ "QVariantList", "private", "", "public" ] }, + +#Normal header overrides + + { include: [ "@\"(QtCore/)?qabstractitemmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbytearray\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qchar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcoreapplication\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcoreevent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdatastream\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdatetime\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdir\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfileinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qflags\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qglobal\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qiodevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qitemselectionmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qjsonvalue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlocale\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qnamespace\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qobjectdefs\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpoint\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qrect\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qregexp\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qscopedpointer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qset\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsharedpointer_impl\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsize\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstring\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstringlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qurl\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qvariant\\.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtGui/)?qbrush\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qcolor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfont\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qicon\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qimage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qkeysequence\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpalette\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpen\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpixmap\\.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtNetwork/)?qnetworkaccessmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, + + { include: [ "\"QtWebKit/qwebsettings.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtWidgets/)?qabstractbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractitemview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qaction\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qboxlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qframe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlayoutitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlineedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyleoption\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtabwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, + + { include: [ "\"qabstractproxymodel.h\"", "private", "", "public" ] }, + { include: [ "\"qapplication.h\"", "private", "", "public" ] }, + { include: [ "\"qcheckbox.h\"", "private", "", "public" ] }, + { include: [ "\"qclipboard.h\"", "private", "", "public" ] }, + { include: [ "\"qcombobox.h\"", "private", "", "public" ] }, + { include: [ "\"qcommandlinkbutton.h\"", "private", "", "public" ] }, + { include: [ "\"qcryptographichash.h\"", "private", "", "public" ] }, + { include: [ "\"qdatetime.h\"", "private", "", "public" ] }, + { include: [ "\"qdebug.h\"", "private", "", "public" ] }, + { include: [ "\"qdesktopwidget.h\"", "private", "", "public" ] }, + { include: [ "\"qdialog.h\"", "private", "", "public" ] }, + { include: [ "\"qdialogbuttonbox.h\"", "private", "", "public" ] }, + { include: [ "\"qdiriterator.h\"", "private", "", "public" ] }, + { include: [ "\"qfiledialog.h\"", "private", "", "public" ] }, + { include: [ "\"qfilesystemmodel.h\"", "private", "", "public" ] }, + { include: [ "\"qfilesystemwatcher.h\"", "private", "", "public" ] }, + { include: [ "\"qhash.h\"", "private", "", "public" ] }, + { include: [ "\"qheaderview.h\"", "private", "", "public" ] }, + { include: [ "\"qinputdialog.h\"", "private", "", "public" ] }, + { include: [ "\"qitemdelegate.h\"", "private", "", "public" ] }, + { include: [ "\"qjsonarray.h\"", "private", "", "public" ] }, + { include: [ "\"qjsondocument.h\"", "private", "", "public" ] }, + { include: [ "\"qlabel.h\"", "private", "", "public" ] }, + { include: [ "\"qlibrary.h\"", "private", "", "public" ] }, + { include: [ "\"qlistwidget.h\"", "private", "", "public" ] }, + { include: [ "\"qlocalserver.h\"", "private", "", "public" ] }, + { include: [ "\"qlocalsocket.h\"", "private", "", "public" ] }, + { include: [ "\"qmainwindow.h\"", "private", "", "public" ] }, + { include: [ "\"qmenu.h\"", "private", "", "public" ] }, + { include: [ "\"qmessagebox.h\"", "private", "", "public" ] }, + { include: [ "\"qmetatype.h\"", "private", "", "public" ] }, + { include: [ "\"qmimedata.h\"", "private", "", "public" ] }, + { include: [ "\"qmutex.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkcookie.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkcookiejar.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkinterface.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkreply.h\"", "private", "", "public" ] }, + { include: [ "\"qpainter.h\"", "private", "", "public" ] }, + { include: [ "\"qprocess.h\"", "private", "", "public" ] }, + { include: [ "\"qprogressbar.h\"", "private", "", "public" ] }, + { include: [ "\"qprogressdialog.h\"", "private", "", "public" ] }, + { include: [ "\"qproxystyle.h\"", "private", "", "public" ] }, + { include: [ "\"qpushbutton.h\"", "private", "", "public" ] }, + { include: [ "\"qregexp.h\"", "private", "", "public" ] }, + { include: [ "\"qscrollbar.h\"", "private", "", "public" ] }, + { include: [ "\"qsettings.h\"", "private", "", "public" ] }, + { include: [ "\"qsharedmemory.h\"", "private", "", "public" ] }, + { include: [ "\"qshortcut.h\"", "private", "", "public" ] }, + { include: [ "\"qsortfilterproxymodel.h\"", "private", "", "public" ] }, + { include: [ "\"qstackedwidget.h\"", "private", "", "public" ] }, + { include: [ "\"qstyleditemdelegate.h\"", "private", "", "public" ] }, + { include: [ "\"qstylefactory.h\"", "private", "", "public" ] }, + { include: [ "\"qtablewidget.h\"", "private", "", "public" ] }, + { include: [ "\"qtemporaryfile.h\"", "private", "", "public" ] }, + { include: [ "\"qtextbrowser.h\"", "private", "", "public" ] }, + { include: [ "\"qtextcodec.h\"", "private", "", "public" ] }, + { include: [ "\"qtextedit.h\"", "private", "", "public" ] }, + { include: [ "\"qtextstream.h\"", "private", "", "public" ] }, + { include: [ "\"qthread.h\"", "private", "", "public" ] }, + { include: [ "\"qtimer.h\"", "private", "", "public" ] }, + { include: [ "\"qtreeview.h\"", "private", "", "public" ] }, + { include: [ "\"qtreewidget.h\"", "private", "", "public" ] }, + { include: [ "\"qurlquery.h\"", "private", "", "public" ] }, + { include: [ "\"qvalidator.h\"", "private", "", "public" ] }, + { include: [ "\"qwebframe.h\"", "private", "", "public" ] }, + { include: [ "\"qwebhistory.h\"", "private", "", "public" ] }, + { include: [ "\"qwebpage.h\"", "private", "", "public" ] }, + { include: [ "\"qwebview.h\"", "private", "", "public" ] }, + { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkdiskcache.h\"", "private", "", "public" ] }, + { include: [ "\"qmimedata.h\"", "private", "", "public" ] }, + { include: [ "\"qtgroupingproxy.h\"", "private", "", "public" ] }, + +# Microsft visual C? + + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + +# Windows + + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + +# And for boost??? + +] + + + + + +#include "QtCore/qiterator.h" +#include "QtCore/qtypeinfo.h" // for swap +#include "QtCore/qtypetraits.h" // for remove_reference<>::type +#include "QtGui/qfontmetrics.h" +#include "QtGui/qwindowdefs_win.h" // for HINSTANCE +#include // for _Simple_types<>::value_type +#include // for _Tree_const_iterator diff --git a/scons_configure_template.py b/scons_configure_template.py index 67a8fad6..e4116adf 100644 --- a/scons_configure_template.py +++ b/scons_configure_template.py @@ -31,3 +31,6 @@ ZLIBPATH = r"C:\Apps\zlib-1.2.8" # though you have to set it up in the configuration GIT = r"C:\Program Files\git\bin\git.exe" MERCURIAL = r"C:\Program Files\TortoiseHg\hg.exe" + +# Path to include-what-you-use. This is currently rather experimental +#IWYU = r"C:\Apps\include-what-you-use\bin\include-what-you-use.exe" diff --git a/src/SConscript b/src/SConscript index f09db093..cd2d8a52 100644 --- a/src/SConscript +++ b/src/SConscript @@ -67,7 +67,6 @@ env.Uic(env.Glob('*.ui')) env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk') - env.AppendUnique(LIBS = [ 'shell32', 'user32', @@ -114,8 +113,9 @@ env.AppendUnique(LINKFLAGS = [ # modeltest is optional and it doesn't compile anyway... cpp_files = [ - x for x in Glob('*.cpp') - if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp' + x for x in env.Glob('*.cpp', source = True) + if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp' and \ + not x.name.startswith('moc_') # I think this is a strange bug ] about_env = env.Clone() @@ -143,6 +143,14 @@ env.AppendUnique(LIBS = 'zlibstatic') prog = env.Program('ModOrganizer', cpp_files + env.Glob('*.qrc') + other_sources) +############################################################################### +# I'd like to automatically add this to every .o generation. +if 'IWYU' in env: + for f in cpp_files + [ env.File('aboutdialog.cpp') ]: + env.AddPostAction(prog, "-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM " + str(f)) + env.Depends(prog, env['IWYU_MAPPING_FILE']) +############################################################################### + env.InstallModule(prog) for subdir in ('tutorials', 'stylesheets'): diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 0f9170d4..56369538 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -21,8 +21,6 @@ along with Mod Organizer. If not, see . #include #include -#include -#include namespace BBCode { @@ -80,7 +78,7 @@ public: if (tagName == "color") { QString color = tagIter->second.first.cap(1); QString content = tagIter->second.first.cap(2); - if (color.at(0) == "#") { + if (color.at(0) == '#') { return temp.replace(tagIter->second.first, QString("%2").arg(color, content)); } else { auto colIter = m_ColorMap.find(color.toLower()); diff --git a/src/browserdialog.cpp b/src/browserdialog.cpp index c382c112..5e6bec00 100644 --- a/src/browserdialog.cpp +++ b/src/browserdialog.cpp @@ -25,8 +25,6 @@ along with Mod Organizer. If not, see . #include "report.h" #include "persistentcookiejar.h" -#include "json.h" - #include #include #include "settings.h" diff --git a/src/browserview.h b/src/browserview.h index f8b132b8..6a89752a 100644 --- a/src/browserview.h +++ b/src/browserview.h @@ -21,9 +21,11 @@ along with Mod Organizer. If not, see . #define NEXUSVIEW_H +class QEvent; +class QUrl; +class QWidget; #include #include -#include /** * @brief web view used to display a nexus page diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index bc78cdc6..1aaf4122 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see . #include #include #include "utility.h" -#include "json.h" #include "selectiondialog.h" #include "bbcode.h" #include diff --git a/src/helper.h b/src/helper.h index 36f10db1..410e2527 100644 --- a/src/helper.h +++ b/src/helper.h @@ -21,7 +21,7 @@ along with Mod Organizer. If not, see . #define HELPER_H -#include +#include /** diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 4d06bea9..c01955f2 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -56,7 +56,7 @@ void LoadMechanism::writeHintFile(const QDir &targetDirectory) } -void LoadMechanism::removeHintFile(QDir &targetDirectory) +void LoadMechanism::removeHintFile(QDir targetDirectory) { targetDirectory.remove("mo_path.txt"); } diff --git a/src/loadmechanism.h b/src/loadmechanism.h index 43a8dd6c..c04473ab 100644 --- a/src/loadmechanism.h +++ b/src/loadmechanism.h @@ -91,7 +91,7 @@ private: void writeHintFile(const QDir &targetDirectory); // remove the hint file if it exists. does nothing if the file doesn't exist - void removeHintFile(QDir &targetDirectory); + void removeHintFile(QDir targetDirectory); // compare the two files by md5-hash, returns true if they are identical bool hashIdentical(const QString &fileNameLHS, const QString &fileNameRHS); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index e0d888e6..ae64b81f 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see . #include "report.h" #include "modinfodialog.h" #include "overwriteinfodialog.h" -#include "json.h" #include "messagedialog.h" #include "filenamestring.h" diff --git a/src/modinfo.h b/src/modinfo.h index da97b09b..d9de60e8 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -1047,7 +1047,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const { return QDateTime(); } virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } virtual QString getInstallationFile() const { return ""; } virtual int getFixedPriority() const { return INT_MAX; } virtual int getNexusID() const { return -1; } @@ -1099,7 +1099,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const; virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } virtual QString getInstallationFile() const { return ""; } virtual int getNexusID() const { return -1; } virtual std::vector getIniTweaks() const { return std::vector(); } diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index 0763bb71..6ec282f6 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see . #include "persistentcookiejar.h" #include "settings.h" #include -#include #include #include #include diff --git a/src/settings.cpp b/src/settings.cpp index 4c2a34c8..b51ba71e 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -22,7 +22,6 @@ along with Mod Organizer. If not, see . #include "settingsdialog.h" #include "utility.h" #include "helper.h" -#include "json.h" #include #include #include diff --git a/src/settings.h b/src/settings.h index def1dc5c..580ffe42 100644 --- a/src/settings.h +++ b/src/settings.h @@ -328,7 +328,7 @@ private: }; /** Display/store the configuration in the 'general' tab of the settings dialogue */ - class GeneralTab : SettingsTab + class GeneralTab : public SettingsTab { public: GeneralTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -347,7 +347,7 @@ private: }; /** Display/store the configuration in the 'nexus' tab of the settings dialogue */ - class NexusTab : SettingsTab + class NexusTab : public SettingsTab { public: NexusTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -365,7 +365,7 @@ private: }; /** Display/store the configuration in the 'steam' tab of the settings dialogue */ - class SteamTab : SettingsTab + class SteamTab : public SettingsTab { public: SteamTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -378,7 +378,7 @@ private: }; /** Display/store the configuration in the 'plugins' tab of the settings dialogue */ - class PluginsTab : SettingsTab + class PluginsTab : public SettingsTab { public: PluginsTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -391,7 +391,7 @@ private: }; /** Display/store the configuration in the 'workarounds' tab of the settings dialogue */ - class WorkaroundsTab : SettingsTab + class WorkaroundsTab : public SettingsTab { public: WorkaroundsTab(Settings *m_parent, SettingsDialog &m_dialog); -- cgit v1.3.1 From 76bee42dd10056f7ad820eb7e14f5dc028f35c8f Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 18 Oct 2015 19:00:14 +0100 Subject: umm. windows hardlinks weren't quite working as expected --- SConstruct | 56 ++++++++++++++++++-- qtmappings.imp | 122 +++++++++++++++++++++++++++++++++----------- scons_configure_template.py | 3 -- 3 files changed, 144 insertions(+), 37 deletions(-) diff --git a/SConstruct b/SConstruct index eb3da432..94097f3c 100644 --- a/SConstruct +++ b/SConstruct @@ -37,6 +37,14 @@ def setup_config_variables(): if 'ZLIBPATH' in os.environ: zlibpath = os.environ['ZLIBPATH'] + git = 'git' + if 'GIT' in os.environ: + git = os.environ['GIT'] + + mercurial = 'hg' + if 'MERCURIAL' in os.environ: + hg = os.environ['HG'] + vars = Variables('scons_configure.py') vars.AddVariables( PathVariable('BOOSTPATH', 'Set to point to your boost directory', @@ -50,12 +58,14 @@ def setup_config_variables(): PathVariable.PathIsDir), PathVariable('SEVENZIPPATH', 'Path to 7zip sources', sevenzippath, PathVariable.PathIsDir), - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir). PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, PathVariable.PathIsDir), - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir) + PathVariable('GIT', 'Path to git executable', git, + PathVariable.PathIsFile), + PathVariable('MERCURIAL', 'Path to hg executable', mercurial, + PathVariable.PathIsFile), + PathVariable('IWYU', 'Path to include-what-you-use executable', None, + PathVariable.PathIsFile) ) return vars @@ -351,6 +361,44 @@ else: env.AppendUnique(CPPFLAGS = [ '/O2', '/MD' ]) env.AppendUnique(LINKFLAGS = [ '/OPT:REF', '/OPT:ICF' ]) +# Add in env variables for include-what-you-use +################################################################ +# I really want to make this a post action for building a .o +if 'IWYU' in env: + # Sigh - IWYU is a right bum as it doesn't recognise /I so I have to duplicate most of the usual stuff. Worse, half the + # flags are irrelevant immaterial and incompetent and I can't use an environment clone because it takes stuff from the + # wrong environment. + + # There has to be a better way of doing this. 'begins with Q means system header'??? + # Also, I can't get this to show issues in the issue window which sucks + env['IWYU_FLAGS'] = [ + # This might turn down the output a bit. I hope + '-Xiwyu', '--transitive_includes_only', + '-D_MT', '-D_DLL', '-m32', + # This is something to do with clang, windows and boost headers + '-DBOOST_USE_WINDOWS_H', + # There's a lot of this, disabled for now + '-Wno-inconsistent-missing-override', + '--system-header-prefix=Q', + '--system-header-prefix=boost/', + # Attempt to get QT to recognise clang output. So far it has not worked well. + '-fdiagnostics-format=msvc', + '-fno-show-column', + # clang says it sets this to 1700 but pretty sure vc12 is 1800 + '-fmsc-version=1800', + ] + if env['CONFIG'] == 'debug': + env['IWYU_FLAGS'] += [ '-D_DEBUG' ] + + env['IWYU_DEFPREFIX'] = '-D' + env['IWYU_DEFSUFFIX'] = '' + env['IWYU_INCPREFIX'] = '-I' + env['IWYU_INCSUFFIX'] = '' + env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS' + env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' + env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' + env['IWYU_MAPPING_FILE'] = env.File('#/qtmappings.imp') + # /OPT:REF removes unreferenced code # for release, use /OPT:ICF (comdat folding: coalesce identical blocks of code) diff --git a/qtmappings.imp b/qtmappings.imp index 3dc2e5f5..db59f67f 100644 --- a/qtmappings.imp +++ b/qtmappings.imp @@ -4,30 +4,36 @@ { symbol: [ "QAbstractTableModel", "private", "", "public" ] }, { symbol: [ "QAtomicInt", "private", "", "public"] }, { symbol: [ "QDate", "private", "", "public"] }, - { symbol: [ "QKeyEvent", "private", "", "public" ] }, { symbol: [ "QDragEnterEvent", "private", "", "public" ] }, + { symbol: [ "QIntValidator", "private", "", "public" ] }, + { symbol: [ "QKeyEvent", "private", "", "public" ] }, { symbol: [ "QListWidgetItem", "private", "", "public" ] }, { symbol: [ "QModelIndex", "private", "", "public" ] }, + { symbol: [ "QModelIndexList", "private", "", "public" ] }, { symbol: [ "QMouseEvent", "private", "", "public" ] }, - { symbol: [ "QMutableHashIterator", "private", "", "public" ] }, + { symbol: [ "@QMutableHashIterator(::.*)?", "private", "", "public" ] }, { symbol: [ "QScopedArrayPointer", "private", "", "public" ] }, + { symbol: [ "QResizeEvent", "private", "", "public" ] }, { symbol: [ "QStyleOptionSlider", "private", "", "public" ] }, { symbol: [ "QStyleOptionViewItem", "private", "", "public" ] }, - { symbol: [ "QTime", "private", "", "public"] }, { symbol: [ "QTableWidgetItem", "private", "", "public" ] }, + { symbol: [ "QTime", "private", "", "public"] }, { symbol: [ "QTreeWidgetItem", "private", "", "public" ] }, { symbol: [ "QVBoxLayout", "private", "", "public" ] }, { symbol: [ "QWebHitTestResult", "private", "", "public" ] }, { symbol: [ "qobject_cast", "private", "", "public"] }, - # these are in QMetaType but the documentation is slightly unclear as to where they are meant to be defined. - { symbol: [ "QVariantMap", "private", "", "public" ] }, { symbol: [ "QVariantList", "private", "", "public" ] }, + { symbol: [ "QVariantMap", "private", "", "public" ] }, #Normal header overrides +# Possibly we should add in the QtCore/ (see MOC generated files which always do) + + { include: [ "@\"(QtConcurrent/)?qtconcurrentrun\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qabstractitemmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractproxymodel\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qbytearray\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qchar\\.h\"", "private", "", "public" ] }, @@ -36,13 +42,17 @@ { include: [ "@\"(QtCore/)?qdatastream\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdatetime\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdir\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdiriterator\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qfile\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qfileinfo\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qflags\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfuture\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qglobal\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qhash\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qiodevice\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qitemselectionmodel\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qjsonvalue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlibrary\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qlist\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qlocale\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "", "public" ] }, @@ -61,23 +71,26 @@ { include: [ "@\"(QtCore/)?qstringlist\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qurl\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qvariant\\.h\"", "private", "", "public" ] }, - + { include: [ "@\"(QtCore/)?qdebug\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstandardpaths\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qbrush\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qcolor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qcursor\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qfont\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qicon\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qimage\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qkeysequence\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpainter\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qpalette\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qpen\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qpixmap\\.h\"", "private", "", "public" ] }, - + { include: [ "@\"(QtGui/)?qfontmetrics\\.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtNetwork/)?qnetworkaccessmanager\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtNetwork/)?qnetworkrequest\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, - - { include: [ "\"QtWebKit/qwebsettings.h\"", "private", "", "public" ] }, - + { include: [ "@\"(QtWidgets/)?qabstractbutton\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qabstractitemview\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qaction\\.h\"", "private", "", "public" ] }, @@ -87,35 +100,36 @@ { include: [ "@\"(QtWidgets/)?qlayout\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qlayoutitem\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qlineedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsizepolicy\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qstyle\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qstyleoption\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtabbar\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qtabwidget\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtextedit\\.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtWebKit/)?qwebsettings\\.h\"", "private", "", "public" ] }, + + { include: [ "@\"(QtWebKitWidgets/)?qwebpage\\.h\"", "private", "", "public" ] }, - { include: [ "\"qabstractproxymodel.h\"", "private", "", "public" ] }, { include: [ "\"qapplication.h\"", "private", "", "public" ] }, { include: [ "\"qcheckbox.h\"", "private", "", "public" ] }, { include: [ "\"qclipboard.h\"", "private", "", "public" ] }, { include: [ "\"qcombobox.h\"", "private", "", "public" ] }, { include: [ "\"qcommandlinkbutton.h\"", "private", "", "public" ] }, { include: [ "\"qcryptographichash.h\"", "private", "", "public" ] }, - { include: [ "\"qdatetime.h\"", "private", "", "public" ] }, - { include: [ "\"qdebug.h\"", "private", "", "public" ] }, { include: [ "\"qdesktopwidget.h\"", "private", "", "public" ] }, - { include: [ "\"qdialog.h\"", "private", "", "public" ] }, { include: [ "\"qdialogbuttonbox.h\"", "private", "", "public" ] }, - { include: [ "\"qdiriterator.h\"", "private", "", "public" ] }, { include: [ "\"qfiledialog.h\"", "private", "", "public" ] }, { include: [ "\"qfilesystemmodel.h\"", "private", "", "public" ] }, { include: [ "\"qfilesystemwatcher.h\"", "private", "", "public" ] }, - { include: [ "\"qhash.h\"", "private", "", "public" ] }, { include: [ "\"qheaderview.h\"", "private", "", "public" ] }, { include: [ "\"qinputdialog.h\"", "private", "", "public" ] }, { include: [ "\"qitemdelegate.h\"", "private", "", "public" ] }, { include: [ "\"qjsonarray.h\"", "private", "", "public" ] }, { include: [ "\"qjsondocument.h\"", "private", "", "public" ] }, { include: [ "\"qlabel.h\"", "private", "", "public" ] }, - { include: [ "\"qlibrary.h\"", "private", "", "public" ] }, + { include: [ "\"qlcdnumber.h\"", "private", "", "public" ] }, { include: [ "\"qlistwidget.h\"", "private", "", "public" ] }, { include: [ "\"qlocalserver.h\"", "private", "", "public" ] }, { include: [ "\"qlocalsocket.h\"", "private", "", "public" ] }, @@ -127,20 +141,23 @@ { include: [ "\"qmutex.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkcookie.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkcookiejar.h\"", "private", "", "public" ] }, + { include: [ "\"qnetworkdiskcache.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkinterface.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkreply.h\"", "private", "", "public" ] }, - { include: [ "\"qpainter.h\"", "private", "", "public" ] }, { include: [ "\"qprocess.h\"", "private", "", "public" ] }, { include: [ "\"qprogressbar.h\"", "private", "", "public" ] }, { include: [ "\"qprogressdialog.h\"", "private", "", "public" ] }, { include: [ "\"qproxystyle.h\"", "private", "", "public" ] }, { include: [ "\"qpushbutton.h\"", "private", "", "public" ] }, - { include: [ "\"qregexp.h\"", "private", "", "public" ] }, + { include: [ "\"qqueue.h\"", "private", "", "public" ] }, { include: [ "\"qscrollbar.h\"", "private", "", "public" ] }, { include: [ "\"qsettings.h\"", "private", "", "public" ] }, { include: [ "\"qsharedmemory.h\"", "private", "", "public" ] }, { include: [ "\"qshortcut.h\"", "private", "", "public" ] }, + { include: [ "\"qsignalmapper.h\"", "private", "", "public" ] }, { include: [ "\"qsortfilterproxymodel.h\"", "private", "", "public" ] }, + { include: [ "\"qsplashscreen.h\"", "private", "", "public" ] }, + { include: [ "\"qsslsocket.h\"", "private", "", "public" ] }, { include: [ "\"qstackedwidget.h\"", "private", "", "public" ] }, { include: [ "\"qstyleditemdelegate.h\"", "private", "", "public" ] }, { include: [ "\"qstylefactory.h\"", "private", "", "public" ] }, @@ -148,48 +165,93 @@ { include: [ "\"qtemporaryfile.h\"", "private", "", "public" ] }, { include: [ "\"qtextbrowser.h\"", "private", "", "public" ] }, { include: [ "\"qtextcodec.h\"", "private", "", "public" ] }, - { include: [ "\"qtextedit.h\"", "private", "", "public" ] }, { include: [ "\"qtextstream.h\"", "private", "", "public" ] }, + { include: [ "\"qtgroupingproxy.h\"", "private", "", "public" ] }, { include: [ "\"qthread.h\"", "private", "", "public" ] }, { include: [ "\"qtimer.h\"", "private", "", "public" ] }, { include: [ "\"qtreeview.h\"", "private", "", "public" ] }, { include: [ "\"qtreewidget.h\"", "private", "", "public" ] }, { include: [ "\"qurlquery.h\"", "private", "", "public" ] }, { include: [ "\"qvalidator.h\"", "private", "", "public" ] }, + { include: [ "\"qvector.h\"", "private", "", "public" ] }, { include: [ "\"qwebframe.h\"", "private", "", "public" ] }, { include: [ "\"qwebhistory.h\"", "private", "", "public" ] }, - { include: [ "\"qwebpage.h\"", "private", "", "public" ] }, { include: [ "\"qwebview.h\"", "private", "", "public" ] }, { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkdiskcache.h\"", "private", "", "public" ] }, - { include: [ "\"qmimedata.h\"", "private", "", "public" ] }, - { include: [ "\"qtgroupingproxy.h\"", "private", "", "public" ] }, # Microsft visual C? { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, # Windows +# You have to be kidding me. ULONG is defined in winsmcrd.h? + { symbol: [ "ULONG", "private", "", "private" ] }, +# These are all in windef.h apparently. Which m/s then says 'use windows.h' + { include: [ "", "private", "", "private" ] }, # or in winnt apparently + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + +# Similary, but for winbase.h + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + +# These ones say xxxx.h (include windows.h) on the ms web site + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # check this { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, -# And for boost??? +# These ones are in windows.h but the documentation post windows 8 says they are individual headers, +# which looks like M/S are trying to get their act together. Maybe. + { include: [ "", "private", "", "public" ] }, #recheck + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, -] +# These ones are *not* defined to be in windows.h, but it seems to work. These should probably be cleaned up + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, +# And for boost??? +# These are probably correct but might need a revisit as if you look at the boost documentation pages, it +# can give you huge lists of alternate includes... + { symbol: [ "BOOST_FOREACH", "private", "", "public" ] }, + { include: [ "@\"boost/bind/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/algorithm/string/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/assign/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/function/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/signals2/.*\"", "private", "", "public" ] }, + { include: [ "\"boost/smart_ptr/scoped_array.hpp\"", "private", "", "public" ] }, + { include: [ "\"boost/smart_ptr/shared_ptr.hpp\"", "private", "", "public" ] }, + +# And this is specific to us + { include: [ "\"appconfig.inc\"", "private", "\"appconfig.h\"", "public" ] }, +] +# Ones I don't yet know how to deal with +#include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion +#include "boost/iterator/iterator_facade.hpp" // for operator!= +#include // for operator delete[], etc #include "QtCore/qiterator.h" #include "QtCore/qtypeinfo.h" // for swap +#include "QtCore/qtypetraits.h" #include "QtCore/qtypetraits.h" // for remove_reference<>::type #include "QtGui/qfontmetrics.h" +#include "QtGui/qvalidator.h" // for QIntValidator #include "QtGui/qwindowdefs_win.h" // for HINSTANCE +#include "QtWidgets/qabstractitemdelegate.h" +#include "boost/iterator/iterator_facade.hpp" #include // for _Simple_types<>::value_type #include // for _Tree_const_iterator diff --git a/scons_configure_template.py b/scons_configure_template.py index e4116adf..67a8fad6 100644 --- a/scons_configure_template.py +++ b/scons_configure_template.py @@ -31,6 +31,3 @@ ZLIBPATH = r"C:\Apps\zlib-1.2.8" # though you have to set it up in the configuration GIT = r"C:\Program Files\git\bin\git.exe" MERCURIAL = r"C:\Program Files\TortoiseHg\hg.exe" - -# Path to include-what-you-use. This is currently rather experimental -#IWYU = r"C:\Apps\include-what-you-use\bin\include-what-you-use.exe" -- cgit v1.3.1 From b1cfc45853705163da0641eb8cf1cd77783e009d Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 25 Oct 2015 08:36:30 +0000 Subject: Make the IWYU generation generic --- SConstruct | 117 +++++++++++++++++++++++++++++++++++++++------------------ qtmappings.imp | 117 +++++++++++++++++++++++++++++++++++++++++---------------- src/SConscript | 8 ---- 3 files changed, 164 insertions(+), 78 deletions(-) diff --git a/SConstruct b/SConstruct index 94097f3c..fbc7e3fe 100644 --- a/SConstruct +++ b/SConstruct @@ -245,6 +245,83 @@ def DisableQtModules(self, *modules): for module in modules: self['CPPPATH'].remove(os.path.join('$QTDIR', 'include', 'QT' + module)) +def setup_IWYU(env): + import SCons.Defaults + import SCons.Builder + original_shared = SCons.Defaults.SharedObjectEmitter + original_static = SCons.Defaults.StaticObjectEmitter + + def DoIWYU(env, source, target): + for i in range(len(source)): + s = source[i] + dir, name = os.path.split(str(s)) # I'm sure theres a way of getting this from scons + # Don't bother looking at moc files and 7zip source + if not name.startswith('moc_') and \ + not dir.startswith(env['SEVENZIPPATH']): + # Put the .iwyu in the same place as the .obj + targ = os.path.splitext(str(target[i]))[0] + env.IWYU(targ + '.iwyu', s) + + def shared_emitter(target, source, env): + DoIWYU(env, source, target) + return original_shared(target, source, env) + + def static_emitter(target, source, env): + DoIWYU(env, source, target) + return original_static(target, source, env) + + SCons.Defaults.SharedObjectEmitter = shared_emitter + SCons.Defaults.StaticObjectEmitter = static_emitter + + def emitter(target, source, env): + env.Depends(target, '$IWYU_MAPPING_FILE') + return target, source + + iwyu = SCons.Builder.Builder( + action=[ + '-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM $SOURCE', + Touch('$TARGET') + ], + emitter=emitter, + suffix='.iwyu', + src_suffix='.cpp') + + env.Append(BUILDERS={'IWYU': iwyu}) + + # Sigh - IWYU is a right bum as it doesn't recognise /I so I have to duplicate most of the usual stuff. Worse, half the + # flags are irrelevant immaterial and incompetent and I can't use an environment clone because it takes stuff from the + # wrong environment. + + # There has to be a better way of doing this. 'begins with Q means system header'??? + # Also, I can't get this to show issues in the issue window which sucks + env['IWYU_FLAGS'] = [ + # This might turn down the output a bit. I hope + '-Xiwyu', '--transitive_includes_only', + '-D_MT', '-D_DLL', '-m32', + # This is something to do with clang, windows and boost headers + '-DBOOST_USE_WINDOWS_H', + # There's a lot of this, disabled for now + '-Wno-inconsistent-missing-override', + '--system-header-prefix=Q', + '--system-header-prefix=boost/', + # Attempt to get QT to recognise clang output. So far it has not worked well. + '-fdiagnostics-format=msvc', + '-fno-show-column', + # clang says it sets this to 1700 but pretty sure vc12 is 1800 + '-fmsc-version=1800', + ] + if env['CONFIG'] == 'debug': + env['IWYU_FLAGS'] += [ '-D_DEBUG' ] + + env['IWYU_DEFPREFIX'] = '-D' + env['IWYU_DEFSUFFIX'] = '' + env['IWYU_INCPREFIX'] = '-I' + env['IWYU_INCSUFFIX'] = '' + env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $CCPDBFLAGS' + env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' + env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' + env['IWYU_MAPPING_FILE'] = env.File('#/qtmappings.imp') + # Create base environment vars = setup_config_variables() @@ -361,44 +438,10 @@ else: env.AppendUnique(CPPFLAGS = [ '/O2', '/MD' ]) env.AppendUnique(LINKFLAGS = [ '/OPT:REF', '/OPT:ICF' ]) -# Add in env variables for include-what-you-use -################################################################ -# I really want to make this a post action for building a .o +# Set up include what you use. Add this as an extra compile step. Note it +# doesn't currently generate an output file (use the output instead!). if 'IWYU' in env: - # Sigh - IWYU is a right bum as it doesn't recognise /I so I have to duplicate most of the usual stuff. Worse, half the - # flags are irrelevant immaterial and incompetent and I can't use an environment clone because it takes stuff from the - # wrong environment. - - # There has to be a better way of doing this. 'begins with Q means system header'??? - # Also, I can't get this to show issues in the issue window which sucks - env['IWYU_FLAGS'] = [ - # This might turn down the output a bit. I hope - '-Xiwyu', '--transitive_includes_only', - '-D_MT', '-D_DLL', '-m32', - # This is something to do with clang, windows and boost headers - '-DBOOST_USE_WINDOWS_H', - # There's a lot of this, disabled for now - '-Wno-inconsistent-missing-override', - '--system-header-prefix=Q', - '--system-header-prefix=boost/', - # Attempt to get QT to recognise clang output. So far it has not worked well. - '-fdiagnostics-format=msvc', - '-fno-show-column', - # clang says it sets this to 1700 but pretty sure vc12 is 1800 - '-fmsc-version=1800', - ] - if env['CONFIG'] == 'debug': - env['IWYU_FLAGS'] += [ '-D_DEBUG' ] - - env['IWYU_DEFPREFIX'] = '-D' - env['IWYU_DEFSUFFIX'] = '' - env['IWYU_INCPREFIX'] = '-I' - env['IWYU_INCSUFFIX'] = '' - env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS' - env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' - env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' - env['IWYU_MAPPING_FILE'] = env.File('#/qtmappings.imp') - + setup_IWYU(env) # /OPT:REF removes unreferenced code # for release, use /OPT:ICF (comdat folding: coalesce identical blocks of code) diff --git a/qtmappings.imp b/qtmappings.imp index db59f67f..17073ddd 100644 --- a/qtmappings.imp +++ b/qtmappings.imp @@ -1,19 +1,23 @@ [ # Overrides. Some classes are defined by the spec to reside in their own headers but actually use the same # header as another class. It might make some sense using this for every class in QT... + { symbol: [ "QAbstractItemModel", "private", "", "public" ] }, { symbol: [ "QAbstractTableModel", "private", "", "public" ] }, { symbol: [ "QAtomicInt", "private", "", "public"] }, + { symbol: [ "QCloseEvent", "private", "", "public" ] }, { symbol: [ "QDate", "private", "", "public"] }, { symbol: [ "QDragEnterEvent", "private", "", "public" ] }, + { symbol: [ "QDropEvent", "private", "", "public" ] }, { symbol: [ "QIntValidator", "private", "", "public" ] }, { symbol: [ "QKeyEvent", "private", "", "public" ] }, { symbol: [ "QListWidgetItem", "private", "", "public" ] }, { symbol: [ "QModelIndex", "private", "", "public" ] }, - { symbol: [ "QModelIndexList", "private", "", "public" ] }, + { symbol: [ "QModelIndexList", "private", "", "public" ] }, { symbol: [ "QMouseEvent", "private", "", "public" ] }, { symbol: [ "@QMutableHashIterator(::.*)?", "private", "", "public" ] }, + { symbol: [ "QPersistentModelIndex", "private", "", "public" ] }, + { symbol: [ "QResizeEvent", "private", "", "public" ] }, { symbol: [ "QScopedArrayPointer", "private", "", "public" ] }, - { symbol: [ "QResizeEvent", "private", "", "public" ] }, { symbol: [ "QStyleOptionSlider", "private", "", "public" ] }, { symbol: [ "QStyleOptionViewItem", "private", "", "public" ] }, { symbol: [ "QTableWidgetItem", "private", "", "public" ] }, @@ -32,7 +36,6 @@ { include: [ "@\"(QtConcurrent/)?qtconcurrentrun\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qabstractitemmodel\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qabstractproxymodel\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qbytearray\\.h\"", "private", "", "public" ] }, @@ -41,6 +44,7 @@ { include: [ "@\"(QtCore/)?qcoreevent\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdatastream\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdatetime\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdebug\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdir\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qdiriterator\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qfile\\.h\"", "private", "", "public" ] }, @@ -67,17 +71,17 @@ { include: [ "@\"(QtCore/)?qset\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qsharedpointer_impl\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qsize\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstandardpaths\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qstring\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qstringlist\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qurl\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qvariant\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdebug\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qstandardpaths\\.h\"", "private", "", "public" ] }, - + { include: [ "@\"(QtGui/)?qbrush\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qcolor\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qcursor\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qfont\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfontmetrics\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qicon\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qimage\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qkeysequence\\.h\"", "private", "", "public" ] }, @@ -85,7 +89,6 @@ { include: [ "@\"(QtGui/)?qpalette\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qpen\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtGui/)?qpixmap\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qfontmetrics\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtNetwork/)?qnetworkaccessmanager\\.h\"", "private", "", "public" ] }, @@ -105,14 +108,16 @@ { include: [ "@\"(QtWidgets/)?qstyleoption\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qtabbar\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qtabwidget\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWidgets/)?qtextedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWebKit/)?qwebsettings\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtWebKitWidgets/)?qwebpage\\.h\"", "private", "", "public" ] }, + # I need to find out where these are and group them as above. { include: [ "\"qapplication.h\"", "private", "", "public" ] }, + { include: [ "\"qbuffer.h\"", "private", "", "public" ] }, { include: [ "\"qcheckbox.h\"", "private", "", "public" ] }, { include: [ "\"qclipboard.h\"", "private", "", "public" ] }, { include: [ "\"qcombobox.h\"", "private", "", "public" ] }, @@ -123,11 +128,13 @@ { include: [ "\"qfiledialog.h\"", "private", "", "public" ] }, { include: [ "\"qfilesystemmodel.h\"", "private", "", "public" ] }, { include: [ "\"qfilesystemwatcher.h\"", "private", "", "public" ] }, + { include: [ "\"qgroupbox.h\"", "private", "", "public" ] }, { include: [ "\"qheaderview.h\"", "private", "", "public" ] }, { include: [ "\"qinputdialog.h\"", "private", "", "public" ] }, { include: [ "\"qitemdelegate.h\"", "private", "", "public" ] }, { include: [ "\"qjsonarray.h\"", "private", "", "public" ] }, { include: [ "\"qjsondocument.h\"", "private", "", "public" ] }, + { include: [ "\"qjsonobject.h\"", "private", "", "public" ] }, { include: [ "\"qlabel.h\"", "private", "", "public" ] }, { include: [ "\"qlcdnumber.h\"", "private", "", "public" ] }, { include: [ "\"qlistwidget.h\"", "private", "", "public" ] }, @@ -144,12 +151,14 @@ { include: [ "\"qnetworkdiskcache.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkinterface.h\"", "private", "", "public" ] }, { include: [ "\"qnetworkreply.h\"", "private", "", "public" ] }, + { include: [ "\"qpixmapcache.h\"", "private", "", "public" ] }, { include: [ "\"qprocess.h\"", "private", "", "public" ] }, { include: [ "\"qprogressbar.h\"", "private", "", "public" ] }, { include: [ "\"qprogressdialog.h\"", "private", "", "public" ] }, { include: [ "\"qproxystyle.h\"", "private", "", "public" ] }, { include: [ "\"qpushbutton.h\"", "private", "", "public" ] }, { include: [ "\"qqueue.h\"", "private", "", "public" ] }, + { include: [ "\"qradiobutton.h\"", "private", "", "public" ] }, { include: [ "\"qscrollbar.h\"", "private", "", "public" ] }, { include: [ "\"qsettings.h\"", "private", "", "public" ] }, { include: [ "\"qsharedmemory.h\"", "private", "", "public" ] }, @@ -157,18 +166,24 @@ { include: [ "\"qsignalmapper.h\"", "private", "", "public" ] }, { include: [ "\"qsortfilterproxymodel.h\"", "private", "", "public" ] }, { include: [ "\"qsplashscreen.h\"", "private", "", "public" ] }, + { include: [ "\"qsplitter.h\"", "private", "", "public" ] }, { include: [ "\"qsslsocket.h\"", "private", "", "public" ] }, { include: [ "\"qstackedwidget.h\"", "private", "", "public" ] }, + { include: [ "\"qstatusbar.h\"", "private", "", "public" ] }, { include: [ "\"qstyleditemdelegate.h\"", "private", "", "public" ] }, { include: [ "\"qstylefactory.h\"", "private", "", "public" ] }, + { include: [ "\"qsyntaxhighlighter.h\"", "private", "", "public" ] }, { include: [ "\"qtablewidget.h\"", "private", "", "public" ] }, { include: [ "\"qtemporaryfile.h\"", "private", "", "public" ] }, { include: [ "\"qtextbrowser.h\"", "private", "", "public" ] }, { include: [ "\"qtextcodec.h\"", "private", "", "public" ] }, { include: [ "\"qtextstream.h\"", "private", "", "public" ] }, - { include: [ "\"qtgroupingproxy.h\"", "private", "", "public" ] }, { include: [ "\"qthread.h\"", "private", "", "public" ] }, { include: [ "\"qtimer.h\"", "private", "", "public" ] }, + { include: [ "\"qtoolbar.h\"", "private", "", "public" ] }, + { include: [ "\"qtoolbutton.h\"", "private", "", "public" ] }, + { include: [ "\"qtooltip.h\"", "private", "", "public" ] }, + { include: [ "\"qtranslator.h\"", "private", "", "public" ] }, { include: [ "\"qtreeview.h\"", "private", "", "public" ] }, { include: [ "\"qtreewidget.h\"", "private", "", "public" ] }, { include: [ "\"qurlquery.h\"", "private", "", "public" ] }, @@ -178,48 +193,68 @@ { include: [ "\"qwebhistory.h\"", "private", "", "public" ] }, { include: [ "\"qwebview.h\"", "private", "", "public" ] }, { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, + { include: [ "\"qwidgetaction.h\"", "private", "", "public" ] }, + { include: [ "\"qimagereader.h\"", "private", "", "public" ] }, -# Microsft visual C? + + # Microsft visual C? + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, # Windows +# Looks like the doucmentation says the 1st char is u/c the rest are l/c # You have to be kidding me. ULONG is defined in winsmcrd.h? { symbol: [ "ULONG", "private", "", "private" ] }, -# These are all in windef.h apparently. Which m/s then says 'use windows.h' + { include: [ "", "private", "", "private" ] }, # Stringapiset.h + { include: [ "", "private", "", "public" ] }, # Windows.h + +# These are all in windef.h apparently. Which m/s then says 'use Windows.h' { include: [ "", "private", "", "private" ] }, # or in winnt apparently { include: [ "", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, # Similary, but for winbase.h - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, -# These ones say xxxx.h (include windows.h) on the ms web site - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, # check this - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, +# These ones say xxxx.h (include Windows.h) on the ms web site + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # VerRsrc.h + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, -# These ones are in windows.h but the documentation post windows 8 says they are individual headers, +# These ones are in Windows.h but the documentation post windows 8 says they are individual headers, # which looks like M/S are trying to get their act together. Maybe. - { include: [ "", "private", "", "public" ] }, #recheck - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, -# These ones are *not* defined to be in windows.h, but it seems to work. These should probably be cleaned up - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, +# These ones are *not* defined to be in Windows.h, but it seems to work. These should probably be cleaned up + { include: [ "", "private", "", "public" ] }, + # These 3 should go to Shellapi.h + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, +# combaseapi.h is for objbase.h but objbase.h appears to come free with Windows.h +# Windows.h is a pile of ... + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + +# Huh? This one is sane? + { include: [ "", "private", "", "public" ] }, # And for boost??? # These are probably correct but might need a revisit as if you look at the boost documentation pages, it @@ -229,7 +264,10 @@ { include: [ "@\"boost/bind/.*\"", "private", "", "public" ] }, { include: [ "@\"boost/algorithm/string/.*\"", "private", "", "public" ] }, { include: [ "@\"boost/assign/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/filesystem/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/format/.*\"", "private", "", "public" ] }, { include: [ "@\"boost/function/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/python/.*\"", "private", "", "public" ] }, { include: [ "@\"boost/signals2/.*\"", "private", "", "public" ] }, { include: [ "\"boost/smart_ptr/scoped_array.hpp\"", "private", "", "public" ] }, { include: [ "\"boost/smart_ptr/shared_ptr.hpp\"", "private", "", "public" ] }, @@ -239,7 +277,17 @@ ] +# Warning: QtGroupingProxy is not provided by Qt + +#include "qdeclarativecontext.h" // for QDeclarativeContext +#include "qdeclarativeview.h" // for QDeclarativeView, etc +#include "qgraphicsitem.h" // for QGraphicsObject + +#include "qpluginloader.h" +#include "qnetworkproxy.h" + # Ones I don't yet know how to deal with +#include #include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion #include "boost/iterator/iterator_facade.hpp" // for operator!= #include // for operator delete[], etc @@ -248,10 +296,13 @@ #include "QtCore/qtypeinfo.h" // for swap #include "QtCore/qtypetraits.h" #include "QtCore/qtypetraits.h" // for remove_reference<>::type -#include "QtGui/qfontmetrics.h" -#include "QtGui/qvalidator.h" // for QIntValidator #include "QtGui/qwindowdefs_win.h" // for HINSTANCE #include "QtWidgets/qabstractitemdelegate.h" #include "boost/iterator/iterator_facade.hpp" #include // for _Simple_types<>::value_type #include // for _Tree_const_iterator + +# typical error on stdout (?) +#source\hookdll\dllmain.cpp(220) : warning C4244: '=' : conversion from 'int' to 'char', possible loss of data +# error from include-what-you-use (on stderr? at least it's in red) +#source\hookdll\dllmain.cpp(2220) : warning: case value not in enumerated type 'FILE_INFORMATION_CLASS' (aka '_FILE_INFORMATION_CLASS') [-Wswitch] diff --git a/src/SConscript b/src/SConscript index cd2d8a52..d88bee30 100644 --- a/src/SConscript +++ b/src/SConscript @@ -143,14 +143,6 @@ env.AppendUnique(LIBS = 'zlibstatic') prog = env.Program('ModOrganizer', cpp_files + env.Glob('*.qrc') + other_sources) -############################################################################### -# I'd like to automatically add this to every .o generation. -if 'IWYU' in env: - for f in cpp_files + [ env.File('aboutdialog.cpp') ]: - env.AddPostAction(prog, "-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM " + str(f)) - env.Depends(prog, env['IWYU_MAPPING_FILE']) -############################################################################### - env.InstallModule(prog) for subdir in ('tutorials', 'stylesheets'): -- cgit v1.3.1 From 8f64a1d13671dde96873c6245de850b133d7ad32 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 25 Oct 2015 21:07:02 +0000 Subject: Proper integraton of IWYU into the build (including massaging clang errors into the issues tab). Note: There is at least one ug in QT that stops thing s copiling because it doesn't undertand clangs version --- massage_messages.py | 12 ++++++++++++ qtmappings.imp | 32 ++++++++++++++++++++++---------- src/modinfo.h | 4 ++-- 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 massage_messages.py diff --git a/massage_messages.py b/massage_messages.py new file mode 100644 index 00000000..656c48bd --- /dev/null +++ b/massage_messages.py @@ -0,0 +1,12 @@ +# Attempt to massage the messages from clang so that QT recognises them +# expected: source\bsatk\bsafile.cpp(101) : fatal error C1189: #error : "we may have to compress/decompress!" +# clang: source\bsatk\bsafile.cpp(101) : error: "we may have to compress/decompress!" + +import fileinput +import re + +for line in fileinput.input(): + # Look for '\) : ([^:])?:' + # Replace with ') : \1 I0000: + line.rstrip() + print re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I0000:', line) \ No newline at end of file diff --git a/qtmappings.imp b/qtmappings.imp index 17073ddd..deea653f 100644 --- a/qtmappings.imp +++ b/qtmappings.imp @@ -195,7 +195,10 @@ { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, { include: [ "\"qwidgetaction.h\"", "private", "", "public" ] }, { include: [ "\"qimagereader.h\"", "private", "", "public" ] }, - + { include: [ "\"qdeclarativecontext.h\"", "private", "", "public" ] }, + { include: [ "\"qdeclarativeview.h\"", "private", "", "public" ] }, +# looks wrong +# { include: [ "\"qgraphicsitem.h\"", "private", "", "public" ] }, # Microsft visual C? @@ -210,7 +213,7 @@ { symbol: [ "ULONG", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, # Stringapiset.h - { include: [ "", "private", "", "public" ] }, # Windows.h + { include: [ "", "private", "", "public" ] }, # These are all in windef.h apparently. Which m/s then says 'use Windows.h' { include: [ "", "private", "", "private" ] }, # or in winnt apparently @@ -227,6 +230,7 @@ { include: [ "", "private", "", "private" ] }, # These ones say xxxx.h (include Windows.h) on the ms web site + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, # VerRsrc.h { include: [ "", "private", "", "public" ] }, @@ -245,14 +249,26 @@ { include: [ "", "private", "", "public" ] }, # These 3 should go to Shellapi.h { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # official name according to website { include: [ "", "private", "", "public" ] }, + # + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, -# combaseapi.h is for objbase.h but objbase.h appears to come free with Windows.h -# Windows.h is a pile of ... - { include: [ "", "private", "", "private" ] }, + +# Files that are included by other files which seem to then come for free in Windows.h but +# shouldn't. Again, should be cleaned up. + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + # Huh? This one is sane? { include: [ "", "private", "", "public" ] }, @@ -279,15 +295,11 @@ # Warning: QtGroupingProxy is not provided by Qt -#include "qdeclarativecontext.h" // for QDeclarativeContext -#include "qdeclarativeview.h" // for QDeclarativeView, etc -#include "qgraphicsitem.h" // for QGraphicsObject #include "qpluginloader.h" #include "qnetworkproxy.h" # Ones I don't yet know how to deal with -#include #include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion #include "boost/iterator/iterator_facade.hpp" // for operator!= #include // for operator delete[], etc diff --git a/src/modinfo.h b/src/modinfo.h index d9de60e8..da97b09b 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -1047,7 +1047,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const { return QDateTime(); } virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } virtual QString getInstallationFile() const { return ""; } virtual int getFixedPriority() const { return INT_MAX; } virtual int getNexusID() const { return -1; } @@ -1099,7 +1099,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const; virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } virtual QString getInstallationFile() const { return ""; } virtual int getNexusID() const { return -1; } virtual std::vector getIniTweaks() const { return std::vector(); } -- cgit v1.3.1 From f1aaf92afb58e9fee330ede36b9775fe2a6e5a27 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 31 Oct 2015 19:40:33 +0000 Subject: Improve diagnostics if IWYU is enabled Few small cleanups from clang --- SConstruct | 24 +++++++++++++----- massage_messages.py | 66 ++++++++++++++++++++++++++++++++++++++++++++++-- src/modinfo.h | 4 +-- src/nexusinterface.cpp | 4 +-- src/shared/stackdata.cpp | 2 +- 5 files changed, 87 insertions(+), 13 deletions(-) diff --git a/SConstruct b/SConstruct index fbc7e3fe..01e7b2fd 100644 --- a/SConstruct +++ b/SConstruct @@ -260,7 +260,7 @@ def setup_IWYU(env): not dir.startswith(env['SEVENZIPPATH']): # Put the .iwyu in the same place as the .obj targ = os.path.splitext(str(target[i]))[0] - env.IWYU(targ + '.iwyu', s) + env.Depends(env.IWYU(targ + '.iwyu', s), target[i]) def shared_emitter(target, source, env): DoIWYU(env, source, target) @@ -274,12 +274,13 @@ def setup_IWYU(env): SCons.Defaults.StaticObjectEmitter = static_emitter def emitter(target, source, env): - env.Depends(target, '$IWYU_MAPPING_FILE') + env.Depends(target, ('$IWYU_MAPPING_FILE', '$IWYU_MASSAGE')) return target, source + # Note to self: command 2>&1 | other command appears to work as I would hope iwyu = SCons.Builder.Builder( action=[ - '-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM $SOURCE', + '-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM $SOURCE 2>&1 | $IWYU_MASSAGE', Touch('$TARGET') ], emitter=emitter, @@ -308,8 +309,14 @@ def setup_IWYU(env): '-fdiagnostics-format=msvc', '-fno-show-column', # clang says it sets this to 1700 but pretty sure vc12 is 1800 - '-fmsc-version=1800', - ] + #'-fmsc-version=1800', '-D_MSC_VER=1800', + '-fmsc-version=1700', + # clang and qt don't agree about these because clang says its gcc 4.2 and + # QT doesn't realise it's clang + '-DQ_COMPILER_INITIALIZER_LISTS', + '-DQ_COMPILER_DECLTYPE', + '-DQ_COMPILER_VARIADIC_TEMPLATES', +] if env['CONFIG'] == 'debug': env['IWYU_FLAGS'] += [ '-D_DEBUG' ] @@ -317,10 +324,14 @@ def setup_IWYU(env): env['IWYU_DEFSUFFIX'] = '' env['IWYU_INCPREFIX'] = '-I' env['IWYU_INCSUFFIX'] = '' - env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $CCPDBFLAGS' + env['IWYU_INCLUDEPREFIX'] = '-include' # Amazingly this works without a space + env['IWYU_INCLUDESUFFIX'] = '' + env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $IWYU_PCHFILES $CCPDBFLAGS' env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' + env['IWYU_PCHFILES'] = '$( ${_concat(IWYU_INCLUDEPREFIX, PCHSTOP, IWYU_INCLUDESUFFIX, __env__, target=TARGET, source=SOURCE)} $)' env['IWYU_MAPPING_FILE'] = env.File('#/qtmappings.imp') + env['IWYU_MASSAGE'] = env.File('#/massage_messages.py') # Create base environment @@ -442,6 +453,7 @@ else: # doesn't currently generate an output file (use the output instead!). if 'IWYU' in env: setup_IWYU(env) + # /OPT:REF removes unreferenced code # for release, use /OPT:ICF (comdat folding: coalesce identical blocks of code) diff --git a/massage_messages.py b/massage_messages.py index 656c48bd..c1b31c96 100644 --- a/massage_messages.py +++ b/massage_messages.py @@ -5,8 +5,70 @@ import fileinput import re +removing = None + +includes = dict + +foundline = 0 + for line in fileinput.input(): # Look for '\) : ([^:])?:' # Replace with ') : \1 I0000: - line.rstrip() - print re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I0000:', line) \ No newline at end of file + line = line.rstrip() + if removing: + if line == '': + removing = None + print + continue + else: + # Really we should stash these so that if we get a 'class xxx' in the + # add lines we can print it here. also we could do the case fixing. + m = re.match(r'- #include [<"](.*)[">] +// lines (.*)-', line) + if m: + # If there is an added line with the same class, print it here + print '%s(%s) : warning I0001: Unnecessary include of %s' % (removing, m.group(2), m.group(1)) + foundline = m.group(1) + else: + m = re.match(r'- (.*); +// lines (.*)-', line) + if m: + print '%s(%s) : warning I0002: Unnecessary forward ref of %s' % (removing, m.group(2), m.group(1)) + foundline = m.group(1) + else: + print '********* I got confused **********' + + line = re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I1234:', line) + # Sadly qt doesn't seem to support 'info' in the issues tab. + line = re.sub(r': note I1234:', r': warning I1234:', line) + print line + if line.endswith(' should remove these lines:'): + removing = (line.split(' '))[0] + elif line.endswith(' should add these lines:'): + adding = (line.split(' '))[0] + +# also process the other lines +""" + +source/organizer/aboutdialog.h should add these lines: +#include // for Q_OBJECT, slots +#include // for QString +class QListWidgetItem; +class QWidget; + +source/organizer/aboutdialog.h should remove these lines: +- #include // lines 25-25 +- #include // lines 28-28 +- #include // lines 27-27 +- class DownloadManager; // lines 47-47 + +The full include-list for source/organizer/aboutdialog.h: +#include // for QDialog +#include // for Q_OBJECT, slots +#include // for QString +#include // for map +class QListWidgetItem; +class QWidget; +namespace Ui { class AboutDialog; } // lines 31-31 +--- +""" + +# added lines should come after the first entry with a line number. diff --git a/src/modinfo.h b/src/modinfo.h index da97b09b..d9de60e8 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -1047,7 +1047,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const { return QDateTime(); } virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } virtual QString getInstallationFile() const { return ""; } virtual int getFixedPriority() const { return INT_MAX; } virtual int getNexusID() const { return -1; } @@ -1099,7 +1099,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const; virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return ""; } + virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } virtual QString getInstallationFile() const { return ""; } virtual int getNexusID() const { return -1; } virtual std::vector getIniTweaks() const { return std::vector(); } diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index dc027be4..b4775e2d 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -217,8 +217,8 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo QString r3Highlight(fileName); r3Highlight.insert(result.position(3) + result.length(3), "* ").insert(result.position(3), " *"); - selection.addChoice(candidate.c_str(), r3Highlight, strtol(candidate.c_str(), nullptr, 10)); - selection.addChoice(candidate2.c_str() + offset, r2Highlight, abs(strtol(candidate2.c_str() + offset, nullptr, 10))); + selection.addChoice(candidate.c_str(), r3Highlight, static_cast(strtol(candidate.c_str(), nullptr, 10))); + selection.addChoice(candidate2.c_str() + offset, r2Highlight, static_cast(abs(strtol(candidate2.c_str() + offset, nullptr, 10)))); if (selection.exec() == QDialog::Accepted) { modID = selection.getChoiceData().toInt(); } else { diff --git a/src/shared/stackdata.cpp b/src/shared/stackdata.cpp index 6c5a0968..18daaf7b 100644 --- a/src/shared/stackdata.cpp +++ b/src/shared/stackdata.cpp @@ -24,7 +24,7 @@ static void initDbgIfNecess() firstCall = false; } if (!::SymInitialize(process, NULL, TRUE)) { - printf("failed to initialize symbols: %d", ::GetLastError()); + printf("failed to initialize symbols: %lu", ::GetLastError()); } initialized.insert(::GetCurrentProcessId()); } -- cgit v1.3.1 From 184cff8a7731c83f049dedb0f8e20d91c36e77a3 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 1 Nov 2015 18:27:34 +0000 Subject: Add support for version dependency checks --- SConstruct | 4 ---- src/gameinfoimpl.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++- src/gameinfoimpl.h | 2 ++ src/shared/fallout3info.h | 1 + src/shared/falloutnvinfo.h | 1 + src/shared/gameinfo.h | 1 + src/shared/oblivioninfo.h | 1 + src/shared/skyriminfo.h | 1 + 8 files changed, 57 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index eb3da432..5df6f96a 100644 --- a/SConstruct +++ b/SConstruct @@ -50,10 +50,6 @@ def setup_config_variables(): PathVariable.PathIsDir), PathVariable('SEVENZIPPATH', 'Path to 7zip sources', sevenzippath, PathVariable.PathIsDir), - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir). - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir), PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, PathVariable.PathIsDir) ) diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 025ce4e6..979e6c8d 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -18,8 +18,10 @@ along with Mod Organizer. If not, see . */ #include "gameinfoimpl.h" -#include +#include "gameinfo.h" #include + +#include #include @@ -52,3 +54,50 @@ QString GameInfoImpl::binaryName() const { return ToQString(GameInfo::instance().getBinaryName()); } + +namespace { + +QString GetAppVersion(std::wstring const &app_name) +{ + DWORD handle; + DWORD info_len = ::GetFileVersionInfoSizeW(app_name.c_str(), &handle); + if (info_len == 0) { + qDebug("GetFileVersionInfoSizeW Error %d", ::GetLastError()); + throw std::runtime_error("Failed to get version info"); + } + + std::vector buff(info_len); + if( ! ::GetFileVersionInfoW(app_name.c_str(), handle, info_len, buff.data())) { + qDebug("GetFileVersionInfoW Error %d", ::GetLastError()); + throw std::runtime_error("Failed to get version info"); + } + + VS_FIXEDFILEINFO *pFileInfo; + UINT buf_len; + if ( ! ::VerQueryValueW(buff.data(), L"\\", reinterpret_cast(&pFileInfo), &buf_len)) { + qDebug("VerQueryValueW Error %d", ::GetLastError()); + throw std::runtime_error("Failed to get version info"); + } + return QString("%1.%2.%3.%4").arg(HIWORD(pFileInfo->dwFileVersionMS)) + .arg(LOWORD(pFileInfo->dwFileVersionMS)) + .arg(HIWORD(pFileInfo->dwFileVersionLS)) + .arg(LOWORD(pFileInfo->dwFileVersionLS)); +} + +} + +QString GameInfoImpl::version() const +{ + std::wstring dir = GameInfo::instance().getGameDirectory(); + std::wstring exec = GameInfo::instance().getBinaryName(); + std::wstring target = L"\\\\?\\" + dir + L"\\" + exec; + return GetAppVersion(target.c_str()); +} + +QString GameInfoImpl::extenderVersion() const +{ + std::wstring dir = GameInfo::instance().getGameDirectory(); + std::wstring exec = GameInfo::instance().getExtenderName(); + std::wstring target = L"\\\\?\\" + dir + L"\\" + exec; + return GetAppVersion(target.c_str()); +} diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index 3ed7be6b..b7ac78c5 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -33,6 +33,8 @@ public: virtual Type type() const; virtual QString path() const; virtual QString binaryName() const; + virtual QString version() const; + virtual QString extenderVersion() const; }; diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 0045581d..62eb0a08 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -38,6 +38,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } virtual std::wstring getBinaryName() { return L"Fallout3.exe"; } + virtual std::wstring getExtenderName() { return L"fose_loader.exe"; } virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index e1a614d2..3039d8cc 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -38,6 +38,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } virtual std::wstring getBinaryName() { return L"FalloutNV.exe"; } + virtual std::wstring getExtenderName() { return L"nvse_loader.exe"; } virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index a32b6b82..5b344932 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -60,6 +60,7 @@ public: virtual std::wstring getRegPath() = 0; virtual std::wstring getBinaryName() = 0; + virtual std::wstring getExtenderName() = 0; virtual GameInfo::Type getType() = 0; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 87ba26ff..02fa32c6 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -36,6 +36,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } virtual std::wstring getBinaryName() { return L"Oblivion.exe"; } + virtual std::wstring getExtenderName() { return L"obse_loader.exe"; } virtual GameInfo::Type getType() { return TYPE_OBLIVION; } diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 5951f910..1824eb3e 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -38,6 +38,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } virtual std::wstring getBinaryName() { return L"TESV.exe"; } + virtual std::wstring getExtenderName() { return L"skse_loader.exe"; } virtual GameInfo::Type getType() { return TYPE_SKYRIM; } -- cgit v1.3.1 From 1a12b1f1f6256139427c2516d314f25c593087c5 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 4 Nov 2015 21:39:14 +0000 Subject: Decided it shouldn't be an error if i can't get information about the file. --- src/gameinfoimpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 979e6c8d..98b0fddf 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -63,20 +63,20 @@ QString GetAppVersion(std::wstring const &app_name) DWORD info_len = ::GetFileVersionInfoSizeW(app_name.c_str(), &handle); if (info_len == 0) { qDebug("GetFileVersionInfoSizeW Error %d", ::GetLastError()); - throw std::runtime_error("Failed to get version info"); + return ""; } std::vector buff(info_len); if( ! ::GetFileVersionInfoW(app_name.c_str(), handle, info_len, buff.data())) { qDebug("GetFileVersionInfoW Error %d", ::GetLastError()); - throw std::runtime_error("Failed to get version info"); + return ""; } VS_FIXEDFILEINFO *pFileInfo; UINT buf_len; if ( ! ::VerQueryValueW(buff.data(), L"\\", reinterpret_cast(&pFileInfo), &buf_len)) { qDebug("VerQueryValueW Error %d", ::GetLastError()); - throw std::runtime_error("Failed to get version info"); + return ""; } return QString("%1.%2.%3.%4").arg(HIWORD(pFileInfo->dwFileVersionMS)) .arg(LOWORD(pFileInfo->dwFileVersionMS)) -- cgit v1.3.1 From d82ca00733c629df6e89e181192696afaeba1936 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 8 Nov 2015 09:46:30 +0000 Subject: Separated out the include what you use mappings into separate files, more improvements --- SConstruct | 76 +- mappings.imp | 30 + massage_messages.py | 39 +- qt5_4.imp | 2478 +++++++++++++++++++++++++++++++++++++++++++++++++++ qtmappings.imp | 320 ------- win.imp | 82 ++ 6 files changed, 2690 insertions(+), 335 deletions(-) create mode 100644 mappings.imp create mode 100644 qt5_4.imp delete mode 100644 qtmappings.imp create mode 100644 win.imp diff --git a/SConstruct b/SConstruct index 01e7b2fd..34aab72d 100644 --- a/SConstruct +++ b/SConstruct @@ -274,13 +274,70 @@ def setup_IWYU(env): SCons.Defaults.StaticObjectEmitter = static_emitter def emitter(target, source, env): - env.Depends(target, ('$IWYU_MAPPING_FILE', '$IWYU_MASSAGE')) + env.Depends(target, env['IWYU_MAPPING_FILE']) + env.Depends(target, env['IWYU_MASSAGE']) return target, source + def _concat_list(prefixes, list, suffixes, env, f=lambda x: x, target=None, source=None): + """ Creates a new list from 'list' by first interpolating each element + in the list using the 'env' dictionary and then calling f on the + list, and concatenate the 'prefix' and 'suffix' LISTS onto each element of the list. + A trailing space on the last element of 'prefix' or leading space on the + first element of 'suffix' will cause them to be put into separate list + elements rather than being concatenated. + """ + + if not list: + return list + + l = f(SCons.PathList.PathList(list).subst_path(env, target, source)) + if l is not None: + list = l + + # This bit replaces current concat_ixes + + result = [] + + def process_stringlist(s): + return [ str(env.subst(p, SCons.Subst.SUBST_RAW)) + for p in Flatten([s]) if p != '' ] + + # ensure that prefix and suffix are strings + prefixes = process_stringlist(prefixes) + prefix = '' + if len(prefixes) != 0: + if prefixes[-1][-1] != ' ': + prefix = prefixes.pop() + + suffixes = process_stringlist(suffixes) + suffix = '' + if len(suffixes) != 0: + if suffixes[-1][0] != ' ': + suffix = suffixes.pop(0) + + for x in list: + if isinstance(x, SCons.Node.FS.File): + result.append(x) + continue + x = str(x) + if x: + result.append(prefixes) + if prefix: + if x[:len(prefix)] != prefix: + x = prefix + x + result.append(x) + if suffix: + if x[-len(suffix):] != suffix: + result[-1] = result[-1] + suffix + result.append(suffixes) + return result + + env['_concat_list'] = _concat_list # Note to self: command 2>&1 | other command appears to work as I would hope + # except it eats errors iwyu = SCons.Builder.Builder( action=[ - '-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM $SOURCE 2>&1 | $IWYU_MASSAGE', + '$IWYU_MASSAGE $IWYU $IWYU_FLAGS $IWYU_MAPPINGS $IWYU_COMCOM $SOURCE', Touch('$TARGET') ], emitter=emitter, @@ -305,9 +362,6 @@ def setup_IWYU(env): '-Wno-inconsistent-missing-override', '--system-header-prefix=Q', '--system-header-prefix=boost/', - # Attempt to get QT to recognise clang output. So far it has not worked well. - '-fdiagnostics-format=msvc', - '-fno-show-column', # clang says it sets this to 1700 but pretty sure vc12 is 1800 #'-fmsc-version=1800', '-D_MSC_VER=1800', '-fmsc-version=1700', @@ -330,9 +384,15 @@ def setup_IWYU(env): env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' env['IWYU_PCHFILES'] = '$( ${_concat(IWYU_INCLUDEPREFIX, PCHSTOP, IWYU_INCLUDESUFFIX, __env__, target=TARGET, source=SOURCE)} $)' - env['IWYU_MAPPING_FILE'] = env.File('#/qtmappings.imp') - env['IWYU_MASSAGE'] = env.File('#/massage_messages.py') - + env['IWYU_MAPPING_FILE'] = [ + env.File('#/modorganizer/qt5_4.imp'), + env.File('#/modorganizer/win.imp'), + env.File('#/modorganizer/mappings.imp') + ] + env['IWYU_MAPPING_PREFIX'] = ['-Xiwyu', '--mapping_file='] + env['IWYU_MAPPING_SUFFIX'] = '' + env['IWYU_MAPPINGS'] = '$( ${_concat_list(IWYU_MAPPING_PREFIX, IWYU_MAPPING_FILE, IWYU_MAPPING_SUFFIX, __env__, f=lambda l: [ str(x) for x in l], target=TARGET, source=SOURCE)} $)' + env['IWYU_MASSAGE'] = env.File('#/modorganizer/massage_messages.py') # Create base environment vars = setup_config_variables() diff --git a/mappings.imp b/mappings.imp new file mode 100644 index 00000000..6af65e3c --- /dev/null +++ b/mappings.imp @@ -0,0 +1,30 @@ +[ + +# for boost??? +# These are probably correct but might need a revisit as if you look at the boost documentation pages, it +# can give you huge lists of alternate includes... + { symbol: [ "BOOST_FOREACH", "private", "", "public" ] }, + + { include: [ "@\"boost/bind/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/algorithm/string/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/assign/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/filesystem/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/format/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/function/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/local/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/python/.*\"", "private", "", "public" ] }, + { include: [ "@\"boost/signals2/.*\"", "private", "", "public" ] }, + { include: [ "\"boost/smart_ptr/scoped_array.hpp\"", "private", "", "public" ] }, + { include: [ "\"boost/smart_ptr/shared_ptr.hpp\"", "private", "", "public" ] }, + # this appears to be excessive + #{ include: [ "@\"boost/thread/.*\"", "private", "", "public" ] }, + +# And this is specific to us + { include: [ "\"appconfig.inc\"", "private", "\"appconfig.h\"", "public" ] }, + +] + +# Ones I don't yet know how to deal with +#include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion +#include "boost/iterator/iterator_facade.hpp" // for operator!= +#include "boost/iterator/iterator_facade.hpp" diff --git a/massage_messages.py b/massage_messages.py index c1b31c96..159c2950 100644 --- a/massage_messages.py +++ b/massage_messages.py @@ -4,6 +4,8 @@ import fileinput import re +import subprocess +import sys removing = None @@ -11,15 +13,18 @@ includes = dict foundline = 0 -for line in fileinput.input(): +def process_next_line(line): # Look for '\) : ([^:])?:' # Replace with ') : \1 I0000: + global removing + global includes + global foundline line = line.rstrip() if removing: if line == '': removing = None print - continue + return else: # Really we should stash these so that if we get a 'class xxx' in the # add lines we can print it here. also we could do the case fixing. @@ -29,16 +34,22 @@ for line in fileinput.input(): print '%s(%s) : warning I0001: Unnecessary include of %s' % (removing, m.group(2), m.group(1)) foundline = m.group(1) else: - m = re.match(r'- (.*); +// lines (.*)-', line) + m = re.match(r'- (.*) +// lines (.*)-', line) if m: print '%s(%s) : warning I0002: Unnecessary forward ref of %s' % (removing, m.group(2), m.group(1)) foundline = m.group(1) else: print '********* I got confused **********' - line = re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I1234:', line) - # Sadly qt doesn't seem to support 'info' in the issues tab. - line = re.sub(r': note I1234:', r': warning I1234:', line) + # Replace clang :line:column: type: with ms (line) : type nnnn: + # filename:line:column type: + # replace with brackets + line = re.sub(r':(\d+):\d+: ([^:]*):', r'(\1) : \2 I1234:', line) + + if ': note I1234:' in line: + line = ' ' + line + line = line.replace(': note I1234:', '') + print line if line.endswith(' should remove these lines:'): removing = (line.split(' '))[0] @@ -71,4 +82,18 @@ namespace Ui { class AboutDialog; } // lines 31-31 --- """ -# added lines should come after the first entry with a line number. + # added lines should come after the first entry with a line number. + +process = subprocess.Popen(sys.argv[1:], + stdout = subprocess.PIPE, stderr = subprocess.STDOUT) +while True: + output = process.stdout.readline() + if output == '' and process.poll() is not None: + break + if output: + process_next_line(output) +rc = process.poll() +# The return code you get appears to be more to do with the amount of output +# generated than any real error. We should error if any ': error:' lines are +# detected + diff --git a/qt5_4.imp b/qt5_4.imp new file mode 100644 index 00000000..5d75fd9e --- /dev/null +++ b/qt5_4.imp @@ -0,0 +1,2478 @@ +[ + +# Per le documentation, each class lives in it's own header file. These are the +# official header files (as far as I can determine, from a scan of the QT includes +# directory) +# It'd be nice if IWYU could be told to recognise X::y as coming from the same header as X + + { symbol: [ "ActiveQt", "private", "", "public" ] }, + { symbol: [ "ActiveQtDepends", "private", "", "public" ] }, + { symbol: [ "ActiveQtVersion", "private", "", "public" ] }, + { symbol: [ "Enginio", "private", "", "public" ] }, + { symbol: [ "EnginioDepends", "private", "", "public" ] }, + { symbol: [ "EnginioVersion", "private", "", "public" ] }, + { symbol: [ "QAbstractAnimation", "private", "", "public" ] }, + { symbol: [ "QAbstractAudioDeviceInfo", "private", "", "public" ] }, + { symbol: [ "QAbstractAudioInput", "private", "", "public" ] }, + { symbol: [ "QAbstractAudioOutput", "private", "", "public" ] }, + { symbol: [ "QAbstractButton", "private", "", "public" ] }, + { symbol: [ "QAbstractEventDispatcher", "private", "", "public" ] }, + { symbol: [ "QAbstractExtensionFactory", "private", "", "public" ] }, + { symbol: [ "QAbstractExtensionManager", "private", "", "public" ] }, + { symbol: [ "QAbstractFormBuilder", "private", "", "public" ] }, + { symbol: [ "QAbstractGraphicsShapeItem", "private", "", "public" ] }, + { symbol: [ "QAbstractItemDelegate", "private", "", "public" ] }, + { symbol: [ "QAbstractItemModel", "private", "", "public" ] }, + { symbol: [ "QAbstractItemView", "private", "", "public" ] }, + { symbol: [ "QAbstractListModel", "private", "", "public" ] }, + { symbol: [ "QAbstractMessageHandler", "private", "", "public" ] }, + { symbol: [ "QAbstractNativeEventFilter", "private", "", "public" ] }, + { symbol: [ "QAbstractNetworkCache", "private", "", "public" ] }, + { symbol: [ "QAbstractPlanarVideoBuffer", "private", "", "public" ] }, + { symbol: [ "QAbstractPrintDialog", "private", "", "public" ] }, + { symbol: [ "QAbstractProxyModel", "private", "", "public" ] }, + { symbol: [ "QAbstractScrollArea", "private", "", "public" ] }, + { symbol: [ "QAbstractSlider", "private", "", "public" ] }, + { symbol: [ "QAbstractSocket", "private", "", "public" ] }, + { symbol: [ "QAbstractSpinBox", "private", "", "public" ] }, + { symbol: [ "QAbstractState", "private", "", "public" ] }, + { symbol: [ "QAbstractTableModel", "private", "", "public" ] }, + { symbol: [ "QAbstractTextDocumentLayout", "private", "", "public" ] }, + { symbol: [ "QAbstractTransition", "private", "", "public" ] }, + { symbol: [ "QAbstractUndoItem", "private", "", "public" ] }, + { symbol: [ "QAbstractUriResolver", "private", "", "public" ] }, + { symbol: [ "QAbstractVideoBuffer", "private", "", "public" ] }, + { symbol: [ "QAbstractVideoSurface", "private", "", "public" ] }, + { symbol: [ "QAbstractXmlNodeModel", "private", "", "public" ] }, + { symbol: [ "QAbstractXmlReceiver", "private", "", "public" ] }, + { symbol: [ "QAccelerometer", "private", "", "public" ] }, + { symbol: [ "QAccelerometerFilter", "private", "", "public" ] }, + { symbol: [ "QAccelerometerReading", "private", "", "public" ] }, + { symbol: [ "QAccessible", "private", "", "public" ] }, + { symbol: [ "QAccessibleAbstractScrollArea", "private", "", "public" ] }, + { symbol: [ "QAccessibleAbstractSlider", "private", "", "public" ] }, + { symbol: [ "QAccessibleAbstractSpinBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleActionInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleApplication", "private", "", "public" ] }, + { symbol: [ "QAccessibleBridge", "private", "", "public" ] }, + { symbol: [ "QAccessibleBridgePlugin", "private", "", "public" ] }, + { symbol: [ "QAccessibleButton", "private", "", "public" ] }, + { symbol: [ "QAccessibleCalendarWidget", "private", "", "public" ] }, + { symbol: [ "QAccessibleComboBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleDial", "private", "", "public" ] }, + { symbol: [ "QAccessibleDialogButtonBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleDisplay", "private", "", "public" ] }, + { symbol: [ "QAccessibleDockWidget", "private", "", "public" ] }, + { symbol: [ "QAccessibleDoubleSpinBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleEditableTextInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleGroupBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleImageInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleLineEdit", "private", "", "public" ] }, + { symbol: [ "QAccessibleMainWindow", "private", "", "public" ] }, + { symbol: [ "QAccessibleMdiArea", "private", "", "public" ] }, + { symbol: [ "QAccessibleMdiSubWindow", "private", "", "public" ] }, + { symbol: [ "QAccessibleMenu", "private", "", "public" ] }, + { symbol: [ "QAccessibleMenuBar", "private", "", "public" ] }, + { symbol: [ "QAccessibleMenuItem", "private", "", "public" ] }, + { symbol: [ "QAccessibleObject", "private", "", "public" ] }, + { symbol: [ "QAccessiblePlainTextEdit", "private", "", "public" ] }, + { symbol: [ "QAccessiblePlugin", "private", "", "public" ] }, + { symbol: [ "QAccessibleProgressBar", "private", "", "public" ] }, + { symbol: [ "QAccessibleScrollArea", "private", "", "public" ] }, + { symbol: [ "QAccessibleScrollBar", "private", "", "public" ] }, + { symbol: [ "QAccessibleSlider", "private", "", "public" ] }, + { symbol: [ "QAccessibleSpinBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleStackedWidget", "private", "", "public" ] }, + { symbol: [ "QAccessibleStateChangeEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTabBar", "private", "", "public" ] }, + { symbol: [ "QAccessibleTable", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableCell", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableCellInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableCornerButton", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableHeaderCell", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleTableModelChangeEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextBrowser", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextCursorEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextEdit", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextInsertEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextRemoveEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextSelectionEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextUpdateEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleTextWidget", "private", "", "public" ] }, + { symbol: [ "QAccessibleToolBox", "private", "", "public" ] }, + { symbol: [ "QAccessibleToolButton", "private", "", "public" ] }, + { symbol: [ "QAccessibleTree", "private", "", "public" ] }, + { symbol: [ "QAccessibleValueChangeEvent", "private", "", "public" ] }, + { symbol: [ "QAccessibleValueInterface", "private", "", "public" ] }, + { symbol: [ "QAccessibleWidget", "private", "", "public" ] }, + { symbol: [ "QAccessibleWindowContainer", "private", "", "public" ] }, + { symbol: [ "QAction", "private", "", "public" ] }, + { symbol: [ "QActionEvent", "private", "", "public" ] }, + { symbol: [ "QActionGroup", "private", "", "public" ] }, + { symbol: [ "QAltimeter", "private", "", "public" ] }, + { symbol: [ "QAltimeterFilter", "private", "", "public" ] }, + { symbol: [ "QAltimeterReading", "private", "", "public" ] }, + { symbol: [ "QAmbientLightFilter", "private", "", "public" ] }, + { symbol: [ "QAmbientLightReading", "private", "", "public" ] }, + { symbol: [ "QAmbientLightSensor", "private", "", "public" ] }, + { symbol: [ "QAmbientTemperatureFilter", "private", "", "public" ] }, + { symbol: [ "QAmbientTemperatureReading", "private", "", "public" ] }, + { symbol: [ "QAmbientTemperatureSensor", "private", "", "public" ] }, + { symbol: [ "QAnimationDriver", "private", "", "public" ] }, + { symbol: [ "QAnimationGroup", "private", "", "public" ] }, + { symbol: [ "QApplication", "private", "", "public" ] }, + { symbol: [ "QApplicationStateChangeEvent", "private", "", "public" ] }, + { symbol: [ "QArgument", "private", "", "public" ] }, + { symbol: [ "QArrayData", "private", "", "public" ] }, + { symbol: [ "QArrayDataPointer", "private", "", "public" ] }, + { symbol: [ "QArrayDataPointerRef", "private", "", "public" ] }, + { symbol: [ "QAssociativeIterable", "private", "", "public" ] }, + { symbol: [ "QAtomicInt", "private", "", "public" ] }, + { symbol: [ "QAtomicInteger", "private", "", "public" ] }, + { symbol: [ "QAtomicPointer", "private", "", "public" ] }, + { symbol: [ "QAudio", "private", "", "public" ] }, + { symbol: [ "QAudioBuffer", "private", "", "public" ] }, + { symbol: [ "QAudioDecoder", "private", "", "public" ] }, + { symbol: [ "QAudioDecoderControl", "private", "", "public" ] }, + { symbol: [ "QAudioDeviceInfo", "private", "", "public" ] }, + { symbol: [ "QAudioEncoderSettings", "private", "", "public" ] }, + { symbol: [ "QAudioEncoderSettingsControl", "private", "", "public" ] }, + { symbol: [ "QAudioFormat", "private", "", "public" ] }, + { symbol: [ "QAudioInput", "private", "", "public" ] }, + { symbol: [ "QAudioInputSelectorControl", "private", "", "public" ] }, + { symbol: [ "QAudioOutput", "private", "", "public" ] }, + { symbol: [ "QAudioOutputSelectorControl", "private", "", "public" ] }, + { symbol: [ "QAudioProbe", "private", "", "public" ] }, + { symbol: [ "QAudioRecorder", "private", "", "public" ] }, + { symbol: [ "QAudioSystemFactoryInterface", "private", "", "public" ] }, + { symbol: [ "QAudioSystemPlugin", "private", "", "public" ] }, + { symbol: [ "QAuthenticator", "private", "", "public" ] }, + { symbol: [ "QAxAggregated", "private", "", "public" ] }, + { symbol: [ "QAxBase", "private", "", "public" ] }, + { symbol: [ "QAxBindable", "private", "", "public" ] }, + { symbol: [ "QAxFactory", "private", "", "public" ] }, + { symbol: [ "QAxObject", "private", "", "public" ] }, + { symbol: [ "QAxScript", "private", "", "public" ] }, + { symbol: [ "QAxScriptEngine", "private", "", "public" ] }, + { symbol: [ "QAxScriptManager", "private", "", "public" ] }, + { symbol: [ "QAxSelect", "private", "", "public" ] }, + { symbol: [ "QAxWidget", "private", "", "public" ] }, + { symbol: [ "QBBSystemLocaleData", "private", "", "public" ] }, + { symbol: [ "QBackingStore", "private", "", "public" ] }, + { symbol: [ "QBasicMutex", "private", "", "public" ] }, + { symbol: [ "QBasicTimer", "private", "", "public" ] }, + { symbol: [ "QBitArray", "private", "", "public" ] }, + { symbol: [ "QBitRef", "private", "", "public" ] }, + { symbol: [ "QBitmap", "private", "", "public" ] }, + { symbol: [ "QBluetoothAddress", "private", "", "public" ] }, + { symbol: [ "QBluetoothDeviceDiscoveryAgent", "private", "", "public" ] }, + { symbol: [ "QBluetoothDeviceInfo", "private", "", "public" ] }, + { symbol: [ "QBluetoothHostInfo", "private", "", "public" ] }, + { symbol: [ "QBluetoothLocalDevice", "private", "", "public" ] }, + { symbol: [ "QBluetoothServer", "private", "", "public" ] }, + { symbol: [ "QBluetoothServiceDiscoveryAgent", "private", "", "public" ] }, + { symbol: [ "QBluetoothServiceInfo", "private", "", "public" ] }, + { symbol: [ "QBluetoothSocket", "private", "", "public" ] }, + { symbol: [ "QBluetoothTransferManager", "private", "", "public" ] }, + { symbol: [ "QBluetoothTransferReply", "private", "", "public" ] }, + { symbol: [ "QBluetoothTransferRequest", "private", "", "public" ] }, + { symbol: [ "QBluetoothUuid", "private", "", "public" ] }, + { symbol: [ "QBoxLayout", "private", "", "public" ] }, + { symbol: [ "QBrush", "private", "", "public" ] }, + { symbol: [ "QBrushData", "private", "", "public" ] }, + { symbol: [ "QBuffer", "private", "", "public" ] }, + { symbol: [ "QButtonGroup", "private", "", "public" ] }, + { symbol: [ "QByteArray", "private", "", "public" ] }, + { symbol: [ "QByteArrayData", "private", "", "public" ] }, + { symbol: [ "QByteArrayDataPtr", "private", "", "public" ] }, + { symbol: [ "QByteArrayList", "private", "", "public" ] }, + { symbol: [ "QByteArrayListIterator", "private", "", "public" ] }, + { symbol: [ "QByteArrayMatcher", "private", "", "public" ] }, + { symbol: [ "QByteRef", "private", "", "public" ] }, + { symbol: [ "QCache", "private", "", "public" ] }, + { symbol: [ "QCalendarWidget", "private", "", "public" ] }, + { symbol: [ "QCamera", "private", "", "public" ] }, + { symbol: [ "QCameraCaptureBufferFormatControl", "private", "", "public" ] }, + { symbol: [ "QCameraCaptureDestinationControl", "private", "", "public" ] }, + { symbol: [ "QCameraControl", "private", "", "public" ] }, + { symbol: [ "QCameraExposure", "private", "", "public" ] }, + { symbol: [ "QCameraExposureControl", "private", "", "public" ] }, + { symbol: [ "QCameraFeedbackControl", "private", "", "public" ] }, + { symbol: [ "QCameraFlashControl", "private", "", "public" ] }, + { symbol: [ "QCameraFocus", "private", "", "public" ] }, + { symbol: [ "QCameraFocusControl", "private", "", "public" ] }, + { symbol: [ "QCameraFocusZone", "private", "", "public" ] }, + { symbol: [ "QCameraFocusZoneList", "private", "", "public" ] }, + { symbol: [ "QCameraImageCapture", "private", "", "public" ] }, + { symbol: [ "QCameraImageCaptureControl", "private", "", "public" ] }, + { symbol: [ "QCameraImageProcessing", "private", "", "public" ] }, + { symbol: [ "QCameraImageProcessingControl", "private", "", "public" ] }, + { symbol: [ "QCameraInfo", "private", "", "public" ] }, + { symbol: [ "QCameraInfoControl", "private", "", "public" ] }, + { symbol: [ "QCameraLocksControl", "private", "", "public" ] }, + { symbol: [ "QCameraViewfinder", "private", "", "public" ] }, + { symbol: [ "QCameraViewfinderSettingsControl", "private", "", "public" ] }, + { symbol: [ "QCameraZoomControl", "private", "", "public" ] }, + { symbol: [ "QChar", "private", "", "public" ] }, + { symbol: [ "QCharRef", "private", "", "public" ] }, + { symbol: [ "QCheckBox", "private", "", "public" ] }, + { symbol: [ "QChildEvent", "private", "", "public" ] }, + { symbol: [ "QClipboard", "private", "", "public" ] }, + { symbol: [ "QCloseEvent", "private", "", "public" ] }, + { symbol: [ "QCocoaNativeContext", "private", "", "public" ] }, + { symbol: [ "QCollator", "private", "", "public" ] }, + { symbol: [ "QCollatorSortKey", "private", "", "public" ] }, + { symbol: [ "QColor", "private", "", "public" ] }, + { symbol: [ "QColorDialog", "private", "", "public" ] }, + { symbol: [ "QColormap", "private", "", "public" ] }, + { symbol: [ "QColumnView", "private", "", "public" ] }, + { symbol: [ "QComboBox", "private", "", "public" ] }, + { symbol: [ "QCommandLineOption", "private", "", "public" ] }, + { symbol: [ "QCommandLineParser", "private", "", "public" ] }, + { symbol: [ "QCommandLinkButton", "private", "", "public" ] }, + { symbol: [ "QCommonStyle", "private", "", "public" ] }, + { symbol: [ "QCompass", "private", "", "public" ] }, + { symbol: [ "QCompassFilter", "private", "", "public" ] }, + { symbol: [ "QCompassReading", "private", "", "public" ] }, + { symbol: [ "QCompleter", "private", "", "public" ] }, + { symbol: [ "QConicalGradient", "private", "", "public" ] }, + { symbol: [ "QContextMenuEvent", "private", "", "public" ] }, + { symbol: [ "QContiguousCache", "private", "", "public" ] }, + { symbol: [ "QContiguousCacheData", "private", "", "public" ] }, + { symbol: [ "QContiguousCacheTypedData", "private", "", "public" ] }, + { symbol: [ "QCoreApplication", "private", "", "public" ] }, + { symbol: [ "QCryptographicHash", "private", "", "public" ] }, + { symbol: [ "QCursor", "private", "", "public" ] }, + { symbol: [ "QDBusAbstractAdaptor", "private", "", "public" ] }, + { symbol: [ "QDBusAbstractInterface", "private", "", "public" ] }, + { symbol: [ "QDBusAbstractInterfaceBase", "private", "", "public" ] }, + { symbol: [ "QDBusArgument", "private", "", "public" ] }, + { symbol: [ "QDBusConnection", "private", "", "public" ] }, + { symbol: [ "QDBusConnectionInterface", "private", "", "public" ] }, + { symbol: [ "QDBusContext", "private", "", "public" ] }, + { symbol: [ "QDBusError", "private", "", "public" ] }, + { symbol: [ "QDBusInterface", "private", "", "public" ] }, + { symbol: [ "QDBusMessage", "private", "", "public" ] }, + { symbol: [ "QDBusMetaType", "private", "", "public" ] }, + { symbol: [ "QDBusObjectPath", "private", "", "public" ] }, + { symbol: [ "QDBusPendingCall", "private", "", "public" ] }, + { symbol: [ "QDBusPendingCallWatcher", "private", "", "public" ] }, + { symbol: [ "QDBusPendingReply", "private", "", "public" ] }, + { symbol: [ "QDBusPendingReplyData", "private", "", "public" ] }, + { symbol: [ "QDBusReply", "private", "", "public" ] }, + { symbol: [ "QDBusServer", "private", "", "public" ] }, + { symbol: [ "QDBusServiceWatcher", "private", "", "public" ] }, + { symbol: [ "QDBusSignature", "private", "", "public" ] }, + { symbol: [ "QDBusUnixFileDescriptor", "private", "", "public" ] }, + { symbol: [ "QDBusVariant", "private", "", "public" ] }, + { symbol: [ "QDBusVirtualObject", "private", "", "public" ] }, + { symbol: [ "QDataStream", "private", "", "public" ] }, + { symbol: [ "QDataWidgetMapper", "private", "", "public" ] }, + { symbol: [ "QDate", "private", "", "public" ] }, + { symbol: [ "QDateEdit", "private", "", "public" ] }, + { symbol: [ "QDateTime", "private", "", "public" ] }, + { symbol: [ "QDateTimeEdit", "private", "", "public" ] }, + { symbol: [ "QDebug", "private", "", "public" ] }, + { symbol: [ "QDebugStateSaver", "private", "", "public" ] }, + { symbol: [ "QDeclarativeAttachedPropertiesFunc", "private", "", "public" ] }, + { symbol: [ "QDeclarativeComponent", "private", "", "public" ] }, + { symbol: [ "QDeclarativeContext", "private", "", "public" ] }, + { symbol: [ "QDeclarativeDebuggingEnabler", "private", "", "public" ] }, + { symbol: [ "QDeclarativeEngine", "private", "", "public" ] }, + { symbol: [ "QDeclarativeError", "private", "", "public" ] }, + { symbol: [ "QDeclarativeExpression", "private", "", "public" ] }, + { symbol: [ "QDeclarativeExtensionInterface", "private", "", "public" ] }, + { symbol: [ "QDeclarativeExtensionPlugin", "private", "", "public" ] }, + { symbol: [ "QDeclarativeImageProvider", "private", "", "public" ] }, + { symbol: [ "QDeclarativeInfo", "private", "", "public" ] }, + { symbol: [ "QDeclarativeItem", "private", "", "public" ] }, + { symbol: [ "QDeclarativeListProperty", "private", "", "public" ] }, + { symbol: [ "QDeclarativeListReference", "private", "", "public" ] }, + { symbol: [ "QDeclarativeNetworkAccessManagerFactory", "private", "", "public" ] }, + { symbol: [ "QDeclarativeParserStatus", "private", "", "public" ] }, + { symbol: [ "QDeclarativeProperties", "private", "", "public" ] }, + { symbol: [ "QDeclarativeProperty", "private", "", "public" ] }, + { symbol: [ "QDeclarativePropertyMap", "private", "", "public" ] }, + { symbol: [ "QDeclarativePropertyValueInterceptor", "private", "", "public" ] }, + { symbol: [ "QDeclarativePropertyValueSource", "private", "", "public" ] }, + { symbol: [ "QDeclarativeScriptString", "private", "", "public" ] }, + { symbol: [ "QDeclarativeTypeInfo", "private", "", "public" ] }, + { symbol: [ "QDeclarativeView", "private", "", "public" ] }, + { symbol: [ "QDeferredDeleteEvent", "private", "", "public" ] }, + { symbol: [ "QDesignerActionEditorInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerComponents", "private", "", "public" ] }, + { symbol: [ "QDesignerContainerExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerCustomWidgetCollectionInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerCustomWidgetInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerDnDItemInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerDynamicPropertySheetExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerExportWidget", "private", "", "public" ] }, + { symbol: [ "QDesignerExtraInfoExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerFormEditorInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerFormEditorPluginInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerFormWindowCursorInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerFormWindowInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerFormWindowManagerInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerFormWindowToolInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerIntegration", "private", "", "public" ] }, + { symbol: [ "QDesignerIntegrationInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerLanguageExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerLayoutDecorationExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerMemberSheetExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerMetaDataBaseInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerMetaDataBaseItemInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerNewFormWidgetInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerObjectInspectorInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerOptionsPageInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerPromotionInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerPropertyEditorInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerPropertySheetExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerResourceBrowserInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerSettingsInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerTaskMenuExtension", "private", "", "public" ] }, + { symbol: [ "QDesignerWidgetBoxInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerWidgetDataBaseInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerWidgetDataBaseItemInterface", "private", "", "public" ] }, + { symbol: [ "QDesignerWidgetFactoryInterface", "private", "", "public" ] }, + { symbol: [ "QDesktopServices", "private", "", "public" ] }, + { symbol: [ "QDesktopWidget", "private", "", "public" ] }, + { symbol: [ "QDial", "private", "", "public" ] }, + { symbol: [ "QDialog", "private", "", "public" ] }, + { symbol: [ "QDialogButtonBox", "private", "", "public" ] }, + { symbol: [ "QDir", "private", "", "public" ] }, + { symbol: [ "QDirIterator", "private", "", "public" ] }, + { symbol: [ "QDirModel", "private", "", "public" ] }, + { symbol: [ "QDistanceFilter", "private", "", "public" ] }, + { symbol: [ "QDistanceReading", "private", "", "public" ] }, + { symbol: [ "QDistanceSensor", "private", "", "public" ] }, + { symbol: [ "QDnsDomainNameRecord", "private", "", "public" ] }, + { symbol: [ "QDnsHostAddressRecord", "private", "", "public" ] }, + { symbol: [ "QDnsLookup", "private", "", "public" ] }, + { symbol: [ "QDnsMailExchangeRecord", "private", "", "public" ] }, + { symbol: [ "QDnsServiceRecord", "private", "", "public" ] }, + { symbol: [ "QDnsTextRecord", "private", "", "public" ] }, + { symbol: [ "QDockWidget", "private", "", "public" ] }, + { symbol: [ "QDomAttr", "private", "", "public" ] }, + { symbol: [ "QDomCDATASection", "private", "", "public" ] }, + { symbol: [ "QDomCharacterData", "private", "", "public" ] }, + { symbol: [ "QDomComment", "private", "", "public" ] }, + { symbol: [ "QDomDocument", "private", "", "public" ] }, + { symbol: [ "QDomDocumentFragment", "private", "", "public" ] }, + { symbol: [ "QDomDocumentType", "private", "", "public" ] }, + { symbol: [ "QDomElement", "private", "", "public" ] }, + { symbol: [ "QDomEntity", "private", "", "public" ] }, + { symbol: [ "QDomEntityReference", "private", "", "public" ] }, + { symbol: [ "QDomImplementation", "private", "", "public" ] }, + { symbol: [ "QDomNamedNodeMap", "private", "", "public" ] }, + { symbol: [ "QDomNode", "private", "", "public" ] }, + { symbol: [ "QDomNodeList", "private", "", "public" ] }, + { symbol: [ "QDomNotation", "private", "", "public" ] }, + { symbol: [ "QDomProcessingInstruction", "private", "", "public" ] }, + { symbol: [ "QDomText", "private", "", "public" ] }, + { symbol: [ "QDoubleSpinBox", "private", "", "public" ] }, + { symbol: [ "QDoubleValidator", "private", "", "public" ] }, + { symbol: [ "QDrag", "private", "", "public" ] }, + { symbol: [ "QDragEnterEvent", "private", "", "public" ] }, + { symbol: [ "QDragLeaveEvent", "private", "", "public" ] }, + { symbol: [ "QDragMoveEvent", "private", "", "public" ] }, + { symbol: [ "QDropEvent", "private", "", "public" ] }, + { symbol: [ "QDynamicPropertyChangeEvent", "private", "", "public" ] }, + { symbol: [ "QEGLNativeContext", "private", "", "public" ] }, + { symbol: [ "QEasingCurve", "private", "", "public" ] }, + { symbol: [ "QEglFSFunctions", "private", "", "public" ] }, + { symbol: [ "QElapsedTimer", "private", "", "public" ] }, + { symbol: [ "QEnableSharedFromThis", "private", "", "public" ] }, + { symbol: [ "QEnterEvent", "private", "", "public" ] }, + { symbol: [ "QErrorMessage", "private", "", "public" ] }, + { symbol: [ "QEvent", "private", "", "public" ] }, + { symbol: [ "QEventLoop", "private", "", "public" ] }, + { symbol: [ "QEventLoopLocker", "private", "", "public" ] }, + { symbol: [ "QEventSizeOfChecker", "private", "", "public" ] }, + { symbol: [ "QEventTransition", "private", "", "public" ] }, + { symbol: [ "QException", "private", "", "public" ] }, + { symbol: [ "QExplicitlySharedDataPointer", "private", "", "public" ] }, + { symbol: [ "QExposeEvent", "private", "", "public" ] }, + { symbol: [ "QExtensionFactory", "private", "", "public" ] }, + { symbol: [ "QExtensionManager", "private", "", "public" ] }, + { symbol: [ "QFactoryInterface", "private", "", "public" ] }, + { symbol: [ "QFile", "private", "", "public" ] }, + { symbol: [ "QFileDevice", "private", "", "public" ] }, + { symbol: [ "QFileDialog", "private", "", "public" ] }, + { symbol: [ "QFileIconProvider", "private", "", "public" ] }, + { symbol: [ "QFileInfo", "private", "", "public" ] }, + { symbol: [ "QFileInfoList", "private", "", "public" ] }, + { symbol: [ "QFileOpenEvent", "private", "", "public" ] }, + { symbol: [ "QFileSelector", "private", "", "public" ] }, + { symbol: [ "QFileSystemModel", "private", "", "public" ] }, + { symbol: [ "QFileSystemWatcher", "private", "", "public" ] }, + { symbol: [ "QFinalState", "private", "", "public" ] }, + { symbol: [ "QFlag", "private", "", "public" ] }, + { symbol: [ "QFlags", "private", "", "public" ] }, + { symbol: [ "QFocusEvent", "private", "", "public" ] }, + { symbol: [ "QFocusFrame", "private", "", "public" ] }, + { symbol: [ "QFont", "private", "", "public" ] }, + { symbol: [ "QFontComboBox", "private", "", "public" ] }, + { symbol: [ "QFontDatabase", "private", "", "public" ] }, + { symbol: [ "QFontDialog", "private", "", "public" ] }, + { symbol: [ "QFontInfo", "private", "", "public" ] }, + { symbol: [ "QFontMetrics", "private", "", "public" ] }, + { symbol: [ "QFontMetricsF", "private", "", "public" ] }, + { symbol: [ "QForeachContainer", "private", "", "public" ] }, + { symbol: [ "QFormBuilder", "private", "", "public" ] }, + { symbol: [ "QFormLayout", "private", "", "public" ] }, + { symbol: [ "QFrame", "private", "", "public" ] }, + { symbol: [ "QFunctionPointer", "private", "", "public" ] }, + { symbol: [ "QFuture", "private", "", "public" ] }, + { symbol: [ "QFutureInterface", "private", "", "public" ] }, + { symbol: [ "QFutureInterfaceBase", "private", "", "public" ] }, + { symbol: [ "QFutureIterator", "private", "", "public" ] }, + { symbol: [ "QFutureSynchronizer", "private", "", "public" ] }, + { symbol: [ "QFutureWatcher", "private", "", "public" ] }, + { symbol: [ "QFutureWatcherBase", "private", "", "public" ] }, + { symbol: [ "QGL", "private", "", "public" ] }, + { symbol: [ "QGLBuffer", "private", "", "public" ] }, + { symbol: [ "QGLColormap", "private", "", "public" ] }, + { symbol: [ "QGLContext", "private", "", "public" ] }, + { symbol: [ "QGLFormat", "private", "", "public" ] }, + { symbol: [ "QGLFramebufferObject", "private", "", "public" ] }, + { symbol: [ "QGLFramebufferObjectFormat", "private", "", "public" ] }, + { symbol: [ "QGLFunctions", "private", "", "public" ] }, + { symbol: [ "QGLFunctionsPrivate", "private", "", "public" ] }, + { symbol: [ "QGLPixelBuffer", "private", "", "public" ] }, + { symbol: [ "QGLShader", "private", "", "public" ] }, + { symbol: [ "QGLShaderProgram", "private", "", "public" ] }, + { symbol: [ "QGLWidget", "private", "", "public" ] }, + { symbol: [ "QGLXNativeContext", "private", "", "public" ] }, + { symbol: [ "QGenericArgument", "private", "", "public" ] }, + { symbol: [ "QGenericMatrix", "private", "", "public" ] }, + { symbol: [ "QGenericPlugin", "private", "", "public" ] }, + { symbol: [ "QGenericPluginFactory", "private", "", "public" ] }, + { symbol: [ "QGenericReturnArgument", "private", "", "public" ] }, + { symbol: [ "QGeoAddress", "private", "", "public" ] }, + { symbol: [ "QGeoAreaMonitorInfo", "private", "", "public" ] }, + { symbol: [ "QGeoAreaMonitorSource", "private", "", "public" ] }, + { symbol: [ "QGeoCircle", "private", "", "public" ] }, + { symbol: [ "QGeoCodeReply", "private", "", "public" ] }, + { symbol: [ "QGeoCodingManager", "private", "", "public" ] }, + { symbol: [ "QGeoCodingManagerEngine", "private", "", "public" ] }, + { symbol: [ "QGeoCoordinate", "private", "", "public" ] }, + { symbol: [ "QGeoLocation", "private", "", "public" ] }, + { symbol: [ "QGeoManeuver", "private", "", "public" ] }, + { symbol: [ "QGeoPositionInfo", "private", "", "public" ] }, + { symbol: [ "QGeoPositionInfoSource", "private", "", "public" ] }, + { symbol: [ "QGeoPositionInfoSourceFactory", "private", "", "public" ] }, + { symbol: [ "QGeoRectangle", "private", "", "public" ] }, + { symbol: [ "QGeoRoute", "private", "", "public" ] }, + { symbol: [ "QGeoRouteReply", "private", "", "public" ] }, + { symbol: [ "QGeoRouteRequest", "private", "", "public" ] }, + { symbol: [ "QGeoRouteSegment", "private", "", "public" ] }, + { symbol: [ "QGeoRoutingManager", "private", "", "public" ] }, + { symbol: [ "QGeoRoutingManagerEngine", "private", "", "public" ] }, + { symbol: [ "QGeoSatelliteInfo", "private", "", "public" ] }, + { symbol: [ "QGeoSatelliteInfoSource", "private", "", "public" ] }, + { symbol: [ "QGeoServiceProvider", "private", "", "public" ] }, + { symbol: [ "QGeoServiceProviderFactory", "private", "", "public" ] }, + { symbol: [ "QGeoShape", "private", "", "public" ] }, + { symbol: [ "QGesture", "private", "", "public" ] }, + { symbol: [ "QGestureEvent", "private", "", "public" ] }, + { symbol: [ "QGestureRecognizer", "private", "", "public" ] }, + { symbol: [ "QGlobalStatic", "private", "", "public" ] }, + { symbol: [ "QGlyphRun", "private", "", "public" ] }, + { symbol: [ "QGradient", "private", "", "public" ] }, + { symbol: [ "QGradientStop", "private", "", "public" ] }, + { symbol: [ "QGradientStops", "private", "", "public" ] }, + { symbol: [ "QGraphicsAnchor", "private", "", "public" ] }, + { symbol: [ "QGraphicsAnchorLayout", "private", "", "public" ] }, + { symbol: [ "QGraphicsBlurEffect", "private", "", "public" ] }, + { symbol: [ "QGraphicsColorizeEffect", "private", "", "public" ] }, + { symbol: [ "QGraphicsDropShadowEffect", "private", "", "public" ] }, + { symbol: [ "QGraphicsEffect", "private", "", "public" ] }, + { symbol: [ "QGraphicsEllipseItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsGridLayout", "private", "", "public" ] }, + { symbol: [ "QGraphicsItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsItemAnimation", "private", "", "public" ] }, + { symbol: [ "QGraphicsItemGroup", "private", "", "public" ] }, + { symbol: [ "QGraphicsLayout", "private", "", "public" ] }, + { symbol: [ "QGraphicsLayoutItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsLineItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsLinearLayout", "private", "", "public" ] }, + { symbol: [ "QGraphicsObject", "private", "", "public" ] }, + { symbol: [ "QGraphicsOpacityEffect", "private", "", "public" ] }, + { symbol: [ "QGraphicsPathItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsPixmapItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsPolygonItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsProxyWidget", "private", "", "public" ] }, + { symbol: [ "QGraphicsRectItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsRotation", "private", "", "public" ] }, + { symbol: [ "QGraphicsScale", "private", "", "public" ] }, + { symbol: [ "QGraphicsScene", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneContextMenuEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneDragDropEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneHelpEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneHoverEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneMouseEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneMoveEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneResizeEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSceneWheelEvent", "private", "", "public" ] }, + { symbol: [ "QGraphicsSimpleTextItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsSvgItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsTextItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsTransform", "private", "", "public" ] }, + { symbol: [ "QGraphicsVideoItem", "private", "", "public" ] }, + { symbol: [ "QGraphicsView", "private", "", "public" ] }, + { symbol: [ "QGraphicsWebView", "private", "", "public" ] }, + { symbol: [ "QGraphicsWidget", "private", "", "public" ] }, + { symbol: [ "QGridLayout", "private", "", "public" ] }, + { symbol: [ "QGroupBox", "private", "", "public" ] }, + { symbol: [ "QGuiApplication", "private", "", "public" ] }, + { symbol: [ "QGyroscope", "private", "", "public" ] }, + { symbol: [ "QGyroscopeFilter", "private", "", "public" ] }, + { symbol: [ "QGyroscopeReading", "private", "", "public" ] }, + { symbol: [ "QHBoxLayout", "private", "", "public" ] }, + { symbol: [ "QHash", "private", "", "public" ] }, + { symbol: [ "QHashData", "private", "", "public" ] }, + { symbol: [ "QHashDummyValue", "private", "", "public" ] }, + { symbol: [ "QHashIterator", "private", "", "public" ] }, + { symbol: [ "QHashNode", "private", "", "public" ] }, + { symbol: [ "QHeaderView", "private", "", "public" ] }, + { symbol: [ "QHelpContentItem", "private", "", "public" ] }, + { symbol: [ "QHelpContentModel", "private", "", "public" ] }, + { symbol: [ "QHelpContentWidget", "private", "", "public" ] }, + { symbol: [ "QHelpEngine", "private", "", "public" ] }, + { symbol: [ "QHelpEngineCore", "private", "", "public" ] }, + { symbol: [ "QHelpEvent", "private", "", "public" ] }, + { symbol: [ "QHelpGlobal", "private", "", "public" ] }, + { symbol: [ "QHelpIndexModel", "private", "", "public" ] }, + { symbol: [ "QHelpIndexWidget", "private", "", "public" ] }, + { symbol: [ "QHelpSearchEngine", "private", "", "public" ] }, + { symbol: [ "QHelpSearchQuery", "private", "", "public" ] }, + { symbol: [ "QHelpSearchQueryWidget", "private", "", "public" ] }, + { symbol: [ "QHelpSearchResultWidget", "private", "", "public" ] }, + { symbol: [ "QHideEvent", "private", "", "public" ] }, + { symbol: [ "QHistoryState", "private", "", "public" ] }, + { symbol: [ "QHolsterFilter", "private", "", "public" ] }, + { symbol: [ "QHolsterReading", "private", "", "public" ] }, + { symbol: [ "QHolsterSensor", "private", "", "public" ] }, + { symbol: [ "QHostAddress", "private", "", "public" ] }, + { symbol: [ "QHostInfo", "private", "", "public" ] }, + { symbol: [ "QHoverEvent", "private", "", "public" ] }, + { symbol: [ "QHttpMultiPart", "private", "", "public" ] }, + { symbol: [ "QHttpPart", "private", "", "public" ] }, + { symbol: [ "QIODevice", "private", "", "public" ] }, + { symbol: [ "QIPv6Address", "private", "", "public" ] }, + { symbol: [ "QIRProximityFilter", "private", "", "public" ] }, + { symbol: [ "QIRProximityReading", "private", "", "public" ] }, + { symbol: [ "QIRProximitySensor", "private", "", "public" ] }, + { symbol: [ "QIcon", "private", "", "public" ] }, + { symbol: [ "QIconDragEvent", "private", "", "public" ] }, + { symbol: [ "QIconEngine", "private", "", "public" ] }, + { symbol: [ "QIconEnginePlugin", "private", "", "public" ] }, + { symbol: [ "QIconEngineV2", "private", "", "public" ] }, + { symbol: [ "QIdentityProxyModel", "private", "", "public" ] }, + { symbol: [ "QImage", "private", "", "public" ] }, + { symbol: [ "QImageCleanupFunction", "private", "", "public" ] }, + { symbol: [ "QImageEncoderControl", "private", "", "public" ] }, + { symbol: [ "QImageEncoderSettings", "private", "", "public" ] }, + { symbol: [ "QImageIOHandler", "private", "", "public" ] }, + { symbol: [ "QImageIOPlugin", "private", "", "public" ] }, + { symbol: [ "QImageReader", "private", "", "public" ] }, + { symbol: [ "QImageTextKeyLang", "private", "", "public" ] }, + { symbol: [ "QImageWriter", "private", "", "public" ] }, + { symbol: [ "QIncompatibleFlag", "private", "", "public" ] }, + { symbol: [ "QInputDialog", "private", "", "public" ] }, + { symbol: [ "QInputEvent", "private", "", "public" ] }, + { symbol: [ "QInputMethod", "private", "", "public" ] }, + { symbol: [ "QInputMethodEvent", "private", "", "public" ] }, + { symbol: [ "QInputMethodQueryEvent", "private", "", "public" ] }, + { symbol: [ "QIntValidator", "private", "", "public" ] }, + { symbol: [ "QIntegerForSize", "private", "", "public" ] }, + { symbol: [ "QInternal", "private", "", "public" ] }, + { symbol: [ "QItemDelegate", "private", "", "public" ] }, + { symbol: [ "QItemEditorCreator", "private", "", "public" ] }, + { symbol: [ "QItemEditorCreatorBase", "private", "", "public" ] }, + { symbol: [ "QItemEditorFactory", "private", "", "public" ] }, + { symbol: [ "QItemSelection", "private", "", "public" ] }, + { symbol: [ "QItemSelectionModel", "private", "", "public" ] }, + { symbol: [ "QItemSelectionRange", "private", "", "public" ] }, + { symbol: [ "QJSEngine", "private", "", "public" ] }, + { symbol: [ "QJSValue", "private", "", "public" ] }, + { symbol: [ "QJSValueIterator", "private", "", "public" ] }, + { symbol: [ "QJSValueList", "private", "", "public" ] }, + { symbol: [ "QJsonArray", "private", "", "public" ] }, + { symbol: [ "QJsonDocument", "private", "", "public" ] }, + { symbol: [ "QJsonObject", "private", "", "public" ] }, + { symbol: [ "QJsonParseError", "private", "", "public" ] }, + { symbol: [ "QJsonValue", "private", "", "public" ] }, + { symbol: [ "QJsonValuePtr", "private", "", "public" ] }, + { symbol: [ "QJsonValueRef", "private", "", "public" ] }, + { symbol: [ "QJsonValueRefPtr", "private", "", "public" ] }, + { symbol: [ "QKeyEvent", "private", "", "public" ] }, + { symbol: [ "QKeyEventTransition", "private", "", "public" ] }, + { symbol: [ "QKeySequence", "private", "", "public" ] }, + { symbol: [ "QKeySequenceEdit", "private", "", "public" ] }, + { symbol: [ "QLCDNumber", "private", "", "public" ] }, + { symbol: [ "QLabel", "private", "", "public" ] }, + { symbol: [ "QLatin1Char", "private", "", "public" ] }, + { symbol: [ "QLatin1Literal", "private", "", "public" ] }, + { symbol: [ "QLatin1String", "private", "", "public" ] }, + { symbol: [ "QLayout", "private", "", "public" ] }, + { symbol: [ "QLayoutItem", "private", "", "public" ] }, + { symbol: [ "QLibrary", "private", "", "public" ] }, + { symbol: [ "QLibraryInfo", "private", "", "public" ] }, + { symbol: [ "QLightFilter", "private", "", "public" ] }, + { symbol: [ "QLightReading", "private", "", "public" ] }, + { symbol: [ "QLightSensor", "private", "", "public" ] }, + { symbol: [ "QLine", "private", "", "public" ] }, + { symbol: [ "QLineEdit", "private", "", "public" ] }, + { symbol: [ "QLineF", "private", "", "public" ] }, + { symbol: [ "QLinearGradient", "private", "", "public" ] }, + { symbol: [ "QLinkedList", "private", "", "public" ] }, + { symbol: [ "QLinkedListData", "private", "", "public" ] }, + { symbol: [ "QLinkedListIterator", "private", "", "public" ] }, + { symbol: [ "QLinkedListNode", "private", "", "public" ] }, + { symbol: [ "QList", "private", "", "public" ] }, + { symbol: [ "QListData", "private", "", "public" ] }, + { symbol: [ "QListIterator", "private", "", "public" ] }, + { symbol: [ "QListSpecialMethods", "private", "", "public" ] }, + { symbol: [ "QListView", "private", "", "public" ] }, + { symbol: [ "QListWidget", "private", "", "public" ] }, + { symbol: [ "QListWidgetItem", "private", "", "public" ] }, + { symbol: [ "QLocalServer", "private", "", "public" ] }, + { symbol: [ "QLocalSocket", "private", "", "public" ] }, + { symbol: [ "QLocale", "private", "", "public" ] }, + { symbol: [ "QLocation", "private", "", "public" ] }, + { symbol: [ "QLockFile", "private", "", "public" ] }, + { symbol: [ "QLockFile", "private", "", "public" ] }, + { symbol: [ "QLoggingCategory", "private", "", "public" ] }, + { symbol: [ "QLowEnergyCharacteristic", "private", "", "public" ] }, + { symbol: [ "QLowEnergyController", "private", "", "public" ] }, + { symbol: [ "QLowEnergyDescriptor", "private", "", "public" ] }, + { symbol: [ "QLowEnergyHandle", "private", "", "public" ] }, + { symbol: [ "QLowEnergyService", "private", "", "public" ] }, + { symbol: [ "QMacCocoaViewContainer", "private", "", "public" ] }, + { symbol: [ "QMacNativeWidget", "private", "", "public" ] }, + { symbol: [ "QMagnetometer", "private", "", "public" ] }, + { symbol: [ "QMagnetometerFilter", "private", "", "public" ] }, + { symbol: [ "QMagnetometerReading", "private", "", "public" ] }, + { symbol: [ "QMainWindow", "private", "", "public" ] }, + { symbol: [ "QMap", "private", "", "public" ] }, + { symbol: [ "QMapData", "private", "", "public" ] }, + { symbol: [ "QMapDataBase", "private", "", "public" ] }, + { symbol: [ "QMapIterator", "private", "", "public" ] }, + { symbol: [ "QMapNode", "private", "", "public" ] }, + { symbol: [ "QMapNodeBase", "private", "", "public" ] }, + { symbol: [ "QMargins", "private", "", "public" ] }, + { symbol: [ "QMarginsF", "private", "", "public" ] }, + { symbol: [ "QMaskGenerator", "private", "", "public" ] }, + { symbol: [ "QMatrix", "private", "", "public" ] }, + { symbol: [ "QMatrix2x2", "private", "", "public" ] }, + { symbol: [ "QMatrix2x3", "private", "", "public" ] }, + { symbol: [ "QMatrix2x4", "private", "", "public" ] }, + { symbol: [ "QMatrix3x2", "private", "", "public" ] }, + { symbol: [ "QMatrix3x3", "private", "", "public" ] }, + { symbol: [ "QMatrix3x4", "private", "", "public" ] }, + { symbol: [ "QMatrix4x2", "private", "", "public" ] }, + { symbol: [ "QMatrix4x3", "private", "", "public" ] }, + { symbol: [ "QMatrix4x4", "private", "", "public" ] }, + { symbol: [ "QMdiArea", "private", "", "public" ] }, + { symbol: [ "QMdiSubWindow", "private", "", "public" ] }, + { symbol: [ "QMediaAudioProbeControl", "private", "", "public" ] }, + { symbol: [ "QMediaAvailabilityControl", "private", "", "public" ] }, + { symbol: [ "QMediaBindableInterface", "private", "", "public" ] }, + { symbol: [ "QMediaContainerControl", "private", "", "public" ] }, + { symbol: [ "QMediaContent", "private", "", "public" ] }, + { symbol: [ "QMediaControl", "private", "", "public" ] }, + { symbol: [ "QMediaGaplessPlaybackControl", "private", "", "public" ] }, + { symbol: [ "QMediaMetaData", "private", "", "public" ] }, + { symbol: [ "QMediaNetworkAccessControl", "private", "", "public" ] }, + { symbol: [ "QMediaObject", "private", "", "public" ] }, + { symbol: [ "QMediaPlayer", "private", "", "public" ] }, + { symbol: [ "QMediaPlayerControl", "private", "", "public" ] }, + { symbol: [ "QMediaPlaylist", "private", "", "public" ] }, + { symbol: [ "QMediaRecorder", "private", "", "public" ] }, + { symbol: [ "QMediaRecorderControl", "private", "", "public" ] }, + { symbol: [ "QMediaResource", "private", "", "public" ] }, + { symbol: [ "QMediaResourceList", "private", "", "public" ] }, + { symbol: [ "QMediaService", "private", "", "public" ] }, + { symbol: [ "QMediaServiceCameraInfoInterface", "private", "", "public" ] }, + { symbol: [ "QMediaServiceDefaultDeviceInterface", "private", "", "public" ] }, + { symbol: [ "QMediaServiceFeaturesInterface", "private", "", "public" ] }, + { symbol: [ "QMediaServiceProviderFactoryInterface", "private", "", "public" ] }, + { symbol: [ "QMediaServiceProviderHint", "private", "", "public" ] }, + { symbol: [ "QMediaServiceProviderPlugin", "private", "", "public" ] }, + { symbol: [ "QMediaServiceSupportedDevicesInterface", "private", "", "public" ] }, + { symbol: [ "QMediaServiceSupportedFormatsInterface", "private", "", "public" ] }, + { symbol: [ "QMediaStreamsControl", "private", "", "public" ] }, + { symbol: [ "QMediaTimeInterval", "private", "", "public" ] }, + { symbol: [ "QMediaTimeRange", "private", "", "public" ] }, + { symbol: [ "QMediaVideoProbeControl", "private", "", "public" ] }, + { symbol: [ "QMenu", "private", "", "public" ] }, + { symbol: [ "QMenuBar", "private", "", "public" ] }, + { symbol: [ "QMessageAuthenticationCode", "private", "", "public" ] }, + { symbol: [ "QMessageBox", "private", "", "public" ] }, + { symbol: [ "QMessageLogContext", "private", "", "public" ] }, + { symbol: [ "QMessageLogger", "private", "", "public" ] }, + { symbol: [ "QMetaClassInfo", "private", "", "public" ] }, + { symbol: [ "QMetaDataReaderControl", "private", "", "public" ] }, + { symbol: [ "QMetaDataWriterControl", "private", "", "public" ] }, + { symbol: [ "QMetaEnum", "private", "", "public" ] }, + { symbol: [ "QMetaMethod", "private", "", "public" ] }, + { symbol: [ "QMetaObject", "private", "", "public" ] }, + { symbol: [ "QMetaProperty", "private", "", "public" ] }, + { symbol: [ "QMetaType", "private", "", "public" ] }, + { symbol: [ "QMetaTypeId", "private", "", "public" ] }, + { symbol: [ "QMetaTypeId2", "private", "", "public" ] }, + { symbol: [ "QMetaTypeIdQObject", "private", "", "public" ] }, + { symbol: [ "QMimeData", "private", "", "public" ] }, + { symbol: [ "QMimeDatabase", "private", "", "public" ] }, + { symbol: [ "QMimeType", "private", "", "public" ] }, + { symbol: [ "QModelIndex", "private", "", "public" ] }, + { symbol: [ "QModelIndexList", "private", "", "public" ] }, + { symbol: [ "QMouseEvent", "private", "", "public" ] }, + { symbol: [ "QMouseEventTransition", "private", "", "public" ] }, + { symbol: [ "QMoveEvent", "private", "", "public" ] }, + { symbol: [ "QMovie", "private", "", "public" ] }, + { symbol: [ "QMultiHash", "private", "", "public" ] }, + { symbol: [ "QMultiMap", "private", "", "public" ] }, + { symbol: [ "QMultimedia", "private", "", "public" ] }, + { symbol: [ "QMutableByteArrayListIterator", "private", "", "public" ] }, + { symbol: [ "QMutableFutureIterator", "private", "", "public" ] }, + { symbol: [ "QMutableHashIterator", "private", "", "public" ] }, + { symbol: [ "QMutableLinkedListIterator", "private", "", "public" ] }, + { symbol: [ "QMutableListIterator", "private", "", "public" ] }, + { symbol: [ "QMutableMapIterator", "private", "", "public" ] }, + { symbol: [ "QMutableSetIterator", "private", "", "public" ] }, + { symbol: [ "QMutableStringListIterator", "private", "", "public" ] }, + { symbol: [ "QMutableVectorIterator", "private", "", "public" ] }, + { symbol: [ "QMutex", "private", "", "public" ] }, + { symbol: [ "QMutexLocker", "private", "", "public" ] }, + { symbol: [ "QNativeGestureEvent", "private", "", "public" ] }, + { symbol: [ "QNdefFilter", "private", "", "public" ] }, + { symbol: [ "QNdefMessage", "private", "", "public" ] }, + { symbol: [ "QNdefNfcIconRecord", "private", "", "public" ] }, + { symbol: [ "QNdefNfcSmartPosterRecord", "private", "", "public" ] }, + { symbol: [ "QNdefNfcTextRecord", "private", "", "public" ] }, + { symbol: [ "QNdefNfcUriRecord", "private", "", "public" ] }, + { symbol: [ "QNdefRecord", "private", "", "public" ] }, + { symbol: [ "QNearFieldManager", "private", "", "public" ] }, + { symbol: [ "QNearFieldShareManager", "private", "", "public" ] }, + { symbol: [ "QNearFieldShareTarget", "private", "", "public" ] }, + { symbol: [ "QNearFieldTarget", "private", "", "public" ] }, + { symbol: [ "QNetworkAccessManager", "private", "", "public" ] }, + { symbol: [ "QNetworkAddressEntry", "private", "", "public" ] }, + { symbol: [ "QNetworkCacheMetaData", "private", "", "public" ] }, + { symbol: [ "QNetworkConfiguration", "private", "", "public" ] }, + { symbol: [ "QNetworkConfigurationManager", "private", "", "public" ] }, + { symbol: [ "QNetworkCookie", "private", "", "public" ] }, + { symbol: [ "QNetworkCookieJar", "private", "", "public" ] }, + { symbol: [ "QNetworkDiskCache", "private", "", "public" ] }, + { symbol: [ "QNetworkInterface", "private", "", "public" ] }, + { symbol: [ "QNetworkProxy", "private", "", "public" ] }, + { symbol: [ "QNetworkProxyFactory", "private", "", "public" ] }, + { symbol: [ "QNetworkProxyQuery", "private", "", "public" ] }, + { symbol: [ "QNetworkReply", "private", "", "public" ] }, + { symbol: [ "QNetworkRequest", "private", "", "public" ] }, + { symbol: [ "QNetworkSession", "private", "", "public" ] }, + { symbol: [ "QNmeaPositionInfoSource", "private", "", "public" ] }, + { symbol: [ "QNoDebug", "private", "", "public" ] }, + { symbol: [ "QObject", "private", "", "public" ] }, + { symbol: [ "QObjectCleanupHandler", "private", "", "public" ] }, + { symbol: [ "QObjectData", "private", "", "public" ] }, + { symbol: [ "QObjectList", "private", "", "public" ] }, + { symbol: [ "QObjectUserData", "private", "", "public" ] }, + { symbol: [ "QOffscreenSurface", "private", "", "public" ] }, + { symbol: [ "QOpenGLBuffer", "private", "", "public" ] }, + { symbol: [ "QOpenGLContext", "private", "", "public" ] }, + { symbol: [ "QOpenGLContextGroup", "private", "", "public" ] }, + { symbol: [ "QOpenGLDebugLogger", "private", "", "public" ] }, + { symbol: [ "QOpenGLDebugMessage", "private", "", "public" ] }, + { symbol: [ "QOpenGLExtensions", "private", "", "public" ] }, + { symbol: [ "QOpenGLFramebufferObject", "private", "", "public" ] }, + { symbol: [ "QOpenGLFramebufferObjectFormat", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctionsPrivate", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_0", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_1", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_2", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_3", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_4", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_1_5", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_2_0", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_2_1", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_0", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_1", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_2_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_2_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_3_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_3_3_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_0_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_0_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_1_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_1_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_2_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_2_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_3_Compatibility", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_4_3_Core", "private", "", "public" ] }, + { symbol: [ "QOpenGLFunctions_ES2", "private", "", "public" ] }, + { symbol: [ "QOpenGLPaintDevice", "private", "", "public" ] }, + { symbol: [ "QOpenGLPixelTransferOptions", "private", "", "public" ] }, + { symbol: [ "QOpenGLShader", "private", "", "public" ] }, + { symbol: [ "QOpenGLShaderProgram", "private", "", "public" ] }, + { symbol: [ "QOpenGLTexture", "private", "", "public" ] }, + { symbol: [ "QOpenGLTimeMonitor", "private", "", "public" ] }, + { symbol: [ "QOpenGLTimerQuery", "private", "", "public" ] }, + { symbol: [ "QOpenGLVersionFunctions", "private", "", "public" ] }, + { symbol: [ "QOpenGLVersionProfile", "private", "", "public" ] }, + { symbol: [ "QOpenGLVertexArrayObject", "private", "", "public" ] }, + { symbol: [ "QOpenGLWidget", "private", "", "public" ] }, + { symbol: [ "QOpenGLWindow", "private", "", "public" ] }, + { symbol: [ "QOrientationFilter", "private", "", "public" ] }, + { symbol: [ "QOrientationReading", "private", "", "public" ] }, + { symbol: [ "QOrientationSensor", "private", "", "public" ] }, + { symbol: [ "QPageLayout", "private", "", "public" ] }, + { symbol: [ "QPageSetupDialog", "private", "", "public" ] }, + { symbol: [ "QPageSize", "private", "", "public" ] }, + { symbol: [ "QPagedPaintDevice", "private", "", "public" ] }, + { symbol: [ "QPaintDevice", "private", "", "public" ] }, + { symbol: [ "QPaintDeviceWindow", "private", "", "public" ] }, + { symbol: [ "QPaintEngine", "private", "", "public" ] }, + { symbol: [ "QPaintEngineState", "private", "", "public" ] }, + { symbol: [ "QPaintEvent", "private", "", "public" ] }, + { symbol: [ "QPainter", "private", "", "public" ] }, + { symbol: [ "QPainterPath", "private", "", "public" ] }, + { symbol: [ "QPainterPathStroker", "private", "", "public" ] }, + { symbol: [ "QPair", "private", "", "public" ] }, + { symbol: [ "QPalette", "private", "", "public" ] }, + { symbol: [ "QPanGesture", "private", "", "public" ] }, + { symbol: [ "QParallelAnimationGroup", "private", "", "public" ] }, + { symbol: [ "QPauseAnimation", "private", "", "public" ] }, + { symbol: [ "QPdfWriter", "private", "", "public" ] }, + { symbol: [ "QPen", "private", "", "public" ] }, + { symbol: [ "QPersistentModelIndex", "private", "", "public" ] }, + { symbol: [ "QPicture", "private", "", "public" ] }, + { symbol: [ "QPictureFormatPlugin", "private", "", "public" ] }, + { symbol: [ "QPictureIO", "private", "", "public" ] }, + { symbol: [ "QPinchGesture", "private", "", "public" ] }, + { symbol: [ "QPixelFormat", "private", "", "public" ] }, + { symbol: [ "QPixmap", "private", "", "public" ] }, + { symbol: [ "QPixmapCache", "private", "", "public" ] }, + { symbol: [ "QPlace", "private", "", "public" ] }, + { symbol: [ "QPlaceAttribute", "private", "", "public" ] }, + { symbol: [ "QPlaceCategory", "private", "", "public" ] }, + { symbol: [ "QPlaceContactDetail", "private", "", "public" ] }, + { symbol: [ "QPlaceContent", "private", "", "public" ] }, + { symbol: [ "QPlaceContentReply", "private", "", "public" ] }, + { symbol: [ "QPlaceContentRequest", "private", "", "public" ] }, + { symbol: [ "QPlaceDetailsReply", "private", "", "public" ] }, + { symbol: [ "QPlaceEditorial", "private", "", "public" ] }, + { symbol: [ "QPlaceIcon", "private", "", "public" ] }, + { symbol: [ "QPlaceIdReply", "private", "", "public" ] }, + { symbol: [ "QPlaceImage", "private", "", "public" ] }, + { symbol: [ "QPlaceManager", "private", "", "public" ] }, + { symbol: [ "QPlaceManagerEngine", "private", "", "public" ] }, + { symbol: [ "QPlaceMatchReply", "private", "", "public" ] }, + { symbol: [ "QPlaceMatchRequest", "private", "", "public" ] }, + { symbol: [ "QPlaceProposedSearchResult", "private", "", "public" ] }, + { symbol: [ "QPlaceRatings", "private", "", "public" ] }, + { symbol: [ "QPlaceReply", "private", "", "public" ] }, + { symbol: [ "QPlaceResult", "private", "", "public" ] }, + { symbol: [ "QPlaceReview", "private", "", "public" ] }, + { symbol: [ "QPlaceSearchReply", "private", "", "public" ] }, + { symbol: [ "QPlaceSearchRequest", "private", "", "public" ] }, + { symbol: [ "QPlaceSearchResult", "private", "", "public" ] }, + { symbol: [ "QPlaceSearchSuggestionReply", "private", "", "public" ] }, + { symbol: [ "QPlaceSupplier", "private", "", "public" ] }, + { symbol: [ "QPlaceUser", "private", "", "public" ] }, + { symbol: [ "QPlainTextDocumentLayout", "private", "", "public" ] }, + { symbol: [ "QPlainTextEdit", "private", "", "public" ] }, + { symbol: [ "QPluginLoader", "private", "", "public" ] }, + { symbol: [ "QPoint", "private", "", "public" ] }, + { symbol: [ "QPointF", "private", "", "public" ] }, + { symbol: [ "QPointer", "private", "", "public" ] }, + { symbol: [ "QPolygon", "private", "", "public" ] }, + { symbol: [ "QPolygonF", "private", "", "public" ] }, + { symbol: [ "QPressureFilter", "private", "", "public" ] }, + { symbol: [ "QPressureReading", "private", "", "public" ] }, + { symbol: [ "QPressureSensor", "private", "", "public" ] }, + { symbol: [ "QPrintDialog", "private", "", "public" ] }, + { symbol: [ "QPrintEngine", "private", "", "public" ] }, + { symbol: [ "QPrintPreviewDialog", "private", "", "public" ] }, + { symbol: [ "QPrintPreviewWidget", "private", "", "public" ] }, + { symbol: [ "QPrinter", "private", "", "public" ] }, + { symbol: [ "QPrinterInfo", "private", "", "public" ] }, + { symbol: [ "QProcess", "private", "", "public" ] }, + { symbol: [ "QProcessEnvironment", "private", "", "public" ] }, + { symbol: [ "QProgressBar", "private", "", "public" ] }, + { symbol: [ "QProgressDialog", "private", "", "public" ] }, + { symbol: [ "QPropertyAnimation", "private", "", "public" ] }, + { symbol: [ "QProximityFilter", "private", "", "public" ] }, + { symbol: [ "QProximityReading", "private", "", "public" ] }, + { symbol: [ "QProximitySensor", "private", "", "public" ] }, + { symbol: [ "QProxyStyle", "private", "", "public" ] }, + { symbol: [ "QPushButton", "private", "", "public" ] }, + { symbol: [ "QQmlAbstractUrlInterceptor", "private", "", "public" ] }, + { symbol: [ "QQmlApplicationEngine", "private", "", "public" ] }, + { symbol: [ "QQmlAttachedPropertiesFunc", "private", "", "public" ] }, + { symbol: [ "QQmlComponent", "private", "", "public" ] }, + { symbol: [ "QQmlContext", "private", "", "public" ] }, + { symbol: [ "QQmlDebuggingEnabler", "private", "", "public" ] }, + { symbol: [ "QQmlEngine", "private", "", "public" ] }, + { symbol: [ "QQmlError", "private", "", "public" ] }, + { symbol: [ "QQmlExpression", "private", "", "public" ] }, + { symbol: [ "QQmlExtensionInterface", "private", "", "public" ] }, + { symbol: [ "QQmlExtensionPlugin", "private", "", "public" ] }, + { symbol: [ "QQmlFile", "private", "", "public" ] }, + { symbol: [ "QQmlFileSelector", "private", "", "public" ] }, + { symbol: [ "QQmlImageProviderBase", "private", "", "public" ] }, + { symbol: [ "QQmlIncubationController", "private", "", "public" ] }, + { symbol: [ "QQmlIncubator", "private", "", "public" ] }, + { symbol: [ "QQmlInfo", "private", "", "public" ] }, + { symbol: [ "QQmlListProperty", "private", "", "public" ] }, + { symbol: [ "QQmlListReference", "private", "", "public" ] }, + { symbol: [ "QQmlNdefRecord", "private", "", "public" ] }, + { symbol: [ "QQmlNetworkAccessManagerFactory", "private", "", "public" ] }, + { symbol: [ "QQmlParserStatus", "private", "", "public" ] }, + { symbol: [ "QQmlProperties", "private", "", "public" ] }, + { symbol: [ "QQmlProperty", "private", "", "public" ] }, + { symbol: [ "QQmlPropertyMap", "private", "", "public" ] }, + { symbol: [ "QQmlPropertyValueSource", "private", "", "public" ] }, + { symbol: [ "QQmlScriptString", "private", "", "public" ] }, + { symbol: [ "QQmlTypeInfo", "private", "", "public" ] }, + { symbol: [ "QQmlTypesExtensionInterface", "private", "", "public" ] }, + { symbol: [ "QQmlWebChannel", "private", "", "public" ] }, + { symbol: [ "QQuaternion", "private", "", "public" ] }, + { symbol: [ "QQueue", "private", "", "public" ] }, + { symbol: [ "QQuickFramebufferObject", "private", "", "public" ] }, + { symbol: [ "QQuickImageProvider", "private", "", "public" ] }, + { symbol: [ "QQuickItem", "private", "", "public" ] }, + { symbol: [ "QQuickItemGrabResult", "private", "", "public" ] }, + { symbol: [ "QQuickPaintedItem", "private", "", "public" ] }, + { symbol: [ "QQuickRenderControl", "private", "", "public" ] }, + { symbol: [ "QQuickTextDocument", "private", "", "public" ] }, + { symbol: [ "QQuickTextureFactory", "private", "", "public" ] }, + { symbol: [ "QQuickTransform", "private", "", "public" ] }, + { symbol: [ "QQuickView", "private", "", "public" ] }, + { symbol: [ "QQuickWidget", "private", "", "public" ] }, + { symbol: [ "QQuickWindow", "private", "", "public" ] }, + { symbol: [ "QRadialGradient", "private", "", "public" ] }, + { symbol: [ "QRadioButton", "private", "", "public" ] }, + { symbol: [ "QRadioData", "private", "", "public" ] }, + { symbol: [ "QRadioDataControl", "private", "", "public" ] }, + { symbol: [ "QRadioTuner", "private", "", "public" ] }, + { symbol: [ "QRadioTunerControl", "private", "", "public" ] }, + { symbol: [ "QRasterWindow", "private", "", "public" ] }, + { symbol: [ "QRawFont", "private", "", "public" ] }, + { symbol: [ "QReadLocker", "private", "", "public" ] }, + { symbol: [ "QReadWriteLock", "private", "", "public" ] }, + { symbol: [ "QRect", "private", "", "public" ] }, + { symbol: [ "QRectF", "private", "", "public" ] }, + { symbol: [ "QRegExp", "private", "", "public" ] }, + { symbol: [ "QRegExpValidator", "private", "", "public" ] }, + { symbol: [ "QRegion", "private", "", "public" ] }, + { symbol: [ "QRegularExpression", "private", "", "public" ] }, + { symbol: [ "QRegularExpressionMatch", "private", "", "public" ] }, + { symbol: [ "QRegularExpressionMatchIterator", "private", "", "public" ] }, + { symbol: [ "QRegularExpressionValidator", "private", "", "public" ] }, + { symbol: [ "QResizeEvent", "private", "", "public" ] }, + { symbol: [ "QResource", "private", "", "public" ] }, + { symbol: [ "QReturnArgument", "private", "", "public" ] }, + { symbol: [ "QRgb", "private", "", "public" ] }, + { symbol: [ "QRotationFilter", "private", "", "public" ] }, + { symbol: [ "QRotationReading", "private", "", "public" ] }, + { symbol: [ "QRotationSensor", "private", "", "public" ] }, + { symbol: [ "QRubberBand", "private", "", "public" ] }, + { symbol: [ "QRunnable", "private", "", "public" ] }, + { symbol: [ "QSGAbstractRenderer", "private", "", "public" ] }, + { symbol: [ "QSGBasicGeometryNode", "private", "", "public" ] }, + { symbol: [ "QSGClipNode", "private", "", "public" ] }, + { symbol: [ "QSGDynamicTexture", "private", "", "public" ] }, + { symbol: [ "QSGEngine", "private", "", "public" ] }, + { symbol: [ "QSGFlatColorMaterial", "private", "", "public" ] }, + { symbol: [ "QSGGeometry", "private", "", "public" ] }, + { symbol: [ "QSGGeometryNode", "private", "", "public" ] }, + { symbol: [ "QSGMaterial", "private", "", "public" ] }, + { symbol: [ "QSGMaterialShader", "private", "", "public" ] }, + { symbol: [ "QSGMaterialType", "private", "", "public" ] }, + { symbol: [ "QSGNode", "private", "", "public" ] }, + { symbol: [ "QSGNodeVisitor", "private", "", "public" ] }, + { symbol: [ "QSGOpacityNode", "private", "", "public" ] }, + { symbol: [ "QSGOpaqueTextureMaterial", "private", "", "public" ] }, + { symbol: [ "QSGRootNode", "private", "", "public" ] }, + { symbol: [ "QSGSimpleMaterial", "private", "", "public" ] }, + { symbol: [ "QSGSimpleMaterialComparableMaterial", "private", "", "public" ] }, + { symbol: [ "QSGSimpleMaterialShader", "private", "", "public" ] }, + { symbol: [ "QSGSimpleRectNode", "private", "", "public" ] }, + { symbol: [ "QSGSimpleTextureNode", "private", "", "public" ] }, + { symbol: [ "QSGTexture", "private", "", "public" ] }, + { symbol: [ "QSGTextureMaterial", "private", "", "public" ] }, + { symbol: [ "QSGTextureProvider", "private", "", "public" ] }, + { symbol: [ "QSGTransformNode", "private", "", "public" ] }, + { symbol: [ "QSGVertexColorMaterial", "private", "", "public" ] }, + { symbol: [ "QSGVideoNodeFactory_I420", "private", "", "public" ] }, + { symbol: [ "QSGVideoNodeFactory_RGB", "private", "", "public" ] }, + { symbol: [ "QSGVideoNodeFactory_Texture", "private", "", "public" ] }, + { symbol: [ "QSGVideoNode_I420", "private", "", "public" ] }, + { symbol: [ "QSGVideoNode_RGB", "private", "", "public" ] }, + { symbol: [ "QSGVideoNode_Texture", "private", "", "public" ] }, + { symbol: [ "QSaveFile", "private", "", "public" ] }, + { symbol: [ "QScopedArrayPointer", "private", "", "public" ] }, + { symbol: [ "QScopedPointer", "private", "", "public" ] }, + { symbol: [ "QScopedPointerArrayDeleter", "private", "", "public" ] }, + { symbol: [ "QScopedPointerDeleteLater", "private", "", "public" ] }, + { symbol: [ "QScopedPointerDeleter", "private", "", "public" ] }, + { symbol: [ "QScopedPointerObjectDeleteLater", "private", "", "public" ] }, + { symbol: [ "QScopedPointerPodDeleter", "private", "", "public" ] }, + { symbol: [ "QScopedValueRollback", "private", "", "public" ] }, + { symbol: [ "QScreen", "private", "", "public" ] }, + { symbol: [ "QScreenOrientationChangeEvent", "private", "", "public" ] }, + { symbol: [ "QScriptClass", "private", "", "public" ] }, + { symbol: [ "QScriptClassPropertyIterator", "private", "", "public" ] }, + { symbol: [ "QScriptContext", "private", "", "public" ] }, + { symbol: [ "QScriptContextInfo", "private", "", "public" ] }, + { symbol: [ "QScriptContextInfoList", "private", "", "public" ] }, + { symbol: [ "QScriptEngine", "private", "", "public" ] }, + { symbol: [ "QScriptEngineAgent", "private", "", "public" ] }, + { symbol: [ "QScriptEngineDebugger", "private", "", "public" ] }, + { symbol: [ "QScriptExtensionInterface", "private", "", "public" ] }, + { symbol: [ "QScriptExtensionPlugin", "private", "", "public" ] }, + { symbol: [ "QScriptProgram", "private", "", "public" ] }, + { symbol: [ "QScriptString", "private", "", "public" ] }, + { symbol: [ "QScriptSyntaxCheckResult", "private", "", "public" ] }, + { symbol: [ "QScriptValue", "private", "", "public" ] }, + { symbol: [ "QScriptValueIterator", "private", "", "public" ] }, + { symbol: [ "QScriptValueList", "private", "", "public" ] }, + { symbol: [ "QScriptable", "private", "", "public" ] }, + { symbol: [ "QScrollArea", "private", "", "public" ] }, + { symbol: [ "QScrollBar", "private", "", "public" ] }, + { symbol: [ "QScrollEvent", "private", "", "public" ] }, + { symbol: [ "QScrollPrepareEvent", "private", "", "public" ] }, + { symbol: [ "QScroller", "private", "", "public" ] }, + { symbol: [ "QScrollerProperties", "private", "", "public" ] }, + { symbol: [ "QSemaphore", "private", "", "public" ] }, + { symbol: [ "QSensor", "private", "", "public" ] }, + { symbol: [ "QSensorBackend", "private", "", "public" ] }, + { symbol: [ "QSensorBackendFactory", "private", "", "public" ] }, + { symbol: [ "QSensorChangesInterface", "private", "", "public" ] }, + { symbol: [ "QSensorFilter", "private", "", "public" ] }, + { symbol: [ "QSensorGesture", "private", "", "public" ] }, + { symbol: [ "QSensorGestureManager", "private", "", "public" ] }, + { symbol: [ "QSensorGesturePluginInterface", "private", "", "public" ] }, + { symbol: [ "QSensorGestureRecognizer", "private", "", "public" ] }, + { symbol: [ "QSensorManager", "private", "", "public" ] }, + { symbol: [ "QSensorPluginInterface", "private", "", "public" ] }, + { symbol: [ "QSensorReading", "private", "", "public" ] }, + { symbol: [ "QSequentialAnimationGroup", "private", "", "public" ] }, + { symbol: [ "QSequentialIterable", "private", "", "public" ] }, + { symbol: [ "QSerialPort", "private", "", "public" ] }, + { symbol: [ "QSerialPortInfo", "private", "", "public" ] }, + { symbol: [ "QSessionManager", "private", "", "public" ] }, + { symbol: [ "QSet", "private", "", "public" ] }, + { symbol: [ "QSetIterator", "private", "", "public" ] }, + { symbol: [ "QSettings", "private", "", "public" ] }, + { symbol: [ "QSharedData", "private", "", "public" ] }, + { symbol: [ "QSharedDataPointer", "private", "", "public" ] }, + { symbol: [ "QSharedMemory", "private", "", "public" ] }, + { symbol: [ "QSharedPointer", "private", "", "public" ] }, + { symbol: [ "QShortcut", "private", "", "public" ] }, + { symbol: [ "QShortcutEvent", "private", "", "public" ] }, + { symbol: [ "QShowEvent", "private", "", "public" ] }, + { symbol: [ "QSignalBlocker", "private", "", "public" ] }, + { symbol: [ "QSignalMapper", "private", "", "public" ] }, + { symbol: [ "QSignalSpy", "private", "", "public" ] }, + { symbol: [ "QSignalTransition", "private", "", "public" ] }, + { symbol: [ "QSimpleXmlNodeModel", "private", "", "public" ] }, + { symbol: [ "QSize", "private", "", "public" ] }, + { symbol: [ "QSizeF", "private", "", "public" ] }, + { symbol: [ "QSizeGrip", "private", "", "public" ] }, + { symbol: [ "QSizePolicy", "private", "", "public" ] }, + { symbol: [ "QSlider", "private", "", "public" ] }, + { symbol: [ "QSocketNotifier", "private", "", "public" ] }, + { symbol: [ "QSortFilterProxyModel", "private", "", "public" ] }, + { symbol: [ "QSound", "private", "", "public" ] }, + { symbol: [ "QSoundEffect", "private", "", "public" ] }, + { symbol: [ "QSourceLocation", "private", "", "public" ] }, + { symbol: [ "QSpacerItem", "private", "", "public" ] }, + { symbol: [ "QSpinBox", "private", "", "public" ] }, + { symbol: [ "QSplashScreen", "private", "", "public" ] }, + { symbol: [ "QSplitter", "private", "", "public" ] }, + { symbol: [ "QSplitterHandle", "private", "", "public" ] }, + { symbol: [ "QSpontaneKeyEvent", "private", "", "public" ] }, + { symbol: [ "QSql", "private", "", "public" ] }, + { symbol: [ "QSqlDatabase", "private", "", "public" ] }, + { symbol: [ "QSqlDriver", "private", "", "public" ] }, + { symbol: [ "QSqlDriverCreator", "private", "", "public" ] }, + { symbol: [ "QSqlDriverCreatorBase", "private", "", "public" ] }, + { symbol: [ "QSqlDriverPlugin", "private", "", "public" ] }, + { symbol: [ "QSqlError", "private", "", "public" ] }, + { symbol: [ "QSqlField", "private", "", "public" ] }, + { symbol: [ "QSqlIndex", "private", "", "public" ] }, + { symbol: [ "QSqlQuery", "private", "", "public" ] }, + { symbol: [ "QSqlQueryModel", "private", "", "public" ] }, + { symbol: [ "QSqlRecord", "private", "", "public" ] }, + { symbol: [ "QSqlRelation", "private", "", "public" ] }, + { symbol: [ "QSqlRelationalDelegate", "private", "", "public" ] }, + { symbol: [ "QSqlRelationalTableModel", "private", "", "public" ] }, + { symbol: [ "QSqlResult", "private", "", "public" ] }, + { symbol: [ "QSqlTableModel", "private", "", "public" ] }, + { symbol: [ "QSsl", "private", "", "public" ] }, + { symbol: [ "QSslCertificate", "private", "", "public" ] }, + { symbol: [ "QSslCertificateExtension", "private", "", "public" ] }, + { symbol: [ "QSslCipher", "private", "", "public" ] }, + { symbol: [ "QSslConfiguration", "private", "", "public" ] }, + { symbol: [ "QSslError", "private", "", "public" ] }, + { symbol: [ "QSslKey", "private", "", "public" ] }, + { symbol: [ "QSslSocket", "private", "", "public" ] }, + { symbol: [ "QStack", "private", "", "public" ] }, + { symbol: [ "QStackedLayout", "private", "", "public" ] }, + { symbol: [ "QStackedWidget", "private", "", "public" ] }, + { symbol: [ "QStandardItem", "private", "", "public" ] }, + { symbol: [ "QStandardItemEditorCreator", "private", "", "public" ] }, + { symbol: [ "QStandardItemModel", "private", "", "public" ] }, + { symbol: [ "QStandardPaths", "private", "", "public" ] }, + { symbol: [ "QState", "private", "", "public" ] }, + { symbol: [ "QStateMachine", "private", "", "public" ] }, + { symbol: [ "QStaticArrayData", "private", "", "public" ] }, + { symbol: [ "QStaticAssertFailure", "private", "", "public" ] }, + { symbol: [ "QStaticByteArrayData", "private", "", "public" ] }, + { symbol: [ "QStaticPlugin", "private", "", "public" ] }, + { symbol: [ "QStaticStringData", "private", "", "public" ] }, + { symbol: [ "QStaticText", "private", "", "public" ] }, + { symbol: [ "QStatusBar", "private", "", "public" ] }, + { symbol: [ "QStatusTipEvent", "private", "", "public" ] }, + { symbol: [ "QStorageInfo", "private", "", "public" ] }, + { symbol: [ "QString", "private", "", "public" ] }, + { symbol: [ "QStringBuilder", "private", "", "public" ] }, + { symbol: [ "QStringData", "private", "", "public" ] }, + { symbol: [ "QStringDataPtr", "private", "", "public" ] }, + { symbol: [ "QStringList", "private", "", "public" ] }, + { symbol: [ "QStringListIterator", "private", "", "public" ] }, + { symbol: [ "QStringListModel", "private", "", "public" ] }, + { symbol: [ "QStringMatcher", "private", "", "public" ] }, + { symbol: [ "QStringRef", "private", "", "public" ] }, + { symbol: [ "QStyle", "private", "", "public" ] }, + { symbol: [ "QStyleFactory", "private", "", "public" ] }, + { symbol: [ "QStyleHintReturn", "private", "", "public" ] }, + { symbol: [ "QStyleHintReturnMask", "private", "", "public" ] }, + { symbol: [ "QStyleHintReturnVariant", "private", "", "public" ] }, + { symbol: [ "QStyleHints", "private", "", "public" ] }, + { symbol: [ "QStyleOption", "private", "", "public" ] }, + { symbol: [ "QStyleOptionButton", "private", "", "public" ] }, + { symbol: [ "QStyleOptionComboBox", "private", "", "public" ] }, + { symbol: [ "QStyleOptionComplex", "private", "", "public" ] }, + { symbol: [ "QStyleOptionDockWidget", "private", "", "public" ] }, + { symbol: [ "QStyleOptionDockWidgetV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionFocusRect", "private", "", "public" ] }, + { symbol: [ "QStyleOptionFrame", "private", "", "public" ] }, + { symbol: [ "QStyleOptionFrameV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionFrameV3", "private", "", "public" ] }, + { symbol: [ "QStyleOptionGraphicsItem", "private", "", "public" ] }, + { symbol: [ "QStyleOptionGroupBox", "private", "", "public" ] }, + { symbol: [ "QStyleOptionHeader", "private", "", "public" ] }, + { symbol: [ "QStyleOptionMenuItem", "private", "", "public" ] }, + { symbol: [ "QStyleOptionProgressBar", "private", "", "public" ] }, + { symbol: [ "QStyleOptionProgressBarV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionRubberBand", "private", "", "public" ] }, + { symbol: [ "QStyleOptionSizeGrip", "private", "", "public" ] }, + { symbol: [ "QStyleOptionSlider", "private", "", "public" ] }, + { symbol: [ "QStyleOptionSpinBox", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTab", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabBarBase", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabBarBaseV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabV3", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabWidgetFrame", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTabWidgetFrameV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionTitleBar", "private", "", "public" ] }, + { symbol: [ "QStyleOptionToolBar", "private", "", "public" ] }, + { symbol: [ "QStyleOptionToolBox", "private", "", "public" ] }, + { symbol: [ "QStyleOptionToolBoxV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionToolButton", "private", "", "public" ] }, + { symbol: [ "QStyleOptionViewItem", "private", "", "public" ] }, + { symbol: [ "QStyleOptionViewItemV2", "private", "", "public" ] }, + { symbol: [ "QStyleOptionViewItemV3", "private", "", "public" ] }, + { symbol: [ "QStyleOptionViewItemV4", "private", "", "public" ] }, + { symbol: [ "QStylePainter", "private", "", "public" ] }, + { symbol: [ "QStylePlugin", "private", "", "public" ] }, + { symbol: [ "QStyledItemDelegate", "private", "", "public" ] }, + { symbol: [ "QSurface", "private", "", "public" ] }, + { symbol: [ "QSurfaceFormat", "private", "", "public" ] }, + { symbol: [ "QSvgGenerator", "private", "", "public" ] }, + { symbol: [ "QSvgRenderer", "private", "", "public" ] }, + { symbol: [ "QSvgWidget", "private", "", "public" ] }, + { symbol: [ "QSwipeGesture", "private", "", "public" ] }, + { symbol: [ "QSyntaxHighlighter", "private", "", "public" ] }, + { symbol: [ "QSysInfo", "private", "", "public" ] }, + { symbol: [ "QSystemSemaphore", "private", "", "public" ] }, + { symbol: [ "QSystemTrayIcon", "private", "", "public" ] }, + { symbol: [ "QTabBar", "private", "", "public" ] }, + { symbol: [ "QTabWidget", "private", "", "public" ] }, + { symbol: [ "QTableView", "private", "", "public" ] }, + { symbol: [ "QTableWidget", "private", "", "public" ] }, + { symbol: [ "QTableWidgetItem", "private", "", "public" ] }, + { symbol: [ "QTableWidgetSelectionRange", "private", "", "public" ] }, + { symbol: [ "QTabletEvent", "private", "", "public" ] }, + { symbol: [ "QTapAndHoldGesture", "private", "", "public" ] }, + { symbol: [ "QTapFilter", "private", "", "public" ] }, + { symbol: [ "QTapGesture", "private", "", "public" ] }, + { symbol: [ "QTapReading", "private", "", "public" ] }, + { symbol: [ "QTapSensor", "private", "", "public" ] }, + { symbol: [ "QTcpServer", "private", "", "public" ] }, + { symbol: [ "QTcpSocket", "private", "", "public" ] }, + { symbol: [ "QTemporaryDir", "private", "", "public" ] }, + { symbol: [ "QTemporaryFile", "private", "", "public" ] }, + { symbol: [ "QTest", "private", "", "public" ] }, + { symbol: [ "QTestAccessibility", "private", "", "public" ] }, + { symbol: [ "QTestData", "private", "", "public" ] }, + { symbol: [ "QTestDelayEvent", "private", "", "public" ] }, + { symbol: [ "QTestEvent", "private", "", "public" ] }, + { symbol: [ "QTestEventList", "private", "", "public" ] }, + { symbol: [ "QTestEventLoop", "private", "", "public" ] }, + { symbol: [ "QTestKeyClicksEvent", "private", "", "public" ] }, + { symbol: [ "QTestKeyEvent", "private", "", "public" ] }, + { symbol: [ "QTestMouseEvent", "private", "", "public" ] }, + { symbol: [ "QTextBlock", "private", "", "public" ] }, + { symbol: [ "QTextBlockFormat", "private", "", "public" ] }, + { symbol: [ "QTextBlockGroup", "private", "", "public" ] }, + { symbol: [ "QTextBlockUserData", "private", "", "public" ] }, + { symbol: [ "QTextBoundaryFinder", "private", "", "public" ] }, + { symbol: [ "QTextBrowser", "private", "", "public" ] }, + { symbol: [ "QTextCharFormat", "private", "", "public" ] }, + { symbol: [ "QTextCodec", "private", "", "public" ] }, + { symbol: [ "QTextCursor", "private", "", "public" ] }, + { symbol: [ "QTextDecoder", "private", "", "public" ] }, + { symbol: [ "QTextDocument", "private", "", "public" ] }, + { symbol: [ "QTextDocumentFragment", "private", "", "public" ] }, + { symbol: [ "QTextDocumentWriter", "private", "", "public" ] }, + { symbol: [ "QTextEdit", "private", "", "public" ] }, + { symbol: [ "QTextEncoder", "private", "", "public" ] }, + { symbol: [ "QTextFormat", "private", "", "public" ] }, + { symbol: [ "QTextFragment", "private", "", "public" ] }, + { symbol: [ "QTextFrame", "private", "", "public" ] }, + { symbol: [ "QTextFrameFormat", "private", "", "public" ] }, + { symbol: [ "QTextFrameLayoutData", "private", "", "public" ] }, + { symbol: [ "QTextImageFormat", "private", "", "public" ] }, + { symbol: [ "QTextInlineObject", "private", "", "public" ] }, + { symbol: [ "QTextItem", "private", "", "public" ] }, + { symbol: [ "QTextLayout", "private", "", "public" ] }, + { symbol: [ "QTextLength", "private", "", "public" ] }, + { symbol: [ "QTextLine", "private", "", "public" ] }, + { symbol: [ "QTextList", "private", "", "public" ] }, + { symbol: [ "QTextListFormat", "private", "", "public" ] }, + { symbol: [ "QTextObject", "private", "", "public" ] }, + { symbol: [ "QTextObjectInterface", "private", "", "public" ] }, + { symbol: [ "QTextOption", "private", "", "public" ] }, + { symbol: [ "QTextStream", "private", "", "public" ] }, + { symbol: [ "QTextStreamFunction", "private", "", "public" ] }, + { symbol: [ "QTextStreamManipulator", "private", "", "public" ] }, + { symbol: [ "QTextTable", "private", "", "public" ] }, + { symbol: [ "QTextTableCell", "private", "", "public" ] }, + { symbol: [ "QTextTableCellFormat", "private", "", "public" ] }, + { symbol: [ "QTextTableFormat", "private", "", "public" ] }, + { symbol: [ "QThread", "private", "", "public" ] }, + { symbol: [ "QThreadPool", "private", "", "public" ] }, + { symbol: [ "QThreadStorage", "private", "", "public" ] }, + { symbol: [ "QThreadStorageData", "private", "", "public" ] }, + { symbol: [ "QTileRules", "private", "", "public" ] }, + { symbol: [ "QTiltFilter", "private", "", "public" ] }, + { symbol: [ "QTiltReading", "private", "", "public" ] }, + { symbol: [ "QTiltSensor", "private", "", "public" ] }, + { symbol: [ "QTime", "private", "", "public" ] }, + { symbol: [ "QTimeEdit", "private", "", "public" ] }, + { symbol: [ "QTimeLine", "private", "", "public" ] }, + { symbol: [ "QTimeZone", "private", "", "public" ] }, + { symbol: [ "QTimer", "private", "", "public" ] }, + { symbol: [ "QTimerEvent", "private", "", "public" ] }, + { symbol: [ "QToolBar", "private", "", "public" ] }, + { symbol: [ "QToolBarChangeEvent", "private", "", "public" ] }, + { symbol: [ "QToolBox", "private", "", "public" ] }, + { symbol: [ "QToolButton", "private", "", "public" ] }, + { symbol: [ "QToolTip", "private", "", "public" ] }, + { symbol: [ "QTouchDevice", "private", "", "public" ] }, + { symbol: [ "QTouchEvent", "private", "", "public" ] }, + { symbol: [ "QTransform", "private", "", "public" ] }, + { symbol: [ "QTranslator", "private", "", "public" ] }, + { symbol: [ "QTreeView", "private", "", "public" ] }, + { symbol: [ "QTreeWidget", "private", "", "public" ] }, + { symbol: [ "QTreeWidgetItem", "private", "", "public" ] }, + { symbol: [ "QTreeWidgetItemIterator", "private", "", "public" ] }, + { symbol: [ "QTypeInfo", "private", "", "public" ] }, + { symbol: [ "QTypeInfoMerger", "private", "", "public" ] }, + { symbol: [ "QUdpSocket", "private", "", "public" ] }, + { symbol: [ "QUiLoader", "private", "", "public" ] }, + { symbol: [ "QUndoCommand", "private", "", "public" ] }, + { symbol: [ "QUndoGroup", "private", "", "public" ] }, + { symbol: [ "QUndoStack", "private", "", "public" ] }, + { symbol: [ "QUndoView", "private", "", "public" ] }, + { symbol: [ "QUnhandledException", "private", "", "public" ] }, + { symbol: [ "QUrl", "private", "", "public" ] }, + { symbol: [ "QUrlQuery", "private", "", "public" ] }, + { symbol: [ "QUrlTwoFlags", "private", "", "public" ] }, + { symbol: [ "QUuid", "private", "", "public" ] }, + { symbol: [ "QVBoxLayout", "private", "", "public" ] }, + { symbol: [ "QValidator", "private", "", "public" ] }, + { symbol: [ "QVarLengthArray", "private", "", "public" ] }, + { symbol: [ "QVariant", "private", "", "public" ] }, + { symbol: [ "QVariantAnimation", "private", "", "public" ] }, + { symbol: [ "QVariantComparisonHelper", "private", "", "public" ] }, + { symbol: [ "QVariantHash", "private", "", "public" ] }, + { symbol: [ "QVariantList", "private", "", "public" ] }, + { symbol: [ "QVariantMap", "private", "", "public" ] }, + { symbol: [ "QVector", "private", "", "public" ] }, + { symbol: [ "QVector2D", "private", "", "public" ] }, + { symbol: [ "QVector3D", "private", "", "public" ] }, + { symbol: [ "QVector4D", "private", "", "public" ] }, + { symbol: [ "QVectorIterator", "private", "", "public" ] }, + { symbol: [ "QVideoDeviceSelectorControl", "private", "", "public" ] }, + { symbol: [ "QVideoEncoderSettings", "private", "", "public" ] }, + { symbol: [ "QVideoEncoderSettingsControl", "private", "", "public" ] }, + { symbol: [ "QVideoFrame", "private", "", "public" ] }, + { symbol: [ "QVideoProbe", "private", "", "public" ] }, + { symbol: [ "QVideoRendererControl", "private", "", "public" ] }, + { symbol: [ "QVideoSurfaceFormat", "private", "", "public" ] }, + { symbol: [ "QVideoWidget", "private", "", "public" ] }, + { symbol: [ "QVideoWidgetControl", "private", "", "public" ] }, + { symbol: [ "QVideoWindowControl", "private", "", "public" ] }, + { symbol: [ "QWGLNativeContext", "private", "", "public" ] }, + { symbol: [ "QWaitCondition", "private", "", "public" ] }, + { symbol: [ "QWeakPointer", "private", "", "public" ] }, + { symbol: [ "QWebChannel", "private", "", "public" ] }, + { symbol: [ "QWebChannelAbstractTransport", "private", "", "public" ] }, + { symbol: [ "QWebDatabase", "private", "", "public" ] }, + { symbol: [ "QWebElement", "private", "", "public" ] }, + { symbol: [ "QWebElementCollection", "private", "", "public" ] }, + { symbol: [ "QWebFrame", "private", "", "public" ] }, + { symbol: [ "QWebFullScreenVideoHandler", "private", "", "public" ] }, + { symbol: [ "QWebHapticFeedbackPlayer", "private", "", "public" ] }, + { symbol: [ "QWebHistory", "private", "", "public" ] }, + { symbol: [ "QWebHistoryInterface", "private", "", "public" ] }, + { symbol: [ "QWebHistoryItem", "private", "", "public" ] }, + { symbol: [ "QWebHitTestResult", "private", "", "public" ] }, + { symbol: [ "QWebInspector", "private", "", "public" ] }, + { symbol: [ "QWebKitPlatformPlugin", "private", "", "public" ] }, + { symbol: [ "QWebNotificationData", "private", "", "public" ] }, + { symbol: [ "QWebNotificationPresenter", "private", "", "public" ] }, + { symbol: [ "QWebPage", "private", "", "public" ] }, + { symbol: [ "QWebPluginFactory", "private", "", "public" ] }, + { symbol: [ "QWebSecurityOrigin", "private", "", "public" ] }, + { symbol: [ "QWebSelectData", "private", "", "public" ] }, + { symbol: [ "QWebSelectMethod", "private", "", "public" ] }, + { symbol: [ "QWebSettings", "private", "", "public" ] }, + { symbol: [ "QWebSocket", "private", "", "public" ] }, + { symbol: [ "QWebSocketCorsAuthenticator", "private", "", "public" ] }, + { symbol: [ "QWebSocketServer", "private", "", "public" ] }, + { symbol: [ "QWebSpellChecker", "private", "", "public" ] }, + { symbol: [ "QWebTouchModifier", "private", "", "public" ] }, + { symbol: [ "QWebView", "private", "", "public" ] }, + { symbol: [ "QWhatsThis", "private", "", "public" ] }, + { symbol: [ "QWhatsThisClickedEvent", "private", "", "public" ] }, + { symbol: [ "QWheelEvent", "private", "", "public" ] }, + { symbol: [ "QWidget", "private", "", "public" ] }, + { symbol: [ "QWidgetAction", "private", "", "public" ] }, + { symbol: [ "QWidgetData", "private", "", "public" ] }, + { symbol: [ "QWidgetItem", "private", "", "public" ] }, + { symbol: [ "QWidgetItemV2", "private", "", "public" ] }, + { symbol: [ "QWidgetList", "private", "", "public" ] }, + { symbol: [ "QWidgetMapper", "private", "", "public" ] }, + { symbol: [ "QWidgetSet", "private", "", "public" ] }, + { symbol: [ "QWinColorizationChangeEvent", "private", "", "public" ] }, + { symbol: [ "QWinCompositionChangeEvent", "private", "", "public" ] }, + { symbol: [ "QWinEvent", "private", "", "public" ] }, + { symbol: [ "QWinEventNotifier", "private", "", "public" ] }, + { symbol: [ "QWinEventNotifier", "private", "", "public" ] }, + { symbol: [ "QWinJumpList", "private", "", "public" ] }, + { symbol: [ "QWinJumpListCategory", "private", "", "public" ] }, + { symbol: [ "QWinJumpListItem", "private", "", "public" ] }, + { symbol: [ "QWinMime", "private", "", "public" ] }, + { symbol: [ "QWinTaskbarButton", "private", "", "public" ] }, + { symbol: [ "QWinTaskbarProgress", "private", "", "public" ] }, + { symbol: [ "QWinThumbnailToolBar", "private", "", "public" ] }, + { symbol: [ "QWinThumbnailToolButton", "private", "", "public" ] }, + { symbol: [ "QWindow", "private", "", "public" ] }, + { symbol: [ "QWindowList", "private", "", "public" ] }, + { symbol: [ "QWindowStateChangeEvent", "private", "", "public" ] }, + { symbol: [ "QWizard", "private", "", "public" ] }, + { symbol: [ "QWizardPage", "private", "", "public" ] }, + { symbol: [ "QWriteLocker", "private", "", "public" ] }, + { symbol: [ "QXcbWindowFunctions", "private", "", "public" ] }, + { symbol: [ "QXmlAttributes", "private", "", "public" ] }, + { symbol: [ "QXmlContentHandler", "private", "", "public" ] }, + { symbol: [ "QXmlDTDHandler", "private", "", "public" ] }, + { symbol: [ "QXmlDeclHandler", "private", "", "public" ] }, + { symbol: [ "QXmlDefaultHandler", "private", "", "public" ] }, + { symbol: [ "QXmlEntityResolver", "private", "", "public" ] }, + { symbol: [ "QXmlErrorHandler", "private", "", "public" ] }, + { symbol: [ "QXmlFormatter", "private", "", "public" ] }, + { symbol: [ "QXmlInputSource", "private", "", "public" ] }, + { symbol: [ "QXmlItem", "private", "", "public" ] }, + { symbol: [ "QXmlLexicalHandler", "private", "", "public" ] }, + { symbol: [ "QXmlLocator", "private", "", "public" ] }, + { symbol: [ "QXmlName", "private", "", "public" ] }, + { symbol: [ "QXmlNamePool", "private", "", "public" ] }, + { symbol: [ "QXmlNamespaceSupport", "private", "", "public" ] }, + { symbol: [ "QXmlNodeModelIndex", "private", "", "public" ] }, + { symbol: [ "QXmlParseException", "private", "", "public" ] }, + { symbol: [ "QXmlQuery", "private", "", "public" ] }, + { symbol: [ "QXmlReader", "private", "", "public" ] }, + { symbol: [ "QXmlResultItems", "private", "", "public" ] }, + { symbol: [ "QXmlSchema", "private", "", "public" ] }, + { symbol: [ "QXmlSchemaValidator", "private", "", "public" ] }, + { symbol: [ "QXmlSerializer", "private", "", "public" ] }, + { symbol: [ "QXmlSimpleReader", "private", "", "public" ] }, + { symbol: [ "QXmlStreamAttribute", "private", "", "public" ] }, + { symbol: [ "QXmlStreamAttributes", "private", "", "public" ] }, + { symbol: [ "QXmlStreamEntityDeclaration", "private", "", "public" ] }, + { symbol: [ "QXmlStreamEntityDeclarations", "private", "", "public" ] }, + { symbol: [ "QXmlStreamEntityResolver", "private", "", "public" ] }, + { symbol: [ "QXmlStreamNamespaceDeclaration", "private", "", "public" ] }, + { symbol: [ "QXmlStreamNamespaceDeclarations", "private", "", "public" ] }, + { symbol: [ "QXmlStreamNotationDeclaration", "private", "", "public" ] }, + { symbol: [ "QXmlStreamNotationDeclarations", "private", "", "public" ] }, + { symbol: [ "QXmlStreamReader", "private", "", "public" ] }, + { symbol: [ "QXmlStreamStringRef", "private", "", "public" ] }, + { symbol: [ "QXmlStreamWriter", "private", "", "public" ] }, + { symbol: [ "Q_IPV6ADDR", "private", "", "public" ] }, + { symbol: [ "Q_PID", "private", "", "public" ] }, + { symbol: [ "Qt", "private", "", "public" ] }, + { symbol: [ "QtAlgorithms", "private", "", "public" ] }, + { symbol: [ "QtBluetooth", "private", "", "public" ] }, + { symbol: [ "QtBluetoothDepends", "private", "", "public" ] }, + { symbol: [ "QtBluetoothVersion", "private", "", "public" ] }, + { symbol: [ "QtCLucene", "private", "", "public" ] }, + { symbol: [ "QtCLuceneDepends", "private", "", "public" ] }, + { symbol: [ "QtCLuceneVersion", "private", "", "public" ] }, + { symbol: [ "QtCleanUpFunction", "private", "", "public" ] }, + { symbol: [ "QtConcurrent", "private", "", "public" ] }, + { symbol: [ "QtConcurrentDepends", "private", "", "public" ] }, + { symbol: [ "QtConcurrentFilter", "private", "", "public" ] }, + { symbol: [ "QtConcurrentMap", "private", "", "public" ] }, + { symbol: [ "QtConcurrentRun", "private", "", "public" ] }, + { symbol: [ "QtConcurrentVersion", "private", "", "public" ] }, + { symbol: [ "QtConfig", "private", "", "public" ] }, + { symbol: [ "QtContainerFwd", "private", "", "public" ] }, + { symbol: [ "QtCore", "private", "", "public" ] }, + { symbol: [ "QtCoreDepends", "private", "", "public" ] }, + { symbol: [ "QtCoreVersion", "private", "", "public" ] }, + { symbol: [ "QtDBus", "private", "", "public" ] }, + { symbol: [ "QtDBusDepends", "private", "", "public" ] }, + { symbol: [ "QtDBusVersion", "private", "", "public" ] }, + { symbol: [ "QtDebug", "private", "", "public" ] }, + { symbol: [ "QtDeclarative", "private", "", "public" ] }, + { symbol: [ "QtDeclarativeDepends", "private", "", "public" ] }, + { symbol: [ "QtDeclarativeVersion", "private", "", "public" ] }, + { symbol: [ "QtDesigner", "private", "", "public" ] }, + { symbol: [ "QtDesignerComponents", "private", "", "public" ] }, + { symbol: [ "QtDesignerComponentsDepends", "private", "", "public" ] }, + { symbol: [ "QtDesignerComponentsVersion", "private", "", "public" ] }, + { symbol: [ "QtDesignerDepends", "private", "", "public" ] }, + { symbol: [ "QtDesignerVersion", "private", "", "public" ] }, + { symbol: [ "QtEndian", "private", "", "public" ] }, + { symbol: [ "QtEvents", "private", "", "public" ] }, + { symbol: [ "QtGlobal", "private", "", "public" ] }, + { symbol: [ "QtGui", "private", "", "public" ] }, + { symbol: [ "QtGuiDepends", "private", "", "public" ] }, + { symbol: [ "QtGuiVersion", "private", "", "public" ] }, + { symbol: [ "QtHelp", "private", "", "public" ] }, + { symbol: [ "QtHelpDepends", "private", "", "public" ] }, + { symbol: [ "QtHelpVersion", "private", "", "public" ] }, + { symbol: [ "QtLocation", "private", "", "public" ] }, + { symbol: [ "QtLocationDepends", "private", "", "public" ] }, + { symbol: [ "QtLocationVersion", "private", "", "public" ] }, + { symbol: [ "QtMath", "private", "", "public" ] }, + { symbol: [ "QtMessageHandler", "private", "", "public" ] }, + { symbol: [ "QtMsgHandler", "private", "", "public" ] }, + { symbol: [ "QtMultimedia", "private", "", "public" ] }, + { symbol: [ "QtMultimediaDepends", "private", "", "public" ] }, + { symbol: [ "QtMultimediaQuick_p", "private", "", "public" ] }, + { symbol: [ "QtMultimediaQuick_pDepends", "private", "", "public" ] }, + { symbol: [ "QtMultimediaQuick_pVersion", "private", "", "public" ] }, + { symbol: [ "QtMultimediaVersion", "private", "", "public" ] }, + { symbol: [ "QtMultimediaWidgets", "private", "", "public" ] }, + { symbol: [ "QtMultimediaWidgetsDepends", "private", "", "public" ] }, + { symbol: [ "QtMultimediaWidgetsVersion", "private", "", "public" ] }, + { symbol: [ "QtNetwork", "private", "", "public" ] }, + { symbol: [ "QtNetworkDepends", "private", "", "public" ] }, + { symbol: [ "QtNetworkVersion", "private", "", "public" ] }, + { symbol: [ "QtNfc", "private", "", "public" ] }, + { symbol: [ "QtNfcDepends", "private", "", "public" ] }, + { symbol: [ "QtNfcVersion", "private", "", "public" ] }, + { symbol: [ "QtNumeric", "private", "", "public" ] }, + { symbol: [ "QtOpenGL", "private", "", "public" ] }, + { symbol: [ "QtOpenGLDepends", "private", "", "public" ] }, + { symbol: [ "QtOpenGLExtensions", "private", "", "public" ] }, + { symbol: [ "QtOpenGLExtensionsDepends", "private", "", "public" ] }, + { symbol: [ "QtOpenGLExtensionsVersion", "private", "", "public" ] }, + { symbol: [ "QtOpenGLVersion", "private", "", "public" ] }, + { symbol: [ "QtPlatformHeaders", "private", "", "public" ] }, + { symbol: [ "QtPlatformHeadersDepends", "private", "", "public" ] }, + { symbol: [ "QtPlatformHeadersVersion", "private", "", "public" ] }, + { symbol: [ "QtPlatformSupport", "private", "", "public" ] }, + { symbol: [ "QtPlatformSupportDepends", "private", "", "public" ] }, + { symbol: [ "QtPlatformSupportVersion", "private", "", "public" ] }, + { symbol: [ "QtPlugin", "private", "", "public" ] }, + { symbol: [ "QtPluginInstanceFunction", "private", "", "public" ] }, + { symbol: [ "QtPluginMetaDataFunction", "private", "", "public" ] }, + { symbol: [ "QtPositioning", "private", "", "public" ] }, + { symbol: [ "QtPositioningDepends", "private", "", "public" ] }, + { symbol: [ "QtPositioningVersion", "private", "", "public" ] }, + { symbol: [ "QtPrintSupport", "private", "", "public" ] }, + { symbol: [ "QtPrintSupportDepends", "private", "", "public" ] }, + { symbol: [ "QtPrintSupportVersion", "private", "", "public" ] }, + { symbol: [ "QtQml", "private", "", "public" ] }, + { symbol: [ "QtQmlDepends", "private", "", "public" ] }, + { symbol: [ "QtQmlVersion", "private", "", "public" ] }, + { symbol: [ "QtQuick", "private", "", "public" ] }, + { symbol: [ "QtQuickDepends", "private", "", "public" ] }, + { symbol: [ "QtQuickParticles", "private", "", "public" ] }, + { symbol: [ "QtQuickParticlesDepends", "private", "", "public" ] }, + { symbol: [ "QtQuickParticlesVersion", "private", "", "public" ] }, + { symbol: [ "QtQuickTest", "private", "", "public" ] }, + { symbol: [ "QtQuickTestDepends", "private", "", "public" ] }, + { symbol: [ "QtQuickTestVersion", "private", "", "public" ] }, + { symbol: [ "QtQuickVersion", "private", "", "public" ] }, + { symbol: [ "QtQuickWidgets", "private", "", "public" ] }, + { symbol: [ "QtQuickWidgetsDepends", "private", "", "public" ] }, + { symbol: [ "QtQuickWidgetsVersion", "private", "", "public" ] }, + { symbol: [ "QtScript", "private", "", "public" ] }, + { symbol: [ "QtScriptDepends", "private", "", "public" ] }, + { symbol: [ "QtScriptTools", "private", "", "public" ] }, + { symbol: [ "QtScriptToolsDepends", "private", "", "public" ] }, + { symbol: [ "QtScriptToolsVersion", "private", "", "public" ] }, + { symbol: [ "QtScriptVersion", "private", "", "public" ] }, + { symbol: [ "QtSensors", "private", "", "public" ] }, + { symbol: [ "QtSensorsDepends", "private", "", "public" ] }, + { symbol: [ "QtSensorsVersion", "private", "", "public" ] }, + { symbol: [ "QtSerialPort", "private", "", "public" ] }, + { symbol: [ "QtSerialPortDepends", "private", "", "public" ] }, + { symbol: [ "QtSerialPortVersion", "private", "", "public" ] }, + { symbol: [ "QtSql", "private", "", "public" ] }, + { symbol: [ "QtSqlDepends", "private", "", "public" ] }, + { symbol: [ "QtSqlVersion", "private", "", "public" ] }, + { symbol: [ "QtSvg", "private", "", "public" ] }, + { symbol: [ "QtSvgDepends", "private", "", "public" ] }, + { symbol: [ "QtSvgVersion", "private", "", "public" ] }, + { symbol: [ "QtTest", "private", "", "public" ] }, + { symbol: [ "QtTestDepends", "private", "", "public" ] }, + { symbol: [ "QtTestGui", "private", "", "public" ] }, + { symbol: [ "QtTestVersion", "private", "", "public" ] }, + { symbol: [ "QtTestWidgets", "private", "", "public" ] }, + { symbol: [ "QtUiTools", "private", "", "public" ] }, + { symbol: [ "QtUiToolsDepends", "private", "", "public" ] }, + { symbol: [ "QtUiToolsVersion", "private", "", "public" ] }, + { symbol: [ "QtWebChannel", "private", "", "public" ] }, + { symbol: [ "QtWebChannelDepends", "private", "", "public" ] }, + { symbol: [ "QtWebChannelVersion", "private", "", "public" ] }, + { symbol: [ "QtWebKit", "private", "", "public" ] }, + { symbol: [ "QtWebKitDepends", "private", "", "public" ] }, + { symbol: [ "QtWebKitVersion", "private", "", "public" ] }, + { symbol: [ "QtWebKitWidgets", "private", "", "public" ] }, + { symbol: [ "QtWebKitWidgetsDepends", "private", "", "public" ] }, + { symbol: [ "QtWebKitWidgetsVersion", "private", "", "public" ] }, + { symbol: [ "QtWebSockets", "private", "", "public" ] }, + { symbol: [ "QtWebSocketsDepends", "private", "", "public" ] }, + { symbol: [ "QtWebSocketsVersion", "private", "", "public" ] }, + { symbol: [ "QtWidgets", "private", "", "public" ] }, + { symbol: [ "QtWidgetsDepends", "private", "", "public" ] }, + { symbol: [ "QtWidgetsVersion", "private", "", "public" ] }, + { symbol: [ "QtWin", "private", "", "public" ] }, + { symbol: [ "QtWinExtras", "private", "", "public" ] }, + { symbol: [ "QtWinExtrasDepends", "private", "", "public" ] }, + { symbol: [ "QtWinExtrasVersion", "private", "", "public" ] }, + { symbol: [ "QtXml", "private", "", "public" ] }, + { symbol: [ "QtXmlDepends", "private", "", "public" ] }, + { symbol: [ "QtXmlPatterns", "private", "", "public" ] }, + { symbol: [ "QtXmlPatternsDepends", "private", "", "public" ] }, + { symbol: [ "QtXmlPatternsVersion", "private", "", "public" ] }, + { symbol: [ "QtXmlVersion", "private", "", "public" ] }, + +## other things not picked up by the above + #{ symbol: [ "qobject_cast", "private", "", "public" ] }, + #{ symbol: [ "qApp", "private", "", "public" ] }, + #{ symbol: [ "qHash", "private", "", "public" ] }, + +# This is necessary because QList::toSet ends up in QSet which is wrong. See note +# at top as to why this shouldn't be necessary + + { symbol: [ "QList::toSet", "private", "", "public" ] }, + +# Even if IWYU recognised A::B as coming from a.h, we'd still need a lot of these for +# free operators + +# Generated with +# perl -le "use File::Find;use File::Basename; sub wanted { $x = lc $_. '.h'; print ' { include: [ -@\-('.basename($File::Find::dir).'/)?'.$x.'\--, -private-, -<'.$_.'>-, -public- ] },' if -e $x } find(\&wanted, '.')" +# on windows + + { include: [ "@\"(ActiveQt/)?activeqtversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxaggregated\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxbase\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxbindable\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxscript\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxselect\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(ActiveQt/)?qaxwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(Enginio/)?enginio\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(Enginio/)?enginioversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothaddress\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothdevicediscoveryagent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothdeviceinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothhostinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothlocaldevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothserver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothservicediscoveryagent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothserviceinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothtransfermanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothtransferreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothtransferrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qbluetoothuuid\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qlowenergycharacteristic\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qlowenergycontroller\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qlowenergydescriptor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qlowenergyservice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtBluetooth/)?qtbluetoothversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCLucene/)?qtcluceneversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtConcurrent/)?qtconcurrentfilter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtConcurrent/)?qtconcurrentmap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtConcurrent/)?qtconcurrentrun\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtConcurrent/)?qtconcurrentversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractanimation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstracteventdispatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractitemmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractnativeeventfilter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractproxymodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstractstate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qabstracttransition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qanimationgroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qarraydata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qarraydatapointer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbasictimer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbitarray\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbytearray\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbytearraylist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qbytearraymatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcache\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qchar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcollator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcommandlineoption\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcommandlineparser\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcontiguouscache\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcoreapplication\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qcryptographichash\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdatastream\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdatetime\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdebug\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdir\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qdiriterator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qeasingcurve\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qelapsedtimer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qeventloop\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qeventtransition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qexception\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfactoryinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfiledevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfileinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfileselector\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfilesystemwatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfinalstate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qflags\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfuture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfutureinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfuturesynchronizer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qfuturewatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qglobalstatic\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qhash\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qhistorystate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qidentityproxymodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qiodevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qitemselectionmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qjsonarray\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qjsondocument\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qjsonobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qjsonvalue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlibrary\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlibraryinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qline\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlinkedlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlocale\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlockfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qloggingcategory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmargins\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmessageauthenticationcode\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmetaobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmetatype\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmimedata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmimedatabase\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmimetype\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qmutex\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qobjectcleanuphandler\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpair\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qparallelanimationgroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpauseanimation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpluginloader\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpoint\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpointer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qprocess\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qpropertyanimation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qqueue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qreadwritelock\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qrect\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qregexp\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qregularexpression\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qresource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qrunnable\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsavefile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qscopedpointer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qscopedvaluerollback\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsemaphore\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsequentialanimationgroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qset\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsettings\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qshareddata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsharedmemory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsharedpointer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsignalmapper\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsignaltransition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsize\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsocketnotifier\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsortfilterproxymodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstack\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstandardpaths\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstatemachine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstorageinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstring\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstringbuilder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstringlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstringlistmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qstringmatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsysinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qsystemsemaphore\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtcoreversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtemporarydir\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtemporaryfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtextboundaryfinder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtextcodec\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtextstream\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qthread\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qthreadpool\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qthreadstorage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtimeline\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtimer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtimezone\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtranslator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qtypeinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qurl\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qurlquery\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?quuid\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qvariant\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qvariantanimation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qvarlengtharray\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qvector\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qwaitcondition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qwineventnotifier\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusabstractadaptor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusabstractinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusargument\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusconnection\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusconnectioninterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbuscontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbuserror\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusmessage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusmetatype\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbuspendingcall\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbuspendingreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusserver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusservicewatcher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusunixfiledescriptor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qdbusvirtualobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDBus/)?qtdbusversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativecomponent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativecontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeerror\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeexpression\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeextensioninterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeextensionplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeimageprovider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativenetworkaccessmanagerfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeparserstatus\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeproperty\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativepropertymap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativepropertyvalueinterceptor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativepropertyvaluesource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativescriptstring\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qdeclarativeview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDeclarative/)?qtdeclarativeversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDesigner/)?qdesignerexportwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDesigner/)?qextensionmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDesigner/)?qtdesignerversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtDesignerComponents/)?qtdesignercomponentsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qabstracttextdocumentlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qaccessible\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qaccessiblebridge\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qaccessibleobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qaccessibleplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qbackingstore\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qbitmap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qbrush\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qclipboard\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qcolor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qcursor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qdesktopservices\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qdrag\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfont\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfontdatabase\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfontinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qfontmetrics\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qgenericmatrix\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qgenericplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qgenericpluginfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qglyphrun\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qguiapplication\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qicon\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qiconengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qiconengineplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qimage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qimageiohandler\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qimagereader\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qimagewriter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qinputmethod\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qkeysequence\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qmatrix4x4\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qmatrix\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qmovie\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qoffscreensurface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglbuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglcontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglframebufferobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_0\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_1\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_2\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_3\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_4\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_1_5\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_2_0\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_2_1\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_0\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_1\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_2_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_2_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_3_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_3_3_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_0_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_0_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_1_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_1_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_2_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_2_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_3_compatibility\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_4_3_core\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglfunctions_es2\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglpaintdevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglpixeltransferoptions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglshaderprogram\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopengltexture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopengltimerquery\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglversionfunctions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglvertexarrayobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qopenglwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpagedpaintdevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpagelayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpagesize\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpaintdevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpaintdevicewindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpaintengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpainter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpainterpath\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpalette\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpdfwriter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpen\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpicture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpictureformatplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpixelformat\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpixmap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpixmapcache\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qpolygon\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qquaternion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qrasterwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qrawfont\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qregion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qrgb\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qscreen\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qsessionmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qstandarditemmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qstatictext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qstylehints\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qsurface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qsurfaceformat\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qsyntaxhighlighter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextcursor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextdocument\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextdocumentfragment\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextdocumentwriter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextformat\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextlist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtextoption\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtexttable\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtguiversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtouchdevice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qtransform\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qvalidator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qvector2d\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qvector3d\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qvector4d\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtGui/)?qwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpcontentwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpenginecore\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpindexwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpsearchengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpsearchquerywidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qhelpsearchresultwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtHelp/)?qthelpversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeocodereply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeocodingmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeocodingmanagerengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeomaneuver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoroute\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoroutereply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeorouterequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoroutesegment\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoroutingmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoroutingmanagerengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoserviceprovider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qgeoserviceproviderfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qlocation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplace\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceattribute\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacecategory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacecontactdetail\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacecontent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacecontentreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacecontentrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacedetailsreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceeditorial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceicon\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceidreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceimage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacemanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacemanagerengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacematchreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacematchrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceproposedsearchresult\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceratings\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacereply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceresult\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacereview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacesearchreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacesearchrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacesearchresult\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacesearchsuggestionreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplacesupplier\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qplaceuser\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtLocation/)?qtlocationversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qabstractvideobuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qabstractvideosurface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudio\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiobuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiodecoder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiodecodercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiodeviceinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudioencodersettingscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudioformat\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudioinput\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudioinputselectorcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiooutput\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiooutputselectorcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudioprobe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiorecorder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qaudiosystemplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamera\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameracapturebufferformatcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameracapturedestinationcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameracontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraexposure\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraexposurecontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerafeedbackcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraflashcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerafocus\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerafocuscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraimagecapture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraimagecapturecontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraimageprocessing\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraimageprocessingcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerainfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerainfocontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameralockscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcameraviewfindersettingscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qcamerazoomcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qimageencodercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaaudioprobecontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaavailabilitycontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediabindableinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediacontainercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediacontent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediacontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediagaplessplaybackcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediametadata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmedianetworkaccesscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaplayer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaplayercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaplaylist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediarecorder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediarecordercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaresource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaservice\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediaserviceproviderplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediastreamscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediatimerange\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmediavideoprobecontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmetadatareadercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmetadatawritercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qmultimedia\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qradiodata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qradiodatacontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qradiotuner\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qradiotunercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qsound\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qsoundeffect\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qtmultimediaversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideodeviceselectorcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideoencodersettingscontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideoframe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideoprobe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideorenderercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideosurfaceformat\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimedia/)?qvideowindowcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaQuick_p/)?qsgvideonode_i420\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaQuick_p/)?qsgvideonode_rgb\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaQuick_p/)?qsgvideonode_texture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaQuick_p/)?qtmultimediaquick_pversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaWidgets/)?qcameraviewfinder\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaWidgets/)?qgraphicsvideoitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaWidgets/)?qtmultimediawidgetsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaWidgets/)?qvideowidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtMultimediaWidgets/)?qvideowidgetcontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qabstractnetworkcache\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qabstractsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qauthenticator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qdnslookup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qhostinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qhttpmultipart\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qlocalserver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qlocalsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkaccessmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkconfiguration\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkcookie\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkcookiejar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkdiskcache\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkproxy\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkreply\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworkrequest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qnetworksession\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qssl\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslcertificate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslcertificateextension\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslcipher\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslconfiguration\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslerror\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslkey\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qsslsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qtcpserver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qtcpsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qtnetworkversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNetwork/)?qudpsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndeffilter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndefmessage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndefnfcsmartposterrecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndefnfctextrecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndefnfcurirecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qndefrecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qnearfieldmanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qnearfieldsharemanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qnearfieldsharetarget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qnearfieldtarget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qqmlndefrecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtNfc/)?qtnfcversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qgl\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglbuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglcolormap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglframebufferobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglfunctions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglpixelbuffer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qglshaderprogram\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGL/)?qtopenglversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGLExtensions/)?qopenglextensions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtOpenGLExtensions/)?qtopenglextensionsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qcocoanativecontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qeglfsfunctions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qeglnativecontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qglxnativecontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qtplatformheadersversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qwglnativecontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformHeaders/)?qxcbwindowfunctions\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPlatformSupport/)?qtplatformsupportversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeoaddress\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeoareamonitorinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeoareamonitorsource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeocircle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeocoordinate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeolocation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeopositioninfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeopositioninfosource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeopositioninfosourcefactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeorectangle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeosatelliteinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeosatelliteinfosource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qgeoshape\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qnmeapositioninfosource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPositioning/)?qtpositioningversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qabstractprintdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qpagesetupdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprintdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprintengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprinter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprinterinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprintpreviewdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qprintpreviewwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtPrintSupport/)?qtprintsupportversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qjsengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qjsvalue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qjsvalueiterator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlabstracturlinterceptor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlapplicationengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlcomponent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlcontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlerror\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlexpression\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlextensioninterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlextensionplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlfileselector\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlincubator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlnetworkaccessmanagerfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlparserstatus\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlproperty\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlpropertymap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlpropertyvaluesource\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qqmlscriptstring\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQml/)?qtqmlversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickframebufferobject\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickimageprovider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickitemgrabresult\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickpainteditem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickrendercontrol\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquicktextdocument\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qquickwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgabstractrenderer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgflatcolormaterial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsggeometry\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgmaterial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgnode\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgsimplematerial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgsimplerectnode\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgsimpletexturenode\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgtexture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgtexturematerial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgtextureprovider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qsgvertexcolormaterial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuick/)?qtquickversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuickParticles/)?qtquickparticlesversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuickTest/)?qtquicktestversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuickWidgets/)?qquickwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtQuickWidgets/)?qtquickwidgetsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptable\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptclass\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptclasspropertyiterator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptcontext\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptcontextinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptengine\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptengineagent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptextensioninterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptextensionplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptprogram\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptstring\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptvalue\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qscriptvalueiterator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScript/)?qtscriptversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScriptTools/)?qscriptenginedebugger\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtScriptTools/)?qtscripttoolsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qaccelerometer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qaltimeter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qambientlightsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qambienttemperaturesensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qcompass\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qdistancesensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qgyroscope\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qholstersensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qirproximitysensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qlightsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qmagnetometer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qorientationsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qpressuresensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qproximitysensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qrotationsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensorbackend\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensorgesture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensorgesturemanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensorgestureplugininterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensorgesturerecognizer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qsensormanager\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qtapsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qtiltsensor\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSensors/)?qtsensorsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSerialPort/)?qlockfile\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSerialPort/)?qserialport\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSerialPort/)?qserialportinfo\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSerialPort/)?qtserialportversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSerialPort/)?qwineventnotifier\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsql\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqldatabase\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqldriver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqldriverplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlerror\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlfield\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlindex\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlquery\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlquerymodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlrecord\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlrelationaldelegate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlrelationaltablemodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqlresult\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qsqltablemodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSql/)?qtsqlversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSvg/)?qgraphicssvgitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSvg/)?qsvggenerator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSvg/)?qsvgrenderer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSvg/)?qsvgwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtSvg/)?qtsvgversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qsignalspy\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qtest\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qtestdata\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qtestevent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qtesteventloop\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtTest/)?qttestversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtUiTools/)?qtuitoolsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtUiTools/)?quiloader\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebChannel/)?qqmlwebchannel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebChannel/)?qtwebchannelversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebChannel/)?qwebchannel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebChannel/)?qwebchannelabstracttransport\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qtwebkitversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebdatabase\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebelement\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebhistory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebhistoryinterface\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebkitplatformplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebpluginfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebsecurityorigin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKit/)?qwebsettings\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qgraphicswebview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qtwebkitwidgetsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qwebframe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qwebinspector\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qwebpage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebKitWidgets/)?qwebview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebSockets/)?qmaskgenerator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebSockets/)?qtwebsocketsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebSockets/)?qwebsocket\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebSockets/)?qwebsocketcorsauthenticator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWebSockets/)?qwebsocketserver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractitemdelegate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractitemview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractscrollarea\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractslider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qabstractspinbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qaccessiblemenu\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qaccessiblewidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qaction\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qactiongroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qapplication\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qboxlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qbuttongroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcalendarwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcheckbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcolordialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcolormap\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcolumnview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcombobox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcommandlinkbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcommonstyle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qcompleter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdatawidgetmapper\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdatetimeedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdesktopwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdial\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdialogbuttonbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdirmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qdockwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qerrormessage\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfiledialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfileiconprovider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfilesystemmodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfocusframe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfontcombobox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qfontdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qformlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qframe\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgesture\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgesturerecognizer\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsanchorlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicseffect\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsgridlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsitemanimation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicslayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicslayoutitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicslinearlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsproxywidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsscene\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicssceneevent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicstransform\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicsview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgraphicswidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgridlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qgroupbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qheaderview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qinputdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qitemdelegate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qitemeditorfactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qkeyeventtransition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qkeysequenceedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlabel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlayoutitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlcdnumber\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlineedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlistview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qlistwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmainwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmdiarea\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmdisubwindow\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmenu\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmenubar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmessagebox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qmouseeventtransition\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qopenglwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qplaintextedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qprogressbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qprogressdialog\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qproxystyle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qpushbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qradiobutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qrubberband\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qscrollarea\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qscrollbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qscroller\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qscrollerproperties\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qshortcut\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsizegrip\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsizepolicy\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qslider\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qspinbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsplashscreen\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsplitter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstackedlayout\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstackedwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstatusbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyle\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyleditemdelegate\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstylefactory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyleoption\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstylepainter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qstyleplugin\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qsystemtrayicon\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtabbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtableview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtablewidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtabwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtextbrowser\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtextedit\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtoolbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtoolbox\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtoolbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtooltip\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtreeview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtreewidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtreewidgetitemiterator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qtwidgetsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qundogroup\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qundostack\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qundoview\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwhatsthis\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwidgetaction\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWidgets/)?qwizard\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qtwinextrasversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinevent\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinjumplist\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinjumplistcategory\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinjumplistitem\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinmime\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwintaskbarbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwintaskbarprogress\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinthumbnailtoolbar\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtWinExtras/)?qwinthumbnailtoolbutton\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXml/)?qtxmlversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qabstractmessagehandler\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qabstracturiresolver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qabstractxmlnodemodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qabstractxmlreceiver\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qsimplexmlnodemodel\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qsourcelocation\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qtxmlpatternsversion\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlformatter\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlname\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlnamepool\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlquery\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlresultitems\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlschema\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlschemavalidator\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtXmlPatterns/)?qxmlserializer\\.h\"", "private", "", "public" ] }, + +# And lastly, things stored in difficult places + { include: [ "@\"(QtCore/)?qobjectdefs\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qglobal\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qnamespace\\.h\"", "private", "", "public" ] }, + { include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "", "public" ] }, #qDebug, qWarning, etc + { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, #qSort, etc + +# These ones are just madness. For instance, why with the above do we get +# #include "QtCore/qcoreevent.h" // for QEvent (ptr only), etc + { include: [ "@\"(QtCore/)?qcoreevent\\.h\"", "private", "", "public" ] }, + +# These ones seem spurious +#include "QtCore/qtypetraits.h" // for remove_reference<>::type +#include "QtCore/qsharedpointer_impl.h" // for swap +#include "QtCore/qatomic_msvc.h" +#include "qwinfunctions.h" // for fromHICON + +] diff --git a/qtmappings.imp b/qtmappings.imp deleted file mode 100644 index deea653f..00000000 --- a/qtmappings.imp +++ /dev/null @@ -1,320 +0,0 @@ -[ -# Overrides. Some classes are defined by the spec to reside in their own headers but actually use the same -# header as another class. It might make some sense using this for every class in QT... - { symbol: [ "QAbstractItemModel", "private", "", "public" ] }, - { symbol: [ "QAbstractTableModel", "private", "", "public" ] }, - { symbol: [ "QAtomicInt", "private", "", "public"] }, - { symbol: [ "QCloseEvent", "private", "", "public" ] }, - { symbol: [ "QDate", "private", "", "public"] }, - { symbol: [ "QDragEnterEvent", "private", "", "public" ] }, - { symbol: [ "QDropEvent", "private", "", "public" ] }, - { symbol: [ "QIntValidator", "private", "", "public" ] }, - { symbol: [ "QKeyEvent", "private", "", "public" ] }, - { symbol: [ "QListWidgetItem", "private", "", "public" ] }, - { symbol: [ "QModelIndex", "private", "", "public" ] }, - { symbol: [ "QModelIndexList", "private", "", "public" ] }, - { symbol: [ "QMouseEvent", "private", "", "public" ] }, - { symbol: [ "@QMutableHashIterator(::.*)?", "private", "", "public" ] }, - { symbol: [ "QPersistentModelIndex", "private", "", "public" ] }, - { symbol: [ "QResizeEvent", "private", "", "public" ] }, - { symbol: [ "QScopedArrayPointer", "private", "", "public" ] }, - { symbol: [ "QStyleOptionSlider", "private", "", "public" ] }, - { symbol: [ "QStyleOptionViewItem", "private", "", "public" ] }, - { symbol: [ "QTableWidgetItem", "private", "", "public" ] }, - { symbol: [ "QTime", "private", "", "public"] }, - { symbol: [ "QTreeWidgetItem", "private", "", "public" ] }, - { symbol: [ "QVBoxLayout", "private", "", "public" ] }, - { symbol: [ "QWebHitTestResult", "private", "", "public" ] }, - { symbol: [ "qobject_cast", "private", "", "public"] }, - -# these are in QMetaType but the documentation is slightly unclear as to where they are meant to be defined. - { symbol: [ "QVariantList", "private", "", "public" ] }, - { symbol: [ "QVariantMap", "private", "", "public" ] }, - -#Normal header overrides -# Possibly we should add in the QtCore/ (see MOC generated files which always do) - - { include: [ "@\"(QtConcurrent/)?qtconcurrentrun\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtCore/)?qabstractproxymodel\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qbytearray\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qchar\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qcoreapplication\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qcoreevent\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdatastream\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdatetime\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdebug\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdir\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qdiriterator\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qfile\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qfileinfo\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qflags\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qfuture\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qglobal\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qhash\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qiodevice\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qitemselectionmodel\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qjsonvalue\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qlibrary\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qlist\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qlocale\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qmap\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qnamespace\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qobject\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qobjectdefs\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qpoint\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qrect\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qregexp\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qscopedpointer\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qset\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qsharedpointer_impl\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qsize\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qstandardpaths\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qstring\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qstringlist\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qurl\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtCore/)?qvariant\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtGui/)?qbrush\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qcolor\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qcursor\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qfont\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qfontmetrics\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qicon\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qimage\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qkeysequence\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qpainter\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qpalette\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qpen\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtGui/)?qpixmap\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtNetwork/)?qhostaddress\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtNetwork/)?qnetworkaccessmanager\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtNetwork/)?qnetworkrequest\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtWidgets/)?qabstractbutton\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qabstractitemview\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qaction\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qboxlayout\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qdialog\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qframe\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qlayout\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qlayoutitem\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qlineedit\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qsizepolicy\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qstyle\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qstyleoption\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qtabbar\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qtabwidget\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qtextedit\\.h\"", "private", "", "public" ] }, - { include: [ "@\"(QtWidgets/)?qwidget\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtWebKit/)?qwebsettings\\.h\"", "private", "", "public" ] }, - - { include: [ "@\"(QtWebKitWidgets/)?qwebpage\\.h\"", "private", "", "public" ] }, - - # I need to find out where these are and group them as above. - { include: [ "\"qapplication.h\"", "private", "", "public" ] }, - { include: [ "\"qbuffer.h\"", "private", "", "public" ] }, - { include: [ "\"qcheckbox.h\"", "private", "", "public" ] }, - { include: [ "\"qclipboard.h\"", "private", "", "public" ] }, - { include: [ "\"qcombobox.h\"", "private", "", "public" ] }, - { include: [ "\"qcommandlinkbutton.h\"", "private", "", "public" ] }, - { include: [ "\"qcryptographichash.h\"", "private", "", "public" ] }, - { include: [ "\"qdesktopwidget.h\"", "private", "", "public" ] }, - { include: [ "\"qdialogbuttonbox.h\"", "private", "", "public" ] }, - { include: [ "\"qfiledialog.h\"", "private", "", "public" ] }, - { include: [ "\"qfilesystemmodel.h\"", "private", "", "public" ] }, - { include: [ "\"qfilesystemwatcher.h\"", "private", "", "public" ] }, - { include: [ "\"qgroupbox.h\"", "private", "", "public" ] }, - { include: [ "\"qheaderview.h\"", "private", "", "public" ] }, - { include: [ "\"qinputdialog.h\"", "private", "", "public" ] }, - { include: [ "\"qitemdelegate.h\"", "private", "", "public" ] }, - { include: [ "\"qjsonarray.h\"", "private", "", "public" ] }, - { include: [ "\"qjsondocument.h\"", "private", "", "public" ] }, - { include: [ "\"qjsonobject.h\"", "private", "", "public" ] }, - { include: [ "\"qlabel.h\"", "private", "", "public" ] }, - { include: [ "\"qlcdnumber.h\"", "private", "", "public" ] }, - { include: [ "\"qlistwidget.h\"", "private", "", "public" ] }, - { include: [ "\"qlocalserver.h\"", "private", "", "public" ] }, - { include: [ "\"qlocalsocket.h\"", "private", "", "public" ] }, - { include: [ "\"qmainwindow.h\"", "private", "", "public" ] }, - { include: [ "\"qmenu.h\"", "private", "", "public" ] }, - { include: [ "\"qmessagebox.h\"", "private", "", "public" ] }, - { include: [ "\"qmetatype.h\"", "private", "", "public" ] }, - { include: [ "\"qmimedata.h\"", "private", "", "public" ] }, - { include: [ "\"qmutex.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkcookie.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkcookiejar.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkdiskcache.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkinterface.h\"", "private", "", "public" ] }, - { include: [ "\"qnetworkreply.h\"", "private", "", "public" ] }, - { include: [ "\"qpixmapcache.h\"", "private", "", "public" ] }, - { include: [ "\"qprocess.h\"", "private", "", "public" ] }, - { include: [ "\"qprogressbar.h\"", "private", "", "public" ] }, - { include: [ "\"qprogressdialog.h\"", "private", "", "public" ] }, - { include: [ "\"qproxystyle.h\"", "private", "", "public" ] }, - { include: [ "\"qpushbutton.h\"", "private", "", "public" ] }, - { include: [ "\"qqueue.h\"", "private", "", "public" ] }, - { include: [ "\"qradiobutton.h\"", "private", "", "public" ] }, - { include: [ "\"qscrollbar.h\"", "private", "", "public" ] }, - { include: [ "\"qsettings.h\"", "private", "", "public" ] }, - { include: [ "\"qsharedmemory.h\"", "private", "", "public" ] }, - { include: [ "\"qshortcut.h\"", "private", "", "public" ] }, - { include: [ "\"qsignalmapper.h\"", "private", "", "public" ] }, - { include: [ "\"qsortfilterproxymodel.h\"", "private", "", "public" ] }, - { include: [ "\"qsplashscreen.h\"", "private", "", "public" ] }, - { include: [ "\"qsplitter.h\"", "private", "", "public" ] }, - { include: [ "\"qsslsocket.h\"", "private", "", "public" ] }, - { include: [ "\"qstackedwidget.h\"", "private", "", "public" ] }, - { include: [ "\"qstatusbar.h\"", "private", "", "public" ] }, - { include: [ "\"qstyleditemdelegate.h\"", "private", "", "public" ] }, - { include: [ "\"qstylefactory.h\"", "private", "", "public" ] }, - { include: [ "\"qsyntaxhighlighter.h\"", "private", "", "public" ] }, - { include: [ "\"qtablewidget.h\"", "private", "", "public" ] }, - { include: [ "\"qtemporaryfile.h\"", "private", "", "public" ] }, - { include: [ "\"qtextbrowser.h\"", "private", "", "public" ] }, - { include: [ "\"qtextcodec.h\"", "private", "", "public" ] }, - { include: [ "\"qtextstream.h\"", "private", "", "public" ] }, - { include: [ "\"qthread.h\"", "private", "", "public" ] }, - { include: [ "\"qtimer.h\"", "private", "", "public" ] }, - { include: [ "\"qtoolbar.h\"", "private", "", "public" ] }, - { include: [ "\"qtoolbutton.h\"", "private", "", "public" ] }, - { include: [ "\"qtooltip.h\"", "private", "", "public" ] }, - { include: [ "\"qtranslator.h\"", "private", "", "public" ] }, - { include: [ "\"qtreeview.h\"", "private", "", "public" ] }, - { include: [ "\"qtreewidget.h\"", "private", "", "public" ] }, - { include: [ "\"qurlquery.h\"", "private", "", "public" ] }, - { include: [ "\"qvalidator.h\"", "private", "", "public" ] }, - { include: [ "\"qvector.h\"", "private", "", "public" ] }, - { include: [ "\"qwebframe.h\"", "private", "", "public" ] }, - { include: [ "\"qwebhistory.h\"", "private", "", "public" ] }, - { include: [ "\"qwebview.h\"", "private", "", "public" ] }, - { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, - { include: [ "\"qwidgetaction.h\"", "private", "", "public" ] }, - { include: [ "\"qimagereader.h\"", "private", "", "public" ] }, - { include: [ "\"qdeclarativecontext.h\"", "private", "", "public" ] }, - { include: [ "\"qdeclarativeview.h\"", "private", "", "public" ] }, -# looks wrong -# { include: [ "\"qgraphicsitem.h\"", "private", "", "public" ] }, - - # Microsft visual C? - - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - -# Windows -# Looks like the doucmentation says the 1st char is u/c the rest are l/c -# You have to be kidding me. ULONG is defined in winsmcrd.h? - { symbol: [ "ULONG", "private", "", "private" ] }, - - { include: [ "", "private", "", "private" ] }, # Stringapiset.h - { include: [ "", "private", "", "public" ] }, - -# These are all in windef.h apparently. Which m/s then says 'use Windows.h' - { include: [ "", "private", "", "private" ] }, # or in winnt apparently - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - -# Similary, but for winbase.h - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - -# These ones say xxxx.h (include Windows.h) on the ms web site - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, # VerRsrc.h - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - -# These ones are in Windows.h but the documentation post windows 8 says they are individual headers, -# which looks like M/S are trying to get their act together. Maybe. - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - -# These ones are *not* defined to be in Windows.h, but it seems to work. These should probably be cleaned up - { include: [ "", "private", "", "public" ] }, - # These 3 should go to Shellapi.h - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, # official name according to website - { include: [ "", "private", "", "public" ] }, - # - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, - -# Files that are included by other files which seem to then come for free in Windows.h but -# shouldn't. Again, should be cleaned up. - - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "public" ] }, - - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "public" ] }, - - { include: [ "", "private", "", "private" ] }, - { include: [ "", "private", "", "public" ] }, - -# Huh? This one is sane? - { include: [ "", "private", "", "public" ] }, - -# And for boost??? -# These are probably correct but might need a revisit as if you look at the boost documentation pages, it -# can give you huge lists of alternate includes... - { symbol: [ "BOOST_FOREACH", "private", "", "public" ] }, - - { include: [ "@\"boost/bind/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/algorithm/string/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/assign/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/filesystem/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/format/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/function/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/python/.*\"", "private", "", "public" ] }, - { include: [ "@\"boost/signals2/.*\"", "private", "", "public" ] }, - { include: [ "\"boost/smart_ptr/scoped_array.hpp\"", "private", "", "public" ] }, - { include: [ "\"boost/smart_ptr/shared_ptr.hpp\"", "private", "", "public" ] }, - -# And this is specific to us - { include: [ "\"appconfig.inc\"", "private", "\"appconfig.h\"", "public" ] }, - -] - -# Warning: QtGroupingProxy is not provided by Qt - - -#include "qpluginloader.h" -#include "qnetworkproxy.h" - -# Ones I don't yet know how to deal with -#include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion -#include "boost/iterator/iterator_facade.hpp" // for operator!= -#include // for operator delete[], etc - -#include "QtCore/qiterator.h" -#include "QtCore/qtypeinfo.h" // for swap -#include "QtCore/qtypetraits.h" -#include "QtCore/qtypetraits.h" // for remove_reference<>::type -#include "QtGui/qwindowdefs_win.h" // for HINSTANCE -#include "QtWidgets/qabstractitemdelegate.h" -#include "boost/iterator/iterator_facade.hpp" -#include // for _Simple_types<>::value_type -#include // for _Tree_const_iterator - -# typical error on stdout (?) -#source\hookdll\dllmain.cpp(220) : warning C4244: '=' : conversion from 'int' to 'char', possible loss of data -# error from include-what-you-use (on stderr? at least it's in red) -#source\hookdll\dllmain.cpp(2220) : warning: case value not in enumerated type 'FILE_INFORMATION_CLASS' (aka '_FILE_INFORMATION_CLASS') [-Wswitch] diff --git a/win.imp b/win.imp new file mode 100644 index 00000000..90e8e69c --- /dev/null +++ b/win.imp @@ -0,0 +1,82 @@ +[ + # Microsft visual C? + + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + + { include: [ "", "private", "", "public" ] }, + +# Windows +# Looks like the doucmentation says the 1st char is u/c the rest are l/c +# You have to be kidding me. ULONG is defined in winsmcrd.h? + { symbol: [ "ULONG", "private", "", "private" ] }, + + { include: [ "", "private", "", "private" ] }, # Stringapiset.h + { include: [ "", "private", "", "public" ] }, + +# These are all in windef.h apparently. Which m/s then says 'use Windows.h' + { include: [ "", "private", "", "private" ] }, # or in winnt apparently + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + +# Similary, but for winbase.h + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + +# These ones say xxxx.h (include Windows.h) on the ms web site + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # VerRsrc.h + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + +# These ones are in Windows.h but the documentation post windows 8 says they are individual headers, +# which looks like M/S are trying to get their act together. Maybe. + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + +# These ones are *not* defined to be in Windows.h, but it seems to work. These should probably be cleaned up + { include: [ "", "private", "", "public" ] }, + # These 3 should go to Shellapi.h + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # official name according to website + { include: [ "", "private", "", "public" ] }, + # + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, + +# Files that are included by other files which seem to then come for free in Windows.h but +# shouldn't. Again, should be cleaned up. + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + +# Huh? This one is sane? + { include: [ "", "private", "", "public" ] }, + + +] + +#include // for operator delete[], etc + +#include // for _Simple_types<>::value_type +#include // for _Tree_const_iterator -- cgit v1.3.1 From fe54b6c46ada0807a7e6cb6135253fe22af68924 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 8 Nov 2015 23:18:16 +0000 Subject: More cleanups --- SConstruct | 6 ++--- massage_messages.py | 74 ++++++++++++++++++++++++++--------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/SConstruct b/SConstruct index 34aab72d..7af00c82 100644 --- a/SConstruct +++ b/SConstruct @@ -355,9 +355,9 @@ def setup_IWYU(env): env['IWYU_FLAGS'] = [ # This might turn down the output a bit. I hope '-Xiwyu', '--transitive_includes_only', - '-D_MT', '-D_DLL', '-m32', - # This is something to do with clang, windows and boost headers - '-DBOOST_USE_WINDOWS_H', + '-D_MT', '-D_DLL', '-m32', + # This is something to do with clang, windows and boost headers + '-DBOOST_USE_WINDOWS_H', # There's a lot of this, disabled for now '-Wno-inconsistent-missing-override', '--system-header-prefix=Q', diff --git a/massage_messages.py b/massage_messages.py index 159c2950..708c09cc 100644 --- a/massage_messages.py +++ b/massage_messages.py @@ -1,12 +1,33 @@ -# Attempt to massage the messages from clang so that QT recognises them -# expected: source\bsatk\bsafile.cpp(101) : fatal error C1189: #error : "we may have to compress/decompress!" -# clang: source\bsatk\bsafile.cpp(101) : error: "we may have to compress/decompress!" - import fileinput import re import subprocess import sys + +""" + +source/organizer/aboutdialog.h should add these lines: +#include // for Q_OBJECT, slots +#include // for QString +class QListWidgetItem; +class QWidget; + +source/organizer/aboutdialog.h should remove these lines: +- #include // lines 25-25 +- #include // lines 28-28 +- #include // lines 27-27 +- class DownloadManager; // lines 47-47 + +The full include-list for source/organizer/aboutdialog.h: +#include // for QDialog +#include // for Q_OBJECT, slots +#include // for QString +#include // for map +class QListWidgetItem; +class QWidget; +namespace Ui { class AboutDialog; } // lines 31-31 +--- +""" removing = None includes = dict @@ -14,8 +35,10 @@ includes = dict foundline = 0 def process_next_line(line): - # Look for '\) : ([^:])?:' - # Replace with ') : \1 I0000: + """ Read a line of output/error from include-what-you use + Turn clang errors into a form QT creator recognises + Raise warnings for unneeded includes + """ global removing global includes global foundline @@ -41,14 +64,15 @@ def process_next_line(line): else: print '********* I got confused **********' - # Replace clang :line:column: type: with ms (line) : type nnnn: - # filename:line:column type: - # replace with brackets - line = re.sub(r':(\d+):\d+: ([^:]*):', r'(\1) : \2 I1234:', line) + if line.startswith('In file included from'): + line = re.sub(r'^(In file included from)(.*):(\d+):', r' \2(\3) : \1 here', line) + # Note This doesnt appear to work if you get a string of them, not sure why. + elif ': note:' in line: + line = ' ' + re.sub(r':(\d+):\d+: note:', r'(\1) : note:', line) + else: + # Replace clang :line:column: type: with ms (line) : type nnnn: + line = re.sub(r':(\d+):\d+: ([^:]*):', r'(\1) : \2 I1234:', line) - if ': note I1234:' in line: - line = ' ' + line - line = line.replace(': note I1234:', '') print line if line.endswith(' should remove these lines:'): @@ -57,30 +81,6 @@ def process_next_line(line): adding = (line.split(' '))[0] # also process the other lines -""" - -source/organizer/aboutdialog.h should add these lines: -#include // for Q_OBJECT, slots -#include // for QString -class QListWidgetItem; -class QWidget; - -source/organizer/aboutdialog.h should remove these lines: -- #include // lines 25-25 -- #include // lines 28-28 -- #include // lines 27-27 -- class DownloadManager; // lines 47-47 - -The full include-list for source/organizer/aboutdialog.h: -#include // for QDialog -#include // for Q_OBJECT, slots -#include // for QString -#include // for map -class QListWidgetItem; -class QWidget; -namespace Ui { class AboutDialog; } // lines 31-31 ---- -""" # added lines should come after the first entry with a line number. -- cgit v1.3.1 From a284cbf232f34cc1a83b85ec45baafc1ce6518ec Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Mon, 9 Nov 2015 18:16:58 +0000 Subject: Yet more changes for include what you use, including a moderate hack for compiling stackdata with clang --- SConstruct | 43 +++++++++++++++++++++++-------------------- massage_messages.py | 41 +++++++++++++++++++++++++++++------------ src/shared/stackdata.cpp | 3 ++- 3 files changed, 54 insertions(+), 33 deletions(-) diff --git a/SConstruct b/SConstruct index 7af00c82..57111773 100644 --- a/SConstruct +++ b/SConstruct @@ -337,8 +337,7 @@ def setup_IWYU(env): # except it eats errors iwyu = SCons.Builder.Builder( action=[ - '$IWYU_MASSAGE $IWYU $IWYU_FLAGS $IWYU_MAPPINGS $IWYU_COMCOM $SOURCE', - Touch('$TARGET') + '$IWYU_MASSAGE $TARGET $IWYU $IWYU_FLAGS $IWYU_MAPPINGS $IWYU_COMCOM $SOURCE' ], emitter=emitter, suffix='.iwyu', @@ -346,27 +345,26 @@ def setup_IWYU(env): env.Append(BUILDERS={'IWYU': iwyu}) - # Sigh - IWYU is a right bum as it doesn't recognise /I so I have to duplicate most of the usual stuff. Worse, half the - # flags are irrelevant immaterial and incompetent and I can't use an environment clone because it takes stuff from the - # wrong environment. + # Sigh - IWYU is a right bum as it doesn't recognise /I so I have to + # duplicate most of the usual stuff - # There has to be a better way of doing this. 'begins with Q means system header'??? - # Also, I can't get this to show issues in the issue window which sucks env['IWYU_FLAGS'] = [ # This might turn down the output a bit. I hope '-Xiwyu', '--transitive_includes_only', + # Seem to be needed for a windows build '-D_MT', '-D_DLL', '-m32', # This is something to do with clang, windows and boost headers '-DBOOST_USE_WINDOWS_H', # There's a lot of this, disabled for now '-Wno-inconsistent-missing-override', + # Mark boost and Qt headers as system headers to disable a lot of noise. + # I'm sure there has to be a better way than saying 'prefix=Q' '--system-header-prefix=Q', '--system-header-prefix=boost/', - # clang says it sets this to 1700 but pretty sure vc12 is 1800 - #'-fmsc-version=1800', '-D_MSC_VER=1800', - '-fmsc-version=1700', - # clang and qt don't agree about these because clang says its gcc 4.2 and - # QT doesn't realise it's clang + # Should be able to get this info from our setup really + '-fmsc-version=1800', '-D_MSC_VER=1800', + # clang and qt don't agree about these because clang says its gcc 4.2 + # and QT doesn't realise it's clang '-DQ_COMPILER_INITIALIZER_LISTS', '-DQ_COMPILER_DECLTYPE', '-DQ_COMPILER_VARIADIC_TEMPLATES', @@ -376,22 +374,27 @@ def setup_IWYU(env): env['IWYU_DEFPREFIX'] = '-D' env['IWYU_DEFSUFFIX'] = '' + env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' + env['IWYU_INCPREFIX'] = '-I' env['IWYU_INCSUFFIX'] = '' - env['IWYU_INCLUDEPREFIX'] = '-include' # Amazingly this works without a space - env['IWYU_INCLUDESUFFIX'] = '' - env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $IWYU_PCHFILES $CCPDBFLAGS' - env['IWYU_CPPDEFFLAGS'] = '${_defines(IWYU_DEFPREFIX, CPPDEFINES, IWYU_DEFSUFFIX, __env__)}' env['IWYU_CPPINCFLAGS'] = '$( ${_concat(IWYU_INCPREFIX, CPPPATH, IWYU_INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' - env['IWYU_PCHFILES'] = '$( ${_concat(IWYU_INCLUDEPREFIX, PCHSTOP, IWYU_INCLUDESUFFIX, __env__, target=TARGET, source=SOURCE)} $)' + + env['IWYU_PCH_PREFIX'] = '-include' # Amazingly this works without a space + env['IWYU_PCH_SUFFIX'] = '' + env['IWYU_PCHFILES'] = '$( ${_concat(IWYU_PCH_PREFIX, PCHSTOP, IWYU_PCH_SUFFIX, __env__, target=TARGET, source=SOURCE)} $)' + + env['IWYU_COMCOM'] = '$IWYU_CPPDEFFLAGS $IWYU_CPPINCFLAGS $IWYU_PCHFILES $CCPDBFLAGS' + env['IWYU_MAPPING_PREFIX'] = ['-Xiwyu', '--mapping_file='] + env['IWYU_MAPPING_SUFFIX'] = '' + env['IWYU_MAPPINGS'] = '$( ${_concat_list(IWYU_MAPPING_PREFIX, IWYU_MAPPING_FILE, IWYU_MAPPING_SUFFIX, __env__, f=lambda l: [ str(x) for x in l], target=TARGET, source=SOURCE)} $)' + env['IWYU_MAPPING_FILE'] = [ env.File('#/modorganizer/qt5_4.imp'), env.File('#/modorganizer/win.imp'), env.File('#/modorganizer/mappings.imp') ] - env['IWYU_MAPPING_PREFIX'] = ['-Xiwyu', '--mapping_file='] - env['IWYU_MAPPING_SUFFIX'] = '' - env['IWYU_MAPPINGS'] = '$( ${_concat_list(IWYU_MAPPING_PREFIX, IWYU_MAPPING_FILE, IWYU_MAPPING_SUFFIX, __env__, f=lambda l: [ str(x) for x in l], target=TARGET, source=SOURCE)} $)' + env['IWYU_MASSAGE'] = env.File('#/modorganizer/massage_messages.py') # Create base environment diff --git a/massage_messages.py b/massage_messages.py index 708c09cc..249068ba 100644 --- a/massage_messages.py +++ b/massage_messages.py @@ -34,7 +34,9 @@ includes = dict foundline = 0 -def process_next_line(line): +errors = False + +def process_next_line(line, outfile): """ Read a line of output/error from include-what-you use Turn clang errors into a form QT creator recognises Raise warnings for unneeded includes @@ -42,37 +44,48 @@ def process_next_line(line): global removing global includes global foundline + global errors line = line.rstrip() + print >> outfile, line if removing: if line == '': removing = None print return else: - # Really we should stash these so that if we get a 'class xxx' in the - # add lines we can print it here. also we could do the case fixing. + # Really we should stash these so that if we get a 'class xxx' in + # the add lines we can print it here. also we could do the case + # fixing. m = re.match(r'- #include [<"](.*)[">] +// lines (.*)-', line) if m: # If there is an added line with the same class, print it here - print '%s(%s) : warning I0001: Unnecessary include of %s' % (removing, m.group(2), m.group(1)) + print '%s(%s) : warning I0001: Unnecessary include of %s' %\ + (removing, m.group(2), m.group(1)) foundline = m.group(1) else: m = re.match(r'- (.*) +// lines (.*)-', line) if m: - print '%s(%s) : warning I0002: Unnecessary forward ref of %s' % (removing, m.group(2), m.group(1)) + print '%s(%s) : warning I0002: '\ + 'Unnecessary forward ref of %s' %\ + (removing, m.group(2), m.group(1)) foundline = m.group(1) else: print '********* I got confused **********' if line.startswith('In file included from'): - line = re.sub(r'^(In file included from)(.*):(\d+):', r' \2(\3) : \1 here', line) - # Note This doesnt appear to work if you get a string of them, not sure why. + line = re.sub(r'^(In file included from)(.*):(\d+):', + r' \2(\3) : \1 here', + line) + # Note; QT Creator seems to be unwilling to let you double click the + # line to select the code in question if you get a string of these, not + # sure why. elif ': note:' in line: line = ' ' + re.sub(r':(\d+):\d+: note:', r'(\1) : note:', line) else: # Replace clang :line:column: type: with ms (line) : type nnnn: line = re.sub(r':(\d+):\d+: ([^:]*):', r'(\1) : \2 I1234:', line) - + if ' : error I1234:' in line: + errors = True print line if line.endswith(' should remove these lines:'): @@ -84,16 +97,20 @@ def process_next_line(line): # added lines should come after the first entry with a line number. -process = subprocess.Popen(sys.argv[1:], +outfile = open(sys.argv[1], 'w') +process = subprocess.Popen(sys.argv[2:], stdout = subprocess.PIPE, stderr = subprocess.STDOUT) while True: output = process.stdout.readline() if output == '' and process.poll() is not None: break if output: - process_next_line(output) + process_next_line(output, outfile) + rc = process.poll() # The return code you get appears to be more to do with the amount of output -# generated than any real error. We should error if any ': error:' lines are -# detected +# generated than any real error, so instead we should error if any ': error:' +# lines are detected +if errors: + sys.exit(1) diff --git a/src/shared/stackdata.cpp b/src/shared/stackdata.cpp index 18daaf7b..b336593a 100644 --- a/src/shared/stackdata.cpp +++ b/src/shared/stackdata.cpp @@ -99,7 +99,8 @@ void StackData::initTrace() { CONTEXT context; std::memset(&context, 0, sizeof(CONTEXT)); context.ContextFlags = CONTEXT_CONTROL; -#if BOOST_ARCH_X86_64 + //Why only for 64 bit? +#if BOOST_ARCH_X86_64 || defined(__clang__) ::RtlCaptureContext(&context); #else __asm -- cgit v1.3.1 From d1932bfc8ec190db2ac8878f32e77ea45e897a02 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 12 Nov 2015 21:48:40 +0000 Subject: Better header matching --- qt5_4.imp | 2 +- win.imp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qt5_4.imp b/qt5_4.imp index 5d75fd9e..0c688042 100644 --- a/qt5_4.imp +++ b/qt5_4.imp @@ -2464,6 +2464,7 @@ { include: [ "@\"(QtCore/)?qnamespace\\.h\"", "private", "", "public" ] }, { include: [ "@\"(QtCore/)?qlogging\\.h\"", "private", "", "public" ] }, #qDebug, qWarning, etc { include: [ "@\"(QtCore/)?qalgorithms\\.h\"", "private", "", "public" ] }, #qSort, etc + { include: [ "@\"(QtWinExtras/)?qwinfunctions\\.h\"", "private", "", "public" ] }, // for fromHICON # These ones are just madness. For instance, why with the above do we get # #include "QtCore/qcoreevent.h" // for QEvent (ptr only), etc @@ -2473,6 +2474,5 @@ #include "QtCore/qtypetraits.h" // for remove_reference<>::type #include "QtCore/qsharedpointer_impl.h" // for swap #include "QtCore/qatomic_msvc.h" -#include "qwinfunctions.h" // for fromHICON ] diff --git a/win.imp b/win.imp index 90e8e69c..cbecdc43 100644 --- a/win.imp +++ b/win.imp @@ -9,9 +9,10 @@ { include: [ "", "private", "", "public" ] }, # Windows -# Looks like the doucmentation says the 1st char is u/c the rest are l/c +# Looks like the documentation says the 1st char is u/c the rest are l/c + # You have to be kidding me. ULONG is defined in winsmcrd.h? - { symbol: [ "ULONG", "private", "", "private" ] }, + { symbol: [ "ULONG", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, # Stringapiset.h { include: [ "", "private", "", "public" ] }, -- cgit v1.3.1 From 9ac845779abeafa7031f49dbc6bf0143765b3cd9 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 18 Nov 2015 20:51:27 +0000 Subject: Fixup --- SConstruct | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SConstruct b/SConstruct index eb3da432..5df6f96a 100644 --- a/SConstruct +++ b/SConstruct @@ -50,10 +50,6 @@ def setup_config_variables(): PathVariable.PathIsDir), PathVariable('SEVENZIPPATH', 'Path to 7zip sources', sevenzippath, PathVariable.PathIsDir), - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir). - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir), PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, PathVariable.PathIsDir) ) -- cgit v1.3.1 From 49de6e8d2555234c5da132c5fc35287083fe7ef7 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Fri, 20 Nov 2015 18:07:06 +0000 Subject: Get rid of `GameIfo::getOrganizerDirectory` and associated member variable qApp->getProperty("dataPath") can be used instead (and is pretty much everywhere else) so it's unnecessary --- src/main.cpp | 9 +++++---- src/organizercore.cpp | 1 + src/organizerproxy.cpp | 4 +++- src/selfupdater.cpp | 6 +++--- src/settingsdialog.cpp | 2 +- src/shared/fallout3info.cpp | 4 ++-- src/shared/fallout3info.h | 2 +- src/shared/falloutnvinfo.cpp | 4 ++-- src/shared/falloutnvinfo.h | 2 +- src/shared/gameinfo.cpp | 18 +++++++++--------- src/shared/gameinfo.h | 14 +++++++++----- src/shared/oblivioninfo.cpp | 4 ++-- src/shared/oblivioninfo.h | 2 +- src/shared/skyriminfo.cpp | 4 ++-- src/shared/skyriminfo.h | 2 +- 15 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 773bfc16..ff34145d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -86,7 +86,8 @@ using namespace MOShared; bool createAndMakeWritable(const std::wstring &subPath) { - QString fullPath = qApp->property("dataPath").toString() + "/" + QString::fromStdWString(subPath); + QString const dataPath = qApp->property("dataPath").toString(); + QString fullPath = dataPath + "/" + QString::fromStdWString(subPath); if (!QDir(fullPath).exists()) { QDir().mkdir(fullPath); @@ -100,7 +101,7 @@ bool createAndMakeWritable(const std::wstring &subPath) "will be made writable for the current user account). You will be asked to run " "\"helper.exe\" with administrative rights."), QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Yes) { - if (!Helper::init(GameInfo::instance().getOrganizerDirectory())) { + if (!Helper::init(dataPath.toStdWString())) { return false; } } else { @@ -341,7 +342,7 @@ int main(int argc, char *argv[]) instanceID = instanceFile.readAll().trimmed(); } - QString dataPath = + QString const dataPath = instanceID.isEmpty() ? application.applicationDirPath() : QDir::fromNativeSeparators( QStandardPaths::writableLocation(QStandardPaths::DataLocation) @@ -373,7 +374,7 @@ int main(int argc, char *argv[]) QSplashScreen splash(pixmap); try { - if (!bootstrap()) { // requires gameinfo to be initialised! + if (!bootstrap()) { return -1; } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index a9284e97..c1f091d9 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1,4 +1,5 @@ #include "organizercore.h" + #include "mainwindow.h" #include "gameinfoimpl.h" #include "messagedialog.h" diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 095cb0bb..9e85929f 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -1,7 +1,9 @@ #include "organizerproxy.h" + #include #include +#include using namespace MOBase; using namespace MOShared; @@ -40,7 +42,7 @@ QString OrganizerProxy::downloadsPath() const QString OrganizerProxy::overwritePath() const { - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getOrganizerDirectory())) + return QDir::fromNativeSeparators(qApp->property("dataPath").toString()) + "/" + ToQString(AppConfig::overwritePath()); } diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index bcf81cfd..7e42f322 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -159,7 +159,7 @@ void SelfUpdater::download(const QString &downloadLink, const QString &fileName) QNetworkRequest request(dlUrl); m_Canceled = false; m_Reply = accessManager->get(request); - m_UpdateFile.setFileName(QDir::fromNativeSeparators(ToQString(GameInfo::instance().getOrganizerDirectory()).append("\\").append(fileName))); + m_UpdateFile.setFileName(QDir::fromNativeSeparators(qApp->property("dataPath").toString()).append("/").append(fileName)); m_UpdateFile.open(QIODevice::WriteOnly); showProgress(); @@ -243,7 +243,7 @@ void SelfUpdater::downloadCancel() void SelfUpdater::installUpdate() { - const QString mopath = QDir::fromNativeSeparators(ToQString(GameInfo::instance().getOrganizerDirectory())); + const QString mopath = QDir::fromNativeSeparators(qApp->property("dataPath").toString()); QString backupPath = mopath + "/update_backup"; QDir().mkdir(backupPath); @@ -281,7 +281,7 @@ void SelfUpdater::installUpdate() } // now unpack the archive into the mo directory - if (!m_CurrentArchive->extract(GameInfo::instance().getOrganizerDirectory().c_str(), + if (!m_CurrentArchive->extract(QDir::toNativeSeparators(mopath).toStdWString().c_str(), new MethodCallback(this, &SelfUpdater::updateProgress), new MethodCallback(this, &SelfUpdater::updateProgressFile), new MethodCallback(this, &SelfUpdater::report7ZipError))) { diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 765858f5..f2160719 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -87,7 +87,7 @@ void SettingsDialog::on_categoriesBtn_clicked() void SettingsDialog::on_bsaDateBtn_clicked() { - Helper::backdateBSAs(GameInfo::instance().getOrganizerDirectory(), GameInfo::instance().getGameDirectory().append(L"\\data")); + Helper::backdateBSAs(qApp->property("dataPath").toString().toStdWString(), GameInfo::instance().getGameDirectory().append(L"\\data")); } void SettingsDialog::on_browseDownloadDirBtn_clicked() diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 0b369b50..055d3b38 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -30,8 +30,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -Fallout3Info::Fallout3Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDirectory, moDataDirectory, gameDirectory) +Fallout3Info::Fallout3Info(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) + : GameInfo(moDataDirectory, gameDirectory) { identifyMyGamesDirectory(L"fallout3"); } diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 0045581d..d019ee07 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -69,7 +69,7 @@ public: private: - Fallout3Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + Fallout3Info(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 1203bd25..2ddbf055 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -FalloutNVInfo::FalloutNVInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDirectory, moDataDirectory, gameDirectory) +FalloutNVInfo::FalloutNVInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) + : GameInfo(moDataDirectory, gameDirectory) { identifyMyGamesDirectory(L"falloutnv"); } diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index e1a614d2..9a9004ec 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -102,7 +102,7 @@ public: private: - FalloutNVInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + FalloutNVInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); }; diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 1f25cec1..e5e47cdf 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -40,8 +40,8 @@ namespace MOShared { GameInfo* GameInfo::s_Instance = nullptr; -GameInfo::GameInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : m_GameDirectory(gameDirectory), m_OrganizerDirectory(moDirectory), m_OrganizerDataDirectory(moDataDirectory) +GameInfo::GameInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) + : m_GameDirectory(gameDirectory), m_OrganizerDataDirectory(moDataDirectory) { atexit(&cleanup); } @@ -87,16 +87,16 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) } -bool GameInfo::identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath) +bool GameInfo::identifyGame(const std::wstring &moDataDirectory, const std::wstring &searchPath) { if (OblivionInfo::identifyGame(searchPath)) { - s_Instance = new OblivionInfo(moDirectory, moDataDirectory, searchPath); + s_Instance = new OblivionInfo(moDataDirectory, searchPath); } else if (Fallout3Info::identifyGame(searchPath)) { - s_Instance = new Fallout3Info(moDirectory, moDataDirectory, searchPath); + s_Instance = new Fallout3Info(moDataDirectory, searchPath); } else if (FalloutNVInfo::identifyGame(searchPath)) { - s_Instance = new FalloutNVInfo(moDirectory, moDataDirectory, searchPath); + s_Instance = new FalloutNVInfo(moDataDirectory, searchPath); } else if (SkyrimInfo::identifyGame(searchPath)) { - s_Instance = new SkyrimInfo(moDirectory, moDataDirectory, searchPath); + s_Instance = new SkyrimInfo(moDataDirectory, searchPath); } return s_Instance != nullptr; @@ -109,14 +109,14 @@ bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &moDataD if (gamePath.length() == 0) { // search upward in the directory until a recognized game-binary is found std::wstring searchPath(moDirectory); - while (!identifyGame(moDirectory, moDataDirectory, searchPath)) { + while (!identifyGame(moDataDirectory, searchPath)) { size_t lastSep = searchPath.find_last_of(L"/\\"); if (lastSep == std::string::npos) { return false; } searchPath.erase(lastSep); } - } else if (!identifyGame(moDirectory, moDataDirectory, gamePath)) { + } else if (!identifyGame(moDataDirectory, gamePath)) { return false; } } diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index a32b6b82..1d4b050b 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -56,8 +56,7 @@ public: virtual ~GameInfo() {} - std::wstring getOrganizerDirectory() { return m_OrganizerDirectory; } - + //**USED IN HOOKDLL virtual std::wstring getRegPath() = 0; virtual std::wstring getBinaryName() = 0; @@ -70,6 +69,7 @@ public: /// exception if the mechanism can't be determined virtual LoadOrderMechanism getLoadOrderMechanism() const { return TYPE_FILETIME; } + //**USED IN HOOKDLL virtual std::wstring getGameDirectory() const; virtual bool requiresSteam() const; @@ -80,9 +80,11 @@ public: // get a set of esp/esm files that are part of known dlcs virtual std::vector getDLCPlugins() = 0; + //**USED IN HOOKDLL // file name of this games ini file(s) virtual std::vector getIniFileNames() = 0; + //**USED IN HOOKDLL virtual std::wstring getReferenceDataFile() = 0; virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; @@ -90,19 +92,22 @@ public: virtual int getNexusModID() = 0; virtual int getNexusGameID() = 0; + //**USED IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; public: + //**USED IN HOOKDLL // initialise with the path to the mo directory (needs to be where hook.dll is stored). This // needs to be called before the instance can be retrieved static bool init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath = L""); + //**USED IN HOOKDLL static GameInfo& instance(); protected: - GameInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + GameInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); std::wstring getLocalAppFolder() const; const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; } @@ -110,7 +115,7 @@ protected: private: - static bool identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath); + static bool identifyGame(const std::wstring &moDataDirectory, const std::wstring &searchPath); std::wstring getSpecialPath(LPCWSTR name) const; static void cleanup(); @@ -122,7 +127,6 @@ private: std::wstring m_MyGamesDirectory; std::wstring m_GameDirectory; - std::wstring m_OrganizerDirectory; std::wstring m_OrganizerDataDirectory; }; diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 16748f58..a5760570 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -OblivionInfo::OblivionInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDirectory, moDataDirectory, gameDirectory) +OblivionInfo::OblivionInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) + : GameInfo(moDataDirectory, gameDirectory) { identifyMyGamesDirectory(L"oblivion"); } diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 87ba26ff..0a6c416c 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -100,7 +100,7 @@ public: private: - OblivionInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + OblivionInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f66fcef4..e122390d 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -33,8 +33,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -SkyrimInfo::SkyrimInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDirectory, moDataDirectory, gameDirectory) +SkyrimInfo::SkyrimInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) + : GameInfo(moDataDirectory, gameDirectory) { identifyMyGamesDirectory(L"skyrim"); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 5951f910..f52be73a 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -68,7 +68,7 @@ public: private: - SkyrimInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + SkyrimInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); -- cgit v1.3.1 From f339cc8431c0a7b6a4d514599e6fa57a75eb6495 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Fri, 20 Nov 2015 19:34:09 +0000 Subject: Member variable unused so removed it. Leaves one asking *why* the datapath can be inside the game directory. --- src/main.cpp | 2 +- src/shared/fallout3info.cpp | 4 ++-- src/shared/fallout3info.h | 2 +- src/shared/falloutnvinfo.cpp | 4 ++-- src/shared/falloutnvinfo.h | 2 +- src/shared/gameinfo.cpp | 20 ++++++++++---------- src/shared/gameinfo.h | 7 +++---- src/shared/oblivioninfo.cpp | 4 ++-- src/shared/oblivioninfo.h | 2 +- src/shared/skyriminfo.cpp | 4 ++-- src/shared/skyriminfo.h | 2 +- 11 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ff34145d..4f79b0b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -446,7 +446,7 @@ int main(int argc, char *argv[]) QString gamePath = QString::fromUtf8(settings.value("gamePath", "").toByteArray()); bool done = false; while (!done) { - if (!GameInfo::init(ToWString(application.applicationDirPath()), ToWString(dataPath), ToWString(QDir::toNativeSeparators(gamePath)))) { + if (!GameInfo::init(ToWString(application.applicationDirPath()), ToWString(QDir::toNativeSeparators(gamePath)))) { if (!gamePath.isEmpty()) { reportError(QObject::tr("No game identified in \"%1\". The directory is required to contain " "the game binary and its launcher.").arg(gamePath)); diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 055d3b38..9c6ad5b9 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -30,8 +30,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -Fallout3Info::Fallout3Info(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDataDirectory, gameDirectory) +Fallout3Info::Fallout3Info(const std::wstring &gameDirectory) + : GameInfo(gameDirectory) { identifyMyGamesDirectory(L"fallout3"); } diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index d019ee07..51abe073 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -69,7 +69,7 @@ public: private: - Fallout3Info(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + Fallout3Info(const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 2ddbf055..4601caf5 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -FalloutNVInfo::FalloutNVInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDataDirectory, gameDirectory) +FalloutNVInfo::FalloutNVInfo(const std::wstring &gameDirectory) + : GameInfo(gameDirectory) { identifyMyGamesDirectory(L"falloutnv"); } diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 9a9004ec..59b52323 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -102,7 +102,7 @@ public: private: - FalloutNVInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + FalloutNVInfo(const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); }; diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index e5e47cdf..703f4a40 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -40,8 +40,8 @@ namespace MOShared { GameInfo* GameInfo::s_Instance = nullptr; -GameInfo::GameInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : m_GameDirectory(gameDirectory), m_OrganizerDataDirectory(moDataDirectory) +GameInfo::GameInfo(const std::wstring &gameDirectory) + : m_GameDirectory(gameDirectory) { atexit(&cleanup); } @@ -87,36 +87,36 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) } -bool GameInfo::identifyGame(const std::wstring &moDataDirectory, const std::wstring &searchPath) +bool GameInfo::identifyGame(const std::wstring &searchPath) { if (OblivionInfo::identifyGame(searchPath)) { - s_Instance = new OblivionInfo(moDataDirectory, searchPath); + s_Instance = new OblivionInfo(searchPath); } else if (Fallout3Info::identifyGame(searchPath)) { - s_Instance = new Fallout3Info(moDataDirectory, searchPath); + s_Instance = new Fallout3Info(searchPath); } else if (FalloutNVInfo::identifyGame(searchPath)) { - s_Instance = new FalloutNVInfo(moDataDirectory, searchPath); + s_Instance = new FalloutNVInfo(searchPath); } else if (SkyrimInfo::identifyGame(searchPath)) { - s_Instance = new SkyrimInfo(moDataDirectory, searchPath); + s_Instance = new SkyrimInfo(searchPath); } return s_Instance != nullptr; } -bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath) +bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &gamePath) { if (s_Instance == nullptr) { if (gamePath.length() == 0) { // search upward in the directory until a recognized game-binary is found std::wstring searchPath(moDirectory); - while (!identifyGame(moDataDirectory, searchPath)) { + while (!identifyGame(searchPath)) { size_t lastSep = searchPath.find_last_of(L"/\\"); if (lastSep == std::string::npos) { return false; } searchPath.erase(lastSep); } - } else if (!identifyGame(moDataDirectory, gamePath)) { + } else if (!identifyGame(gamePath)) { return false; } } diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 1d4b050b..47a5e767 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -100,14 +100,14 @@ public: //**USED IN HOOKDLL // initialise with the path to the mo directory (needs to be where hook.dll is stored). This // needs to be called before the instance can be retrieved - static bool init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath = L""); + static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); //**USED IN HOOKDLL static GameInfo& instance(); protected: - GameInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + GameInfo(const std::wstring &gameDirectory); std::wstring getLocalAppFolder() const; const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; } @@ -115,7 +115,7 @@ protected: private: - static bool identifyGame(const std::wstring &moDataDirectory, const std::wstring &searchPath); + static bool identifyGame(const std::wstring &searchPath); std::wstring getSpecialPath(LPCWSTR name) const; static void cleanup(); @@ -127,7 +127,6 @@ private: std::wstring m_MyGamesDirectory; std::wstring m_GameDirectory; - std::wstring m_OrganizerDataDirectory; }; diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index a5760570..4b0a8499 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -OblivionInfo::OblivionInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDataDirectory, gameDirectory) +OblivionInfo::OblivionInfo(const std::wstring &gameDirectory) + : GameInfo(gameDirectory) { identifyMyGamesDirectory(L"oblivion"); } diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 0a6c416c..ac10b80a 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -100,7 +100,7 @@ public: private: - OblivionInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + OblivionInfo(const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index e122390d..bd901357 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -33,8 +33,8 @@ along with Mod Organizer. If not, see . namespace MOShared { -SkyrimInfo::SkyrimInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDataDirectory, gameDirectory) +SkyrimInfo::SkyrimInfo(const std::wstring &gameDirectory) + : GameInfo(gameDirectory) { identifyMyGamesDirectory(L"skyrim"); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index f52be73a..65977a69 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -68,7 +68,7 @@ public: private: - SkyrimInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + SkyrimInfo(const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); -- cgit v1.3.1 From efb54100dcfe8ac83284ec59e6706c488ecb10e7 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 21 Nov 2015 12:30:33 +0000 Subject: Removal of (get)BinaryName --- src/gameinfoimpl.cpp | 5 +++-- src/gameinfoimpl.h | 2 +- src/organizer.pro | 6 +++--- src/organizercore.cpp | 8 ++------ src/organizercore.h | 2 +- src/organizerproxy.cpp | 13 +++++++++---- src/organizerproxy.h | 9 +++++---- src/shared/fallout3info.h | 1 - src/shared/falloutnvinfo.h | 1 - src/shared/gameinfo.h | 1 - src/shared/oblivioninfo.h | 1 - src/shared/skyriminfo.h | 1 - 12 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 025ce4e6..a0dd832e 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -47,8 +47,9 @@ QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); } - +/* QString GameInfoImpl::binaryName() const { - return ToQString(GameInfo::instance().getBinaryName()); + return ToQString(GameInfo::instance().getgetBinaryName()); } +*/ diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index 3ed7be6b..b78321c4 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -32,7 +32,7 @@ public: virtual Type type() const; virtual QString path() const; - virtual QString binaryName() const; +// virtual QString binaryName() const; }; diff --git a/src/organizer.pro b/src/organizer.pro index 261e3c1c..65c1e4d3 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -355,10 +355,10 @@ CONFIG(debug, debug|release) { } OTHER_FILES += \ - SConscript + SConscript \ + CMakeLists.txt DISTFILES += \ tutorials/tutorial_primer_main.js \ tutorials/Tooltip.qml \ - tutorials/TooltipArea.qml \ - SConscript + tutorials/TooltipArea.qml diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c1f091d9..d56f64cb 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -594,14 +594,10 @@ MOBase::VersionInfo OrganizerCore::appVersion() const return m_Updater.getVersion(); } -MOBase::IModInterface *OrganizerCore::getMod(const QString &name) +MOBase::IModInterface *OrganizerCore::getMod(const QString &name) const { unsigned int index = ModInfo::getIndex(name); - if (index == UINT_MAX) { - return nullptr; - } else { - return ModInfo::getByIndex(index).data(); - } + return index == UINT_MAX ? nullptr : ModInfo::getByIndex(index).data(); } MOBase::IModInterface *OrganizerCore::createMod(GuessedValue &name) diff --git a/src/organizercore.h b/src/organizercore.h index 85f0e0c4..3524dcb5 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -132,7 +132,7 @@ public: QString profilePath() const; QString downloadsPath() const; MOBase::VersionInfo appVersion() const; - MOBase::IModInterface *getMod(const QString &name); + MOBase::IModInterface *getMod(const QString &name) const; MOBase::IModInterface *createMod(MOBase::GuessedValue &name); bool removeMod(MOBase::IModInterface *mod); void modDataChanged(MOBase::IModInterface *mod); diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 9e85929f..17c5a16f 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -52,7 +52,7 @@ VersionInfo OrganizerProxy::appVersion() const return m_Proxied->appVersion(); } -IModInterface *OrganizerProxy::getMod(const QString &name) +IModInterface *OrganizerProxy::getMod(const QString &name) const { return m_Proxied->getMod(name); } @@ -157,17 +157,22 @@ QList OrganizerProxy::findFileInfos(const QString return m_Proxied->findFileInfos(path, filter); } -MOBase::IDownloadManager *OrganizerProxy::downloadManager() +MOBase::IDownloadManager *OrganizerProxy::downloadManager() const { return m_Proxied->downloadManager(); } -MOBase::IPluginList *OrganizerProxy::pluginList() +MOBase::IPluginList *OrganizerProxy::pluginList() const { return m_Proxied->pluginList(); } -MOBase::IModList *OrganizerProxy::modList() +MOBase::IModList *OrganizerProxy::modList() const { return m_Proxied->modList(); } + +MOBase::IPluginGame *OrganizerProxy::managedGame() const +{ + return m_Proxied->managedGame(); +} diff --git a/src/organizerproxy.h b/src/organizerproxy.h index fb502a7f..31009c8a 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -19,7 +19,7 @@ public: virtual QString downloadsPath() const; virtual QString overwritePath() const; virtual MOBase::VersionInfo appVersion() const; - virtual MOBase::IModInterface *getMod(const QString &name); + virtual MOBase::IModInterface *getMod(const QString &name) const; virtual MOBase::IModInterface *createMod(MOBase::GuessedValue &name); virtual bool removeMod(MOBase::IModInterface *mod); virtual void modDataChanged(MOBase::IModInterface *mod); @@ -35,9 +35,9 @@ public: virtual QStringList getFileOrigins(const QString &fileName) const; virtual QList findFileInfos(const QString &path, const std::function &filter) const; - virtual MOBase::IDownloadManager *downloadManager(); - virtual MOBase::IPluginList *pluginList(); - virtual MOBase::IModList *modList(); + virtual MOBase::IDownloadManager *downloadManager() const; + virtual MOBase::IPluginList *pluginList() const; + virtual MOBase::IModList *modList() const; virtual HANDLE startApplication(const QString &executable, const QStringList &args = QStringList(), const QString &cwd = "", const QString &profile = ""); virtual bool waitForApplication(HANDLE handle, LPDWORD exitCode = nullptr) const; virtual void refreshModList(bool saveChanges); @@ -46,6 +46,7 @@ public: virtual bool onFinishedRun(const std::function &func); virtual bool onModInstalled(const std::function &func); + virtual MOBase::IPluginGame *managedGame() const; private: diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 51abe073..90bb6ec0 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -37,7 +37,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"Fallout3.exe"; } virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 59b52323..613694b2 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -37,7 +37,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"FalloutNV.exe"; } virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 47a5e767..57613e5e 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -58,7 +58,6 @@ public: //**USED IN HOOKDLL virtual std::wstring getRegPath() = 0; - virtual std::wstring getBinaryName() = 0; virtual GameInfo::Type getType() = 0; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index ac10b80a..fcdac6bd 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -35,7 +35,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"Oblivion.exe"; } virtual GameInfo::Type getType() { return TYPE_OBLIVION; } diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 65977a69..f26cd065 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -37,7 +37,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual std::wstring getBinaryName() { return L"TESV.exe"; } virtual GameInfo::Type getType() { return TYPE_SKYRIM; } -- cgit v1.3.1 From 408b7933d22dbea35215d5b5b136ce0749b97e12 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 21 Nov 2015 16:32:48 +0000 Subject: Replace GameInfo::path with iPluginGame::gameDirectory (or dataDirectory where applicable) --- src/gameinfoimpl.cpp | 4 ++-- src/gameinfoimpl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index a0dd832e..133c6de6 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -42,12 +42,12 @@ IGameInfo::Type GameInfoImpl::type() const } } - +/* QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); } -/* + QString GameInfoImpl::binaryName() const { return ToQString(GameInfo::instance().getgetBinaryName()); diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index b78321c4..b764b224 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -31,7 +31,7 @@ public: GameInfoImpl(); virtual Type type() const; - virtual QString path() const; +// virtual QString path() const; // virtual QString binaryName() const; }; -- cgit v1.3.1 From 4dbb3b148d874238b0f8dab323f198cc8d4e40c6 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 21 Nov 2015 17:26:34 +0000 Subject: Replace some instances of qApp->property("managed_game") with the saved pointer. Pedantic note: This doesn't help the possibility of supporting multiple executables greatly, we'd have to have a lot of register-for-change events. --- src/mainwindow.cpp | 3 +-- src/organizercore.cpp | 3 +-- src/profile.cpp | 21 ++++++++++----------- src/profile.h | 1 + 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 26ff4b98..84a51b62 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1332,8 +1332,7 @@ void MainWindow::updateBSAList(const QStringList &defaultArchives, const QString std::vector> items; - IPluginGame *gamePlugin = qApp->property("managed_game").value(); - BSAInvalidation *invalidation = gamePlugin->feature(); + BSAInvalidation *invalidation = m_OrganizerCore.managedGame()->feature(); std::vector files = m_OrganizerCore.directoryStructure()->getFiles(); QStringList plugins = m_OrganizerCore.findFiles("", [] (const QString &fileName) -> bool { diff --git a/src/organizercore.cpp b/src/organizercore.cpp index d56f64cb..517a9bfb 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1570,8 +1570,7 @@ void OrganizerCore::prepareStart() { std::vector> OrganizerCore::fileMapping() { - IPluginGame *game = qApp->property("managed_game").value(); - return fileMapping(game->dataDirectory().absolutePath(), + return fileMapping(managedGame()->dataDirectory().absolutePath(), directoryStructure(), directoryStructure()); } diff --git a/src/profile.cpp b/src/profile.cpp index b990fbc1..cf3622b0 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -18,6 +18,7 @@ along with Mod Organizer. If not, see . */ #include "profile.h" + #include "gameinfo.h" #include "windows_error.h" #include "modinfo.h" @@ -30,16 +31,18 @@ along with Mod Organizer. If not, see . #include #include #include + #include #include #include #include + #include +#include #define WIN32_LEAN_AND_MEAN #include #include -#include using namespace MOBase; using namespace MOShared; @@ -47,6 +50,7 @@ using namespace MOShared; Profile::Profile() : m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) + , m_GamePlugin(qApp->property("managed_game").value()) { } @@ -101,6 +105,7 @@ Profile::Profile(const QString &name, IPluginGame *gamePlugin, bool useDefaultSe Profile::Profile(const QDir &directory, IPluginGame *gamePlugin) : m_Directory(directory) + , m_GamePlugin(gamePlugin) , m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) { assert(gamePlugin != nullptr); @@ -568,10 +573,8 @@ void Profile::mergeTweaks(ModInfo::Ptr modInfo, const QString &tweakedIni) const bool Profile::invalidationActive(bool *supported) const { - IPluginGame *gamePlugin = qApp->property("managed_game").value(); - - BSAInvalidation *invalidation = gamePlugin->feature(); - DataArchives *dataArchives = gamePlugin->feature(); + BSAInvalidation *invalidation = m_GamePlugin->feature(); + DataArchives *dataArchives = m_GamePlugin->feature(); if ((invalidation != nullptr) && (dataArchives != nullptr)) { if (supported != nullptr) { @@ -593,9 +596,7 @@ bool Profile::invalidationActive(bool *supported) const void Profile::deactivateInvalidation() { - IPluginGame *gamePlugin = qApp->property("managed_game").value(); - - BSAInvalidation *invalidation = gamePlugin->feature(); + BSAInvalidation *invalidation = m_GamePlugin->feature(); if (invalidation != nullptr) { invalidation->deactivate(this); @@ -605,9 +606,7 @@ void Profile::deactivateInvalidation() void Profile::activateInvalidation() { - IPluginGame *gamePlugin = qApp->property("managed_game").value(); - - BSAInvalidation *invalidation = gamePlugin->feature(); + BSAInvalidation *invalidation = m_GamePlugin->feature(); if (invalidation != nullptr) { invalidation->activate(this); diff --git a/src/profile.h b/src/profile.h index 342b6fa0..9c8139e9 100644 --- a/src/profile.h +++ b/src/profile.h @@ -65,6 +65,7 @@ public: * @param filter save game filter. Defaults to <no filter>. **/ Profile(const QString &name, MOBase::IPluginGame *gamePlugin, bool useDefaultSettings); + /** * @brief constructor * -- cgit v1.3.1 From 159501d0763c3e801d3997d8d4d72accd5f7a9f9 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 22 Nov 2015 08:46:46 +0000 Subject: Removes igameinfo.h from everywhere apart from (sort of) the pythonrunner plugin. Also comment out the filemapping function because it's large and doesn't appear to be used anywhere --- src/gameinfoimpl.cpp | 2 +- src/gameinfoimpl.h | 2 +- src/organizercore.cpp | 3 ++- src/organizercore.h | 6 ++++-- src/profile.cpp | 1 - 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 133c6de6..580ee02c 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -31,6 +31,7 @@ GameInfoImpl::GameInfoImpl() { } +/* IGameInfo::Type GameInfoImpl::type() const { switch (GameInfo::instance().getType()) { @@ -42,7 +43,6 @@ IGameInfo::Type GameInfoImpl::type() const } } -/* QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index b764b224..f3a21669 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -30,7 +30,7 @@ class GameInfoImpl : public MOBase::IGameInfo public: GameInfoImpl(); - virtual Type type() const; +// virtual Type type() const; // virtual QString path() const; // virtual QString binaryName() const; diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 517a9bfb..704dc734 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1568,6 +1568,7 @@ void OrganizerCore::prepareStart() { storeSettings(); } +/* std::vector> OrganizerCore::fileMapping() { return fileMapping(managedGame()->dataDirectory().absolutePath(), @@ -1606,4 +1607,4 @@ std::vector> OrganizerCore::fileMapping( return result; } - +*/ diff --git a/src/organizercore.h b/src/organizercore.h index 3524dcb5..00cf6934 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -157,7 +157,7 @@ public: bool onFinishedRun(const std::function &func); void refreshModList(bool saveChanges = true); - std::vector > fileMapping(); + //std::vector > fileMapping(); public: // IPluginDiagnose interface @@ -210,9 +210,11 @@ private: bool testForSteam(); - std::vector> fileMapping(const QString &dataPath, + /* + * std::vector> fileMapping(const QString &dataPath, const MOShared::DirectoryEntry *base, const MOShared::DirectoryEntry *directoryEntry); +*/ private slots: diff --git a/src/profile.cpp b/src/profile.cpp index cf3622b0..c6a2b43d 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -19,7 +19,6 @@ along with Mod Organizer. If not, see . #include "profile.h" -#include "gameinfo.h" #include "windows_error.h" #include "modinfo.h" #include "safewritefile.h" -- cgit v1.3.1 From efaba9070639dbdc77955784b5de3365c9271738 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 22 Nov 2015 21:18:56 +0000 Subject: Final eradication of igameinfo and adding python wrappers for IPluginGame --- src/CMakeLists.txt | 2 -- src/gameinfoimpl.cpp | 55 -------------------------------------------------- src/gameinfoimpl.h | 39 ----------------------------------- src/mainwindow.cpp | 1 - src/organizer.pro | 2 -- src/organizercore.cpp | 10 +-------- src/organizercore.h | 3 --- src/organizerproxy.cpp | 5 ----- src/organizerproxy.h | 1 - 9 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 src/gameinfoimpl.cpp delete mode 100644 src/gameinfoimpl.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22b725de..8a2964d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,7 +61,6 @@ SET(organizer_SRCS moapplication.cpp profileinputdialog.cpp icondelegate.cpp - gameinfoimpl.cpp csvbuilder.cpp savetextasdialog.cpp qtgroupingproxy.cpp @@ -150,7 +149,6 @@ SET(organizer_HDRS moapplication.h profileinputdialog.h icondelegate.h - gameinfoimpl.h csvbuilder.h savetextasdialog.h qtgroupingproxy.h diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp deleted file mode 100644 index 580ee02c..00000000 --- a/src/gameinfoimpl.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Mod Organizer. If not, see . -*/ - -#include "gameinfoimpl.h" -#include -#include -#include - - -using namespace MOBase; -using namespace MOShared; - - -GameInfoImpl::GameInfoImpl() -{ -} - -/* -IGameInfo::Type GameInfoImpl::type() const -{ - switch (GameInfo::instance().getType()) { - case GameInfo::TYPE_OBLIVION: return IGameInfo::TYPE_OBLIVION; - case GameInfo::TYPE_FALLOUT3: return IGameInfo::TYPE_FALLOUT3; - case GameInfo::TYPE_FALLOUTNV: return IGameInfo::TYPE_FALLOUTNV; - case GameInfo::TYPE_SKYRIM: return IGameInfo::TYPE_SKYRIM; - default: throw MyException(QObject::tr("invalid game type %1").arg(GameInfo::instance().getType())); - } -} - -QString GameInfoImpl::path() const -{ - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); -} - -QString GameInfoImpl::binaryName() const -{ - return ToQString(GameInfo::instance().getgetBinaryName()); -} -*/ diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h deleted file mode 100644 index f3a21669..00000000 --- a/src/gameinfoimpl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Mod Organizer. If not, see . -*/ - -#ifndef GAMEINFOIMPL_H -#define GAMEINFOIMPL_H - - -#include -#include - - -class GameInfoImpl : public MOBase::IGameInfo -{ -public: - GameInfoImpl(); - -// virtual Type type() const; -// virtual QString path() const; -// virtual QString binaryName() const; - -}; - -#endif // GAMEINFOIMPL_H diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 84a51b62..7142bcb1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -52,7 +52,6 @@ along with Mod Organizer. If not, see . #include "credentialsdialog.h" #include "selectiondialog.h" #include "csvbuilder.h" -#include "gameinfoimpl.h" #include "savetextasdialog.h" #include "problemsdialog.h" #include "previewdialog.h" diff --git a/src/organizer.pro b/src/organizer.pro index 65c1e4d3..2869fda5 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -70,7 +70,6 @@ SOURCES += \ moapplication.cpp \ profileinputdialog.cpp \ icondelegate.cpp \ - gameinfoimpl.cpp \ csvbuilder.cpp \ savetextasdialog.cpp \ qtgroupingproxy.cpp \ @@ -145,7 +144,6 @@ HEADERS += \ moapplication.h \ profileinputdialog.h \ icondelegate.h \ - gameinfoimpl.h \ csvbuilder.h \ savetextasdialog.h \ qtgroupingproxy.h \ diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 704dc734..826d5bea 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1,7 +1,6 @@ #include "organizercore.h" #include "mainwindow.h" -#include "gameinfoimpl.h" #include "messagedialog.h" #include "logbuffer.h" #include "credentialsdialog.h" @@ -119,8 +118,7 @@ QStringList toStringList(InputIterator current, InputIterator end) OrganizerCore::OrganizerCore(const QSettings &initSettings) - : m_GameInfo(new GameInfoImpl()) - , m_UserInterface(nullptr) + : m_UserInterface(nullptr) , m_PluginContainer(nullptr) , m_GameName() , m_CurrentProfile(nullptr) @@ -187,7 +185,6 @@ OrganizerCore::~OrganizerCore() m_ModList.setProfile(nullptr); NexusInterface::instance()->cleanup(); - delete m_GameInfo; delete m_DirectoryStructure; } @@ -556,11 +553,6 @@ void OrganizerCore::setCurrentProfile(const QString &profileName) refreshDirectoryStructure(); } -MOBase::IGameInfo &OrganizerCore::gameInfo() const -{ - return *m_GameInfo; -} - MOBase::IModRepositoryBridge *OrganizerCore::createNexusBridge() const { return new NexusBridge(); diff --git a/src/organizercore.h b/src/organizercore.h index 00cf6934..6075eb18 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -126,7 +126,6 @@ public: MOBase::DelayedFileWriter &pluginsWriter() { return m_PluginListsWriter; } public: - MOBase::IGameInfo &gameInfo() const; MOBase::IModRepositoryBridge *createNexusBridge() const; QString profileName() const; QString profilePath() const; @@ -231,8 +230,6 @@ private: private: - MOBase::IGameInfo *m_GameInfo; - IUserInterface *m_UserInterface; PluginContainer *m_PluginContainer; QString m_GameName; diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 17c5a16f..3c103ff0 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -15,11 +15,6 @@ OrganizerProxy::OrganizerProxy(OrganizerCore *organizer, const QString &pluginNa { } -IGameInfo &OrganizerProxy::gameInfo() const -{ - return m_Proxied->gameInfo(); -} - IModRepositoryBridge *OrganizerProxy::createNexusBridge() const { return new NexusBridge(m_PluginName); diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 31009c8a..2f5e0970 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -12,7 +12,6 @@ public: OrganizerProxy(OrganizerCore *organizer, const QString &pluginName); - virtual MOBase::IGameInfo &gameInfo() const; virtual MOBase::IModRepositoryBridge *createNexusBridge() const; virtual QString profileName() const; virtual QString profilePath() const; -- cgit v1.3.1 From 2a50683133953edd80606aedbdd93a7f10d4a7d8 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Mon, 23 Nov 2015 13:35:48 +0000 Subject: Removed 'requiresSteam' which is only used in one place and might or might not be game related --- src/organizercore.cpp | 5 ++++- src/shared/gameinfo.cpp | 5 ----- src/shared/gameinfo.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 826d5bea..ee69c46b 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -950,7 +950,10 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary, const QString & ::SetEnvironmentVariableW(L"SteamAPPId", ToWString(m_Settings.getSteamAppID()).c_str()); } - if ((GameInfo::instance().requiresSteam()) + + //This could possibly be extracted somewhere else but it's probably for when + //we have more than one provider of game registration. + if (QFileInfo(managedGame()->gameDirectory().absoluteFilePath("steam_api.dll")).exists() && (m_Settings.getLoadMechanism() == LoadMechanism::LOAD_MODORGANIZER)) { if (!testForSteam()) { QWidget *window = qApp->activeWindow(); diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 703f4a40..2890e9cc 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -135,11 +135,6 @@ std::wstring GameInfo::getGameDirectory() const return m_GameDirectory; } -bool GameInfo::requiresSteam() const -{ - return FileExists(getGameDirectory() + L"\\steam_api.dll"); -} - std::wstring GameInfo::getLocalAppFolder() const { wchar_t localAppFolder[MAX_PATH]; diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 57613e5e..e1a70597 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -71,8 +71,6 @@ public: //**USED IN HOOKDLL virtual std::wstring getGameDirectory() const; - virtual bool requiresSteam() const; - // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; -- cgit v1.3.1 From 3659284ab6bdbf0845cf846600a26db688584d6f Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Mon, 23 Nov 2015 18:32:30 +0000 Subject: Remove most instances of GameInfo::getname, and transfer getDLCPlugins to the plugingame interface Also commented out startDownloadNexusFile as it doesn't appear to be used anywhere --- src/downloadmanager.cpp | 3 ++- src/downloadmanager.h | 2 ++ src/mainwindow.cpp | 2 +- src/modinfo.cpp | 24 +++++++++++++++--------- src/modinfo.h | 18 +++++++++++------- src/organizercore.cpp | 8 ++++---- src/shared/fallout3info.cpp | 10 ---------- src/shared/fallout3info.h | 1 - src/shared/falloutnvinfo.cpp | 14 -------------- src/shared/falloutnvinfo.h | 34 ---------------------------------- src/shared/gameinfo.h | 3 --- src/shared/oblivioninfo.cpp | 23 ----------------------- src/shared/oblivioninfo.h | 35 ----------------------------------- src/shared/skyriminfo.cpp | 11 ----------- src/shared/skyriminfo.h | 2 -- 15 files changed, 35 insertions(+), 155 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index bc78cdc6..e0d76765 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1235,13 +1235,14 @@ int DownloadManager::startDownloadURLs(const QStringList &urls) return m_ActiveDownloads.size() - 1; } +/* This doesn't appear to be used by anything int DownloadManager::startDownloadNexusFile(int modID, int fileID) { int newID = m_ActiveDownloads.size(); addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(ToQString(MOShared::GameInfo::instance().getGameName())).arg(modID).arg(fileID)); return newID; } - +*/ QString DownloadManager::downloadPath(int id) { return getFilePath(id); diff --git a/src/downloadmanager.h b/src/downloadmanager.h index 57bd592d..f13cc65d 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -328,7 +328,9 @@ public: virtual int startDownloadURLs(const QStringList &urls); + /* This doesn't appear to be used anywhere virtual int startDownloadNexusFile(int modID, int fileID); + */ virtual QString downloadPath(int id); /** diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7142bcb1..3c331c65 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -358,7 +358,7 @@ MainWindow::~MainWindow() void MainWindow::updateWindowTitle(const QString &accountName, bool premium) { QString title = QString("%1 Mod Organizer v%2").arg( - ToQString(GameInfo::instance().getGameName()), + m_OrganizerCore.managedGame()->gameName(), m_OrganizerCore.getVersion().displayString()); if (accountName.isEmpty()) { diff --git a/src/modinfo.cpp b/src/modinfo.cpp index e0d888e6..59205b12 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -203,7 +203,7 @@ unsigned int ModInfo::findMod(const boost::function &filter } -void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **directoryStructure, bool displayForeign) +void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **directoryStructure, bool displayForeign, MOBase::IPluginGame const *game) { QMutexLocker lock(&s_Mutex); s_Collection.clear(); @@ -219,19 +219,25 @@ void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **direc } { // list plugins in the data directory and make a foreign-managed mod out of each - std::vector dlcPlugins = GameInfo::instance().getDLCPlugins(); - QDir dataDir(QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"); - foreach (const QFileInfo &file, dataDir.entryInfoList(QStringList() << "*.esp" << "*.esm")) { - if ((file.baseName() != "Update") // hide update - && (file.baseName() != ToQString(GameInfo::instance().getGameName())) // hide the game esp + QStringList dlcPlugins = game->getDLCPlugins(); + QStringList mainPlugins = game->getPrimaryPlugins(); + QDir dataDir(game->dataDirectory()); + for (const QString &file : dataDir.entryList({ "*.esp", "*.esm" })) { + if (std::find_if(mainPlugins.begin(), mainPlugins.end(), + [&file](QString const &p) { + return p.compare(file, Qt::CaseInsensitive) == 0; }) == mainPlugins.end() && (displayForeign // show non-dlc bundles only if the user wants them - || std::find(dlcPlugins.begin(), dlcPlugins.end(), ToWString(file.fileName())) != dlcPlugins.end())) { + || std::find_if(dlcPlugins.begin(), dlcPlugins.end(), + [&file](QString const &p) { + return p.compare(file, Qt::CaseInsensitive) == 0; }) != dlcPlugins.end())) { + + QFileInfo f(file); //Just so I can get a basename... QStringList archives; - foreach (const QString archiveName, dataDir.entryList(QStringList() << file.baseName() + "*.bsa")) { + for (const QString &archiveName : dataDir.entryList({ f.baseName() + "*.bsa" })) { archives.append(dataDir.absoluteFilePath(archiveName)); } - createFromPlugin(file.fileName(), archives, directoryStructure); + createFromPlugin(file, archives, directoryStructure); } } } diff --git a/src/modinfo.h b/src/modinfo.h index da97b09b..6de4123b 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -23,19 +23,23 @@ along with Mod Organizer. If not, see . #include "nexusinterface.h" #include #include +//#include -#include +#include +class QDir; #include -#include -#include #include -#include +#include +#include + +#include + #include #include #include -#include -using MOBase::ModRepositoryFileInfo; +namespace MOBase { class IPluginGame; } +namespace MOShared { class DirectoryEntry; } /** * @brief Represents meta information about a single mod. @@ -103,7 +107,7 @@ public: /** * @brief read the mod directory and Mod ModInfo objects for all subdirectories **/ - static void updateFromDisc(const QString &modDirectory, MOShared::DirectoryEntry **directoryStructure, bool displayForeign); + static void updateFromDisc(const QString &modDirectory, MOShared::DirectoryEntry **directoryStructure, bool displayForeign, const MOBase::IPluginGame *game); static void clear() { s_Collection.clear(); s_ModsByName.clear(); s_ModsByModID.clear(); } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index ee69c46b..7a2f95d3 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -320,7 +320,7 @@ void OrganizerCore::updateExecutablesList(QSettings &settings) return; } - m_ExecutablesList.init(m_PluginContainer->managedGame(ToQString(GameInfo::instance().getGameName()))); + m_ExecutablesList.init(managedGame()); qDebug("setting up configured executables"); @@ -348,7 +348,7 @@ void OrganizerCore::updateExecutablesList(QSettings &settings) settings.endArray(); // TODO this has nothing to do with executables list move to an appropriate function! - ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign()); + ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign(), managedGame()); } void OrganizerCore::setUserInterface(IUserInterface *userInterface, QWidget *widget) @@ -1125,7 +1125,7 @@ void OrganizerCore::refreshModList(bool saveChanges) if (saveChanges) { m_CurrentProfile->modlistWriter().writeImmediately(true); } - ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign()); + ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign(), managedGame()); m_CurrentProfile->refreshModStatus(); @@ -1367,7 +1367,7 @@ void OrganizerCore::directory_refreshed() void OrganizerCore::profileRefresh() { // have to refresh mods twice (again in refreshModList), otherwise the refresh isn't complete. Not sure why - ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign()); + ModInfo::updateFromDisc(m_Settings.getModDirectory(), &m_DirectoryStructure, m_Settings.displayForeign(), managedGame()); m_CurrentProfile->refreshModStatus(); refreshModList(); diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 9c6ad5b9..95d1d299 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -63,16 +63,6 @@ std::wstring Fallout3Info::getRegPathStatic() } -std::vector Fallout3Info::getDLCPlugins() -{ - return boost::assign::list_of (L"ThePitt.esm") - (L"Anchorage.esm") - (L"BrokenSteel.esm") - (L"PointLookout.esm") - (L"Zeta.esm") - ; -} - std::vector Fallout3Info::getSavegameAttachmentExtensions() { return std::vector(); diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 90bb6ec0..ae6a27c7 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -43,7 +43,6 @@ public: virtual std::wstring getGameName() const { return L"Fallout 3"; } virtual std::wstring getGameShortName() const { return L"Fallout3"; } - virtual std::vector getDLCPlugins(); virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 4601caf5..b5fb4f04 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -63,20 +63,6 @@ std::wstring FalloutNVInfo::getRegPathStatic() } } -std::vector FalloutNVInfo::getDLCPlugins() -{ - return boost::assign::list_of (L"DeadMoney.esm") - (L"HonestHearts.esm") - (L"OldWorldBlues.esm") - (L"LonesomeRoad.esm") - (L"GunRunnersArsenal.esm") - (L"CaravanPack.esm") - (L"ClassicPack.esm") - (L"MercenaryPack.esm") - (L"TribalPack.esm") - ; -} - std::vector FalloutNVInfo::getSavegameAttachmentExtensions() { return std::vector(); diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 613694b2..2179bf2f 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -43,40 +43,6 @@ public: virtual std::wstring getGameName() const { return L"New Vegas"; } virtual std::wstring getGameShortName() const { return L"FalloutNV"; } -// virtual bool requiresSteam() const { return true; } - -/* virtual std::wstring getInvalidationBSA() - { - return L"Fallout - Invalidation.bsa"; - } - - virtual bool isInvalidationBSA(const std::wstring &bsaName) - { - static LPCWSTR invalidation[] = { L"Fallout - AI!.bsa", L"Fallout - Invalidation.bsa", nullptr }; - - for (int i = 0; invalidation[i] != nullptr; ++i) { - if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) { - return true; - } - } - return false; - } - - virtual std::vector getVanillaBSAs() - { - return boost::assign::list_of (L"Fallout - Textures.bsa") - (L"Fallout - Textures2.bsa") - (L"Fallout - Meshes.bsa") - (L"Fallout - Voices1.bsa") - (L"Fallout - Sound.bsa") - (L"Fallout - Misc.bsa"); - } - - virtual std::vector getPrimaryPlugins() - { - return boost::assign::list_of(L"falloutnv.esm"); - }*/ - virtual std::vector getDLCPlugins(); virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index e1a70597..9ae42159 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -74,9 +74,6 @@ public: // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; - // get a set of esp/esm files that are part of known dlcs - virtual std::vector getDLCPlugins() = 0; - //**USED IN HOOKDLL // file name of this games ini file(s) virtual std::vector getIniFileNames() = 0; diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 4b0a8499..27de1275 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -66,29 +66,6 @@ std::wstring OblivionInfo::getRegPathStatic() - - - - - - - -std::vector OblivionInfo::getDLCPlugins() -{ - return boost::assign::list_of (L"DLCShiveringIsles.esp") - (L"Knights.esp") - (L"DLCFrostcrag.esp") - (L"DLCSpellTomes.esp") - (L"DLCMehrunesRazor.esp") - (L"DLCOrrery.esp") - (L"DLCSpellTomes.esp") - (L"DLCThievesDen.esp") - (L"DLCVileLair.esp") - (L"DLCHorseArmor.esp") - ; -} - - std::vector OblivionInfo::getSavegameAttachmentExtensions() { return boost::assign::list_of(L"obse"); diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index fcdac6bd..2a550e0e 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -40,41 +40,6 @@ public: virtual std::wstring getGameName() const { return L"Oblivion"; } virtual std::wstring getGameShortName() const { return L"Oblivion"; } -/* - virtual std::wstring getInvalidationBSA() - { - return L"Oblivion - Invalidation.bsa"; - } - - virtual bool isInvalidationBSA(const std::wstring &bsaName) - { - static LPCWSTR invalidation[] = { L"Oblivion - Invalidation.bsa", L"ArchiveInvalidationInvalidated!.bsa", - L"BSARedirection.bsa", nullptr }; - - for (int i = 0; invalidation[i] != nullptr; ++i) { - if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) { - return true; - } - } - return false; - } - - virtual std::vector getVanillaBSAs() - { - return boost::assign::list_of(L"Oblivion - Meshes.bsa") - (L"Oblivion - Textures - Compressed.bsa") - (L"Oblivion - Sounds.bsa") - (L"Oblivion - Voices1.bsa") - (L"Oblivion - Voices2.bsa") - (L"Oblivion - Misc.bsa"); - } - - virtual std::vector getPrimaryPlugins() - { - return boost::assign::list_of(L"oblivion.esm"); - }*/ - - virtual std::vector getDLCPlugins(); virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index bd901357..189d2ed0 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -91,17 +91,6 @@ GameInfo::LoadOrderMechanism SkyrimInfo::getLoadOrderMechanism() const } } -std::vector SkyrimInfo::getDLCPlugins() -{ - return boost::assign::list_of (L"Dawnguard.esm") - (L"Dragonborn.esm") - (L"HearthFires.esm") - (L"HighResTexturePack01.esp") - (L"HighResTexturePack02.esp") - (L"HighResTexturePack03.esp") - ; -} - std::vector SkyrimInfo::getSavegameAttachmentExtensions() { return boost::assign::list_of(L"skse"); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index f26cd065..741f76c9 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -45,8 +45,6 @@ public: virtual LoadOrderMechanism getLoadOrderMechanism() const; - virtual std::vector getDLCPlugins(); - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) -- cgit v1.3.1 From 37c3bea7dd5a562a97c00b740103cc2868b3013b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 06:58:29 +0000 Subject: Removes all uses of GameInfo::getShortName, replaced by IPluginGame::getNexustName --- src/downloadmanager.cpp | 11 +++++++++-- src/downloadmanager.h | 4 ++++ src/mainwindow.cpp | 18 +++++++++--------- src/organizercore.cpp | 1 + src/settings.cpp | 14 +++++--------- src/shared/fallout3info.h | 1 - src/shared/falloutnvinfo.h | 1 - src/shared/gameinfo.h | 1 - src/shared/oblivioninfo.h | 2 +- src/shared/skyriminfo.h | 1 - 10 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index e0d76765..588b8bb9 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -18,10 +18,11 @@ along with Mod Organizer. If not, see . */ #include "downloadmanager.h" + #include "nxmurl.h" #include "nexusinterface.h" #include "nxmaccessmanager.h" -#include +#include "iplugingame.h" #include #include #include "utility.h" @@ -30,6 +31,7 @@ along with Mod Organizer. If not, see . #include "bbcode.h" #include #include + #include #include #include @@ -37,6 +39,7 @@ along with Mod Organizer. If not, see . #include #include #include + #include #include @@ -447,7 +450,7 @@ void DownloadManager::addNXMDownload(const QString &url) { NXMUrl nxmInfo(url); - QString managedGame = ToQString(MOShared::GameInfo::instance().getGameShortName()); + QString managedGame = m_ManagedGame->getNexusName(); qDebug("add nxm download: %s", qPrintable(url)); if (nxmInfo.game().compare(managedGame, Qt::CaseInsensitive) != 0) { qDebug("download requested for wrong game (game: %s, url: %s)", qPrintable(managedGame), qPrintable(nxmInfo.game())); @@ -1462,3 +1465,7 @@ void DownloadManager::directoryChanged(const QString&) refreshList(); } +void DownloadManager::managedGameChanged(MOBase::IPluginGame *managedGame) +{ + m_ManagedGame = managedGame; +} diff --git a/src/downloadmanager.h b/src/downloadmanager.h index f13cc65d..faa4267e 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -35,6 +35,7 @@ along with Mod Organizer. If not, see . #include #include +namespace MOBase { class IPluginGame; } class NexusInterface; @@ -416,6 +417,8 @@ public slots: void nxmRequestFailed(int modID, int fileID, QVariant userData, int requestID, const QString &errorString); + void managedGameChanged(MOBase::IPluginGame *gamePlugin); + private slots: void downloadProgress(qint64 bytesReceived, qint64 bytesTotal); @@ -503,6 +506,7 @@ private: QRegExp m_DateExpression; + MOBase::IPluginGame *m_ManagedGame; }; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3c331c65..ceb118ea 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -58,10 +58,8 @@ along with Mod Organizer. If not, see . #include "browserdialog.h" #include "aboutdialog.h" #include "safewritefile.h" -#include "organizerproxy.h" #include "nxmaccessmanager.h" #include -#include #include #include #include @@ -70,15 +68,11 @@ along with Mod Organizer. If not, see . #include #include #include -#include -#include -#include -#include + #include #include #include #include -#include #include #include #include @@ -126,8 +120,14 @@ along with Mod Organizer. If not, see . #include #include #endif + +#include #include #include +#include +#include +#include +#include #ifdef TEST_MODELS #include "modeltest.h" @@ -4391,8 +4391,8 @@ void MainWindow::on_bossButton_clicked() parameters << "--unattended" << "--stdout" << "--noreport" - << "--game" << ToQString(GameInfo::instance().getGameShortName()) - << "--gamePath" << QString("\"%1\"").arg(ToQString(GameInfo::instance().getGameDirectory())) + << "--game" << m_OrganizerCore.managedGame()->getNexusName() + << "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath()) << "--out" << outPath; if (m_DidUpdateMasterList) { diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 7a2f95d3..c81a473c 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -159,6 +159,7 @@ OrganizerCore::OrganizerCore(const QSettings &initSettings) connect(NexusInterface::instance()->getAccessManager(), SIGNAL(loginFailed(QString)), this, SLOT(loginFailed(QString))); connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_Settings, SLOT(managedGameChanged(MOBase::IPluginGame*))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_DownloadManager, SLOT(managedGameChanged(MOBase::IPluginGame*))); connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter, &DelayedFileWriterBase::write); diff --git a/src/settings.cpp b/src/settings.cpp index 4c2a34c8..61d6aaa3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -23,25 +23,21 @@ along with Mod Organizer. If not, see . #include "utility.h" #include "helper.h" #include "json.h" -#include #include #include #include #include -#include -#include -#include #include -#include #include +#include +#include +#include +#include #include - using namespace MOBase; -using namespace MOShared; - template class QListWidgetItemEx : public QListWidgetItem { @@ -112,7 +108,7 @@ void Settings::registerAsNXMHandler(bool force) std::wstring nxmPath = ToWString(QCoreApplication::applicationDirPath() + "/nxmhandler.exe"); std::wstring executable = ToWString(QCoreApplication::applicationFilePath()); std::wstring mode = force ? L"forcereg" : L"reg"; - std::wstring parameters = mode + L" " + GameInfo::instance().getGameShortName() + L" \"" + executable + L"\""; + std::wstring parameters = mode + L" " + m_GamePlugin->getNexusName().toStdWString() + L" \"" + executable + L"\""; HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL); if ((int)res <= 32) { QMessageBox::critical(nullptr, tr("Failed"), diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index ae6a27c7..ed130e53 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -41,7 +41,6 @@ public: virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } virtual std::wstring getGameName() const { return L"Fallout 3"; } - virtual std::wstring getGameShortName() const { return L"Fallout3"; } virtual std::vector getSavegameAttachmentExtensions(); diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 2179bf2f..75febd4c 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -41,7 +41,6 @@ public: virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } virtual std::wstring getGameName() const { return L"New Vegas"; } - virtual std::wstring getGameShortName() const { return L"FalloutNV"; } virtual std::vector getSavegameAttachmentExtensions(); diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 9ae42159..9538a19c 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -62,7 +62,6 @@ public: virtual GameInfo::Type getType() = 0; virtual std::wstring getGameName() const = 0; - virtual std::wstring getGameShortName() const = 0; /// determine the load order mechanism used by this game. this may throw an /// exception if the mechanism can't be determined diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 2a550e0e..a9808d77 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -39,7 +39,7 @@ public: virtual GameInfo::Type getType() { return TYPE_OBLIVION; } virtual std::wstring getGameName() const { return L"Oblivion"; } - virtual std::wstring getGameShortName() const { return L"Oblivion"; } + virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 741f76c9..1bf67c11 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -41,7 +41,6 @@ public: virtual GameInfo::Type getType() { return TYPE_SKYRIM; } virtual std::wstring getGameName() const { return L"Skyrim"; } - virtual std::wstring getGameShortName() const { return L"Skyrim"; } virtual LoadOrderMechanism getLoadOrderMechanism() const; -- cgit v1.3.1 From a7ef08965097fb4b863c99de2d6291733b4bc3c0 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 09:45:45 +0000 Subject: Use IPluginGame::getIniFiles throughout. Also removed the default constructor from Profile class and stopped registering it as a QMetaObject (which it is the only reason it is there). --- src/mainwindow.cpp | 8 +++++--- src/profile.cpp | 10 +--------- src/profile.h | 15 +++------------ 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ceb118ea..c08993c1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1258,9 +1258,11 @@ QDir MainWindow::currentSavesDir() const savesDir.setPath(m_OrganizerCore.currentProfile()->absolutePath() + "/saves"); } else { wchar_t path[MAX_PATH]; - ::GetPrivateProfileStringW(L"General", L"SLocalSavePath", L"Saves", - path, MAX_PATH, - (ToWString(m_OrganizerCore.currentProfile()->absolutePath()) + L"\\" + GameInfo::instance().getIniFileNames().at(0)).c_str()); + ::GetPrivateProfileStringW( + L"General", L"SLocalSavePath", L"Saves", + path, MAX_PATH, + ToWString(m_OrganizerCore.currentProfile()->absolutePath() + "/" + + m_OrganizerCore.managedGame()->getIniFiles()[0]).c_str()); savesDir.setPath(m_OrganizerCore.managedGame()->documentsDirectory().absoluteFilePath(QString::fromWCharArray(path))); } diff --git a/src/profile.cpp b/src/profile.cpp index c6a2b43d..42dc56d1 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -46,13 +46,6 @@ along with Mod Organizer. If not, see . using namespace MOBase; using namespace MOShared; - -Profile::Profile() - : m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) - , m_GamePlugin(qApp->property("managed_game").value()) -{ -} - void Profile::touchFile(QString fileName) { QFile modList(m_Directory.filePath(fileName)); @@ -679,8 +672,7 @@ QString Profile::getDeleterFileName() const QString Profile::getIniFileName() const { - std::wstring primaryIniFile = *(GameInfo::instance().getIniFileNames().begin()); - return m_Directory.absoluteFilePath(ToQString(primaryIniFile)); + return m_Directory.absoluteFilePath(m_GamePlugin->getIniFiles()[0]); } QString Profile::getProfileTweaks() const diff --git a/src/profile.h b/src/profile.h index 9c8139e9..e9edca56 100644 --- a/src/profile.h +++ b/src/profile.h @@ -24,17 +24,16 @@ along with Mod Organizer. If not, see . #include "modinfo.h" #include #include + #include #include -#include #include + #include #include -namespace MOBase { - class IPluginGame; -} +namespace MOBase { class IPluginGame; } /** * @brief represents a profile @@ -50,12 +49,6 @@ public: public: - /** - * @brief default constructor - * @todo This constructor initialised nothing, the resulting object is not usable - **/ - Profile(); - /** * @brief constructor * @@ -320,7 +313,5 @@ private: }; -Q_DECLARE_METATYPE(Profile) - #endif // PROFILE_H -- cgit v1.3.1 From 91576257bc7b4d29231e3a8883f00ddcbfdf069b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 09:50:02 +0000 Subject: Updated comments so I can see where I'm going --- src/shared/gameinfo.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 9538a19c..2839a765 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -59,8 +59,10 @@ public: //**USED IN HOOKDLL virtual std::wstring getRegPath() = 0; + //**Used only in savegame which needs refactoring a lot. virtual GameInfo::Type getType() = 0; + //**Currently only used in a nasty mess at initialisation time. virtual std::wstring getGameName() const = 0; /// determine the load order mechanism used by this game. this may throw an @@ -73,11 +75,11 @@ public: // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL // file name of this games ini file(s) virtual std::vector getIniFileNames() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual std::wstring getReferenceDataFile() = 0; virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; @@ -85,7 +87,7 @@ public: virtual int getNexusModID() = 0; virtual int getNexusGameID() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; public: -- cgit v1.3.1 From d4a287a4ccbf377c130df35e869b42b1a4599381 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 09:50:02 +0000 Subject: Updated comments so I can see where I'm going --- src/shared/gameinfo.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 9538a19c..c3fec128 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -56,11 +56,13 @@ public: virtual ~GameInfo() {} - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual std::wstring getRegPath() = 0; + //**Used only in savegame which needs refactoring a lot. virtual GameInfo::Type getType() = 0; + //**Currently only used in a nasty mess at initialisation time. virtual std::wstring getGameName() const = 0; /// determine the load order mechanism used by this game. this may throw an @@ -73,11 +75,11 @@ public: // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL // file name of this games ini file(s) virtual std::vector getIniFileNames() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual std::wstring getReferenceDataFile() = 0; virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; @@ -85,7 +87,7 @@ public: virtual int getNexusModID() = 0; virtual int getNexusGameID() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; public: -- cgit v1.3.1 From c7d583bcf1eeb08182f5f7610690ba104e0f8a84 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 14:21:19 +0000 Subject: Replace GameInfo::getLoadorderMechanism with IPluginGame::getLoadOrderMechanism --- src/mainwindow.cpp | 4 ++-- src/organizercore.cpp | 5 +++-- src/pluginlist.cpp | 11 ++++++++--- src/pluginlist.h | 12 ++++++++++++ src/shared/gameinfo.h | 4 ---- src/shared/skyriminfo.cpp | 18 ------------------ src/shared/skyriminfo.h | 2 -- 7 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c08993c1..1651d0c6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4527,12 +4527,12 @@ void MainWindow::on_bossButton_clicked() // if the game specifies load order by file time, our own load order file needs to be removed because it's outdated. // refreshESPList will then use the file time as the load order. - if (GameInfo::instance().getLoadOrderMechanism() == GameInfo::TYPE_FILETIME) { + if (m_OrganizerCore.managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) { qDebug("removing loadorder.txt"); QFile::remove(m_OrganizerCore.currentProfile()->getLoadOrderFileName()); } m_OrganizerCore.refreshESPList(); - if (GameInfo::instance().getLoadOrderMechanism() == GameInfo::TYPE_FILETIME) { + if (m_OrganizerCore.managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) { // the load order should have been retrieved from file time, now save it to our own format m_OrganizerCore.savePluginList(); } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c81a473c..24077923 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -160,6 +160,7 @@ OrganizerCore::OrganizerCore(const QSettings &initSettings) connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_Settings, SLOT(managedGameChanged(MOBase::IPluginGame*))); connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_DownloadManager, SLOT(managedGameChanged(MOBase::IPluginGame*))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame*))); connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter, &DelayedFileWriterBase::write); @@ -920,12 +921,12 @@ void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &argument refreshDirectoryStructure(); // need to remove our stored load order because it may be outdated if a foreign tool changed the // file time. After removing that file, refreshESPList will use the file time as the order - if (GameInfo::instance().getLoadOrderMechanism() == GameInfo::TYPE_FILETIME) { + if (managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) { qDebug("removing loadorder.txt"); QFile::remove(m_CurrentProfile->getLoadOrderFileName()); } refreshESPList(); - if (GameInfo::instance().getLoadOrderMechanism() == GameInfo::TYPE_FILETIME) { + if (managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) { // the load order should have been retrieved from file time, now save it to our own format savePluginList(); } diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index e7d493a7..6f883645 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -128,7 +128,7 @@ void PluginList::refresh(const QString &profileName m_ESPsByPriority.clear(); m_ESPs.clear(); - QStringList primaryPlugins = qApp->property("managed_game").value()->getPrimaryPlugins(); + QStringList primaryPlugins = m_GamePlugin->getPrimaryPlugins(); m_CurrentProfile = profileName; @@ -313,7 +313,7 @@ bool PluginList::readLoadOrder(const QString &fileName) int priority = 0; - QStringList primaryPlugins = qApp->property("managed_game").value()->getPrimaryPlugins(); + QStringList primaryPlugins = m_GamePlugin->getPrimaryPlugins(); for (const QString &plugin : primaryPlugins) { if (availableESPs.find(plugin) != availableESPs.end()) { m_ESPLoadOrder[plugin] = priority++; @@ -504,7 +504,7 @@ void PluginList::saveTo(const QString &pluginFileName bool PluginList::saveLoadOrder(DirectoryEntry &directoryStructure) { - if (GameInfo::instance().getLoadOrderMechanism() != GameInfo::TYPE_FILETIME) { + if (m_GamePlugin->getLoadOrderMechanism() != IPluginGame::LoadOrderMechanism::FileTime) { // nothing to do return true; } @@ -1210,3 +1210,8 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled, m_IsDummy = false; } } + +void PluginList::managedGameChanged(IPluginGame *gamePlugin) +{ + m_GamePlugin = gamePlugin; +} diff --git a/src/pluginlist.h b/src/pluginlist.h index f8972f05..01d4bfbe 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -22,16 +22,20 @@ along with Mod Organizer. If not, see . #include #include +namespace MOBase { class IPluginGame; } + #include #include #include #include + #pragma warning(push) #pragma warning(disable: 4100) #ifndef Q_MOC_RUN #include #include #endif + #include #include @@ -253,6 +257,12 @@ public slots: **/ void disableAll(); + /** + * @brief The currently managed game has changed + * @param gamePlugin + */ + void managedGameChanged(MOBase::IPluginGame *gamePlugin); + signals: /** @@ -337,6 +347,8 @@ private: QTemporaryFile m_TempFile; + MOBase::IPluginGame *m_GamePlugin; + }; #pragma warning(pop) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index c3fec128..06b96d61 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -65,10 +65,6 @@ public: //**Currently only used in a nasty mess at initialisation time. virtual std::wstring getGameName() const = 0; - /// determine the load order mechanism used by this game. this may throw an - /// exception if the mechanism can't be determined - virtual LoadOrderMechanism getLoadOrderMechanism() const { return TYPE_FILETIME; } - //**USED IN HOOKDLL virtual std::wstring getGameDirectory() const; diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index 189d2ed0..f7fba7ab 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -73,24 +73,6 @@ std::wstring SkyrimInfo::getRegPathStatic() } } -GameInfo::LoadOrderMechanism SkyrimInfo::getLoadOrderMechanism() const -{ - std::wstring fileName = getGameDirectory() + L"\\TESV.exe"; - - try { - VS_FIXEDFILEINFO versionInfo = GetFileVersion(fileName); - if ((versionInfo.dwFileVersionMS > 0x10004) || // version >= 1.5.x? - ((versionInfo.dwFileVersionMS == 0x10004) && (versionInfo.dwFileVersionLS >= 0x1A0000))) { // version >= ?.4.26 - return TYPE_PLUGINSTXT; - } else { - return TYPE_FILETIME; - } - } catch (const std::exception &e) { - log("TESV.exe is invalid: %s", e.what()); - return TYPE_FILETIME; - } -} - std::vector SkyrimInfo::getSavegameAttachmentExtensions() { return boost::assign::list_of(L"skse"); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 1bf67c11..13c82456 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -42,8 +42,6 @@ public: virtual std::wstring getGameName() const { return L"Skyrim"; } - virtual LoadOrderMechanism getLoadOrderMechanism() const; - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) -- cgit v1.3.1 From 42a68689fe60ba29367dc0c8f65083d9bde93e1f Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 24 Nov 2015 16:16:57 +0000 Subject: Replace GameInfo::getNexusModID with IPluginGame::getNexusModOrganizerID() Also implement IPluginGame::getNexusGameID() but not hooked it in yet. --- src/mainwindow.cpp | 5 +++-- src/modinfo.cpp | 5 ++++- src/shared/fallout3info.cpp | 5 ----- src/shared/fallout3info.h | 2 -- src/shared/falloutnvinfo.cpp | 6 ------ src/shared/falloutnvinfo.h | 2 -- src/shared/gameinfo.h | 2 +- src/shared/oblivioninfo.cpp | 5 ----- src/shared/oblivioninfo.h | 2 -- src/shared/skyriminfo.h | 1 - 10 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1651d0c6..5856f57f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3813,7 +3813,8 @@ void MainWindow::on_actionEndorseMO_triggered() if (QMessageBox::question(this, tr("Endorse Mod Organizer"), tr("Do you want to endorse Mod Organizer on %1 now?").arg(ToQString(GameInfo::instance().getNexusPage())), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { - NexusInterface::instance()->requestToggleEndorsement(GameInfo::instance().getNexusModID(), true, this, QVariant(), QString()); + NexusInterface::instance()->requestToggleEndorsement( + m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString()); } } @@ -3877,7 +3878,7 @@ void MainWindow::nxmUpdatesAvailable(const std::vector &modIDs, QVariant us QVariantList resultList = resultData.toList(); for (auto iter = resultList.begin(); iter != resultList.end(); ++iter) { QVariantMap result = iter->toMap(); - if (result["id"].toInt() == GameInfo::instance().getNexusModID()) { + if (result["id"].toInt() == m_OrganizerCore.managedGame()->getNexusModOrganizerID()) { if (!result["voted_by_user"].toBool()) { ui->actionEndorseMO->setVisible(true); } diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 59205b12..a0628bd8 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -287,7 +287,10 @@ int ModInfo::checkAllForUpdate(QObject *receiver) int result = 0; std::vector modIDs; - modIDs.push_back(GameInfo::instance().getNexusModID()); + //I ought to store this, it's used elsewhere + IPluginGame *game = qApp->property("managed_game").value(); + + modIDs.push_back(game->getNexusModOrganizerID()); for (const ModInfo::Ptr &mod : s_Collection) { if (mod->canBeUpdated()) { diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 95d1d299..67dc85e0 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -92,11 +92,6 @@ std::wstring Fallout3Info::getNexusInfoUrlStatic() return L"http://nmm.nexusmods.com/fallout3"; } -int Fallout3Info::getNexusModIDStatic() -{ - return 16348; -} - bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index ed130e53..3688bc2e 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -52,8 +52,6 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true); static std::wstring getNexusInfoUrlStatic(); virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } - static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 120; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index b5fb4f04..c1eea4da 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -94,12 +94,6 @@ std::wstring FalloutNVInfo::getNexusInfoUrlStatic() } -int FalloutNVInfo::getNexusModIDStatic() -{ - return 42572; -} - - bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 75febd4c..024ad9aa 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -52,8 +52,6 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true); static std::wstring getNexusInfoUrlStatic(); virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } - static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 130; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 06b96d61..da6fb3dc 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -80,8 +80,8 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; virtual std::wstring getNexusInfoUrl() = 0; - virtual int getNexusModID() = 0; virtual int getNexusGameID() = 0; + //**Still used: SkyrimInfo::getNexusModIDStatic //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 27de1275..4cd03ae8 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -97,11 +97,6 @@ std::wstring OblivionInfo::getNexusInfoUrlStatic() } -int OblivionInfo::getNexusModIDStatic() -{ - return 38277; -} - bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index a9808d77..b298ed0a 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -50,8 +50,6 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true); static std::wstring getNexusInfoUrlStatic(); virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } - static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } virtual int getNexusGameID() { return 101; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 13c82456..93e2a948 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -54,7 +54,6 @@ public: static std::wstring getNexusInfoUrlStatic(); virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } static int getNexusModIDStatic(); - virtual int getNexusModID() { return getNexusModIDStatic(); } static int getNexusGameIDStatic() { return 110; } virtual int getNexusGameID() { return getNexusGameIDStatic(); } -- cgit v1.3.1 From 78b686b2bc507a5606bc7c673745b02346bc667a Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 25 Nov 2015 08:22:40 +0000 Subject: Removes all references to GameInfo::getGameDirectory apart from one during startup Did some const correctness improvements Also may have fixed a potential crash as the Profile copy constructor didn't copy the m_GamePlugin membber --- src/directoryrefresher.cpp | 8 +++++++- src/loadmechanism.cpp | 1 + src/mainwindow.cpp | 23 ++++++++++++----------- src/mainwindow.h | 4 ---- src/modinfo.cpp | 5 +++-- src/organizercore.cpp | 2 +- src/profile.cpp | 8 +++++--- src/profile.h | 8 ++++---- src/profilesdialog.cpp | 12 ++++++------ src/profilesdialog.h | 4 ++-- src/settingsdialog.cpp | 11 +++++++++-- src/shared/gameinfo.h | 2 +- src/transfersavesdialog.cpp | 2 +- src/transfersavesdialog.h | 4 ++-- 14 files changed, 54 insertions(+), 40 deletions(-) diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index c253f384..f4ad2a7d 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -18,10 +18,14 @@ along with Mod Organizer. If not, see . */ #include "directoryrefresher.h" + +#include "iplugingame.h" #include "utility.h" #include "report.h" #include "modinfo.h" #include + +#include #include #include @@ -141,7 +145,9 @@ void DirectoryRefresher::refresh() m_DirectoryStructure = new DirectoryEntry(L"data", nullptr, 0); - std::wstring dataDirectory = GameInfo::instance().getGameDirectory() + L"\\data"; + IPluginGame *game = qApp->property("managed_game").value(); + + std::wstring dataDirectory = QDir::toNativeSeparators(game->dataDirectory().absolutePath()).toStdWString(); m_DirectoryStructure->addFromOrigin(L"data", dataDirectory, 0); // TODO what was the point of having the priority in this tuple? the list is already sorted by priority diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 4d06bea9..0d95c51c 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -64,6 +64,7 @@ void LoadMechanism::removeHintFile(QDir &targetDirectory) bool LoadMechanism::isDirectLoadingSupported() { + //FIXME: Seriously? isn't there a 'do i need steam' thing? IPluginGame *game = qApp->property("managed_game").value(); if (game->gameName().compare("oblivion", Qt::CaseInsensitive) == 0) { // oblivion can be loaded directly if it's not the steam variant diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5856f57f..05650219 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -153,7 +153,6 @@ MainWindow::MainWindow(const QString &exeName , m_ModListGroupingProxy(nullptr) , m_ModListSortProxy(nullptr) , m_OldExecutableIndex(-1) - , m_GamePath(ToQString(GameInfo::instance().getGameDirectory())) , m_CategoryFactory(CategoryFactory::instance()) , m_ContextItem(nullptr) , m_ContextAction(nullptr) @@ -1031,9 +1030,9 @@ void MainWindow::on_profileBox_currentIndexChanged(int index) if (ui->profileBox->currentIndex() == 0) { ui->profileBox->setCurrentIndex(previousIndex); - ProfilesDialog(ui->profileBox->currentText(), this).exec(); + ProfilesDialog(ui->profileBox->currentText(), m_OrganizerCore.managedGame(), this).exec(); while (!refreshProfiles()) { - ProfilesDialog(ui->profileBox->currentText(), this).exec(); + ProfilesDialog(ui->profileBox->currentText(), m_OrganizerCore.managedGame(), this).exec(); } } else { activateSelectedProfile(); @@ -1819,16 +1818,18 @@ void MainWindow::on_actionInstallMod_triggered() void MainWindow::on_actionAdd_Profile_triggered() { - bool repeat = true; - while (repeat) { - ProfilesDialog profilesDialog(m_GamePath, this); + for (;;) { + //Note: Calling this with an invalid profile name. Not quite sure why + ProfilesDialog profilesDialog(m_OrganizerCore.managedGame()->gameDirectory().absolutePath(), + m_OrganizerCore.managedGame(), + this); // workaround: need to disable monitoring of the saves directory, otherwise the active // profile directory is locked stopMonitorSaves(); profilesDialog.exec(); refreshSaveList(); // since the save list may now be outdated we have to refresh it completely if (refreshProfiles() && !profilesDialog.failed()) { - repeat = false; + break; } } // addProfile(); @@ -3225,9 +3226,9 @@ void MainWindow::fixMods_clicked() // search in data { - QDir dataDir(m_GamePath + "/data"); + QDir dataDir(m_OrganizerCore.managedGame()->dataDirectory()); QStringList esps = dataDir.entryList(espFilter); - foreach (const QString &esp, esps) { + for (const QString &esp : esps) { std::map >::iterator iter = missingPlugins.find(esp); if (iter != missingPlugins.end()) { iter->second.push_back(""); @@ -3241,7 +3242,7 @@ void MainWindow::fixMods_clicked() ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex); QStringList esps = QDir(modInfo->absolutePath()).entryList(espFilter); - foreach (const QString &esp, esps) { + for (const QString &esp : esps) { std::map >::iterator iter = missingPlugins.find(esp); if (iter != missingPlugins.end()) { iter->second.push_back(modInfo->name()); @@ -3253,7 +3254,7 @@ void MainWindow::fixMods_clicked() { QDir overwriteDir(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::overwritePath())); QStringList esps = overwriteDir.entryList(espFilter); - foreach (const QString &esp, esps) { + for (const QString &esp : esps) { std::map >::iterator iter = missingPlugins.find(esp); if (iter != missingPlugins.end()) { iter->second.push_back(""); diff --git a/src/mainwindow.h b/src/mainwindow.h index 55ae40b9..b97a728e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -285,15 +285,11 @@ private: int m_OldExecutableIndex; - QString m_GamePath; - int m_ContextRow; QPersistentModelIndex m_ContextIdx; QTreeWidgetItem *m_ContextItem; QAction *m_ContextAction; - //int m_SelectedSaveGame; - CategoryFactory &m_CategoryFactory; int m_ModsToUpdate; diff --git a/src/modinfo.cpp b/src/modinfo.cpp index a0628bd8..d79a7919 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -1134,14 +1134,15 @@ QDateTime ModInfoForeign::creationTime() const QString ModInfoForeign::absolutePath() const { - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"; + //I ought to store this, it's used elsewhere + IPluginGame *game = qApp->property("managed_game").value(); + return game->dataDirectory().absolutePath(); } std::vector ModInfoForeign::getFlags() const { std::vector result = ModInfoWithConflictInfo::getFlags(); result.push_back(FLAG_FOREIGN); - return result; } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 24077923..c3e10d37 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1011,7 +1011,7 @@ HANDLE OrganizerCore::startApplication(const QString &executable, const QStringL binary = QFileInfo(executable); if (binary.isRelative()) { // relative path, should be relative to game directory - binary = QFileInfo(QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/" + executable); + binary = QFileInfo(managedGame()->gameDirectory().absoluteFilePath(executable)); } if (cwd.length() == 0) { currentDirectory = binary.absolutePath(); diff --git a/src/profile.cpp b/src/profile.cpp index 42dc56d1..77f6ebd1 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -54,7 +54,7 @@ void Profile::touchFile(QString fileName) } } -Profile::Profile(const QString &name, IPluginGame *gamePlugin, bool useDefaultSettings) +Profile::Profile(const QString &name, IPluginGame const *gamePlugin, bool useDefaultSettings) : m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) , m_GamePlugin(gamePlugin) { @@ -95,7 +95,7 @@ Profile::Profile(const QString &name, IPluginGame *gamePlugin, bool useDefaultSe } -Profile::Profile(const QDir &directory, IPluginGame *gamePlugin) +Profile::Profile(const QDir &directory, IPluginGame const *gamePlugin) : m_Directory(directory) , m_GamePlugin(gamePlugin) , m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) @@ -122,6 +122,8 @@ Profile::Profile(const QDir &directory, IPluginGame *gamePlugin) Profile::Profile(const Profile &reference) : m_Directory(reference.m_Directory) , m_ModListWriter(std::bind(&Profile::writeModlistNow, this)) + , m_GamePlugin(reference.m_GamePlugin) + { refreshModStatus(); } @@ -483,7 +485,7 @@ void Profile::setModPriority(unsigned int index, int &newPriority) m_ModListWriter.write(); } -Profile *Profile::createPtrFrom(const QString &name, const Profile &reference, MOBase::IPluginGame *gamePlugin) +Profile *Profile::createPtrFrom(const QString &name, const Profile &reference, MOBase::IPluginGame const *gamePlugin) { QString profileDirectory = qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::profilesPath()) + "/" + name; reference.copyFilesTo(profileDirectory); diff --git a/src/profile.h b/src/profile.h index e9edca56..b306e0c5 100644 --- a/src/profile.h +++ b/src/profile.h @@ -57,7 +57,7 @@ public: * @param name name of the new profile * @param filter save game filter. Defaults to <no filter>. **/ - Profile(const QString &name, MOBase::IPluginGame *gamePlugin, bool useDefaultSettings); + Profile(const QString &name, MOBase::IPluginGame const *gamePlugin, bool useDefaultSettings); /** * @brief constructor @@ -67,7 +67,7 @@ public: * invoking this should always produce a working profile * @param directory directory to read the profile from **/ - Profile(const QDir &directory, MOBase::IPluginGame *gamePlugin); + Profile(const QDir &directory, MOBase::IPluginGame const *gamePlugin); Profile(const Profile &reference); @@ -82,7 +82,7 @@ public: * @param name of the new profile * @param reference profile to copy from **/ - static Profile *createPtrFrom(const QString &name, const Profile &reference, MOBase::IPluginGame *gamePlugin); + static Profile *createPtrFrom(const QString &name, const Profile &reference, MOBase::IPluginGame const *gamePlugin); MOBase::DelayedFileWriter &modlistWriter() { return m_ModListWriter; } @@ -302,7 +302,7 @@ private: QDir m_Directory; - MOBase::IPluginGame *m_GamePlugin; + MOBase::IPluginGame const * const m_GamePlugin; mutable QByteArray m_LastModlistHash; std::vector m_ModStatus; diff --git a/src/profilesdialog.cpp b/src/profilesdialog.cpp index 58be5448..b21aee53 100644 --- a/src/profilesdialog.cpp +++ b/src/profilesdialog.cpp @@ -42,10 +42,11 @@ using namespace MOShared; Q_DECLARE_METATYPE(Profile::Ptr) -ProfilesDialog::ProfilesDialog(const QString &profileName, QWidget *parent) +ProfilesDialog::ProfilesDialog(const QString &profileName, MOBase::IPluginGame const *game, QWidget *parent) : TutorableDialog("Profiles", parent) , ui(new Ui::ProfilesDialog) , m_FailState(false) + , m_Game(game) { ui->setupUi(this); @@ -65,7 +66,6 @@ ProfilesDialog::ProfilesDialog(const QString &profileName, QWidget *parent) QCheckBox *invalidationBox = findChild("invalidationBox"); - IPluginGame *game = qApp->property("managed_game").value(); BSAInvalidation *invalidation = game->feature(); if (invalidation == nullptr) { @@ -104,7 +104,7 @@ QListWidgetItem *ProfilesDialog::addItem(const QString &name) QDir profileDir(name); QListWidgetItem *newItem = new QListWidgetItem(profileDir.dirName(), m_ProfilesList); try { - newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(new Profile(profileDir, qApp->property("managed_game").value())))); + newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(new Profile(profileDir, m_Game)))); m_FailState = false; } catch (const std::exception& e) { reportError(tr("failed to create profile: %1").arg(e.what())); @@ -117,7 +117,7 @@ void ProfilesDialog::createProfile(const QString &name, bool useDefaultSettings) try { QListWidget *profilesList = findChild("profilesList"); QListWidgetItem *newItem = new QListWidgetItem(name, profilesList); - newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(new Profile(name, qApp->property("managed_game").value(), useDefaultSettings)))); + newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(new Profile(name, m_Game, useDefaultSettings)))); profilesList->addItem(newItem); m_FailState = false; } catch (const std::exception&) { @@ -131,7 +131,7 @@ void ProfilesDialog::createProfile(const QString &name, const Profile &reference try { QListWidget *profilesList = findChild("profilesList"); QListWidgetItem *newItem = new QListWidgetItem(name, profilesList); - newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(Profile::createPtrFrom(name, reference, qApp->property("managed_game").value())))); + newItem->setData(Qt::UserRole, QVariant::fromValue(Profile::Ptr(Profile::createPtrFrom(name, reference, m_Game)))); profilesList->addItem(newItem); m_FailState = false; } catch (const std::exception&) { @@ -324,6 +324,6 @@ void ProfilesDialog::on_localSavesBox_stateChanged(int state) void ProfilesDialog::on_transferButton_clicked() { const Profile::Ptr currentProfile = m_ProfilesList->currentItem()->data(Qt::UserRole).value(); - TransferSavesDialog transferDialog(*currentProfile, qApp->property("managed_game").value(), this); + TransferSavesDialog transferDialog(*currentProfile, m_Game, this); transferDialog.exec(); } diff --git a/src/profilesdialog.h b/src/profilesdialog.h index 6dd0c1d4..26476883 100644 --- a/src/profilesdialog.h +++ b/src/profilesdialog.h @@ -50,7 +50,7 @@ public: * @param parent parent widget * @todo the game path could be retrieved from GameInfo just as easily **/ - explicit ProfilesDialog(const QString &profileName, QWidget *parent = 0); + explicit ProfilesDialog(const QString &profileName, MOBase::IPluginGame const *game, QWidget *parent = 0); ~ProfilesDialog(); /** @@ -93,7 +93,7 @@ private: Ui::ProfilesDialog *ui; QListWidget *m_ProfilesList; bool m_FailState; - + MOBase::IPluginGame const *m_Game; }; #endif // PROFILESDIALOG_H diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index f2160719..36e177ab 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -18,18 +18,21 @@ along with Mod Organizer. If not, see . */ #include "settingsdialog.h" + #include "ui_settingsdialog.h" #include "categoriesdialog.h" #include "helper.h" #include "noeditdelegate.h" +#include "iplugingame.h" #include +#include "settings.h" + #include #include #include #include #define WIN32_LEAN_AND_MEAN #include -#include "settings.h" using namespace MOBase; @@ -87,7 +90,11 @@ void SettingsDialog::on_categoriesBtn_clicked() void SettingsDialog::on_bsaDateBtn_clicked() { - Helper::backdateBSAs(qApp->property("dataPath").toString().toStdWString(), GameInfo::instance().getGameDirectory().append(L"\\data")); + IPluginGame *game = qApp->property("managed_game").value(); + QDir dir = game->dataDirectory(); + + Helper::backdateBSAs(qApp->property("dataPath").toString().toStdWString(), + dir.absolutePath().toStdWString()); } void SettingsDialog::on_browseDownloadDirBtn_clicked() diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index da6fb3dc..49b3133b 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -65,7 +65,7 @@ public: //**Currently only used in a nasty mess at initialisation time. virtual std::wstring getGameName() const = 0; - //**USED IN HOOKDLL + //**USED IN HOOKDLL and in initialisation virtual std::wstring getGameDirectory() const; // get a list of file extensions for additional files belonging to a save game diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index 73267f75..d47d2bb0 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -32,7 +32,7 @@ using namespace MOBase; using namespace MOShared; -TransferSavesDialog::TransferSavesDialog(const Profile &profile, IPluginGame *gamePlugin, QWidget *parent) +TransferSavesDialog::TransferSavesDialog(const Profile &profile, IPluginGame const *gamePlugin, QWidget *parent) : TutorableDialog("TransferSaves", parent) , ui(new Ui::TransferSavesDialog) , m_Profile(profile) diff --git a/src/transfersavesdialog.h b/src/transfersavesdialog.h index b9265b6a..d9ea5b29 100644 --- a/src/transfersavesdialog.h +++ b/src/transfersavesdialog.h @@ -35,7 +35,7 @@ class TransferSavesDialog : public MOBase::TutorableDialog Q_OBJECT public: - explicit TransferSavesDialog(const Profile &profile, MOBase::IPluginGame *gamePlugin, QWidget *parent = 0); + explicit TransferSavesDialog(const Profile &profile, MOBase::IPluginGame const *gamePlugin, QWidget *parent = 0); ~TransferSavesDialog(); private slots: @@ -76,7 +76,7 @@ private: Profile m_Profile; - MOBase::IPluginGame *m_GamePlugin; + MOBase::IPluginGame const *m_GamePlugin; std::vector m_GlobalSaves; std::vector m_LocalSaves; -- cgit v1.3.1 From b9b12ca765d1703ac2e3852746e7acc3a20949a9 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 25 Nov 2015 14:23:58 +0000 Subject: Bunch of const correctness changes. There shouldn't be any update of plugin games once MO has started --- src/downloadmanager.cpp | 2 +- src/downloadmanager.h | 4 ++-- src/executableslist.cpp | 2 +- src/executableslist.h | 2 +- src/modinfo.cpp | 5 ++++- src/modinfo.h | 5 ++++- src/organizercore.h | 2 +- src/organizerproxy.cpp | 2 +- src/organizerproxy.h | 2 +- src/pluginlist.cpp | 2 +- src/pluginlist.h | 4 ++-- src/settings.cpp | 2 +- src/settings.h | 4 ++-- 13 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 588b8bb9..4a6769b1 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1465,7 +1465,7 @@ void DownloadManager::directoryChanged(const QString&) refreshList(); } -void DownloadManager::managedGameChanged(MOBase::IPluginGame *managedGame) +void DownloadManager::managedGameChanged(MOBase::IPluginGame const *managedGame) { m_ManagedGame = managedGame; } diff --git a/src/downloadmanager.h b/src/downloadmanager.h index faa4267e..54db4648 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -417,7 +417,7 @@ public slots: void nxmRequestFailed(int modID, int fileID, QVariant userData, int requestID, const QString &errorString); - void managedGameChanged(MOBase::IPluginGame *gamePlugin); + void managedGameChanged(MOBase::IPluginGame const *gamePlugin); private slots: @@ -506,7 +506,7 @@ private: QRegExp m_DateExpression; - MOBase::IPluginGame *m_ManagedGame; + MOBase::IPluginGame const *m_ManagedGame; }; diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 12e3d7aa..2182a425 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -38,7 +38,7 @@ ExecutablesList::~ExecutablesList() { } -void ExecutablesList::init(IPluginGame *game) +void ExecutablesList::init(IPluginGame const *game) { Q_ASSERT(game != nullptr); m_Executables.clear(); diff --git a/src/executableslist.h b/src/executableslist.h index b4054bcc..833829c8 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -78,7 +78,7 @@ public: /** * @brief initialise the list with the executables preconfigured for this game **/ - void init(MOBase::IPluginGame *game); + void init(MOBase::IPluginGame const *game); /** * @brief find an executable by its name diff --git a/src/modinfo.cpp b/src/modinfo.cpp index d79a7919..df34c00f 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -203,7 +203,10 @@ unsigned int ModInfo::findMod(const boost::function &filter } -void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **directoryStructure, bool displayForeign, MOBase::IPluginGame const *game) +void ModInfo::updateFromDisc(const QString &modDirectory, + DirectoryEntry **directoryStructure, + bool displayForeign, + MOBase::IPluginGame const *game) { QMutexLocker lock(&s_Mutex); s_Collection.clear(); diff --git a/src/modinfo.h b/src/modinfo.h index 6de4123b..f6484707 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -107,7 +107,10 @@ public: /** * @brief read the mod directory and Mod ModInfo objects for all subdirectories **/ - static void updateFromDisc(const QString &modDirectory, MOShared::DirectoryEntry **directoryStructure, bool displayForeign, const MOBase::IPluginGame *game); + static void updateFromDisc(const QString &modDirectory, + MOShared::DirectoryEntry **directoryStructure, + bool displayForeign, + MOBase::IPluginGame const *game); static void clear() { s_Collection.clear(); s_ModsByName.clear(); s_ModsByModID.clear(); } diff --git a/src/organizercore.h b/src/organizercore.h index 6075eb18..a673065a 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -193,7 +193,7 @@ signals: */ void modInstalled(const QString &modName); - void managedGameChanged(MOBase::IPluginGame *gamePlugin); + void managedGameChanged(MOBase::IPluginGame const *gamePlugin); private: diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 3c103ff0..fdc60a27 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -167,7 +167,7 @@ MOBase::IModList *OrganizerProxy::modList() const return m_Proxied->modList(); } -MOBase::IPluginGame *OrganizerProxy::managedGame() const +MOBase::IPluginGame const *OrganizerProxy::managedGame() const { return m_Proxied->managedGame(); } diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 2f5e0970..62a35498 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -45,7 +45,7 @@ public: virtual bool onFinishedRun(const std::function &func); virtual bool onModInstalled(const std::function &func); - virtual MOBase::IPluginGame *managedGame() const; + virtual MOBase::IPluginGame const *managedGame() const; private: diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 6f883645..48b27f05 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1211,7 +1211,7 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled, } } -void PluginList::managedGameChanged(IPluginGame *gamePlugin) +void PluginList::managedGameChanged(IPluginGame const *gamePlugin) { m_GamePlugin = gamePlugin; } diff --git a/src/pluginlist.h b/src/pluginlist.h index 01d4bfbe..9fe6eeac 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -261,7 +261,7 @@ public slots: * @brief The currently managed game has changed * @param gamePlugin */ - void managedGameChanged(MOBase::IPluginGame *gamePlugin); + void managedGameChanged(MOBase::IPluginGame const *gamePlugin); signals: @@ -347,7 +347,7 @@ private: QTemporaryFile m_TempFile; - MOBase::IPluginGame *m_GamePlugin; + MOBase::IPluginGame const *m_GamePlugin; }; diff --git a/src/settings.cpp b/src/settings.cpp index 61d6aaa3..95462c82 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -116,7 +116,7 @@ void Settings::registerAsNXMHandler(bool force) } } -void Settings::managedGameChanged(IPluginGame *gamePlugin) +void Settings::managedGameChanged(IPluginGame const *gamePlugin) { m_GamePlugin = gamePlugin; } diff --git a/src/settings.h b/src/settings.h index def1dc5c..b6f25a6d 100644 --- a/src/settings.h +++ b/src/settings.h @@ -299,7 +299,7 @@ public: public slots: - void managedGameChanged(MOBase::IPluginGame *gamePlugin); + void managedGameChanged(MOBase::IPluginGame const *gamePlugin); private: @@ -420,7 +420,7 @@ private: static Settings *s_Instance; - MOBase::IPluginGame *m_GamePlugin; + MOBase::IPluginGame const *m_GamePlugin; QSettings m_Settings; -- cgit v1.3.1 From 38c5899fef2f21561a00bd5b1df3eff8577ec986 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 25 Nov 2015 19:31:05 +0000 Subject: Replace GameInfo::getNexusInfoUrl with IPluginGame::getNexusManagementUrl also added getNexusDisplayUrl for the other variant of getNexusPage Removed skyrim static versions note that Nexusinterface is now passed a game plugin rather than a URL and a game ID if you want to override the current game --- src/main.cpp | 33 ++++++----- src/mainwindow.cpp | 3 +- src/nexusinterface.cpp | 81 +++++++++++++------------- src/nexusinterface.h | 133 +++++++++++++++++++++++++++++++++++-------- src/organizercore.cpp | 26 +++++++-- src/organizercore.h | 3 +- src/selfupdater.cpp | 40 +++++++------ src/selfupdater.h | 5 ++ src/shared/fallout3info.cpp | 5 -- src/shared/fallout3info.h | 2 - src/shared/falloutnvinfo.cpp | 6 -- src/shared/falloutnvinfo.h | 2 - src/shared/gameinfo.h | 2 - src/shared/oblivioninfo.cpp | 6 -- src/shared/oblivioninfo.h | 2 - src/shared/skyriminfo.cpp | 11 ---- src/shared/skyriminfo.h | 3 - 17 files changed, 222 insertions(+), 141 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4f79b0b2..72a63dc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -498,24 +498,27 @@ int main(int argc, char *argv[]) return 1; } - IPluginGame *game = organizer.managedGame(); - - if (!settings.contains("game_edition")) { - QStringList editions = game->gameVariants(); - if (editions.size() > 1) { - SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); - int index = 0; - for (const QString &edition : editions) { - selection.addChoice(edition, "", index++); - } - if (selection.exec() == QDialog::Rejected) { - return -1; - } else { - settings.setValue("game_edition", selection.getChoiceString()); + //This is probably wrong too + { + IPluginGame *game = organizer.managedGameForUpdate(); + + if (!settings.contains("game_edition")) { + QStringList editions = game->gameVariants(); + if (editions.size() > 1) { + SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); + int index = 0; + for (const QString &edition : editions) { + selection.addChoice(edition, "", index++); + } + if (selection.exec() == QDialog::Rejected) { + return -1; + } else { + settings.setValue("game_edition", selection.getChoiceString()); + } } } + game->setGameVariant(settings.value("game_edition").toString()); } - game->setGameVariant(settings.value("game_edition").toString()); #pragma message("edition isn't used?") diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 05650219..f3ffdf6c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3814,8 +3814,9 @@ void MainWindow::on_actionEndorseMO_triggered() if (QMessageBox::question(this, tr("Endorse Mod Organizer"), tr("Do you want to endorse Mod Organizer on %1 now?").arg(ToQString(GameInfo::instance().getNexusPage())), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + //Why pass an empty variant of we're toggling an endorsement? NexusInterface::instance()->requestToggleEndorsement( - m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString()); + m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), ""); } } diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index dc027be4..cbb9ad48 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -18,14 +18,18 @@ along with Mod Organizer. If not, see . */ #include "nexusinterface.h" + +#include "iplugingame.h" #include "nxmaccessmanager.h" #include "json.h" #include "selectiondialog.h" -#include #include -#include #include +#include + +#include + using namespace MOBase; using namespace MOShared; @@ -33,34 +37,34 @@ using namespace MOShared; NexusBridge::NexusBridge(const QString &subModule) : m_Interface(NexusInterface::instance()) - , m_Url() // lazy initialized + , m_Url() //Lazily initialised (but redundant) , m_SubModule(subModule) { } void NexusBridge::requestDescription(int modID, QVariant userData) { - m_RequestIDs.insert(m_Interface->requestDescription(modID, this, userData, m_SubModule, url())); + m_RequestIDs.insert(m_Interface->requestDescription(modID, this, userData, m_SubModule)); } void NexusBridge::requestFiles(int modID, QVariant userData) { - m_RequestIDs.insert(m_Interface->requestFiles(modID, this, userData, m_SubModule, url())); + m_RequestIDs.insert(m_Interface->requestFiles(modID, this, userData, m_SubModule)); } void NexusBridge::requestFileInfo(int modID, int fileID, QVariant userData) { - m_RequestIDs.insert(m_Interface->requestFileInfo(modID, fileID, this, userData, m_SubModule, url())); + m_RequestIDs.insert(m_Interface->requestFileInfo(modID, fileID, this, userData, m_SubModule)); } void NexusBridge::requestDownloadURL(int modID, int fileID, QVariant userData) { - m_RequestIDs.insert(m_Interface->requestDownloadURL(modID, fileID, this, userData, m_SubModule, url())); + m_RequestIDs.insert(m_Interface->requestDownloadURL(modID, fileID, this, userData, m_SubModule)); } void NexusBridge::requestToggleEndorsement(int modID, bool endorse, QVariant userData) { - m_RequestIDs.insert(m_Interface->requestToggleEndorsement(modID, endorse, this, userData, m_SubModule, url())); + m_RequestIDs.insert(m_Interface->requestToggleEndorsement(modID, endorse, this, userData, m_SubModule)); } void NexusBridge::nxmDescriptionAvailable(int modID, QVariant userData, QVariant resultData, int requestID) @@ -136,13 +140,6 @@ void NexusBridge::nxmRequestFailed(int modID, int fileID, QVariant userData, int } } -QString NexusBridge::url() { - if (m_Url.isEmpty()) { - m_Url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl()); - } - return m_Url; -} - QAtomicInt NexusInterface::NXMRequestInfo::s_NextID(0); @@ -246,10 +243,9 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo int NexusInterface::requestDescription(int modID, QObject *receiver, QVariant userData, - const QString &subModule, const QString &url, int nexusGameId) + const QString &subModule, MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_DESCRIPTION, userData, subModule, url, - nexusGameId == -1 ? GameInfo::instance().getNexusGameID() : nexusGameId); + NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_DESCRIPTION, userData, subModule, game); m_RequestQueue.enqueue(requestInfo); connect(this, SIGNAL(nxmDescriptionAvailable(int,QVariant,QVariant,int)), @@ -264,9 +260,9 @@ int NexusInterface::requestDescription(int modID, QObject *receiver, QVariant us int NexusInterface::requestUpdates(const std::vector &modIDs, QObject *receiver, QVariant userData, - const QString &subModule, const QString &url) + const QString &subModule, MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modIDs, NXMRequestInfo::TYPE_GETUPDATES, userData, subModule, url, GameInfo::instance().getNexusGameID()); + NXMRequestInfo requestInfo(modIDs, NXMRequestInfo::TYPE_GETUPDATES, userData, subModule, game); m_RequestQueue.enqueue(requestInfo); connect(this, SIGNAL(nxmUpdatesAvailable(std::vector,QVariant,QVariant,int)), @@ -300,9 +296,9 @@ void NexusInterface::fakeFiles() int NexusInterface::requestFiles(int modID, QObject *receiver, QVariant userData, - const QString &subModule, const QString &url) + const QString &subModule, MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_FILES, userData, subModule, url, GameInfo::instance().getNexusGameID()); + NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_FILES, userData, subModule, game); m_RequestQueue.enqueue(requestInfo); connect(this, SIGNAL(nxmFilesAvailable(int,QVariant,QVariant,int)), receiver, SLOT(nxmFilesAvailable(int,QVariant,QVariant,int)), Qt::UniqueConnection); @@ -320,9 +316,9 @@ int NexusInterface::requestFiles(int modID, QObject *receiver, QVariant userData int NexusInterface::requestFileInfo(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url) + MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modID, fileID, NXMRequestInfo::TYPE_FILEINFO, userData, subModule, url, GameInfo::instance().getNexusGameID()); + NXMRequestInfo requestInfo(modID, fileID, NXMRequestInfo::TYPE_FILEINFO, userData, subModule, game); m_RequestQueue.enqueue(requestInfo); connect(this, SIGNAL(nxmFileInfoAvailable(int,int,QVariant,QVariant,int)), @@ -337,9 +333,9 @@ int NexusInterface::requestFileInfo(int modID, int fileID, QObject *receiver, QV int NexusInterface::requestDownloadURL(int modID, int fileID, QObject *receiver, QVariant userData, - const QString &subModule, const QString &url) + const QString &subModule, MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modID, fileID, NXMRequestInfo::TYPE_DOWNLOADURL, userData, subModule, url, GameInfo::instance().getNexusGameID()); + NXMRequestInfo requestInfo(modID, fileID, NXMRequestInfo::TYPE_DOWNLOADURL, userData, subModule, game); m_RequestQueue.enqueue(requestInfo); connect(this, SIGNAL(nxmDownloadURLsAvailable(int,int,QVariant,QVariant,int)), @@ -354,9 +350,9 @@ int NexusInterface::requestDownloadURL(int modID, int fileID, QObject *receiver, int NexusInterface::requestToggleEndorsement(int modID, bool endorse, QObject *receiver, QVariant userData, - const QString &subModule, const QString &url) + const QString &subModule, MOBase::IPluginGame const *game) { - NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_TOGGLEENDORSEMENT, userData, subModule, url, GameInfo::instance().getNexusGameID()); + NXMRequestInfo requestInfo(modID, NXMRequestInfo::TYPE_TOGGLEENDORSEMENT, userData, subModule, game); requestInfo.m_Endorse = endorse; m_RequestQueue.enqueue(requestInfo); @@ -557,13 +553,18 @@ void NexusInterface::requestTimeout() } } +void NexusInterface::managedGameChanged(IPluginGame const *game) +{ + m_Game = game; +} + NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , NexusInterface::NXMRequestInfo::Type type , QVariant userData , const QString &subModule - , const QString &url - , int nexusGameId) + , MOBase::IPluginGame const *game + ) : m_ModID(modID) , m_FileID(0) , m_Reply(nullptr) @@ -572,9 +573,9 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(url) + , m_URL(game->getNexusManagementURL()) , m_SubModule(subModule) - , m_NexusGameID(nexusGameId) + , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) {} @@ -582,8 +583,8 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector modIDList , NexusInterface::NXMRequestInfo::Type type , QVariant userData , const QString &subModule - , const QString &url - , int nexusGameId) + , MOBase::IPluginGame const *game + ) : m_ModID(-1) , m_ModIDList(modIDList) , m_FileID(0) @@ -593,9 +594,9 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector modIDList , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(url) + , m_URL(game->getNexusManagementURL()) , m_SubModule(subModule) - , m_NexusGameID(nexusGameId) + , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) {} @@ -604,8 +605,8 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , NexusInterface::NXMRequestInfo::Type type , QVariant userData , const QString &subModule - , const QString &url - , int nexusGameId) + , MOBase::IPluginGame const *game + ) : m_ModID(modID) , m_FileID(fileID) , m_Reply(nullptr) @@ -614,8 +615,8 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(url) + , m_URL(game->getNexusManagementURL()) , m_SubModule(subModule) - , m_NexusGameID(nexusGameId) + , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) {} diff --git a/src/nexusinterface.h b/src/nexusinterface.h index c0ee50cd..9f129510 100644 --- a/src/nexusinterface.h +++ b/src/nexusinterface.h @@ -20,20 +20,21 @@ along with Mod Organizer. If not, see . #ifndef NEXUSINTERFACE_H #define NEXUSINTERFACE_H - - #include #include #include #include + #include #include #include #include #include + #include #include +namespace MOBase { class IPluginGame; } class NexusInterface; class NXMAccessManager; @@ -106,10 +107,6 @@ public slots: void nxmEndorsementToggled(int modID, QVariant userData, QVariant resultData, int requestID); void nxmRequestFailed(int modID, int fileID, QVariant userData, int requestID, const QString &errorMessage); -private: - - QString url(); - private: NexusInterface *m_Interface; @@ -147,29 +144,67 @@ public: */ void cleanup(); + /** + * @brief request description for a mod + * + * @param modID id of the mod caller is interested in (assumed to be for the current game) + * @param receiver the object to receive the result asynchronously via a signal (nxmDescriptionAvailable) + * @param userData user data to be returned with the result + * @return int an id to identify the request + **/ + int requestDescription(int modID, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestDescription(modID, receiver, userData, subModule, m_Game); + } + /** * @brief request description for a mod * * @param modID id of the mod caller is interested in * @param receiver the object to receive the result asynchronously via a signal (nxmDescriptionAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @param game Game with which the mod is associated * @return int an id to identify the request **/ int requestDescription(int modID, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl()), - int nexusGameId = -1); + MOBase::IPluginGame const *game); + + /** + * @brief request nexus descriptions for multiple mods at once + * @param modIDs a list of ids of mods the caller is interested in (assumed to be for the current game) + * @param receiver the object to receive the result asynchronously via a signal (nxmDescriptionAvailable) + * @param userData user data to be returned with the result + * @return int an id to identify the request + */ + int requestUpdates(const std::vector &modIDs, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestUpdates(modIDs, receiver, userData, subModule, m_Game); + } /** * @brief request nexus descriptions for multiple mods at once * @param modIDs a list of ids of mods the caller is interested in * @param receiver the object to receive the result asynchronously via a signal (nxmDescriptionAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @param game the game with which the mods are associated * @return int an id to identify the request */ int requestUpdates(const std::vector &modIDs, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl())); + MOBase::IPluginGame const *game); + + /** + * @brief request a list of the files belonging to a mod + * + * @param modID id of the mod caller is interested in (assumed to be for the current game) + * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) + * @param userData user data to be returned with the result + * @return int an id to identify the request + **/ + int requestFiles(int modID, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestFiles(modID, receiver, userData, subModule, m_Game); + } + /** * @brief request a list of the files belonging to a mod @@ -177,24 +212,52 @@ public: * @param modID id of the mod caller is interested in * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @param game the game with which the mods are associated * @return int an id to identify the request **/ int requestFiles(int modID, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl())); + MOBase::IPluginGame const *game); /** * @brief request info about a single file of a mod * - * @param modID id of the mod caller is interested in + * @param modID id of the mod caller is interested in (assumed to be for the current game) * @param fileID id of the file the caller is interested in * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @return int an id to identify the request + **/ + int requestFileInfo(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestFileInfo(modID, fileID, receiver, userData, subModule, m_Game); + } + + /** + * @brief request info about a single file of a mod + * + * @param modID id of the mod caller is interested in (assumed to be for the current game) + * @param fileID id of the file the caller is interested in + * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) + * @param userData user data to be returned with the result + * @param game the game with which the mods are associated * @return int an id to identify the request **/ int requestFileInfo(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl())); + MOBase::IPluginGame const *game); + + /** + * @brief request the download url of a file + * + * @param modID id of the mod caller is interested in (assumed to be for the current game) + * @param fileID id of the file the caller is interested in + * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) + * @param userData user data to be returned with the result + * @return int an id to identify the request + **/ + int requestDownloadURL(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestDownloadURL(modID, fileID, receiver, userData, subModule, m_Game); + } /** * @brief request the download url of a file @@ -203,11 +266,23 @@ public: * @param fileID id of the file the caller is interested in * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @param game the game with which the mods are associated * @return int an id to identify the request **/ - int requestDownloadURL(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl())); + int requestDownloadURL(int modID, int fileID, QObject *receiver, QVariant userData, const QString &subModule, MOBase::IPluginGame const *game); + + /** + * @brief toggle endorsement state of the mod + * @param modID id of the mod (assumed to be for the current game) + * @param endorse true if the mod should be endorsed, false for un-endorse + * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) + * @param userData user data to be returned with the result + * @return int an id to identify the request + */ + int requestToggleEndorsement(int modID, bool endorse, QObject *receiver, QVariant userData, const QString &subModule) + { + return requestToggleEndorsement(modID, endorse, receiver, userData, subModule, m_Game); + } /** * @brief toggle endorsement state of the mod @@ -215,11 +290,11 @@ public: * @param endorse true if the mod should be endorsed, false for un-endorse * @param receiver the object to receive the result asynchronously via a signal (nxmFilesAvailable) * @param userData user data to be returned with the result - * @param url the url to request from + * @param game the game with which the mods are associated * @return int an id to identify the request */ int requestToggleEndorsement(int modID, bool endorse, QObject *receiver, QVariant userData, const QString &subModule, - const QString &url = MOBase::ToQString(MOShared::GameInfo::instance().getNexusInfoUrl())); + MOBase::IPluginGame const *game); /** * @param directory the directory to store cache files @@ -247,6 +322,11 @@ public: */ static void interpretNexusFileName(const QString &fileName, QString &modName, int &modID, bool query); + /** + * @brief get the currently managed game + */ + MOBase::IPluginGame const *managedGame() const; + signals: void requestNXMDownload(const QString &url); @@ -261,6 +341,9 @@ signals: void nxmEndorsementToggled(int modID, QVariant userData, QVariant resultData, int requestID); void nxmRequestFailed(int modID, int fileID, QVariant userData, int requestID, const QString &errorString); +public slots: + void managedGameChanged(MOBase::IPluginGame const *game); + private slots: void requestFinished(); @@ -295,9 +378,9 @@ private: int m_ID; int m_Endorse; - NXMRequestInfo(int modID, Type type, QVariant userData, const QString &subModule, const QString &url, int nexusGameId); - NXMRequestInfo(std::vector modIDList, Type type, QVariant userData, const QString &subModule, const QString &url, int nexusGameId); - NXMRequestInfo(int modID, int fileID, Type type, QVariant userData, const QString &subModule, const QString &url, int nexusGameId); + NXMRequestInfo(int modID, Type type, QVariant userData, const QString &subModule, MOBase::IPluginGame const *game); + NXMRequestInfo(std::vector modIDList, Type type, QVariant userData, const QString &subModule, MOBase::IPluginGame const *game); + NXMRequestInfo(int modID, int fileID, Type type, QVariant userData, const QString &subModule, MOBase::IPluginGame const *game); private: static QAtomicInt s_NextID; @@ -324,6 +407,8 @@ private: MOBase::VersionInfo m_MOVersion; QString m_NMMVersion; + MOBase::IPluginGame const *m_Game; + }; #endif // NEXUSINTERFACE_H diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c3e10d37..7473ec3e 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1,5 +1,6 @@ #include "organizercore.h" +#include "iplugingame.h" #include "mainwindow.h" #include "messagedialog.h" #include "logbuffer.h" @@ -19,11 +20,14 @@ #include #include #include + #include #include #include #include + #include + #include @@ -158,9 +162,10 @@ OrganizerCore::OrganizerCore(const QSettings &initSettings) connect(NexusInterface::instance()->getAccessManager(), SIGNAL(loginSuccessful(bool)), this, SLOT(loginSuccessful(bool))); connect(NexusInterface::instance()->getAccessManager(), SIGNAL(loginFailed(QString)), this, SLOT(loginFailed(QString))); - connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_Settings, SLOT(managedGameChanged(MOBase::IPluginGame*))); - connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_DownloadManager, SLOT(managedGameChanged(MOBase::IPluginGame*))); - connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame*)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame*))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_Settings, SLOT(managedGameChanged(MOBase::IPluginGame const *))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_DownloadManager, SLOT(managedGameChanged(MOBase::IPluginGame const *))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame const *))); + connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), NexusInterface::instance(), SLOT(managedGameChanged(MOBase::IPluginGame const *))); connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter, &DelayedFileWriterBase::write); @@ -393,6 +398,14 @@ void OrganizerCore::connectPlugins(PluginContainer *container) m_GamePlugin = m_PluginContainer->managedGame(m_GameName); emit managedGameChanged(m_GamePlugin); } + //Do this the hard way + for (const IPluginGame * const game : container->plugins()) { + QString n = game->getNexusName(); + if (game->getNexusName() == "Skyrim") { + m_Updater.setNexusDownload(game); + break; + } + } } void OrganizerCore::disconnectPlugins() @@ -1308,7 +1321,12 @@ PluginListSortProxy *OrganizerCore::createPluginListProxyModel() return result; } -IPluginGame *OrganizerCore::managedGame() const +IPluginGame const *OrganizerCore::managedGame() const +{ + return m_GamePlugin; +} + +IPluginGame *OrganizerCore::managedGameForUpdate() const { return m_GamePlugin; } diff --git a/src/organizercore.h b/src/organizercore.h index a673065a..c206e5e7 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -99,7 +99,8 @@ public: ModListSortProxy *createModListProxyModel(); PluginListSortProxy *createPluginListProxyModel(); - MOBase::IPluginGame *managedGame() const; + MOBase::IPluginGame const *managedGame() const; + MOBase::IPluginGame *managedGameForUpdate() const; bool isArchivesInit() const { return m_ArchivesInit; } diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index 7e42f322..8fb204d8 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -18,16 +18,18 @@ along with Mod Organizer. If not, see . */ #include "selfupdater.h" + #include "utility.h" #include "installationmanager.h" +#include "iplugingame.h" #include "messagedialog.h" #include "downloadmanager.h" #include "nexusinterface.h" #include "nxmaccessmanager.h" #include -#include -#include #include +#include + #include #include #include @@ -35,7 +37,6 @@ along with Mod Organizer. If not, see . #include #include #include -#include #include @@ -62,6 +63,7 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface) , m_UpdateRequestID(-1) , m_Reply(nullptr) , m_Attempts(3) + , m_NexusDownload(nullptr) { QLibrary archiveLib("dlls\\archive.dll"); if (!archiveLib.load()) { @@ -101,12 +103,10 @@ void SelfUpdater::testForUpdate() emit updateAvailable(); return; } - - if (m_UpdateRequestID == -1) { + if (m_UpdateRequestID == -1 && m_NexusDownload != nullptr) { m_UpdateRequestID = m_Interface->requestDescription( - SkyrimInfo::getNexusModIDStatic(), this, QVariant(), - QString(), ToQString(SkyrimInfo::getNexusInfoUrlStatic()), - SkyrimInfo::getNexusGameIDStatic()); + m_NexusDownload->getNexusModOrganizerID(), this, QVariant(), + QString(), m_NexusDownload); } } @@ -123,9 +123,9 @@ void SelfUpdater::startUpdate() if (QMessageBox::question(m_Parent, tr("Update"), tr("An update is available (newest version: %1), do you want to install it?").arg(m_NewestVersion), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { - m_UpdateRequestID = m_Interface->requestFiles(SkyrimInfo::getNexusModIDStatic(), - this, m_NewestVersion, - ToQString(SkyrimInfo::getNexusInfoUrlStatic())); + m_UpdateRequestID = m_Interface->requestFiles(m_NexusDownload->getNexusModOrganizerID(), + this, m_NewestVersion, "", + m_NexusDownload); } } } @@ -434,18 +434,18 @@ void SelfUpdater::nxmFilesAvailable(int, QVariant userData, QVariant resultData, if (updateFileID != -1) { qDebug("update available: %d", updateFileID); - m_UpdateRequestID = m_Interface->requestDownloadURL(SkyrimInfo::getNexusModIDStatic(), - updateFileID, this, updateFileName, - ToQString(SkyrimInfo::getNexusInfoUrlStatic())); + m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->getNexusModOrganizerID(), + updateFileID, this, updateFileName, "", + m_NexusDownload); } else if (mainFileID != -1) { qDebug("full download required: %d", mainFileID); if (QMessageBox::question(m_Parent, tr("Update"), tr("No incremental update available for this version, " "the complete package needs to be downloaded (%1 kB)").arg(mainFileSize), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { - m_UpdateRequestID = m_Interface->requestDownloadURL(SkyrimInfo::getNexusModIDStatic(), - mainFileID, this, mainFileName, - ToQString(SkyrimInfo::getNexusInfoUrlStatic())); + m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->getNexusModOrganizerID(), + mainFileID, this, mainFileName, "", + m_NexusDownload); } } else { qCritical("no file for update found"); @@ -489,3 +489,9 @@ void SelfUpdater::nxmDownloadURLsAvailable(int, int, QVariant userData, QVariant } } } + +/** Set the game check for updates */ +void SelfUpdater::setNexusDownload(MOBase::IPluginGame const *game) +{ + m_NexusDownload = game; +} diff --git a/src/selfupdater.h b/src/selfupdater.h index 143b05cb..4fdc3d7d 100644 --- a/src/selfupdater.h +++ b/src/selfupdater.h @@ -29,6 +29,7 @@ along with Mod Organizer. If not, see . #include #include +namespace MOBase { class IPluginGame; } class NexusInterface; @@ -83,6 +84,9 @@ public: **/ MOBase::VersionInfo getVersion() const { return m_MOVersion; } + /** Set the game check for updates */ + void setNexusDownload(MOBase::IPluginGame const *game); + public slots: /** @@ -146,6 +150,7 @@ private: Archive *m_CurrentArchive; + MOBase::IPluginGame const *m_NexusDownload; }; diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 67dc85e0..cb2a3adf 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -87,11 +87,6 @@ std::wstring Fallout3Info::getNexusPage(bool nmmScheme) } } -std::wstring Fallout3Info::getNexusInfoUrlStatic() -{ - return L"http://nmm.nexusmods.com/fallout3"; -} - bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 3688bc2e..b5585eaf 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -50,8 +50,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } virtual int getNexusGameID() { return 120; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index c1eea4da..bfc31c0b 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -88,12 +88,6 @@ std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme) } -std::wstring FalloutNVInfo::getNexusInfoUrlStatic() -{ - return L"http://nmm.nexusmods.com/newvegas"; -} - - bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 024ad9aa..40e11720 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -50,8 +50,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } virtual int getNexusGameID() { return 130; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 49b3133b..45069165 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -79,9 +79,7 @@ public: virtual std::wstring getReferenceDataFile() = 0; virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; - virtual std::wstring getNexusInfoUrl() = 0; virtual int getNexusGameID() = 0; - //**Still used: SkyrimInfo::getNexusModIDStatic //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 4cd03ae8..9bd5f4b1 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -91,12 +91,6 @@ std::wstring OblivionInfo::getNexusPage(bool nmmScheme) } -std::wstring OblivionInfo::getNexusInfoUrlStatic() -{ - return L"http://nmm.nexusmods.com/oblivion"; -} - - bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index b298ed0a..b6b3d867 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -48,8 +48,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } virtual int getNexusGameID() { return 101; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f7fba7ab..9b192902 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -99,17 +99,6 @@ std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) } -std::wstring SkyrimInfo::getNexusInfoUrlStatic() -{ - return L"http://nmm.nexusmods.com/skyrim"; -} - - -int SkyrimInfo::getNexusModIDStatic() -{ - return 1334; -} - bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) { static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr }; diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 93e2a948..ee81ace3 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -51,9 +51,6 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true); - static std::wstring getNexusInfoUrlStatic(); - virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); } - static int getNexusModIDStatic(); static int getNexusGameIDStatic() { return 110; } virtual int getNexusGameID() { return getNexusGameIDStatic(); } -- cgit v1.3.1 From 29dadf52f1c217ddee7ef9e0873cb4e12797318b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Wed, 25 Nov 2015 20:40:34 +0000 Subject: Forgot to remove the redundant member --- src/mainwindow.cpp | 2 +- src/nexusinterface.cpp | 1 - src/nexusinterface.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f3ffdf6c..2d90d5b8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3814,7 +3814,7 @@ void MainWindow::on_actionEndorseMO_triggered() if (QMessageBox::question(this, tr("Endorse Mod Organizer"), tr("Do you want to endorse Mod Organizer on %1 now?").arg(ToQString(GameInfo::instance().getNexusPage())), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { - //Why pass an empty variant of we're toggling an endorsement? + //Why pass an empty variant if we're toggling an endorsement? NexusInterface::instance()->requestToggleEndorsement( m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), ""); } diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index cbb9ad48..078ca29d 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -37,7 +37,6 @@ using namespace MOShared; NexusBridge::NexusBridge(const QString &subModule) : m_Interface(NexusInterface::instance()) - , m_Url() //Lazily initialised (but redundant) , m_SubModule(subModule) { } diff --git a/src/nexusinterface.h b/src/nexusinterface.h index 9f129510..091b5446 100644 --- a/src/nexusinterface.h +++ b/src/nexusinterface.h @@ -110,7 +110,6 @@ public slots: private: NexusInterface *m_Interface; - QString m_Url; QString m_SubModule; std::set m_RequestIDs; -- cgit v1.3.1 From 82e6c98043bd18f5329e8b6d0a6f99c4d28cc0a2 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 26 Nov 2015 07:39:35 +0000 Subject: Replace last occurrence of GameInfo::getNexusGameID and remove a whole load of gameinfo.h includes --- src/browserdialog.cpp | 6 ++---- src/categories.cpp | 4 ++-- src/directoryrefresher.cpp | 1 - src/executableslist.cpp | 8 +++++--- src/executableslist.h | 5 +++-- src/installationmanager.cpp | 7 +++++-- src/mainwindow.cpp | 2 ++ src/modinfo.cpp | 1 - src/modlist.cpp | 5 +++-- src/nexusinterface.cpp | 1 + src/nexusinterface.h | 1 - src/nxmaccessmanager.cpp | 15 +++++++++++++-- src/nxmaccessmanager.h | 7 ++++++- src/organizercore.cpp | 1 + src/organizerproxy.cpp | 1 - src/pluginlist.cpp | 1 - src/settingsdialog.cpp | 3 +-- src/shared/fallout3info.h | 1 - src/shared/falloutnvinfo.h | 1 - src/shared/gameinfo.h | 33 +++++++++++++-------------------- src/shared/oblivioninfo.h | 1 - src/shared/skyriminfo.h | 1 - src/spawn.cpp | 8 +++++--- src/syncoverwritedialog.cpp | 3 ++- src/transfersavesdialog.cpp | 5 ++++- src/transfersavesdialog.h | 6 ++---- 26 files changed, 70 insertions(+), 58 deletions(-) diff --git a/src/browserdialog.cpp b/src/browserdialog.cpp index c382c112..bbdf95c5 100644 --- a/src/browserdialog.cpp +++ b/src/browserdialog.cpp @@ -18,18 +18,16 @@ along with Mod Organizer. If not, see . */ #include "browserdialog.h" + #include "ui_browserdialog.h" #include "browserview.h" - #include "messagedialog.h" #include "report.h" #include "persistentcookiejar.h" - #include "json.h" - #include -#include #include "settings.h" + #include #include #include diff --git a/src/categories.cpp b/src/categories.cpp index 400cc74b..59291a49 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -18,9 +18,10 @@ along with Mod Organizer. If not, see . */ #include "categories.h" + #include #include -#include + #include #include #include @@ -29,7 +30,6 @@ along with Mod Organizer. If not, see . using namespace MOBase; -using namespace MOShared; CategoryFactory* CategoryFactory::s_Instance = nullptr; diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index f4ad2a7d..4eac4103 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -23,7 +23,6 @@ along with Mod Organizer. If not, see . #include "utility.h" #include "report.h" #include "modinfo.h" -#include #include #include diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 2182a425..a4511ade 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -18,16 +18,18 @@ along with Mod Organizer. If not, see . */ #include "executableslist.h" -#include + +#include "iplugingame.h" +#include "utility.h" + #include #include #include -#include "utility.h" + #include using namespace MOBase; -using namespace MOShared; ExecutablesList::ExecutablesList() diff --git a/src/executableslist.h b/src/executableslist.h index 833829c8..3d5ba0ed 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -20,13 +20,14 @@ along with Mod Organizer. If not, see . #ifndef EXECUTABLESLIST_H #define EXECUTABLESLIST_H +#include "executableinfo.h" #include + #include #include -#include -#include +namespace MOBase { class IPluginGame; } /*! * @brief Information about an executable diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index a6af1a7f..4b3722b8 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -18,6 +18,7 @@ along with Mod Organizer. If not, see . */ #include "installationmanager.h" + #include "utility.h" #include "report.h" #include "categories.h" @@ -32,9 +33,9 @@ along with Mod Organizer. If not, see . #include "modinfo.h" #include #include -#include #include #include + #include #include #include @@ -42,11 +43,13 @@ along with Mod Organizer. If not, see . #include #include #include -#include #include #include #include #include + +#include + #include #include diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2d90d5b8..3a2da562 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -68,6 +68,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include "gameinfo.h" #include #include @@ -113,6 +114,7 @@ along with Mod Organizer. If not, see . #include #include #include + #ifndef Q_MOC_RUN #include #include diff --git a/src/modinfo.cpp b/src/modinfo.cpp index df34c00f..ef195bea 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -29,7 +29,6 @@ along with Mod Organizer. If not, see . #include "messagedialog.h" #include "filenamestring.h" -#include #include #include #include diff --git a/src/modlist.cpp b/src/modlist.cpp index 197250a3..9d7f32c8 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -24,15 +24,14 @@ along with Mod Organizer. If not, see . #include "qtgroupingproxy.h" #include "viewmarkingscrollbar.h" #include "modlistsortproxy.h" -#include #include #include #include + #include #include #include #include -#include #include #include #include @@ -44,7 +43,9 @@ along with Mod Organizer. If not, see . #include #include #include + #include +#include #include diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index 078ca29d..8a7c88b6 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -555,6 +555,7 @@ void NexusInterface::requestTimeout() void NexusInterface::managedGameChanged(IPluginGame const *game) { m_Game = game; + m_AccessManager->managedGameChanged(game); } diff --git a/src/nexusinterface.h b/src/nexusinterface.h index 091b5446..807d0aec 100644 --- a/src/nexusinterface.h +++ b/src/nexusinterface.h @@ -21,7 +21,6 @@ along with Mod Organizer. If not, see . #define NEXUSINTERFACE_H #include -#include #include #include diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index 0763bb71..08572d50 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -18,6 +18,8 @@ along with Mod Organizer. If not, see . */ #include "nxmaccessmanager.h" + +#include "iplugingame.h" #include "nxmurl.h" #include "report.h" #include "utility.h" @@ -26,6 +28,7 @@ along with Mod Organizer. If not, see . #include "settings.h" #include #include + #include #include #include @@ -127,9 +130,13 @@ void NXMAccessManager::startLoginCheck() void NXMAccessManager::retrieveCredentials() { qDebug("retrieving credentials"); - QNetworkRequest request(ToQString(GameInfo::instance().getNexusPage()) + + //This may be overkill as + //www.nexusmods.com/Core/Libs/Flamework/Entities/User?GetCredentials + //seems to work fine. + QNetworkRequest request(m_Game->getNexusManagementURL() + QString("/Core/Libs/Flamework/Entities/User?GetCredentials&game_id=%1" - ).arg(GameInfo::instance().getNexusGameID())); + ).arg(m_Game->getNexusGameID())); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); request.setRawHeader("User-Agent", userAgent().toUtf8()); @@ -339,3 +346,7 @@ void NXMAccessManager::loginChecked() m_LoginReply = nullptr; } +void NXMAccessManager::managedGameChanged(MOBase::IPluginGame const *game) +{ + m_Game = game; +} diff --git a/src/nxmaccessmanager.h b/src/nxmaccessmanager.h index a03dbe36..2a016cad 100644 --- a/src/nxmaccessmanager.h +++ b/src/nxmaccessmanager.h @@ -27,6 +27,7 @@ along with Mod Organizer. If not, see . #include #include +namespace MOBase { class IPluginGame; } /** * @brief access manager extended to handle nxm links @@ -84,7 +85,9 @@ private slots: void loginError(QNetworkReply::NetworkError errorCode); void loginTimeout(); -public slots: +public: + //This would be a slot but the NexusInterface code calls this + void managedGameChanged(MOBase::IPluginGame const *game); protected: @@ -127,6 +130,8 @@ private: LOGIN_VALID } m_LoginState = LOGIN_NOT_CHECKED; + MOBase::IPluginGame const *m_Game; + }; #endif // NXMACCESSMANAGER_H diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 7473ec3e..66a3799a 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -162,6 +162,7 @@ OrganizerCore::OrganizerCore(const QSettings &initSettings) connect(NexusInterface::instance()->getAccessManager(), SIGNAL(loginSuccessful(bool)), this, SLOT(loginSuccessful(bool))); connect(NexusInterface::instance()->getAccessManager(), SIGNAL(loginFailed(QString)), this, SLOT(loginFailed(QString))); + //This seems awfully imperative connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_Settings, SLOT(managedGameChanged(MOBase::IPluginGame const *))); connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_DownloadManager, SLOT(managedGameChanged(MOBase::IPluginGame const *))); connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame const *))); diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index fdc60a27..ba07c154 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -1,6 +1,5 @@ #include "organizerproxy.h" -#include #include #include diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 48b27f05..7a609374 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -24,7 +24,6 @@ along with Mod Organizer. If not, see . #include "scopeguard.h" #include "modinfo.h" #include -#include #include #include #include diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 36e177ab..c7f15dc9 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -24,19 +24,18 @@ along with Mod Organizer. If not, see . #include "helper.h" #include "noeditdelegate.h" #include "iplugingame.h" -#include #include "settings.h" #include #include #include #include + #define WIN32_LEAN_AND_MEAN #include using namespace MOBase; -using namespace MOShared; SettingsDialog::SettingsDialog(QWidget *parent) diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index b5585eaf..e6064825 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -50,7 +50,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual int getNexusGameID() { return 120; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 40e11720..aa187fb3 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -50,7 +50,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual int getNexusGameID() { return 130; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 45069165..b6a4f142 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -47,29 +47,30 @@ public: TYPE_SKYRIM }; - enum LoadOrderMechanism { - TYPE_FILETIME, - TYPE_PLUGINSTXT - }; - public: virtual ~GameInfo() {} - //**USED ONLY IN HOOKDLL - virtual std::wstring getRegPath() = 0; - //**Used only in savegame which needs refactoring a lot. virtual GameInfo::Type getType() = 0; + //**Used only in savegame which needs refactoring a lot. + // get a list of file extensions for additional files belonging to a save game + virtual std::vector getSavegameAttachmentExtensions() = 0; + //**Currently only used in a nasty mess at initialisation time. virtual std::wstring getGameName() const = 0; //**USED IN HOOKDLL and in initialisation virtual std::wstring getGameDirectory() const; - // get a list of file extensions for additional files belonging to a save game - virtual std::vector getSavegameAttachmentExtensions() = 0; + //**USED IN HOOKDLL and initialisation + // initialise with the path to the mo directory (needs to be where hook.dll is stored). This + // needs to be called before the instance can be retrieved + static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); + + //**USED ONLY IN HOOKDLL + virtual std::wstring getRegPath() = 0; //**USED ONLY IN HOOKDLL // file name of this games ini file(s) @@ -78,20 +79,12 @@ public: //**USED ONLY IN HOOKDLL virtual std::wstring getReferenceDataFile() = 0; - virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; - virtual int getNexusGameID() = 0; - //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; -public: - - //**USED IN HOOKDLL - // initialise with the path to the mo directory (needs to be where hook.dll is stored). This - // needs to be called before the instance can be retrieved - static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); + virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; - //**USED IN HOOKDLL + //**USED IN HOOKDLL and everywhere that uses GameInfo static GameInfo& instance(); protected: diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index b6b3d867..f9045703 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -48,7 +48,6 @@ public: virtual std::wstring getReferenceDataFile(); virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual int getNexusGameID() { return 101; } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index ee81ace3..47a35b3e 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -52,7 +52,6 @@ public: virtual std::wstring getNexusPage(bool nmmScheme = true); static int getNexusGameIDStatic() { return 110; } - virtual int getNexusGameID() { return getNexusGameIDStatic(); } virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); diff --git a/src/spawn.cpp b/src/spawn.cpp index c79714bb..49e89a8b 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -18,18 +18,20 @@ along with Mod Organizer. If not, see . */ #include "spawn.h" + #include "report.h" #include "utility.h" -#include -#include #include #include -#include #include #include + #include #include +#include + +#include using namespace MOBase; using namespace MOShared; diff --git a/src/syncoverwritedialog.cpp b/src/syncoverwritedialog.cpp index 0e3e98d7..aeed0a55 100644 --- a/src/syncoverwritedialog.cpp +++ b/src/syncoverwritedialog.cpp @@ -18,10 +18,11 @@ along with Mod Organizer. If not, see . */ #include "syncoverwritedialog.h" + #include "ui_syncoverwritedialog.h" #include #include -#include + #include #include #include diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index d47d2bb0..4cb20944 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -18,12 +18,15 @@ along with Mod Organizer. If not, see . */ #include "transfersavesdialog.h" + #include "ui_transfersavesdialog.h" +#include "iplugingame.h" #include "savegamegamebyro.h" #include "utility.h" -#include + #include #include + #include #include diff --git a/src/transfersavesdialog.h b/src/transfersavesdialog.h index d9ea5b29..e2c556b4 100644 --- a/src/transfersavesdialog.h +++ b/src/transfersavesdialog.h @@ -22,11 +22,9 @@ along with Mod Organizer. If not, see . #include "tutorabledialog.h" #include "profile.h" -#include -namespace Ui { -class TransferSavesDialog; -} +namespace Ui { class TransferSavesDialog; } +namespace MOBase { class IPluginGame; } class SaveGame; -- cgit v1.3.1 From dd37152eae382ee95535b289b17b0a727e4038f5 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 26 Nov 2015 17:48:50 +0000 Subject: This removes getNexusPage from GameInfo and is currently in the game plugin. I'm looking to move it to the nexus interface though as it doesn't really relate to the game plugin. I've also removed the MananagementURL as - you can log into nexus without needing to specify the game - See above - it doesn't belong with the game plugin This gets rid of all dependencies bar game saving and logging in --- src/mainwindow.cpp | 25 ++++++++++++++----------- src/modinfodialog.cpp | 14 +++++++++++--- src/nexusinterface.cpp | 13 +++++++++---- src/nxmaccessmanager.cpp | 35 ++++++++++++----------------------- src/nxmaccessmanager.h | 6 ------ src/shared/fallout3info.cpp | 9 --------- src/shared/fallout3info.h | 2 -- src/shared/falloutnvinfo.cpp | 10 ---------- src/shared/falloutnvinfo.h | 2 -- src/shared/gameinfo.h | 2 -- src/shared/oblivioninfo.cpp | 14 -------------- src/shared/oblivioninfo.h | 2 -- src/shared/skyriminfo.cpp | 11 ----------- src/shared/skyriminfo.h | 4 ---- 14 files changed, 46 insertions(+), 103 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3a2da562..3f3d5286 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -19,6 +19,7 @@ along with Mod Organizer. If not, see . #include "mainwindow.h" #include "ui_mainwindow.h" + #include "spawn.h" #include "report.h" #include "modlist.h" @@ -68,7 +69,7 @@ along with Mod Organizer. If not, see . #include #include #include -#include "gameinfo.h" +#include #include #include @@ -95,10 +96,6 @@ along with Mod Organizer. If not, see . #include #include #include -#include -#include -#include -#include #include #include #include @@ -113,7 +110,6 @@ along with Mod Organizer. If not, see . #endif #include #include -#include #ifndef Q_MOC_RUN #include @@ -123,6 +119,11 @@ along with Mod Organizer. If not, see . #include #endif +#include +#include +#include +#include + #include #include #include @@ -2528,7 +2529,7 @@ void MainWindow::visitOnNexus_clicked() { int modID = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(m_ContextRow, 0), Qt::UserRole).toInt(); if (modID > 0) { - nexusLinkActivated(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID)); + nexusLinkActivated(QString("%1/mods/%2").arg(m_OrganizerCore.managedGame()->getNexusDisplayURL()).arg(modID)); } else { MessageDialog::showMessage(tr("Nexus ID for this Mod is unknown"), this); } @@ -3420,7 +3421,9 @@ void MainWindow::on_actionSettings_triggered() void MainWindow::on_actionNexus_triggered() { - ::ShellExecuteW(nullptr, L"open", GameInfo::instance().getNexusPage(false).c_str(), nullptr, nullptr, SW_SHOWNORMAL); + ::ShellExecuteW(nullptr, L"open", + m_OrganizerCore.managedGame()->getNexusDisplayURL().toStdWString().c_str(), + nullptr, nullptr, SW_SHOWNORMAL); } @@ -3814,11 +3817,11 @@ void MainWindow::on_actionUpdate_triggered() void MainWindow::on_actionEndorseMO_triggered() { if (QMessageBox::question(this, tr("Endorse Mod Organizer"), - tr("Do you want to endorse Mod Organizer on %1 now?").arg(ToQString(GameInfo::instance().getNexusPage())), + tr("Do you want to endorse Mod Organizer on %1 now?").arg( + m_OrganizerCore.managedGame()->getNexusDisplayURL()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { - //Why pass an empty variant if we're toggling an endorsement? NexusInterface::instance()->requestToggleEndorsement( - m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), ""); + m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString()); } } diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index 35da228b..c4acb31e 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -20,6 +20,7 @@ along with Mod Organizer. If not, see . #include "modinfodialog.h" #include "ui_modinfodialog.h" +#include "iplugingame.h" #include "report.h" #include "utility.h" #include "messagedialog.h" @@ -36,9 +37,11 @@ along with Mod Organizer. If not, see . #include #include #include +#include + #include + #include -#include using namespace MOBase; @@ -688,7 +691,9 @@ void ModInfoDialog::on_visitNexusLabel_linkActivated(const QString &link) void ModInfoDialog::linkClicked(const QUrl &url) { - if (url.toString().startsWith(ToQString(GameInfo::instance().getNexusPage(false)))) { + //FIXME: See elsewhere. This needs to be a property of the installed mod. + IPluginGame *game = qApp->property("managed_game").value(); + if (game->isRelatedURL(url)) { this->close(); emit nexusLinkActivated(url.toString()); } else { @@ -832,7 +837,10 @@ void ModInfoDialog::activateNexusTab() QLineEdit *modIDEdit = findChild("modIDEdit"); int modID = modIDEdit->text().toInt(); if (modID != 0) { - QString nexusLink = QString("%1/downloads/file.php?id=%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID); + //FIXME: We should remember the game for which this mod was installed in the + //modInfo and get the web page via that. + IPluginGame *game = qApp->property("managed_game").value(); + QString nexusLink = QString("%1/downloads/file.php?id=%2").arg(game->getNexusDisplayURL()).arg(modID); QLabel *visitNexusLabel = findChild("visitNexusLabel"); visitNexusLabel->setText(tr("Visit on Nexus").arg(nexusLink)); visitNexusLabel->setToolTip(nexusLink); diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index 8a7c88b6..b6843c57 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -555,9 +555,14 @@ void NexusInterface::requestTimeout() void NexusInterface::managedGameChanged(IPluginGame const *game) { m_Game = game; - m_AccessManager->managedGameChanged(game); } +namespace { + QString get_management_url(MOBase::IPluginGame const *game) + { + return "http://nmm.nexusmods.com/" + game->getNexusName().toLower(); + } +} NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , NexusInterface::NXMRequestInfo::Type type @@ -573,7 +578,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(game->getNexusManagementURL()) + , m_URL(get_management_url(game)) , m_SubModule(subModule) , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) @@ -594,7 +599,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector modIDList , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(game->getNexusManagementURL()) + , m_URL(get_management_url(game)) , m_SubModule(subModule) , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) @@ -615,7 +620,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID , m_Timeout(nullptr) , m_Reroute(false) , m_ID(s_NextID.fetchAndAddAcquire(1)) - , m_URL(game->getNexusManagementURL()) + , m_URL(get_management_url(game)) , m_SubModule(subModule) , m_NexusGameID(game->getNexusGameID()) , m_Endorse(false) diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index 08572d50..c37131eb 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -26,7 +26,6 @@ along with Mod Organizer. If not, see . #include "selfupdater.h" #include "persistentcookiejar.h" #include "settings.h" -#include #include #include @@ -42,10 +41,11 @@ along with Mod Organizer. If not, see . #include #include - using namespace MOBase; -using namespace MOShared; +namespace { + QString const Nexus_Management_URL("http://nmm.nexusmods.com"); +} // unfortunately Nexus doesn't seem to document these states, all I know is all these listed // are considered premium (27 should be lifetime premium) @@ -99,8 +99,7 @@ QNetworkReply *NXMAccessManager::createRequest( void NXMAccessManager::showCookies() const { - QUrl url(ToQString(GameInfo::instance().getNexusPage()) + "/"); - + QUrl url(Nexus_Management_URL + "/"); for (const QNetworkCookie &cookie : cookieJar()->cookiesForUrl(url)) { qDebug("%s - %s (expires: %s)", cookie.name().constData(), cookie.value().constData(), @@ -113,7 +112,7 @@ void NXMAccessManager::startLoginCheck() { if (hasLoginCookies()) { qDebug("validating login cookies"); - QNetworkRequest request(ToQString(GameInfo::instance().getNexusPage()) + "/Sessions/?Validate"); + QNetworkRequest request(Nexus_Management_URL + "/Sessions/?Validate"); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); request.setRawHeader("User-Agent", userAgent().toUtf8()); @@ -131,12 +130,7 @@ void NXMAccessManager::retrieveCredentials() { qDebug("retrieving credentials"); - //This may be overkill as - //www.nexusmods.com/Core/Libs/Flamework/Entities/User?GetCredentials - //seems to work fine. - QNetworkRequest request(m_Game->getNexusManagementURL() - + QString("/Core/Libs/Flamework/Entities/User?GetCredentials&game_id=%1" - ).arg(m_Game->getNexusGameID())); + QNetworkRequest request(Nexus_Management_URL + "/Core/Libs/Flamework/Entities/User?GetCredentials"); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); request.setRawHeader("User-Agent", userAgent().toUtf8()); @@ -231,8 +225,9 @@ QString NXMAccessManager::userAgent(const QString &subModule) const void NXMAccessManager::pageLogin() { qDebug("logging %s in on Nexus", qPrintable(m_Username)); - QString requestString = (ToQString(GameInfo::instance().getNexusPage()) + "/Sessions/?Login&uri=%1") - .arg(QString(QUrl::toPercentEncoding(ToQString(GameInfo::instance().getNexusPage())))); + + QString requestString = (Nexus_Management_URL + "/Sessions/?Login&uri=%1") + .arg(QString(QUrl::toPercentEncoding(Nexus_Management_URL))); QNetworkRequest request(requestString); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); @@ -296,15 +291,14 @@ void NXMAccessManager::loginError(QNetworkReply::NetworkError) bool NXMAccessManager::hasLoginCookies() const { - bool sidCookie = false; - QUrl url(ToQString(GameInfo::instance().getNexusPage()) + "/"); + QUrl url(Nexus_Management_URL + "/"); QList cookies = cookieJar()->cookiesForUrl(url); for (const QNetworkCookie &cookie : cookies) { if (cookie.name() == "sid") { - sidCookie = true; + return true; } } - return sidCookie; + return false; } @@ -345,8 +339,3 @@ void NXMAccessManager::loginChecked() m_LoginReply->deleteLater(); m_LoginReply = nullptr; } - -void NXMAccessManager::managedGameChanged(MOBase::IPluginGame const *game) -{ - m_Game = game; -} diff --git a/src/nxmaccessmanager.h b/src/nxmaccessmanager.h index 2a016cad..82bd2bd5 100644 --- a/src/nxmaccessmanager.h +++ b/src/nxmaccessmanager.h @@ -85,10 +85,6 @@ private slots: void loginError(QNetworkReply::NetworkError errorCode); void loginTimeout(); -public: - //This would be a slot but the NexusInterface code calls this - void managedGameChanged(MOBase::IPluginGame const *game); - protected: virtual QNetworkReply *createRequest( @@ -130,8 +126,6 @@ private: LOGIN_VALID } m_LoginState = LOGIN_NOT_CHECKED; - MOBase::IPluginGame const *m_Game; - }; #endif // NXMACCESSMANAGER_H diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index cb2a3adf..043a25dc 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -78,15 +78,6 @@ std::wstring Fallout3Info::getReferenceDataFile() return L"Fallout - Meshes.bsa"; } -std::wstring Fallout3Info::getNexusPage(bool nmmScheme) -{ - if (nmmScheme) { - return L"http://nmm.nexusmods.com/fallout3"; - } else { - return L"http://www.nexusmods.com/fallout3"; - } -} - bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index e6064825..ed525588 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -49,8 +49,6 @@ public: virtual std::wstring getReferenceDataFile(); - virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index bfc31c0b..88985ad6 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -78,16 +78,6 @@ std::wstring FalloutNVInfo::getReferenceDataFile() return L"Fallout - Meshes.bsa"; } -std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme) -{ - if (nmmScheme) { - return L"http://nmm.nexusmods.com/newvegas"; - } else { - return L"http://www.nexusmods.com/newvegas"; - } -} - - bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index aa187fb3..ee67ac17 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -49,8 +49,6 @@ public: virtual std::wstring getReferenceDataFile(); - virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index b6a4f142..de3af8b4 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -82,8 +82,6 @@ public: //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; - virtual std::wstring getNexusPage(bool nmmScheme = true) = 0; - //**USED IN HOOKDLL and everywhere that uses GameInfo static GameInfo& instance(); diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 9bd5f4b1..a3dc3986 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -77,20 +77,6 @@ std::vector OblivionInfo::getIniFileNames() return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini"); } - - - - -std::wstring OblivionInfo::getNexusPage(bool nmmScheme) -{ - if (nmmScheme) { - return L"http://nmm.nexusmods.com/oblivion"; - } else { - return L"http://www.nexusmods.com/oblivion"; - } -} - - bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr }; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index f9045703..00048930 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -47,8 +47,6 @@ public: virtual std::wstring getReferenceDataFile(); - virtual std::wstring getNexusPage(bool nmmScheme = true); - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index 9b192902..869ac47d 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -88,17 +88,6 @@ std::wstring SkyrimInfo::getReferenceDataFile() return L"Skyrim - Meshes.bsa"; } - -std::wstring SkyrimInfo::getNexusPage(bool nmmScheme) -{ - if (nmmScheme) { - return L"http://nmm.nexusmods.com/skyrim"; - } else { - return L"http://www.nexusmods.com/skyrim"; - } -} - - bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) { static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr }; diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 47a35b3e..afba1974 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -49,10 +49,6 @@ public: virtual std::wstring getReferenceDataFile(); - virtual std::wstring getNexusPage(bool nmmScheme = true); - - static int getNexusGameIDStatic() { return 110; } - virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath); private: -- cgit v1.3.1 From 1b1fc247dfc4eade8ab34679ca7c58e850a0a1a3 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 26 Nov 2015 17:54:25 +0000 Subject: Remove remaining gameInfo --- src/modinfodialog.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index c4acb31e..70ae5deb 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -28,7 +28,6 @@ along with Mod Organizer. If not, see . #include "questionboxmemory.h" #include "settings.h" #include "categories.h" -#include #include #include @@ -45,7 +44,6 @@ along with Mod Organizer. If not, see . using namespace MOBase; -using namespace MOShared; class ModFileListWidget : public QListWidgetItem { -- cgit v1.3.1 From 2025145ff6e1ddf1b433eae2f9418e10a6fea82e Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 26 Nov 2015 21:02:45 +0000 Subject: Replaced the IPluginGame getNexusDisplayURL with some APIs in NexusInterface It makes more sense to have them here as they have very little to do with the game, more to do with the origin of the mod. --- src/mainwindow.cpp | 6 +++--- src/modinfodialog.cpp | 13 +++++-------- src/nexusinterface.cpp | 16 ++++++++++++++++ src/nexusinterface.h | 20 ++++++++++++++++++++ 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3f3d5286..dd5a1b01 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2529,7 +2529,7 @@ void MainWindow::visitOnNexus_clicked() { int modID = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(m_ContextRow, 0), Qt::UserRole).toInt(); if (modID > 0) { - nexusLinkActivated(QString("%1/mods/%2").arg(m_OrganizerCore.managedGame()->getNexusDisplayURL()).arg(modID)); + nexusLinkActivated(NexusInterface::instance()->getModURL(modID)); } else { MessageDialog::showMessage(tr("Nexus ID for this Mod is unknown"), this); } @@ -3422,7 +3422,7 @@ void MainWindow::on_actionSettings_triggered() void MainWindow::on_actionNexus_triggered() { ::ShellExecuteW(nullptr, L"open", - m_OrganizerCore.managedGame()->getNexusDisplayURL().toStdWString().c_str(), + NexusInterface::instance()->getGameURL().toStdWString().c_str(), nullptr, nullptr, SW_SHOWNORMAL); } @@ -3818,7 +3818,7 @@ void MainWindow::on_actionEndorseMO_triggered() { if (QMessageBox::question(this, tr("Endorse Mod Organizer"), tr("Do you want to endorse Mod Organizer on %1 now?").arg( - m_OrganizerCore.managedGame()->getNexusDisplayURL()), + NexusInterface::instance()->getGameURL()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { NexusInterface::instance()->requestToggleEndorsement( m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString()); diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index 70ae5deb..687f641e 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -44,6 +44,7 @@ along with Mod Organizer. If not, see . using namespace MOBase; +using namespace MOShared; class ModFileListWidget : public QListWidgetItem { @@ -689,9 +690,9 @@ void ModInfoDialog::on_visitNexusLabel_linkActivated(const QString &link) void ModInfoDialog::linkClicked(const QUrl &url) { - //FIXME: See elsewhere. This needs to be a property of the installed mod. - IPluginGame *game = qApp->property("managed_game").value(); - if (game->isRelatedURL(url)) { + //Ideally we'd ask the mod for the game and the web service then pass the game + //and URL to the web service + if (NexusInterface::instance()->isURLGameRelated(url)) { this->close(); emit nexusLinkActivated(url.toString()); } else { @@ -835,15 +836,11 @@ void ModInfoDialog::activateNexusTab() QLineEdit *modIDEdit = findChild("modIDEdit"); int modID = modIDEdit->text().toInt(); if (modID != 0) { - //FIXME: We should remember the game for which this mod was installed in the - //modInfo and get the web page via that. - IPluginGame *game = qApp->property("managed_game").value(); - QString nexusLink = QString("%1/downloads/file.php?id=%2").arg(game->getNexusDisplayURL()).arg(modID); + QString nexusLink = NexusInterface::instance()->getModURL(modID); QLabel *visitNexusLabel = findChild("visitNexusLabel"); visitNexusLabel->setText(tr("Visit on Nexus").arg(nexusLink)); visitNexusLabel->setToolTip(nexusLink); - if (m_ModInfo->getNexusDescription().isEmpty() || QDateTime::currentDateTime() > m_ModInfo->getLastNexusQuery().addDays(1)) { refreshNexusData(modID); diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index b6843c57..7a0b0a17 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -240,6 +240,22 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo } } +bool NexusInterface::isURLGameRelated(const QUrl &url) const +{ + QString const name(url.toString()); + return name.startsWith(getGameURL() + "/") || + name.startsWith("http://" + m_Game->getNexusName().toLower() + ".nexusmods.com/mods/"); +} + +QString NexusInterface::getGameURL() const +{ + return "http://www.nexusmods.com/" + m_Game->getNexusName().toLower(); +} + +QString NexusInterface::getModURL(int modID) const +{ + return QString("%1/mods/%2").arg(getGameURL()).arg(modID); +} int NexusInterface::requestDescription(int modID, QObject *receiver, QVariant userData, const QString &subModule, MOBase::IPluginGame const *game) diff --git a/src/nexusinterface.h b/src/nexusinterface.h index 807d0aec..3fa8f564 100644 --- a/src/nexusinterface.h +++ b/src/nexusinterface.h @@ -325,6 +325,26 @@ public: */ MOBase::IPluginGame const *managedGame() const; + /** + * @brief see if the passed URL is related to the current game + * + * Arguably, this should optionally take a gameplugin pointer + */ + bool isURLGameRelated(QUrl const &url) const; + + /** + * @brief Get the nexus page for the current game + * + * Arguably, this should optionally take a gameplugin pointer + */ + QString getGameURL() const; + + /** + * @brief Get the URL for the mod web page + * @param modID + */ + QString getModURL(int modID) const; + signals: void requestNXMDownload(const QString &url); -- cgit v1.3.1 From ca54ee2e9a8f1d49d81d5c3b66a860b9b16992d6 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 26 Nov 2015 21:22:47 +0000 Subject: Renamed getNexusName to getGameShortName as previously because it hopefully isn't too nexus related. --- src/downloadmanager.cpp | 2 +- src/mainwindow.cpp | 2 +- src/nexusinterface.cpp | 6 +++--- src/organizercore.cpp | 4 ++-- src/settings.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 4a6769b1..e95a315f 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -450,7 +450,7 @@ void DownloadManager::addNXMDownload(const QString &url) { NXMUrl nxmInfo(url); - QString managedGame = m_ManagedGame->getNexusName(); + QString managedGame = m_ManagedGame->getGameShortName(); qDebug("add nxm download: %s", qPrintable(url)); if (nxmInfo.game().compare(managedGame, Qt::CaseInsensitive) != 0) { qDebug("download requested for wrong game (game: %s, url: %s)", qPrintable(managedGame), qPrintable(nxmInfo.game())); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index dd5a1b01..152baee7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4401,7 +4401,7 @@ void MainWindow::on_bossButton_clicked() parameters << "--unattended" << "--stdout" << "--noreport" - << "--game" << m_OrganizerCore.managedGame()->getNexusName() + << "--game" << m_OrganizerCore.managedGame()->getGameShortName() << "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath()) << "--out" << outPath; diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index 7a0b0a17..aadfdc1e 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -244,12 +244,12 @@ bool NexusInterface::isURLGameRelated(const QUrl &url) const { QString const name(url.toString()); return name.startsWith(getGameURL() + "/") || - name.startsWith("http://" + m_Game->getNexusName().toLower() + ".nexusmods.com/mods/"); + name.startsWith("http://" + m_Game->getGameShortName().toLower() + ".nexusmods.com/mods/"); } QString NexusInterface::getGameURL() const { - return "http://www.nexusmods.com/" + m_Game->getNexusName().toLower(); + return "http://www.nexusmods.com/" + m_Game->getGameShortName().toLower(); } QString NexusInterface::getModURL(int modID) const @@ -576,7 +576,7 @@ void NexusInterface::managedGameChanged(IPluginGame const *game) namespace { QString get_management_url(MOBase::IPluginGame const *game) { - return "http://nmm.nexusmods.com/" + game->getNexusName().toLower(); + return "http://nmm.nexusmods.com/" + game->getGameShortName().toLower(); } } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 66a3799a..042a9f1e 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -401,8 +401,8 @@ void OrganizerCore::connectPlugins(PluginContainer *container) } //Do this the hard way for (const IPluginGame * const game : container->plugins()) { - QString n = game->getNexusName(); - if (game->getNexusName() == "Skyrim") { + QString n = game->getGameShortName(); + if (game->getGameShortName() == "Skyrim") { m_Updater.setNexusDownload(game); break; } diff --git a/src/settings.cpp b/src/settings.cpp index 95462c82..e175b210 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -108,7 +108,7 @@ void Settings::registerAsNXMHandler(bool force) std::wstring nxmPath = ToWString(QCoreApplication::applicationDirPath() + "/nxmhandler.exe"); std::wstring executable = ToWString(QCoreApplication::applicationFilePath()); std::wstring mode = force ? L"forcereg" : L"reg"; - std::wstring parameters = mode + L" " + m_GamePlugin->getNexusName().toStdWString() + L" \"" + executable + L"\""; + std::wstring parameters = mode + L" " + m_GamePlugin->getGameShortName().toStdWString() + L" \"" + executable + L"\""; HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL); if ((int)res <= 32) { QMessageBox::critical(nullptr, tr("Failed"), -- cgit v1.3.1 From 2e78a381ea43533769690af0f58989bcbec36d8e Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Fri, 27 Nov 2015 08:13:21 +0000 Subject: Fix sconstruct issue from main line --- SConstruct | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SConstruct b/SConstruct index eb3da432..5df6f96a 100644 --- a/SConstruct +++ b/SConstruct @@ -50,10 +50,6 @@ def setup_config_variables(): PathVariable.PathIsDir), PathVariable('SEVENZIPPATH', 'Path to 7zip sources', sevenzippath, PathVariable.PathIsDir), - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir). - PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, - PathVariable.PathIsDir), PathVariable('ZLIBPATH', 'Path to zlib install', zlibpath, PathVariable.PathIsDir) ) -- cgit v1.3.1 From 9e2bcffc32157b99a2d7364b869a4423ba827a32 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 28 Nov 2015 14:53:32 +0000 Subject: Reworked startup considerably so now no longer dependant on GameInfo Did some const correctness to the "managed_game" property as you shouldn't really be altering the plugin details whilst MO is running --- src/directoryrefresher.cpp | 2 +- src/loadmechanism.cpp | 14 ++-- src/main.cpp | 204 ++++++++++++++++++++++++++++++--------------- src/modinfo.cpp | 6 +- src/organizercore.cpp | 18 ++-- src/organizercore.h | 5 +- src/settingsdialog.cpp | 2 +- src/shared/fallout3info.h | 2 - src/shared/falloutnvinfo.h | 2 - src/shared/gameinfo.h | 7 +- src/shared/oblivioninfo.h | 2 - src/shared/skyriminfo.h | 2 - 12 files changed, 156 insertions(+), 110 deletions(-) diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index 4eac4103..f50a717e 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -144,7 +144,7 @@ void DirectoryRefresher::refresh() m_DirectoryStructure = new DirectoryEntry(L"data", nullptr, 0); - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); std::wstring dataDirectory = QDir::toNativeSeparators(game->dataDirectory().absolutePath()).toStdWString(); m_DirectoryStructure->addFromOrigin(L"data", dataDirectory, 0); diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 0d95c51c..521473b0 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -65,7 +65,7 @@ void LoadMechanism::removeHintFile(QDir &targetDirectory) bool LoadMechanism::isDirectLoadingSupported() { //FIXME: Seriously? isn't there a 'do i need steam' thing? - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); if (game->gameName().compare("oblivion", Qt::CaseInsensitive) == 0) { // oblivion can be loaded directly if it's not the steam variant return !game->gameDirectory().exists("steam_api.dll"); @@ -77,7 +77,7 @@ bool LoadMechanism::isDirectLoadingSupported() bool LoadMechanism::isScriptExtenderSupported() { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); ScriptExtender *extender = game->feature(); // test if there even is an extender for the managed game and if so whether it's installed @@ -93,7 +93,7 @@ bool LoadMechanism::isProxyDLLSupported() // plus: the proxy dll hasn't been working for at least the whole 1.12.x versions of MO and // noone reported it so why maintain an unused feature? return false; -/* IPluginGame *game = qApp->property("managed_game").value(); +/* IPluginGame const *game = qApp->property("managed_game").value(); return game->gameDirectory().exists(QString::fromStdWString(AppConfig::proxyDLLTarget()));*/ } @@ -125,7 +125,7 @@ bool LoadMechanism::hashIdentical(const QString &fileNameLHS, const QString &fil void LoadMechanism::deactivateScriptExtender() { try { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); ScriptExtender *extender = game->feature(); if (extender == nullptr) { throw MyException(QObject::tr("game doesn't support a script extender")); @@ -151,7 +151,7 @@ void LoadMechanism::deactivateScriptExtender() void LoadMechanism::deactivateProxyDLL() { try { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget())); @@ -180,7 +180,7 @@ void LoadMechanism::deactivateProxyDLL() void LoadMechanism::activateScriptExtender() { try { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); ScriptExtender *extender = game->feature(); if (extender == nullptr) { throw MyException(QObject::tr("game doesn't support a script extender")); @@ -220,7 +220,7 @@ void LoadMechanism::activateScriptExtender() void LoadMechanism::activateProxyDLL() { try { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget())); diff --git a/src/main.cpp b/src/main.cpp index 72a63dc6..78145a74 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -330,6 +330,122 @@ QString determineProfile(QStringList &arguments, const QSettings &settings) return selectedProfileName; } +MOBase::IPluginGame *selectGame(QSettings &settings, QDir const &gamePath, MOBase::IPluginGame *game) +{ + settings.setValue("gameName", game->gameName()); + if (gamePath == game->gameDirectory()) { + settings.remove("gamePath"); + } else { + QString gameDir = gamePath.absolutePath(); + game->setGamePath(gameDir); + settings.setValue("gamePath", QDir::toNativeSeparators(gameDir).toUtf8().constData()); + } + return game; //Woot +} + + +MOBase::IPluginGame *determineCurrentGame(QString const &moPath, QSettings &settings, PluginContainer const &plugins) +{ + //Determine what game we are running where. Be very paranoid in case the + //user has done something odd. + //If the game name has been set up, use that. + QString gameName = settings.value("gameName", "").toString(); + if (!gameName.isEmpty()) { + MOBase::IPluginGame *game = plugins.managedGame(gameName); + if (game == nullptr) { + reportError(QObject::tr("Plugin to handle %1 no longer installed").arg(gameName)); + return nullptr; + } + QString gamePath = QString::fromUtf8(settings.value("gamePath", "").toByteArray()); + if (gamePath == "") { + gamePath = game->gameDirectory().absolutePath(); + } + QDir gameDir(gamePath); + if (game->looksValid(gameDir)) { + return selectGame(settings, gameDir, game); + } + } + + //gameName wasn't set, or otherwise can't be found. Try looking through all + //the plugins using the gamePath + QString gamePath = QString::fromUtf8(settings.value("gamePath", "").toByteArray()); + if (!gamePath.isEmpty()) { + QDir gameDir(gamePath); + //Look to see if one of the installed games binary file exists in the current + //game directory. + for (IPluginGame * const game : plugins.plugins()) { + if (game->looksValid(gameDir)) { + return selectGame(settings, gameDir, game); + } + } + } + + //OK, we are in a new setup or existing info is useless. + //See if MO has been installed inside a game directory + for (IPluginGame * const game : plugins.plugins()) { + if (game->isInstalled() && moPath.startsWith(game->gameDirectory().absolutePath())) { + //Found it. + return selectGame(settings, game->gameDirectory(), game); + } + } + + //Try walking up the directory tree to see if MO has been installed inside a game + { + QDir gameDir(moPath); + do { + //Look to see if one of the installed games binary file exists in the current + //directory. + for (IPluginGame * const game : plugins.plugins()) { + if (game->looksValid(gameDir)) { + return selectGame(settings, gameDir, game); + } + } + //OK, chop off the last directory and try again + } while (gameDir.cdUp()); + } + + //Then try a selection dialogue. + if (!gamePath.isEmpty() || !gameName.isEmpty()) { + reportError(QObject::tr("Could not use configuration settings for game \"%1\", path \"%2\"."). + arg(gameName).arg(gamePath)); + } + + SelectionDialog selection(QObject::tr("Please select the game to manage"), nullptr, QSize(32, 32)); + + for (IPluginGame *game : plugins.plugins()) { + if (game->isInstalled()) { + QString path = game->gameDirectory().absolutePath(); + selection.addChoice(game->gameIcon(), game->gameName(), path, QVariant::fromValue(game)); + } + } + + selection.addChoice(QString("Browse..."), QString(), QVariant::fromValue(static_cast(nullptr))); + + while (selection.exec() != QDialog::Rejected) { + IPluginGame * game = selection.getChoiceData().value(); + if (game != nullptr) { + return selectGame(settings, game->gameDirectory(), game); + } + + gamePath = QFileDialog::getExistingDirectory( + nullptr, QObject::tr("Please select the game to manage"), QString(), + QFileDialog::ShowDirsOnly); + + if (!gamePath.isEmpty()) { + QDir gameDir(gamePath); + for (IPluginGame * const game : plugins.plugins()) { + if (game->looksValid(gameDir)) { + return selectGame(settings, gameDir, game); + } + } + reportError(QObject::tr("No game identified in \"%1\". The directory is required to contain " + "the game binary and its launcher.").arg(gamePath)); + } + } + + return nullptr; +} + int main(int argc, char *argv[]) { MOApplication application(argc, argv); @@ -443,86 +559,36 @@ int main(int argc, char *argv[]) PluginContainer pluginContainer(&organizer); pluginContainer.loadPlugins(); - QString gamePath = QString::fromUtf8(settings.value("gamePath", "").toByteArray()); - bool done = false; - while (!done) { - if (!GameInfo::init(ToWString(application.applicationDirPath()), ToWString(QDir::toNativeSeparators(gamePath)))) { - if (!gamePath.isEmpty()) { - reportError(QObject::tr("No game identified in \"%1\". The directory is required to contain " - "the game binary and its launcher.").arg(gamePath)); - } - SelectionDialog selection(QObject::tr("Please select the game to manage"), nullptr, QSize(32, 32)); - - for (const IPluginGame * const game : pluginContainer.plugins()) { - if (game->isInstalled()) { - QString path = game->gameDirectory().absolutePath(); - selection.addChoice(game->gameIcon(), game->gameName(), path, path); - } - } - - selection.addChoice(QString("Browse..."), QString(), QString()); - - if (selection.exec() == QDialog::Rejected) { - gamePath = ""; - done = true; - } else { - gamePath = QDir::cleanPath(selection.getChoiceData().toString()); - if (gamePath.isEmpty()) { - gamePath = QFileDialog::getExistingDirectory( - nullptr, QObject::tr("Please select the game to manage"), QString(), - QFileDialog::ShowDirsOnly); - qDebug() << "manually selected path " << gamePath; - } - } - } else { - done = true; - gamePath = ToQString(GameInfo::instance().getGameDirectory()); - } - } - - if (gamePath.isEmpty()) { - // game not found and user canceled - return -1; - } else if (gamePath.length() != 0) { - // user selected a folder and game was initialised with it - qDebug("game path: %s", qPrintable(gamePath)); - settings.setValue("gamePath", gamePath.toUtf8().constData()); + MOBase::IPluginGame *game = determineCurrentGame(application.applicationDirPath(), settings, pluginContainer); + if (game == nullptr) { + return 1; } - organizer.setManagedGame(ToQString(GameInfo::instance().getGameName()), gamePath); + organizer.setManagedGame(game); organizer.createDefaultProfile(); - if (pluginContainer.managedGame(ToQString(GameInfo::instance().getGameName())) == nullptr) { - reportError(QObject::tr("Plugin to handle %1 not installed").arg(ToQString(GameInfo::instance().getGameName()))); - return 1; - } - - //This is probably wrong too - { - IPluginGame *game = organizer.managedGameForUpdate(); - - if (!settings.contains("game_edition")) { - QStringList editions = game->gameVariants(); - if (editions.size() > 1) { - SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); - int index = 0; - for (const QString &edition : editions) { - selection.addChoice(edition, "", index++); - } - if (selection.exec() == QDialog::Rejected) { - return -1; - } else { - settings.setValue("game_edition", selection.getChoiceString()); - } + //See the pragma - we apparently don't use this so not sure why we check it + if (!settings.contains("game_edition")) { + QStringList editions = game->gameVariants(); + if (editions.size() > 1) { + SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); + int index = 0; + for (const QString &edition : editions) { + selection.addChoice(edition, "", index++); + } + if (selection.exec() == QDialog::Rejected) { + return -1; + } else { + settings.setValue("game_edition", selection.getChoiceString()); } } - game->setGameVariant(settings.value("game_edition").toString()); } + game->setGameVariant(settings.value("game_edition").toString()); #pragma message("edition isn't used?") - qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath))); + qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(game->gameDirectory().absolutePath()))); organizer.updateExecutablesList(settings); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index ef195bea..03ab9a95 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -290,7 +290,7 @@ int ModInfo::checkAllForUpdate(QObject *receiver) std::vector modIDs; //I ought to store this, it's used elsewhere - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); modIDs.push_back(game->getNexusModOrganizerID()); @@ -935,7 +935,7 @@ std::vector ModInfoRegular::getContents() const m_CachedContent.push_back(CONTENT_BSA); } - ScriptExtender *extender = qApp->property("managed_game").value()->feature(); + ScriptExtender *extender = qApp->property("managed_game").value()->feature(); if (extender != nullptr) { QString sePluginPath = extender->name() + "/plugins"; @@ -1137,7 +1137,7 @@ QDateTime ModInfoForeign::creationTime() const QString ModInfoForeign::absolutePath() const { //I ought to store this, it's used elsewhere - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); return game->dataDirectory().absolutePath(); } diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 042a9f1e..06a6dba4 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -422,15 +422,12 @@ void OrganizerCore::disconnectPlugins() m_PluginContainer = nullptr; } -void OrganizerCore::setManagedGame(const QString &gameName, const QString &gamePath) +void OrganizerCore::setManagedGame(MOBase::IPluginGame const *game) { - m_GameName = gameName; - if (m_PluginContainer != nullptr) { - m_GamePlugin = m_PluginContainer->managedGame(m_GameName); - m_GamePlugin->setGamePath(gamePath); - qApp->setProperty("managed_game", QVariant::fromValue(m_GamePlugin)); - emit managedGameChanged(m_GamePlugin); - } + m_GameName = game->gameName(); + m_GamePlugin = game; + qApp->setProperty("managed_game", QVariant::fromValue(m_GamePlugin)); + emit managedGameChanged(m_GamePlugin); } Settings &OrganizerCore::settings() @@ -1327,11 +1324,6 @@ IPluginGame const *OrganizerCore::managedGame() const return m_GamePlugin; } -IPluginGame *OrganizerCore::managedGameForUpdate() const -{ - return m_GamePlugin; -} - std::vector OrganizerCore::enabledArchives() { std::vector result; diff --git a/src/organizercore.h b/src/organizercore.h index c206e5e7..5cfbaca4 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -73,7 +73,7 @@ public: void connectPlugins(PluginContainer *container); void disconnectPlugins(); - void setManagedGame(const QString &gameName, const QString &gamePath); + void setManagedGame(const MOBase::IPluginGame *game); void updateExecutablesList(QSettings &settings); @@ -100,7 +100,6 @@ public: PluginListSortProxy *createPluginListProxyModel(); MOBase::IPluginGame const *managedGame() const; - MOBase::IPluginGame *managedGameForUpdate() const; bool isArchivesInit() const { return m_ArchivesInit; } @@ -234,7 +233,7 @@ private: IUserInterface *m_UserInterface; PluginContainer *m_PluginContainer; QString m_GameName; - MOBase::IPluginGame *m_GamePlugin; + MOBase::IPluginGame const *m_GamePlugin; Profile *m_CurrentProfile; diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index c7f15dc9..8bc1dbc6 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -89,7 +89,7 @@ void SettingsDialog::on_categoriesBtn_clicked() void SettingsDialog::on_bsaDateBtn_clicked() { - IPluginGame *game = qApp->property("managed_game").value(); + IPluginGame const *game = qApp->property("managed_game").value(); QDir dir = game->dataDirectory(); Helper::backdateBSAs(qApp->property("dataPath").toString().toStdWString(), diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index ed525588..69eb9c45 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -40,8 +40,6 @@ public: virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } - virtual std::wstring getGameName() const { return L"Fallout 3"; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index ee67ac17..a7ee089e 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -40,8 +40,6 @@ public: virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } - virtual std::wstring getGameName() const { return L"New Vegas"; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index de3af8b4..55161952 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -58,13 +58,10 @@ public: // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; - //**Currently only used in a nasty mess at initialisation time. - virtual std::wstring getGameName() const = 0; - - //**USED IN HOOKDLL and in initialisation + //**USED IN HOOKDLL virtual std::wstring getGameDirectory() const; - //**USED IN HOOKDLL and initialisation + //**USED IN HOOKDLL // initialise with the path to the mo directory (needs to be where hook.dll is stored). This // needs to be called before the instance can be retrieved static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 00048930..e0a861bf 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -38,8 +38,6 @@ public: virtual GameInfo::Type getType() { return TYPE_OBLIVION; } - virtual std::wstring getGameName() const { return L"Oblivion"; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index afba1974..17b542ab 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -40,8 +40,6 @@ public: virtual GameInfo::Type getType() { return TYPE_SKYRIM; } - virtual std::wstring getGameName() const { return L"Skyrim"; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) -- cgit v1.3.1 From d03e4f45efa89f135ec7d42f55f24bc816f71e0a Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 28 Nov 2015 23:12:29 +0000 Subject: Abstract away the xxse_loader manipulation and make use of the 'ScriptExtender' feature instead A note: This makes loadmechanism.cpp require xxse_loader.exe to exist, not the dll as other places get the version number from the exe. --- src/loadmechanism.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 521473b0..99fce3ba 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -81,9 +81,7 @@ bool LoadMechanism::isScriptExtenderSupported() ScriptExtender *extender = game->feature(); // test if there even is an extender for the managed game and if so whether it's installed - return (extender != nullptr) - && (game->gameDirectory().exists(extender->name() + "_loader.exe") - || game->gameDirectory().exists(extender->name() + "_steam_loader.dll")); + return extender != nullptr && extender->isInstalled(); } bool LoadMechanism::isProxyDLLSupported() -- cgit v1.3.1 From 9a88a190eb31c12aa391b1142461a09b1a32215d Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 29 Nov 2015 12:55:49 +0000 Subject: Another cleanup and make the program not crash when looking at saves for the nonce --- src/main.cpp | 22 +++++++++++++--------- src/shared/gameinfo.h | 10 +++++----- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 78145a74..e9351c97 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,21 +26,16 @@ along with Mod Organizer. If not, see . #define WIN32_LEAN_AND_MEAN #include #include -#include + #include #include #include #include -#include #include "mainwindow.h" #include #include "modlist.h" #include "profile.h" #include "gameinfo.h" -#include "fallout3info.h" -#include "falloutnvinfo.h" -#include "oblivioninfo.h" -#include "skyriminfo.h" #include "spawn.h" #include "executableslist.h" #include "singleinstance.h" @@ -51,11 +46,9 @@ along with Mod Organizer. If not, see . #include "moapplication.h" #include "tutorialmanager.h" #include "nxmaccessmanager.h" -#include -#include #include #include -#include + #include #include #include @@ -77,6 +70,14 @@ along with Mod Organizer. If not, see . #include #include +#include + +#include + +#include +#include +#include + #pragma comment(linker, "/manifestDependency:\"name='dlls' processorArchitecture='x86' version='1.0.0.0' type='win32' \"") @@ -566,6 +567,9 @@ int main(int argc, char *argv[]) organizer.setManagedGame(game); + //*sigh just for making it work + GameInfo::init(application.applicationDirPath().toStdWString(), game->gameDirectory().absolutePath().toStdWString()); + organizer.createDefaultProfile(); //See the pragma - we apparently don't use this so not sure why we check it diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 55161952..01d51f8a 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -51,6 +51,9 @@ public: virtual ~GameInfo() {} + //**USED IN HOOKDLL and savegame code + static GameInfo& instance(); + //**Used only in savegame which needs refactoring a lot. virtual GameInfo::Type getType() = 0; @@ -58,10 +61,10 @@ public: // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL virtual std::wstring getGameDirectory() const; - //**USED IN HOOKDLL + //**USED ONLY IN HOOKDLL // initialise with the path to the mo directory (needs to be where hook.dll is stored). This // needs to be called before the instance can be retrieved static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); @@ -79,9 +82,6 @@ public: //**USED ONLY IN HOOKDLL virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0; - //**USED IN HOOKDLL and everywhere that uses GameInfo - static GameInfo& instance(); - protected: GameInfo(const std::wstring &gameDirectory); -- cgit v1.3.1 From c236078aa1d3b756aaabd2f2c1d28d7474de3c2d Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 29 Nov 2015 14:44:12 +0000 Subject: Fix up so that hookdll continues to work properly --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e9351c97..353e7202 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -334,9 +334,11 @@ QString determineProfile(QStringList &arguments, const QSettings &settings) MOBase::IPluginGame *selectGame(QSettings &settings, QDir const &gamePath, MOBase::IPluginGame *game) { settings.setValue("gameName", game->gameName()); - if (gamePath == game->gameDirectory()) { + //Sadly, hookdll needs gamePath in order to run. So following code block is + //commented out + /*if (gamePath == game->gameDirectory()) { settings.remove("gamePath"); - } else { + } else*/ { QString gameDir = gamePath.absolutePath(); game->setGamePath(gameDir); settings.setValue("gamePath", QDir::toNativeSeparators(gameDir).toUtf8().constData()); -- cgit v1.3.1 From 20442cd4de97db354b304903d616754e8015ce62 Mon Sep 17 00:00:00 2001 From: ReadmeCritic Date: Sun, 29 Nov 2015 19:55:03 -0800 Subject: Update README URLs based on HTTP redirects --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 5965614e..e985a130 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ Here is a complete list: * https://github.com/TanninOne/modorganizer-lootcli * https://github.com/TanninOne/modorganizer-helper * https://github.com/TanninOne/modorganizer-tool_nmmimport -* https://github.com/TanninOne/modorganizer-tool_pyniedit +* https://github.com/TanninOne/modorganizer-tool_configurator * https://github.com/TanninOne/modorganizer-tool_inieditor * https://github.com/TanninOne/modorganizer-preview_base * https://github.com/TanninOne/modorganizer-diagnose_basic -- cgit v1.3.1 From c07e48075e86c855f147e084a50ee1c7f0c00e40 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 5 Dec 2015 06:51:57 +0000 Subject: Most of work for savegame --- src/SConscript | 6 + src/mainwindow.cpp | 21 ++- src/organizer.pro | 4 + src/savegamegamebryo.cpp | 348 +++++--------------------------------------- src/savegamegamebyro.h | 42 ++---- src/shared/fallout3info.h | 2 - src/shared/falloutnvinfo.h | 2 - src/shared/gameinfo.h | 12 -- src/shared/oblivioninfo.h | 2 - src/shared/skyriminfo.h | 2 - src/transfersavesdialog.cpp | 4 +- 11 files changed, 78 insertions(+), 367 deletions(-) diff --git a/src/SConscript b/src/SConscript index f09db093..8e0280ef 100644 --- a/src/SConscript +++ b/src/SConscript @@ -96,6 +96,12 @@ env['CPPPATH'] += [ '${BOOSTPATH}', ] +#########################FUDGE############################### +env['CPPPATH'] += [ + '../plugins/gameGamebryo', + ] +############################################################# + env.AppendUnique(CPPDEFINES = [ '_UNICODE', '_CRT_SECURE_NO_WARNINGS', diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 152baee7..1101f3fa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -59,6 +59,10 @@ along with Mod Organizer. If not, see . #include "browserdialog.h" #include "aboutdialog.h" #include "safewritefile.h" +//? +//#include "isavegame.h" +//#include "savegameinfo.h" +//? #include "nxmaccessmanager.h" #include #include @@ -826,9 +830,22 @@ void MainWindow::setBrowserGeometry(const QByteArray &geometry) } -SaveGameGamebryo *MainWindow::getSaveGame(const QString &name) +SaveGameGamebryo *MainWindow::getSaveGame(const QString &name__) { - return new SaveGameGamebryo(this, name); + IPluginGame const *game = m_OrganizerCore.managedGame(); + QString name(name__); + + //fudge with me +// game = m_PluginContainer.managedGame("Fallout 3"); +// name = "C:\\Users\\Dad\\Downloads\\Games\\Both good and evil saves -10416\\Save 106 - New Start Good, Vault 101 Entrance, 00.33.34.fos"; + +// game = m_PluginContainer.managedGame("New Vegas"); +// name = "C:\\Users\\Dad\\Downloads\\Games\\Crossroads - Clean Save-44883-1-0\\Crossroads.fos"; + +// game = m_PluginContainer.managedGame("Oblivion"); +// name = "C:\\Users\\Dad\\Saved Games\\Oblivion\\Saves\\Save 1537 - Hilary - Xirethard, Level 45, Playing Time 458.48.17.ess"; + + return new SaveGameGamebryo(this, name, game); } diff --git a/src/organizer.pro b/src/organizer.pro index 2869fda5..f472bd80 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -232,6 +232,10 @@ INCLUDEPATH += "E:/Visual Leak Detector/include" LIBS += -L"E:/Visual Leak Detector/lib/Win32" #DEFINES += LEAK_CHECK_WITH_VLD +#########################FUDGE############################### +INCLUDEPATH += ../plugins/gameGamebro +############################################################# + # custom leak detection #LIBS += -lDbgHelp diff --git a/src/savegamegamebryo.cpp b/src/savegamegamebryo.cpp index 7b012e22..457cbdf2 100644 --- a/src/savegamegamebryo.cpp +++ b/src/savegamegamebryo.cpp @@ -18,321 +18,49 @@ along with Mod Organizer. If not, see . */ #include "savegamegamebyro.h" -#include "gameinfo.h" -#include -#include -#include -#include -#include -#include - - -using namespace MOShared; - - -template -static void FileRead(QFile &file, T &value) -{ - int read = file.read(reinterpret_cast(&value), sizeof(T)); - if (read != sizeof(T)) { - throw std::runtime_error("unexpected end of file"); - } -} - - -template -static void FileSkip(QFile &file, int count = 1) -{ - char ignore[sizeof(T)]; - for (int i = 0; i < count; ++i) { - if (file.read(ignore, sizeof(T)) != sizeof(T)) { - throw std::runtime_error("unexpected end of file"); - } - } -} - - -static QString ReadBString(QFile &file) -{ - char buffer[256]; - file.read(buffer, 1); // size including zero termination - unsigned char size = buffer[0]; - file.read(buffer, size); - return QString::fromLatin1(buffer, size); -} - - -static QString ReadFOSString(QFile &file, bool delimiter) -{ - union { - char lengthBuffer[2]; - unsigned short length; - }; - - file.read(lengthBuffer, 2); - if (delimiter) { - FileSkip(file); // 0x7c - } - char *buffer = new char[length]; - file.read(buffer, length); - - QString result = QString::fromLatin1(buffer, length); - delete [] buffer; - - return result; -} - - -SaveGameGamebryo::SaveGameGamebryo(QObject *parent) - : SaveGame(parent), m_Plugins() -{ -} - - -SaveGameGamebryo::SaveGameGamebryo(QObject *parent, const QString &fileName) - : SaveGame(parent, fileName), m_Plugins() -{ - readFile(fileName); -} - - -SaveGameGamebryo::SaveGameGamebryo(const SaveGameGamebryo& reference) - : SaveGame(reference), m_Plugins(reference.m_Plugins) -{ -} - - -SaveGameGamebryo& SaveGameGamebryo::operator=(const SaveGameGamebryo &reference) -{ - if (&reference != this) { - SaveGame::operator =(reference); - m_Plugins = reference.m_Plugins; - } - return *this; -} - - -SaveGameGamebryo::~SaveGameGamebryo() -{ -} - - - - - -void SaveGameGamebryo::readSkyrimFile(QFile &saveFile) -{ - char fileID[14]; - - saveFile.read(fileID, 13); - fileID[13] = '\0'; - if (strncmp(fileID, "TESV_SAVEGAME", 13) != 0) { - throw std::runtime_error(QObject::tr("wrong file format").toUtf8().constData()); - } - - FileSkip(saveFile); // header size - FileSkip(saveFile); // header version, -> 8 - FileRead(saveFile, m_SaveNumber); - m_PCName = ReadFOSString(saveFile, false); +#include "isavegame.h" +#include "savegameinfo.h" +#include "iplugingame.h" +#include "gamebryosavegame.h" - unsigned long temp; - FileRead(saveFile, temp); // player level - m_PCLevel = static_cast(temp); - - m_PCLocation = ReadFOSString(saveFile, false); - ReadFOSString(saveFile, false); // playtime as ascii hhh.mm.ss - ReadFOSString(saveFile, false); // race name (i.e. BretonRace) - - - FileSkip(saveFile); // ??? - FileSkip(saveFile, 2); // ??? - FileSkip(saveFile, 8); // filetime - -// FileSkip(saveFile, 18); // ??? 18 bytes of data. not completely random, maybe a time stamp? maybe - - unsigned long width, height; - FileRead(saveFile, width); // 320 - FileRead(saveFile, height); // 192 - - QScopedArrayPointer buffer(new unsigned char[width * height * 3]); - saveFile.read(reinterpret_cast(buffer.data()), width * height * 3); - // why do I have to copy here? without the copy, the buffer seems to get deleted after the - // temporary vanishes, but Qts implicit sharing should handle that? - m_Screenshot = QImage(buffer.data(), width, height, QImage::Format_RGB888).copy(); - - FileSkip(saveFile); // form version - FileSkip(saveFile); // plugin info size - - unsigned char pluginCount; - FileRead(saveFile, pluginCount); - - for (int i = 0; i < pluginCount; ++i) { - m_Plugins.push_back(ReadFOSString(saveFile, false)); - } -} - - -void SaveGameGamebryo::readESSFile(QFile &saveFile) -{ - char fileID[13]; - unsigned char versionMinor; - unsigned long headerVersion, saveHeaderSize; -// *** format is different for fallout! - saveFile.read(fileID, 12); - fileID[12] = '\0'; - FileSkip(saveFile); FileRead(saveFile, versionMinor); - FileSkip(saveFile); // modified time - FileRead(saveFile, headerVersion); FileRead(saveFile, saveHeaderSize); - - if (strncmp(fileID, "TES4SAVEGAME", 12) != 0) { - throw std::runtime_error(QObject::tr("wrong file format").toUtf8().constData()); - } - - FileRead(saveFile, m_SaveNumber); - - m_PCName = ReadBString(saveFile); - - FileRead(saveFile, m_PCLevel); - m_PCLocation = ReadBString(saveFile); - FileSkip(saveFile); // game days - FileSkip(saveFile); // game ticks - FileRead(saveFile, m_CreationTime); - - unsigned long size; - FileRead(saveFile, size); // screenshot size - - unsigned long width, height; - FileRead(saveFile, width); FileRead(saveFile, height); - QScopedArrayPointer buffer(new unsigned char[width * height * 3]); - saveFile.read(reinterpret_cast(buffer.data()), width * height * 3); - // why do I have to copy here? without the copy, the buffer seems to get deleted after the - // temporary vanishes, but Qts implicit sharing should handle that? - m_Screenshot = QImage(buffer.data(), width, height, QImage::Format_RGB888).copy(); - - unsigned char pluginCount; - FileRead(saveFile, pluginCount); - - for (int i = 0; i < pluginCount; ++i) { - QString name = ReadBString(saveFile); - m_Plugins.push_back(name); - } -} - - -void SaveGameGamebryo::readFOSFile(QFile &saveFile, bool newVegas) -{ - char fileID[13]; - saveFile.read(fileID, 12); - // the signature is only 11 characters, the 12th is random? - fileID[11] = '\0'; - - if (strncmp(fileID, "FO3SAVEGAME", 11) != 0) { - throw std::runtime_error(QObject::tr("wrong file format").toUtf8().constData()); - } - - char ignore = 0x00; - while (ignore != 0x7c) { - FileRead(saveFile, ignore); // unknown - } - if (newVegas) { - ignore = 0x00; - // in new vegas there is another block of uninteresting (?) information - FileSkip(saveFile); // 0x7c - while (ignore != 0x7c) { - FileRead(saveFile, ignore); // unknown - } - } - - unsigned long width, height; - FileRead(saveFile, width); - FileSkip(saveFile); // 0x7c - FileRead(saveFile, height); - FileSkip(saveFile); // 0x7c - - FileRead(saveFile, m_SaveNumber); - FileSkip(saveFile); // 0x7c - - m_PCName = ReadFOSString(saveFile, true); - FileSkip(saveFile); // 0x7c - - ReadFOSString(saveFile, true); - FileSkip(saveFile); // 0x7c - - long Level; - FileRead(saveFile, Level); - m_PCLevel = Level; - FileSkip(saveFile); // 0x7c - - m_PCLocation = ReadFOSString(saveFile, true); - FileSkip(saveFile); // 0x7c - - ReadFOSString(saveFile, true); // playtime - - FileSkip(saveFile); - - QScopedArrayPointer buffer(new unsigned char[width * height * 3]); - saveFile.read(reinterpret_cast(buffer.data()), width * height * 3); - // why do I have to copy here? without the copy, the buffer seems to get deleted after the - // temporary vanishes, but Qts implicit sharing should handle that? - m_Screenshot = QImage(buffer.data(), width, height, QImage::Format_RGB888).scaledToWidth(256); - - FileSkip(saveFile, 5); // unknown - - unsigned char pluginCount = 0; - FileRead(saveFile, pluginCount); - FileSkip(saveFile); // 0x7c - - for (int i = 0; i < pluginCount; ++i) { - QString name = ReadFOSString(saveFile, true); - m_Plugins.push_back(name); - FileSkip(saveFile); // 0x7c - } -} - - -void SaveGameGamebryo::setCreationTime(const QString &fileName) -{ - QFileInfo creationTime(fileName); - QDateTime modified = creationTime.lastModified(); - memset(&m_CreationTime, 0, sizeof(SYSTEMTIME)); +#include +#include - m_CreationTime.wDay = static_cast(modified.date().day()); - m_CreationTime.wDayOfWeek = static_cast(modified.date().dayOfWeek()); - m_CreationTime.wMonth = static_cast(modified.date().month()); - m_CreationTime.wYear =static_cast( modified.date().year()); +using namespace MOBase; - m_CreationTime.wHour = static_cast(modified.time().hour()); - m_CreationTime.wMinute = static_cast(modified.time().minute()); - m_CreationTime.wSecond = static_cast(modified.time().second()); - m_CreationTime.wMilliseconds = static_cast(modified.time().msec()); -} - -void SaveGameGamebryo::readFile(const QString &fileName) +SaveGameGamebryo::SaveGameGamebryo(QObject *parent, const QString &fileName, IPluginGame const *game) + : SaveGame(parent, fileName) + , m_Plugins() { - m_FileName = fileName; - QFile saveFile(fileName); - if (!saveFile.open(QIODevice::ReadOnly)) { - throw std::runtime_error(QObject::tr("failed to open %1").arg(fileName).toUtf8().constData()); - } - switch (GameInfo::instance().getType()) { - case GameInfo::TYPE_FALLOUT3: { - setCreationTime(fileName); - readFOSFile(saveFile, false); - } break; - case GameInfo::TYPE_FALLOUTNV: { - setCreationTime(fileName); - readFOSFile(saveFile, true); - } break; - case GameInfo::TYPE_OBLIVION: { - readESSFile(saveFile); - } break; - case GameInfo::TYPE_SKYRIM: { - setCreationTime(fileName); - readSkyrimFile(saveFile); - } break; + SaveGameInfo const *info = game->feature(); + if (info != nullptr) { + ISaveGame const *save = info->getSaveGameInfo(fileName); + m_Save = save; + + //Kludgery + GamebryoSaveGame const *s = dynamic_cast(save); + m_PCName = s->getPCName(); + m_PCLevel = s->getPCLevel(); + m_PCLocation = s->getPCLocation(); + m_SaveNumber = s->getSaveNumber(); + + QDateTime modified = s->getCreationTime(); + memset(&m_CreationTime, 0, sizeof(SYSTEMTIME)); + + m_CreationTime.wDay = static_cast(modified.date().day()); + m_CreationTime.wDayOfWeek = static_cast(modified.date().dayOfWeek()); + m_CreationTime.wMonth = static_cast(modified.date().month()); + m_CreationTime.wYear =static_cast( modified.date().year()); + + m_CreationTime.wHour = static_cast(modified.time().hour()); + m_CreationTime.wMinute = static_cast(modified.time().minute()); + m_CreationTime.wSecond = static_cast(modified.time().second()); + m_CreationTime.wMilliseconds = static_cast(modified.time().msec()); + + m_Screenshot = s->getScreenshot(); + + m_Plugins = s->getPlugins(); } - - saveFile.close(); } diff --git a/src/savegamegamebyro.h b/src/savegamegamebyro.h index e08e1044..bce08018 100644 --- a/src/savegamegamebyro.h +++ b/src/savegamegamebyro.h @@ -20,17 +20,13 @@ along with Mod Organizer. If not, see . #ifndef SAVEGAMEGAMEBRYO_H #define SAVEGAMEGAMEBRYO_H - #include "savegame.h" -#include -#include #include -#include - -#define WIN32_LEAN_AND_MEAN -#include +#include +#include +namespace MOBase { class IPluginGame; class ISaveGame; } /** * @brief represents a single save game @@ -41,31 +37,21 @@ Q_OBJECT public: - /** - * @brief construct an empty object - **/ - SaveGameGamebryo(QObject *parent = 0); - /** * @brief construct a save game and immediately read out information from the file * * @param filename absolute path of the save game file **/ - SaveGameGamebryo(QObject *parent, const QString &filename); + SaveGameGamebryo(QObject *parent, const QString &filename, MOBase::IPluginGame const *game); + /* SaveGameGamebryo(const SaveGameGamebryo &reference); SaveGameGamebryo &operator=(const SaveGameGamebryo &reference); ~SaveGameGamebryo(); - - /** - * @brief read out information from a savegame - * - * @param fileName absolute path of the save game file - **/ - virtual void readFile(const QString &fileName); + */ /** * @return number of plugins that were enabled when the save game was created @@ -80,22 +66,12 @@ public: **/ const QString &plugin(int index) const { return m_Plugins.at(index); } - private: - void readESSFile(QFile &saveFile); - void readFOSFile(QFile &saveFile, bool newVegas); - void readSkyrimFile(QFile &saveFile); - - void setCreationTime(const QString &fileName); - -private: - - std::vector m_Plugins; + QStringList m_Plugins; + //Note: This isn't owned by us so safe to copy + MOBase::ISaveGame const *m_Save; }; -Q_DECLARE_METATYPE(SaveGameGamebryo) -Q_DECLARE_METATYPE(SaveGameGamebryo*) - #endif // SAVEGAMEGAMEBRYO_H diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 69eb9c45..489ac038 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual GameInfo::Type getType() { return TYPE_FALLOUT3; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index a7ee089e..a0bc5bd4 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 01d51f8a..9e6a35ef 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -38,15 +38,6 @@ namespace MOShared { class GameInfo { -public: - - enum Type { - TYPE_OBLIVION, - TYPE_FALLOUT3, - TYPE_FALLOUTNV, - TYPE_SKYRIM - }; - public: virtual ~GameInfo() {} @@ -54,9 +45,6 @@ public: //**USED IN HOOKDLL and savegame code static GameInfo& instance(); - //**Used only in savegame which needs refactoring a lot. - virtual GameInfo::Type getType() = 0; - //**Used only in savegame which needs refactoring a lot. // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index e0a861bf..1e48b742 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -36,8 +36,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual GameInfo::Type getType() { return TYPE_OBLIVION; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 17b542ab..ce2510f1 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() { return getRegPathStatic(); } - virtual GameInfo::Type getType() { return TYPE_SKYRIM; } - virtual std::vector getSavegameAttachmentExtensions(); // file name of this games ini (no path) diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index 4cb20944..48fc4548 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -63,7 +63,7 @@ void TransferSavesDialog::refreshGlobalSaves() QStringList files = savesDir.entryList(QDir::Files, QDir::Time); for (const QString &filename : files) { - SaveGameGamebryo *save = new SaveGameGamebryo(this, savesDir.absoluteFilePath(filename)); + SaveGameGamebryo *save = new SaveGameGamebryo(this, savesDir.absoluteFilePath(filename), m_GamePlugin); save->setParent(this); m_GlobalSaves.push_back(save); } @@ -81,7 +81,7 @@ void TransferSavesDialog::refreshLocalSaves() QStringList files = savesDir.entryList(QDir::Files, QDir::Time); foreach (const QString &filename, files) { - SaveGameGamebryo *save = new SaveGameGamebryo(this, savesDir.absoluteFilePath(filename)); + SaveGameGamebryo *save = new SaveGameGamebryo(this, savesDir.absoluteFilePath(filename), m_GamePlugin); save->setParent(this); m_LocalSaves.push_back(save); } -- cgit v1.3.1 From cb09ace972731ecc9b0fb653b88d4c599f4530fc Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 5 Dec 2015 10:43:19 +0000 Subject: Hoist self with own petard - add const --- src/shared/fallout3info.h | 2 +- src/shared/falloutnvinfo.h | 2 +- src/shared/oblivioninfo.h | 2 +- src/shared/skyriminfo.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 698dcb25..fb60d6ae 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -37,7 +37,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } virtual std::wstring getBinaryName() const { return L"Fallout3.exe"; } - virtual std::wstring getExtenderName() { return L"fose_loader.exe"; } + virtual std::wstring getExtenderName() const { return L"fose_loader.exe"; } virtual GameInfo::Type getType() const { return TYPE_FALLOUT3; } diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 67a72ec5..65f17013 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -38,7 +38,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } virtual std::wstring getBinaryName() const { return L"FalloutNV.exe"; } - virtual std::wstring getExtenderName() { return L"nvse_loader.exe"; } + virtual std::wstring getExtenderName() const { return L"nvse_loader.exe"; } virtual GameInfo::Type getType() const { return TYPE_FALLOUTNV; } diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index c05aac30..74e3fec6 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -36,7 +36,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } virtual std::wstring getBinaryName() const { return L"Oblivion.exe"; } - virtual std::wstring getExtenderName() { return L"obse_loader.exe"; } + virtual std::wstring getExtenderName() const { return L"obse_loader.exe"; } virtual GameInfo::Type getType() const { return TYPE_OBLIVION; } diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index f4dfb2c2..538fffb4 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -38,7 +38,7 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } virtual std::wstring getBinaryName() const { return L"TESV.exe"; } - virtual std::wstring getExtenderName() { return L"skse_loader.exe"; } + virtual std::wstring getExtenderName() const { return L"skse_loader.exe"; } virtual GameInfo::Type getType() const { return TYPE_SKYRIM; } -- cgit v1.3.1 From 235d893eb845c3c8c0edb9dcdb703ce3ec31bdb5 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 5 Dec 2015 19:13:05 +0000 Subject: Gets rid of last vestiges of GameInfo apart from startup and hookdll Working on sorting out savegame stuff --- src/mainwindow.cpp | 28 +++++++++++---- src/modinfoforeign.cpp | 8 +++-- src/savegame.cpp | 81 ++++++++++++-------------------------------- src/savegame.h | 20 +++-------- src/savegamegamebryo.cpp | 2 +- src/shared/fallout3info.cpp | 5 --- src/shared/fallout3info.h | 2 -- src/shared/falloutnvinfo.cpp | 5 --- src/shared/falloutnvinfo.h | 2 -- src/shared/gameinfo.cpp | 13 ------- src/shared/gameinfo.h | 20 ++++------- src/shared/oblivioninfo.cpp | 9 ----- src/shared/oblivioninfo.h | 2 -- src/shared/skyriminfo.cpp | 5 --- src/shared/skyriminfo.h | 2 -- 15 files changed, 61 insertions(+), 143 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7dd5d71b..aa45a0bd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -835,15 +835,29 @@ SaveGameGamebryo *MainWindow::getSaveGame(const QString &name__) IPluginGame const *game = m_OrganizerCore.managedGame(); QString name(name__); + static int count = 0; //fudge with me -// game = m_PluginContainer.managedGame("Fallout 3"); -// name = "C:\\Users\\Dad\\Downloads\\Games\\Both good and evil saves -10416\\Save 106 - New Start Good, Vault 101 Entrance, 00.33.34.fos"; + switch (count) + { + case 0: + game = m_PluginContainer.managedGame("Fallout 3"); + name = "C:\\Users\\Dad\\Downloads\\Games\\Both good and evil saves -10416\\Save 106 - New Start Good, Vault 101 Entrance, 00.33.34.fos"; + break; + + case 1: + game = m_PluginContainer.managedGame("New Vegas"); + name = "C:\\Users\\Dad\\Downloads\\Games\\Crossroads - Clean Save-44883-1-0\\Crossroads.fos"; + break; -// game = m_PluginContainer.managedGame("New Vegas"); -// name = "C:\\Users\\Dad\\Downloads\\Games\\Crossroads - Clean Save-44883-1-0\\Crossroads.fos"; + case 2: + game = m_PluginContainer.managedGame("Oblivion"); + name = "C:\\Users\\Dad\\Saved Games\\Oblivion\\Saves\\Save 1537 - Hilary - Xirethard, Level 45, Playing Time 458.48.17.ess"; + break; -// game = m_PluginContainer.managedGame("Oblivion"); -// name = "C:\\Users\\Dad\\Saved Games\\Oblivion\\Saves\\Save 1537 - Hilary - Xirethard, Level 45, Playing Time 458.48.17.ess"; + case 3: + count = -1; + } + ++count; return new SaveGameGamebryo(this, name, game); } @@ -3210,7 +3224,7 @@ void MainWindow::deleteSavegame_clicked() foreach (const QModelIndex &idx, selectedIndexes) { QString name = idx.data().toString(); - SaveGame *save = new SaveGame(this, idx.data(Qt::UserRole).toString()); + SaveGame *save = new SaveGame(this, idx.data(Qt::UserRole).toString(), m_OrganizerCore.managedGame()); if (count < 10) { savesMsgLabel += "
  • " + QFileInfo(name).completeBaseName() + "
  • "; diff --git a/src/modinfoforeign.cpp b/src/modinfoforeign.cpp index c0e769c9..4dbe034b 100644 --- a/src/modinfoforeign.cpp +++ b/src/modinfoforeign.cpp @@ -1,8 +1,10 @@ #include "modinfoforeign.h" -#include "gameinfo.h" +#include "iplugingame.h" #include "utility.h" +#include + using namespace MOBase; using namespace MOShared; @@ -18,7 +20,9 @@ QDateTime ModInfoForeign::creationTime() const QString ModInfoForeign::absolutePath() const { - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"; + //I ought to store this, it's used elsewhere + IPluginGame const *game = qApp->property("managed_game").value(); + return game->dataDirectory().absolutePath(); } std::vector ModInfoForeign::getFlags() const diff --git a/src/savegame.cpp b/src/savegame.cpp index 1cdabb2d..2b125575 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -18,50 +18,28 @@ along with Mod Organizer. If not, see . */ #include "savegame.h" -#include -#include -#include -#include -#include -#include -#include -#include "gameinfo.h" - - -SaveGame::SaveGame(QObject *parent) - : QObject(parent), m_FileName(), m_PCName(), m_PCLevel(0), m_PCLocation(), m_SaveNumber(0), m_Screenshot() -{ -} +#include "iplugingame.h" +#include "scriptextender.h" +#include "utility.h" -SaveGame::SaveGame(QObject *parent, const QString &filename) - : QObject(parent), m_FileName(filename), m_PCName(), m_PCLevel(0), m_PCLocation(), m_SaveNumber(0), m_Screenshot() -{ -} - +#include +#include +#include +#include -SaveGame::SaveGame(const SaveGame& reference) - : m_FileName(reference.m_FileName), m_PCName(reference.m_PCName), m_PCLevel(reference.m_PCLevel), - m_PCLocation(reference.m_PCLocation), m_SaveNumber(reference.m_SaveNumber), - m_Screenshot(reference.m_Screenshot) -{ -} +#include +#include +using namespace MOBase; -SaveGame& SaveGame::operator=(const SaveGame &reference) +SaveGame::SaveGame(QObject *parent, const QString &filename, const MOBase::IPluginGame *game) + : QObject(parent) + , m_FileName(filename) + , m_Game(game) { - if (&reference != this) { - m_FileName = reference.m_FileName; - m_PCName = reference.m_PCName; - m_PCLevel = reference.m_PCLevel; - m_PCLocation = reference.m_PCLocation; - m_SaveNumber = reference.m_SaveNumber; - m_Screenshot = reference.m_Screenshot; - } - return *this; } - SaveGame::~SaveGame() { } @@ -69,11 +47,14 @@ SaveGame::~SaveGame() QStringList SaveGame::attachedFiles() const { QStringList result; - foreach (const std::wstring &ext, MOShared::GameInfo::instance().getSavegameAttachmentExtensions()) { - QFileInfo fi(fileName()); - fi.setFile(fi.canonicalPath() + "/" + fi.completeBaseName() + "." + MOBase::ToQString(ext)); - if (fi.exists()) { - result.append(fi.filePath()); + ScriptExtender const *extender = m_Game->feature(); + if (extender != nullptr) { + for (QString const &ext : extender->saveGameAttachmentExtensions()) { + QFileInfo fi(fileName()); + fi.setFile(fi.canonicalPath() + "/" + fi.completeBaseName() + "." + ext); + if (fi.exists()) { + result.append(fi.filePath()); + } } } @@ -86,21 +67,3 @@ QStringList SaveGame::saveFiles() const result.append(fileName()); return result; } - - -void SaveGame::setCreationTime(const QString &fileName) -{ - QFileInfo creationTime(fileName); - QDateTime modified = creationTime.lastModified(); - memset(&m_CreationTime, 0, sizeof(SYSTEMTIME)); - - m_CreationTime.wDay = static_cast(modified.date().day()); - m_CreationTime.wDayOfWeek = static_cast(modified.date().dayOfWeek()); - m_CreationTime.wMonth = static_cast(modified.date().month()); - m_CreationTime.wYear =static_cast( modified.date().year()); - - m_CreationTime.wHour = static_cast(modified.time().hour()); - m_CreationTime.wMinute = static_cast(modified.time().minute()); - m_CreationTime.wSecond = static_cast(modified.time().second()); - m_CreationTime.wMilliseconds = static_cast(modified.time().msec()); -} diff --git a/src/savegame.h b/src/savegame.h index 1fd2f7ab..d1bf4691 100644 --- a/src/savegame.h +++ b/src/savegame.h @@ -31,6 +31,7 @@ along with Mod Organizer. If not, see . #define WIN32_LEAN_AND_MEAN #include +namespace MOBase { class IPluginGame; } /** * @brief represents a single save game @@ -41,23 +42,14 @@ Q_OBJECT public: - /** - * @brief construct an empty object - **/ - SaveGame(QObject *parent = 0); - /** * @brief construct a save game and immediately read out information from the file * * @param filename absolute path of the save game file **/ - SaveGame(QObject *parent, const QString &filename); - - SaveGame(const SaveGame& reference); - - SaveGame& operator=(const SaveGame &reference); + SaveGame(QObject *parent, const QString &filename, MOBase::IPluginGame const *game); - ~SaveGame(); + virtual ~SaveGame(); /** * @brief read out information from a savegame @@ -111,10 +103,6 @@ public: **/ const QImage &screenshot() const { return m_Screenshot; } -private: - - void setCreationTime(const QString &fileName); - protected: QString m_FileName; @@ -125,6 +113,8 @@ protected: SYSTEMTIME m_CreationTime; QImage m_Screenshot; +private: + MOBase::IPluginGame const * const m_Game; }; diff --git a/src/savegamegamebryo.cpp b/src/savegamegamebryo.cpp index 457cbdf2..68ed30af 100644 --- a/src/savegamegamebryo.cpp +++ b/src/savegamegamebryo.cpp @@ -31,7 +31,7 @@ using namespace MOBase; SaveGameGamebryo::SaveGameGamebryo(QObject *parent, const QString &fileName, IPluginGame const *game) - : SaveGame(parent, fileName) + : SaveGame(parent, fileName, game) , m_Plugins() { SaveGameInfo const *info = game->feature(); diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 008a046c..797d68ec 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -63,11 +63,6 @@ std::wstring Fallout3Info::getRegPathStatic() } -std::vector Fallout3Info::getSavegameAttachmentExtensions() const -{ - return std::vector(); -} - std::vector Fallout3Info::getIniFileNames() const { return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini"); diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 21356924..5cf98e3b 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -37,8 +37,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } - virtual std::vector getSavegameAttachmentExtensions() const; - // file name of this games ini (no path) virtual std::vector getIniFileNames() const; diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 80d2fba5..6347224d 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -63,11 +63,6 @@ std::wstring FalloutNVInfo::getRegPathStatic() } } -std::vector FalloutNVInfo::getSavegameAttachmentExtensions() const -{ - return std::vector(); -} - std::vector FalloutNVInfo::getIniFileNames() const { return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini"); diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 4bffff3f..04c13c7d 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } - virtual std::vector getSavegameAttachmentExtensions() const; - // file name of this games ini (no path) virtual std::vector getIniFileNames() const; diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index e77b9d17..5c13a520 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -134,19 +134,6 @@ std::wstring GameInfo::getGameDirectory() const return m_GameDirectory; } -std::wstring GameInfo::getLocalAppFolder() const -{ - wchar_t localAppFolder[MAX_PATH]; - memset(localAppFolder, '\0', MAX_PATH * sizeof(wchar_t)); - - if (::SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, SHGFP_TYPE_CURRENT, localAppFolder) == S_OK) { - return localAppFolder; - } else { - // fallback: try the registry - return getSpecialPath(L"Local AppData"); - } -} - std::wstring GameInfo::getSpecialPath(LPCWSTR name) const { HKEY key; diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index a5c615cf..7bc86d3a 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -42,20 +42,16 @@ public: virtual ~GameInfo() {} - //**USED IN HOOKDLL and savegame code - static GameInfo& instance(); - - //**Used only in savegame which needs refactoring a lot. - // get a list of file extensions for additional files belonging to a save game - virtual std::vector getSavegameAttachmentExtensions() const = 0; + //**USED IN HOOKDLL and at startup to set up for hookdll to work + // initialise with the path to the mo directory (needs to be where hook.dll is stored). This + // needs to be called before the instance can be retrieved + static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); //**USED ONLY IN HOOKDLL - virtual std::wstring getGameDirectory() const; + static GameInfo& instance(); //**USED ONLY IN HOOKDLL - // initialise with the path to the mo directory (needs to be where hook.dll is stored). This - // needs to be called before the instance can be retrieved - static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L""); + virtual std::wstring getGameDirectory() const; //**USED ONLY IN HOOKDLL virtual std::wstring getRegPath() const = 0; @@ -74,12 +70,8 @@ protected: GameInfo(const std::wstring &gameDirectory); - std::wstring getLocalAppFolder() const; - const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; } void identifyMyGamesDirectory(const std::wstring &file); - bool isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const; - private: static bool identifyGame(const std::wstring &searchPath); diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index 8f1f1843..b50f1daa 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -63,15 +63,6 @@ std::wstring OblivionInfo::getRegPathStatic() } } - - - -std::vector OblivionInfo::getSavegameAttachmentExtensions() const -{ - return boost::assign::list_of(L"obse"); -} - - std::vector OblivionInfo::getIniFileNames() const { return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini"); diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index fc949f4b..bf0b2707 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -36,8 +36,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } - virtual std::vector getSavegameAttachmentExtensions() const; - // file name of this games ini (no path) virtual std::vector getIniFileNames() const; diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index d255e60f..9662e66d 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -73,11 +73,6 @@ std::wstring SkyrimInfo::getRegPathStatic() } } -std::vector SkyrimInfo::getSavegameAttachmentExtensions() const -{ - return boost::assign::list_of(L"skse"); -} - std::vector SkyrimInfo::getIniFileNames() const { return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini"); diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index ac979d20..bd329403 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -38,8 +38,6 @@ public: static std::wstring getRegPathStatic(); virtual std::wstring getRegPath() const { return getRegPathStatic(); } - virtual std::vector getSavegameAttachmentExtensions() const; - // file name of this games ini (no path) virtual std::vector getIniFileNames() const; -- cgit v1.3.1 From 3670ab2528ff6a129af4e4aeaf50574e2c9080ba Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 6 Dec 2015 12:07:25 +0000 Subject: Remove debugging code quick! --- src/mainwindow.cpp | 28 +--------------------------- src/organizer.pro | 2 +- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index aa45a0bd..f30e46f1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -830,35 +830,9 @@ void MainWindow::setBrowserGeometry(const QByteArray &geometry) } -SaveGameGamebryo *MainWindow::getSaveGame(const QString &name__) +SaveGameGamebryo *MainWindow::getSaveGame(const QString &name) { IPluginGame const *game = m_OrganizerCore.managedGame(); - QString name(name__); - - static int count = 0; - //fudge with me - switch (count) - { - case 0: - game = m_PluginContainer.managedGame("Fallout 3"); - name = "C:\\Users\\Dad\\Downloads\\Games\\Both good and evil saves -10416\\Save 106 - New Start Good, Vault 101 Entrance, 00.33.34.fos"; - break; - - case 1: - game = m_PluginContainer.managedGame("New Vegas"); - name = "C:\\Users\\Dad\\Downloads\\Games\\Crossroads - Clean Save-44883-1-0\\Crossroads.fos"; - break; - - case 2: - game = m_PluginContainer.managedGame("Oblivion"); - name = "C:\\Users\\Dad\\Saved Games\\Oblivion\\Saves\\Save 1537 - Hilary - Xirethard, Level 45, Playing Time 458.48.17.ess"; - break; - - case 3: - count = -1; - } - ++count; - return new SaveGameGamebryo(this, name, game); } diff --git a/src/organizer.pro b/src/organizer.pro index 0cdb4400..1284aa40 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -243,7 +243,7 @@ LIBS += -L"E:/Visual Leak Detector/lib/Win32" #DEFINES += LEAK_CHECK_WITH_VLD #########################FUDGE############################### -INCLUDEPATH += ../plugins/gameGamebro +INCLUDEPATH += ../plugins/gameGamebryo ############################################################# # custom leak detection -- cgit v1.3.1