diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-12-06 15:47:40 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-12-06 15:49:56 +0000 |
| commit | 750239bebb992ee673f39da98f413ab0f2e1f002 (patch) | |
| tree | 4fc3a4f2c56a41d750baab84c392eec09fe6f75f /src/modinfodialog.cpp | |
| parent | cb09ace972731ecc9b0fb653b88d4c599f4530fc (diff) | |
| parent | 865c75a499fe2319ed07e36d8d5d987032058882 (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/modinfodialog.cpp')
| -rw-r--r-- | src/modinfodialog.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index 35da228b..feaac2d4 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -20,6 +20,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "modinfodialog.h"
#include "ui_modinfodialog.h"
+#include "iplugingame.h"
+#include "nexusinterface.h"
#include "report.h"
#include "utility.h"
#include "messagedialog.h"
@@ -27,7 +29,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "questionboxmemory.h"
#include "settings.h"
#include "categories.h"
-#include <gameinfo.h>
#include <QDir>
#include <QDirIterator>
@@ -36,9 +37,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QMessageBox>
#include <QMenu>
#include <QFileSystemModel>
+#include <QInputDialog>
+
#include <Shlwapi.h>
+
#include <sstream>
-#include <QInputDialog>
using namespace MOBase;
@@ -688,7 +691,9 @@ void ModInfoDialog::on_visitNexusLabel_linkActivated(const QString &link) void ModInfoDialog::linkClicked(const QUrl &url)
{
- if (url.toString().startsWith(ToQString(GameInfo::instance().getNexusPage(false)))) {
+ //Ideally we'd ask the mod for the game and the web service then pass the game
+ //and URL to the web service
+ if (NexusInterface::instance()->isURLGameRelated(url)) {
this->close();
emit nexusLinkActivated(url.toString());
} else {
@@ -832,12 +837,11 @@ void ModInfoDialog::activateNexusTab() QLineEdit *modIDEdit = findChild<QLineEdit*>("modIDEdit");
int modID = modIDEdit->text().toInt();
if (modID != 0) {
- QString nexusLink = QString("%1/downloads/file.php?id=%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID);
+ QString nexusLink = NexusInterface::instance()->getModURL(modID);
QLabel *visitNexusLabel = findChild<QLabel*>("visitNexusLabel");
visitNexusLabel->setText(tr("<a href=\"%1\">Visit on Nexus</a>").arg(nexusLink));
visitNexusLabel->setToolTip(nexusLink);
-
if (m_ModInfo->getNexusDescription().isEmpty() ||
QDateTime::currentDateTime() > m_ModInfo->getLastNexusQuery().addDays(1)) {
refreshNexusData(modID);
|
