diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/aboutdialog.ui | 5 | ||||
| -rw-r--r-- | src/createinstancedialogpages.cpp | 2 | ||||
| -rw-r--r-- | src/dlls.manifest (renamed from src/dlls.manifest.qt5) | 58 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 15 | ||||
| -rw-r--r-- | src/modinfodialognexus.cpp | 1 | ||||
| -rw-r--r-- | src/modinforegular.cpp | 9 | ||||
| -rw-r--r-- | src/organizercore.cpp | 4 | ||||
| -rw-r--r-- | src/qt.conf | 6 | ||||
| -rw-r--r-- | src/settings.cpp | 10 | ||||
| -rw-r--r-- | src/settings.h | 5 | ||||
| -rw-r--r-- | src/settingsdialog.ui | 33 | ||||
| -rw-r--r-- | src/settingsdialoggeneral.cpp | 6 | ||||
| -rw-r--r-- | src/settingsdialognexus.cpp | 2 | ||||
| -rw-r--r-- | src/shared/appconfig.inc | 3 | ||||
| -rw-r--r-- | src/tutorials/TutorialOverlay.qml | 4 |
16 files changed, 112 insertions, 61 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a53d845d..ffaf3c0c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -232,15 +232,17 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest.qt5 +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlls.manifest DESTINATION bin/dlls RENAME dlls.manifest) -install(FILES ${qm_files} DESTINATION bin/translations) +install(FILES ${qm_files} DESTINATION bin/resources/translations) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stylesheets - ${CMAKE_CURRENT_SOURCE_DIR}/tutorials - DESTINATION bin) + DESTINATION bin) + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tutorials + DESTINATION bin/resources) deploy_qt(BINARIES ModOrganizer.exe uibase.dll plugins/bsa_packer.dll) diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index 88cc96e3..f4cb29d5 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -496,6 +496,11 @@ </item>
<item>
<property name="text">
+ <string notr="true">Qudix</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string notr="true">reedts</string>
</property>
</item>
diff --git a/src/createinstancedialogpages.cpp b/src/createinstancedialogpages.cpp index 882776df..a40338dd 100644 --- a/src/createinstancedialogpages.cpp +++ b/src/createinstancedialogpages.cpp @@ -925,7 +925,7 @@ PathsPage::PathsPage(CreateInstanceDialog& dlg) : }; auto setBrowse = [&](QAbstractButton* b, QLineEdit* e) { - QObject::connect(b, &QAbstractButton::clicked, [&]{ browse(e); }); + QObject::connect(b, &QAbstractButton::clicked, [this, e]{ browse(e); }); }; setEdit(ui->location); diff --git a/src/dlls.manifest.qt5 b/src/dlls.manifest index cae74df1..846a02ae 100644 --- a/src/dlls.manifest.qt5 +++ b/src/dlls.manifest @@ -1,29 +1,29 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/>
- <file name="7z.dll"/>
- <file name="archive.dll"/>
- <file name="d3dcompiler_47.dll"/>
- <file name="libEGL.dll"/>
- <file name="libGLESV2.dll"/>
- <file name="liblz4.dll"/>
- <file name="opengl32sw.dll"/>
- <file name="Qt5Core.dll"/>
- <file name="Qt5Gui.dll"/>
- <file name="Qt5Network.dll"/>
- <file name="Qt5Positioning.dll"/>
- <file name="Qt5PrintSupport.dll"/>
- <file name="Qt5Qml.dll"/>
- <file name="Qt5QmlModels.dll"/>
- <file name="Qt5QmlWorkerScript.dll"/>
- <file name="Qt5Quick.dll"/>
- <file name="Qt5QuickWidgets.dll"/>
- <file name="Qt5SerialPort.dll"/>
- <file name="Qt5Svg.dll"/>
- <file name="Qt5WebChannel.dll"/>
- <file name="Qt5WebEngineCore.dll"/>
- <file name="Qt5WebEngineWidgets.dll"/>
- <file name="Qt5WebSockets.dll"/>
- <file name="Qt5Widgets.dll"/>
- <file name="Qt5WinExtras.dll"/>
-</assembly>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity type="win32" name="dlls" version="1.0.0.0" processorArchitecture="x86"/> + <file name="7z.dll"/> + <file name="archive.dll"/> + <file name="d3dcompiler_47.dll"/> + <file name="libEGL.dll"/> + <file name="libGLESV2.dll"/> + <file name="liblz4.dll"/> + <file name="opengl32sw.dll"/> + <file name="Qt5Core.dll"/> + <file name="Qt5Gui.dll"/> + <file name="Qt5Network.dll"/> + <file name="Qt5Positioning.dll"/> + <file name="Qt5PrintSupport.dll"/> + <file name="Qt5Qml.dll"/> + <file name="Qt5QmlModels.dll"/> + <file name="Qt5QmlWorkerScript.dll"/> + <file name="Qt5Quick.dll"/> + <file name="Qt5QuickWidgets.dll"/> + <file name="Qt5SerialPort.dll"/> + <file name="Qt5Svg.dll"/> + <file name="Qt5WebChannel.dll"/> + <file name="Qt5WebEngineCore.dll"/> + <file name="Qt5WebEngineWidgets.dll"/> + <file name="Qt5WebSockets.dll"/> + <file name="Qt5Widgets.dll"/> + <file name="Qt5WinExtras.dll"/> +</assembly> diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c927a691..c2aefdd2 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1206,7 +1206,9 @@ void MainWindow::createHelpMenu() ActionList tutorials; - QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files); + QString tutorialPath = QApplication::applicationDirPath() + + "/" + QString::fromStdWString(AppConfig::tutorialsPath()) + "/"; + QDirIterator dirIter(tutorialPath, QStringList("*.js"), QDir::Files); while (dirIter.hasNext()) { dirIter.next(); QString fileName = dirIter.fileName(); @@ -1318,7 +1320,8 @@ bool MainWindow::addProfile() void MainWindow::hookUpWindowTutorials() { - QDirIterator dirIter(QApplication::applicationDirPath() + "/tutorials", QStringList("*.js"), QDir::Files); + QString tutorialPath = QApplication::applicationDirPath() + "/" + QString::fromStdWString(AppConfig::tutorialsPath()) + "/"; + QDirIterator dirIter(tutorialPath, QStringList("*.js"), QDir::Files); while (dirIter.hasNext()) { dirIter.next(); QString fileName = dirIter.fileName(); @@ -1980,7 +1983,7 @@ void MainWindow::refreshSaveList() files.append(it.fileInfo()); } std::sort(files.begin(), files.end(), [](auto const& lhs, auto const& rhs) { - return lhs.fileTime(QFileDevice::FileModificationTime) < rhs.fileTime(QFileDevice::FileModificationTime); + return lhs.fileTime(QFileDevice::FileModificationTime) > rhs.fileTime(QFileDevice::FileModificationTime); }); for (const QFileInfo &file : files) { @@ -4889,7 +4892,7 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) } } - if (info->nexusId() > 0) { + if (info->nexusId() > 0 && Settings::instance().nexus().trackedIntegration()) { switch (info->trackedState()) { case TrackedState::TRACKED_FALSE: { menu.addAction(tr("Start tracking"), this, SLOT(track_clicked())); @@ -5226,7 +5229,9 @@ void MainWindow::installTranslator(const QString &name) { QTranslator *translator = new QTranslator(this); QString fileName = name + "_" + m_CurrentLanguage; - if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) { + QString translationsPath = qApp->applicationDirPath() + + "/" + QString::fromStdWString(AppConfig::translationsPath()); + if (!translator->load(fileName, translationsPath)) { if (m_CurrentLanguage.contains(QRegularExpression("^.*_(EN|en)(-.*)?$"))) { log::debug("localization file %s not found", fileName); } // we don't actually expect localization files for English (en, en-us, en-uk, and any variation thereof) diff --git a/src/modinfodialognexus.cpp b/src/modinfodialognexus.cpp index b4099a8d..1ee3cefc 100644 --- a/src/modinfodialognexus.cpp +++ b/src/modinfodialognexus.cpp @@ -20,6 +20,7 @@ NexusTab::NexusTab(ModInfoDialogTabContext cx) : { ui->modID->setValidator(new QIntValidator(ui->modID)); ui->endorse->setVisible(core().settings().nexus().endorsementIntegration()); + ui->track->setVisible(core().settings().nexus().trackedIntegration()); connect(ui->modID, &QLineEdit::editingFinished, [&]{ onModIDChanged(); }); connect( diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 3f5fc7fc..c712adb1 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -251,8 +251,10 @@ void ModInfoRegular::saveMeta() if (m_EndorsedState != EndorsedState::ENDORSED_UNKNOWN) { metaFile.setValue("endorsed", static_cast<std::underlying_type_t<EndorsedState>>(m_EndorsedState)); } - metaFile.setValue("tracked", static_cast<std::underlying_type_t<TrackedState>>(m_TrackedState)); - + if (m_TrackedState != TrackedState::TRACKED_UNKNOWN) { + metaFile.setValue("tracked", static_cast<std::underlying_type_t<TrackedState>>(m_TrackedState)); + } + metaFile.remove("installedFiles"); metaFile.beginWriteArray("installedFiles"); int idx = 0; @@ -658,7 +660,8 @@ std::vector<ModInfo::EFlag> ModInfoRegular::getFlags() const result.push_back(ModInfo::FLAG_NOTENDORSED); } if ((m_NexusID > 0) && - (trackedState() == TrackedState::TRACKED_TRUE)) { + (trackedState() == TrackedState::TRACKED_TRUE) && + Settings::instance().nexus().trackedIntegration()) { result.push_back(ModInfo::FLAG_TRACKED); } if (!isValid() && !m_Validated) { diff --git a/src/organizercore.cpp b/src/organizercore.cpp index ae031fe9..a9e62e77 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -965,13 +965,13 @@ QStringList OrganizerCore::findFiles( { QStringList result; DirectoryEntry *dir = m_DirectoryStructure; - if (!path.isEmpty()) + if (!path.isEmpty() && path != ".") dir = dir->findSubDirectoryRecursive(ToWString(path)); if (dir != nullptr) { std::vector<FileEntryPtr> files = dir->getFiles(); for (FileEntryPtr &file: files) { QString fullPath = ToQString(file->getFullPath()); - if (filter(fullPath)) { + if (filter(ToQString(file->getName()))) { result.append(fullPath); } } diff --git a/src/qt.conf b/src/qt.conf index f834a22a..5e070fa3 100644 --- a/src/qt.conf +++ b/src/qt.conf @@ -1,3 +1,7 @@ [Paths]
-Prefix=.
+Libraries=dlls
+LibraryExecutables=resources
Plugins=dlls
+Imports=dlls
+Qml2Imports=dlls
+Translations=resources/translations
\ No newline at end of file diff --git a/src/settings.cpp b/src/settings.cpp index db48cfd2..d325c02f 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1869,6 +1869,16 @@ void NexusSettings::setEndorsementState(EndorsementState s) } } +bool NexusSettings::trackedIntegration() const +{ + return get<bool>(m_Settings, "Settings", "tracked_integration", true); +} + +void NexusSettings::setTrackedIntegration(bool b) const +{ + set(m_Settings, "Settings", "tracked_integration", b); +} + void NexusSettings::registerAsNXMHandler(bool force) { const auto nxmPath = QCoreApplication::applicationDirPath() + "/nxmhandler.exe"; diff --git a/src/settings.h b/src/settings.h index 689067d7..122eb729 100644 --- a/src/settings.h +++ b/src/settings.h @@ -513,6 +513,11 @@ public: EndorsementState endorsementState() const; void setEndorsementState(EndorsementState s); + // returns whether tracked integration is enabled + // + bool trackedIntegration() const; + void setTrackedIntegration(bool b) const; + // registers MO as the handler for nxm links // // if 'force' is true, the registration dialog will be shown even if the user diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui index 2d4ca993..8670752b 100644 --- a/src/settingsdialog.ui +++ b/src/settingsdialog.ui @@ -837,29 +837,29 @@ </item> <item> <layout class="QGridLayout" name="gridLayout_8"> - <item row="0" column="0"> - <widget class="QCheckBox" name="offlineBox"> + <item row="1" column="0"> + <widget class="QCheckBox" name="proxyBox"> <property name="statusTip"> - <string>Disable automatic internet features</string> + <string>Use a proxy for network connections.</string> </property> <property name="whatsThis"> - <string>Disable automatic internet features. This does not affect features that are explicitly invoked by the user (like checking mods for updates, endorsing, opening the web browser)</string> + <string>Use a proxy for network connections. This uses the system-wide settings which can be configured in Internet Explorer. Please note that MO will start up a few seconds slower on some systems when using a proxy.</string> </property> <property name="text"> - <string>Offline Mode</string> + <string>Use HTTP Proxy (Uses System Settings)</string> </property> </widget> </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="proxyBox"> + <item row="0" column="0"> + <widget class="QCheckBox" name="offlineBox"> <property name="statusTip"> - <string>Use a proxy for network connections.</string> + <string>Disable automatic internet features</string> </property> <property name="whatsThis"> - <string>Use a proxy for network connections. This uses the system-wide settings which can be configured in Internet Explorer. Please note that MO will start up a few seconds slower on some systems when using a proxy.</string> + <string>Disable automatic internet features. This does not affect features that are explicitly invoked by the user (like checking mods for updates, endorsing, opening the web browser)</string> </property> <property name="text"> - <string>Use HTTP Proxy (Uses System Settings)</string> + <string>Offline Mode</string> </property> </widget> </item> @@ -873,7 +873,7 @@ </property> </widget> </item> - <item row="1" column="1"> + <item row="2" column="0"> <widget class="QCheckBox" name="hideAPICounterBox"> <property name="toolTip"> <string><html><head/><body><p>By default, a counter is displayed in the bottom right corner. This informs the user of their remaining API requests. The Nexus API becomes unusable once these API requests run out. Checking this option will hide that counter.</p></body></html></string> @@ -886,6 +886,16 @@ </property> </widget> </item> + <item row="1" column="1"> + <widget class="QCheckBox" name="trackedBox"> + <property name="text"> + <string>Tracked Integration</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> </layout> </item> <item> @@ -1727,6 +1737,7 @@ programs you are intentionally running.</string> <tabstop>nexusLog</tabstop> <tabstop>offlineBox</tabstop> <tabstop>endorsementBox</tabstop> + <tabstop>trackedBox</tabstop> <tabstop>proxyBox</tabstop> <tabstop>hideAPICounterBox</tabstop> <tabstop>associateButton</tabstop> diff --git a/src/settingsdialoggeneral.cpp b/src/settingsdialoggeneral.cpp index f29e1d24..9eae2ba1 100644 --- a/src/settingsdialoggeneral.cpp +++ b/src/settingsdialoggeneral.cpp @@ -81,9 +81,9 @@ void GeneralSettingsTab::addLanguages() const QRegExp exp(pattern); - QDirIterator iter( - QCoreApplication::applicationDirPath() + "/translations", - QDir::Files); + QString translationsPath = qApp->applicationDirPath() + + "/" + QString::fromStdWString(AppConfig::translationsPath()); + QDirIterator iter(translationsPath, QDir::Files); std::vector<std::pair<QString, QString>> languages; diff --git a/src/settingsdialognexus.cpp b/src/settingsdialognexus.cpp index 90e0dff1..461ff8d6 100644 --- a/src/settingsdialognexus.cpp +++ b/src/settingsdialognexus.cpp @@ -298,6 +298,7 @@ NexusSettingsTab::NexusSettingsTab(Settings& s, SettingsDialog& d) ui->offlineBox->setChecked(settings().network().offlineMode()); ui->proxyBox->setChecked(settings().network().useProxy()); ui->endorsementBox->setChecked(settings().nexus().endorsementIntegration()); + ui->trackedBox->setChecked(settings().nexus().trackedIntegration()); ui->hideAPICounterBox->setChecked(settings().interface().hideAPICounter()); // display server preferences @@ -355,6 +356,7 @@ void NexusSettingsTab::update() settings().network().setOfflineMode(ui->offlineBox->isChecked()); settings().network().setUseProxy(ui->proxyBox->isChecked()); settings().nexus().setEndorsementIntegration(ui->endorsementBox->isChecked()); + settings().nexus().setTrackedIntegration(ui->trackedBox->isChecked()); settings().interface().setHideAPICounter(ui->hideAPICounterBox->isChecked()); auto servers = settings().network().servers(); diff --git a/src/shared/appconfig.inc b/src/shared/appconfig.inc index 5839c2f4..8d4125cf 100644 --- a/src/shared/appconfig.inc +++ b/src/shared/appconfig.inc @@ -6,7 +6,8 @@ APPPARAM(std::wstring, downloadPath, L"downloads") APPPARAM(std::wstring, overwritePath, L"overwrite")
APPPARAM(std::wstring, stylesheetsPath, L"stylesheets")
APPPARAM(std::wstring, cachePath, L"webcache")
-APPPARAM(std::wstring, tutorialsPath, L"tutorials")
+APPPARAM(std::wstring, tutorialsPath, L"resources/tutorials")
+APPPARAM(std::wstring, translationsPath, L"resources/translations")
APPPARAM(std::wstring, logPath, L"logs")
APPPARAM(std::wstring, dumpsDir, L"crashDumps")
APPPARAM(std::wstring, defaultProfileName, L"Default")
diff --git a/src/tutorials/TutorialOverlay.qml b/src/tutorials/TutorialOverlay.qml index 47e5065d..0a31ef0e 100644 --- a/src/tutorials/TutorialOverlay.qml +++ b/src/tutorials/TutorialOverlay.qml @@ -55,7 +55,9 @@ Rectangle { Connections {
target: manager
- onTabChanged: tabChanged(index)
+ function onTabChanged() {
+ tabChanged(index)
+ }
}
Tooltip {
|
