Skip to content

Commit

Permalink
Changes to compile with Qt6 + Boost 1.77
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Dec 5, 2021
1 parent 7318388 commit c95039a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/handlerwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void HandlerWindow::addBinaryDialog()
if (QFileInfo(iterItem->text(COL_BINARY)) == QFileInfo(dialog.executable())) {
QStringList games = iterItem->text(COL_GAMES).split(",");
games.append(dialog.gameIDs());
games = games.toSet().toList();
games.removeDuplicates();
iterItem->setText(COL_GAMES, games.join(","));
if (iterItem->text(COL_ARGUMENTS).compare(dialog.arguments(), Qt::CaseInsensitive) != 0) {
iterItem->setText(COL_ARGUMENTS, dialog.arguments());
Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <QJsonObject>
#include <QRegularExpression>
#include <QDateTime>
#include <QStandardPaths>
#include "logger.h"


Expand Down Expand Up @@ -84,7 +85,7 @@ HandlerStorage *loadStorage(bool forceReg)
HandlerStorage *storage = nullptr;

QDir globalStorage(
QStandardPaths::writableLocation(QStandardPaths::DataLocation));
QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));
globalStorage.cd("../ModOrganizer");
QDir baseDir;
if (globalStorage.exists()) {
Expand Down Expand Up @@ -158,7 +159,7 @@ HandlerStorage *loadStorage(bool forceReg)

static void applyChromeFix()
{
QString dataPath = QDir::fromNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
QString dataPath = QDir::fromNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));
QString fileName = QDir(dataPath + "/../google/chrome/user data/local state").canonicalPath();

QFile chromeLocalState(fileName);
Expand Down Expand Up @@ -241,7 +242,7 @@ int main(int argc, char *argv[])
if (args.count() > 1) {
if ((args.at(1) == "reg") || (args.at(1) == "forcereg")) {
if (args.count() == 4) {
storage->registerHandler(args.at(2).split(",", QString::SkipEmptyParts), QDir::toNativeSeparators(args.at(3)), "", true, forceReg);
storage->registerHandler(args.at(2).split(",", Qt::SkipEmptyParts), QDir::toNativeSeparators(args.at(3)), "", true, forceReg);
if (forceReg) {
applyChromeFix();
}
Expand Down
24 changes: 12 additions & 12 deletions src/nxmhandler_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,60 +128,60 @@ Use this if you moved Mod Organizer or if you uninstalled the Mod Organizer inst
<context>
<name>QObject</name>
<message>
<location filename="main.cpp" line="124"/>
<location filename="main.cpp" line="125"/>
<source>Change Handler?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="125"/>
<location filename="main.cpp" line="126"/>
<source>A nxm handler from a different Mod Organizer installation has been registered. Do you want to replace it? This is usually not necessary unless the other installation is defective.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="136"/>
<location filename="main.cpp" line="137"/>
<source>Register?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="137"/>
<location filename="main.cpp" line="138"/>
<source>Mod Organizer is not set up to handle nxm links. Associate it with nxm links?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="141"/>
<location filename="main.cpp" line="142"/>
<source>No, don&apos;t ask again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="250"/>
<location filename="main.cpp" line="251"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="250"/>
<location filename="main.cpp" line="271"/>
<location filename="main.cpp" line="251"/>
<location filename="main.cpp" line="272"/>
<source>Invalid number of parameters</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="262"/>
<location filename="main.cpp" line="263"/>
<source>No handler found</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="263"/>
<location filename="main.cpp" line="264"/>
<source>No application registered to handle this game (%1).
If you expected Mod Organizer to handle the link, you have to go to Settings-&gt;Nexus and click the &quot;Associate with ... links&quot;-button.
If you have NMM installed, you can re-register it for nxm-links so it handles the links that MO doesn&apos;t.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="271"/>
<location filename="main.cpp" line="272"/>
<source>Invalid Arguments</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="290"/>
<location filename="main.cpp" line="291"/>
<source>Uncaught exception:
%1</source>
<translation type="unfinished"></translation>
Expand Down

0 comments on commit c95039a

Please sign in to comment.