summaryrefslogtreecommitdiff
path: root/src/nexusinterface.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-11-26 21:02:45 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-11-26 21:02:45 +0000
commit2025145ff6e1ddf1b433eae2f9418e10a6fea82e (patch)
treeb8ebd015f5e718f03a9f55389e53d43fd0557d31 /src/nexusinterface.cpp
parent1b1fc247dfc4eade8ab34679ca7c58e850a0a1a3 (diff)
Replaced the IPluginGame getNexusDisplayURL with some APIs in NexusInterface
It makes more sense to have them here as they have very little to do with the game, more to do with the origin of the mod.
Diffstat (limited to 'src/nexusinterface.cpp')
-rw-r--r--src/nexusinterface.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index b6843c57..7a0b0a17 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -240,6 +240,22 @@ void NexusInterface::interpretNexusFileName(const QString &fileName, QString &mo
}
}
+bool NexusInterface::isURLGameRelated(const QUrl &url) const
+{
+ QString const name(url.toString());
+ return name.startsWith(getGameURL() + "/") ||
+ name.startsWith("http://" + m_Game->getNexusName().toLower() + ".nexusmods.com/mods/");
+}
+
+QString NexusInterface::getGameURL() const
+{
+ return "http://www.nexusmods.com/" + m_Game->getNexusName().toLower();
+}
+
+QString NexusInterface::getModURL(int modID) const
+{
+ return QString("%1/mods/%2").arg(getGameURL()).arg(modID);
+}
int NexusInterface::requestDescription(int modID, QObject *receiver, QVariant userData,
const QString &subModule, MOBase::IPluginGame const *game)