summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-12-06 15:47:40 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-12-06 15:49:56 +0000
commit750239bebb992ee673f39da98f413ab0f2e1f002 (patch)
tree4fc3a4f2c56a41d750baab84c392eec09fe6f75f /src/settings.cpp
parentcb09ace972731ecc9b0fb653b88d4c599f4530fc (diff)
parent865c75a499fe2319ed07e36d8d5d987032058882 (diff)
Merge branch 'master' into issue/344
# Conflicts: # src/gameinfoimpl.cpp # src/gameinfoimpl.h # src/shared/fallout3info.h # src/shared/falloutnvinfo.h # src/shared/gameinfo.h # src/shared/oblivioninfo.h # src/shared/skyriminfo.h
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 4c2a34c8..479dd3ab 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -22,26 +22,22 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "settingsdialog.h"
#include "utility.h"
#include "helper.h"
-#include "json.h"
#include <gameinfo.h>
#include <appconfig.h>
#include <utility.h>
#include <iplugingame.h>
#include <QCheckBox>
-#include <QLineEdit>
-#include <QDirIterator>
-#include <QRegExp>
#include <QCoreApplication>
-#include <QMessageBox>
#include <QDesktopServices>
+#include <QDirIterator>
+#include <QLineEdit>
+#include <QMessageBox>
+#include <QRegExp>
#include <memory>
-
using namespace MOBase;
-using namespace MOShared;
-
template <typename T>
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->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"),
@@ -120,7 +116,7 @@ void Settings::registerAsNXMHandler(bool force)
}
}
-void Settings::managedGameChanged(IPluginGame *gamePlugin)
+void Settings::managedGameChanged(IPluginGame const *gamePlugin)
{
m_GamePlugin = gamePlugin;
}