diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-11-26 17:48:50 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-11-26 17:48:50 +0000 |
| commit | dd37152eae382ee95535b289b17b0a727e4038f5 (patch) | |
| tree | 5e88903380163a31c4c1edc1989d600f3859026a /src/mainwindow.cpp | |
| parent | 82e6c98043bd18f5329e8b6d0a6f99c4d28cc0a2 (diff) | |
This removes getNexusPage from GameInfo and is currently in the game plugin.
I'm looking to move it to the nexus interface though as it doesn't really relate to the game plugin.
I've also removed the MananagementURL as
- you can log into nexus without needing to specify the game
- See above - it doesn't belong with the game plugin
This gets rid of all dependencies bar game saving and logging in
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3a2da562..3f3d5286 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -19,6 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "mainwindow.h"
#include "ui_mainwindow.h"
+
#include "spawn.h"
#include "report.h"
#include "modlist.h"
@@ -68,7 +69,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <questionboxmemory.h>
#include <taskprogressmanager.h>
#include <util.h>
-#include "gameinfo.h"
+#include <scopeguard.h>
#include <QTime>
#include <QInputDialog>
@@ -95,10 +96,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QtPlugin>
#include <QIdentityProxyModel>
#include <QClipboard>
-#include <Psapi.h>
-#include <shlobj.h>
-#include <ShellAPI.h>
-#include <TlHelp32.h>
#include <QNetworkInterface>
#include <QNetworkProxy>
#include <QJsonDocument>
@@ -113,7 +110,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #endif
#include <QCoreApplication>
#include <QProgressDialog>
-#include <scopeguard.h>
#ifndef Q_MOC_RUN
#include <boost/thread.hpp>
@@ -123,6 +119,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <boost/assign.hpp>
#endif
+#include <Psapi.h>
+#include <shlobj.h>
+#include <ShellAPI.h>
+#include <TlHelp32.h>
+
#include <sstream>
#include <regex>
#include <functional>
@@ -2528,7 +2529,7 @@ void MainWindow::visitOnNexus_clicked() {
int modID = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(m_ContextRow, 0), Qt::UserRole).toInt();
if (modID > 0) {
- nexusLinkActivated(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID));
+ nexusLinkActivated(QString("%1/mods/%2").arg(m_OrganizerCore.managedGame()->getNexusDisplayURL()).arg(modID));
} else {
MessageDialog::showMessage(tr("Nexus ID for this Mod is unknown"), this);
}
@@ -3420,7 +3421,9 @@ void MainWindow::on_actionSettings_triggered() void MainWindow::on_actionNexus_triggered()
{
- ::ShellExecuteW(nullptr, L"open", GameInfo::instance().getNexusPage(false).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ ::ShellExecuteW(nullptr, L"open",
+ m_OrganizerCore.managedGame()->getNexusDisplayURL().toStdWString().c_str(),
+ nullptr, nullptr, SW_SHOWNORMAL);
}
@@ -3814,11 +3817,11 @@ void MainWindow::on_actionUpdate_triggered() void MainWindow::on_actionEndorseMO_triggered()
{
if (QMessageBox::question(this, tr("Endorse Mod Organizer"),
- tr("Do you want to endorse Mod Organizer on %1 now?").arg(ToQString(GameInfo::instance().getNexusPage())),
+ tr("Do you want to endorse Mod Organizer on %1 now?").arg(
+ m_OrganizerCore.managedGame()->getNexusDisplayURL()),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
- //Why pass an empty variant if we're toggling an endorsement?
NexusInterface::instance()->requestToggleEndorsement(
- m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), "");
+ m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString());
}
}
|
