summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-11-24 06:58:29 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-11-24 06:58:29 +0000
commit37c3bea7dd5a562a97c00b740103cc2868b3013b (patch)
treec4fce29e8aaba21307456dd30b9cbf81580e6c3e /src/settings.cpp
parent3659284ab6bdbf0845cf846600a26db688584d6f (diff)
Removes all uses of GameInfo::getShortName, replaced by IPluginGame::getNexustName
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp14
1 files changed, 5 insertions, 9 deletions
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 <http://www.gnu.org/licenses/>.
#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->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"),