diff options
| author | TanninOne <seppleviathan@gmx.de> | 2015-12-06 13:24:19 +0100 |
|---|---|---|
| committer | TanninOne <seppleviathan@gmx.de> | 2015-12-06 13:24:19 +0100 |
| commit | e31cf3f2fd99073d22fdddfdb106a59858e14299 (patch) | |
| tree | de7bbfd6de6afe830f8ec1a624876cf174aab376 /src/settings.cpp | |
| parent | 688e149c96c29d8249c9db416f5773cfc7baad6d (diff) | |
| parent | 3670ab2528ff6a129af4e4aeaf50574e2c9080ba (diff) | |
Merge pull request #372 from ThosRTanner/issue/356
Refactor gameinfo & 'shared' library to use game plugins (9 of 17)
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 4c2a34c8..e175b210 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->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; } |
