summaryrefslogtreecommitdiff
path: root/src/nexusinterface.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-11-26 17:48:50 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-11-26 17:48:50 +0000
commitdd37152eae382ee95535b289b17b0a727e4038f5 (patch)
tree5e88903380163a31c4c1edc1989d600f3859026a /src/nexusinterface.cpp
parent82e6c98043bd18f5329e8b6d0a6f99c4d28cc0a2 (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/nexusinterface.cpp')
-rw-r--r--src/nexusinterface.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 8a7c88b6..b6843c57 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -555,9 +555,14 @@ void NexusInterface::requestTimeout()
void NexusInterface::managedGameChanged(IPluginGame const *game)
{
m_Game = game;
- m_AccessManager->managedGameChanged(game);
}
+namespace {
+ QString get_management_url(MOBase::IPluginGame const *game)
+ {
+ return "http://nmm.nexusmods.com/" + game->getNexusName().toLower();
+ }
+}
NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID
, NexusInterface::NXMRequestInfo::Type type
@@ -573,7 +578,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID
, m_Timeout(nullptr)
, m_Reroute(false)
, m_ID(s_NextID.fetchAndAddAcquire(1))
- , m_URL(game->getNexusManagementURL())
+ , m_URL(get_management_url(game))
, m_SubModule(subModule)
, m_NexusGameID(game->getNexusGameID())
, m_Endorse(false)
@@ -594,7 +599,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector<int> modIDList
, m_Timeout(nullptr)
, m_Reroute(false)
, m_ID(s_NextID.fetchAndAddAcquire(1))
- , m_URL(game->getNexusManagementURL())
+ , m_URL(get_management_url(game))
, m_SubModule(subModule)
, m_NexusGameID(game->getNexusGameID())
, m_Endorse(false)
@@ -615,7 +620,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID
, m_Timeout(nullptr)
, m_Reroute(false)
, m_ID(s_NextID.fetchAndAddAcquire(1))
- , m_URL(game->getNexusManagementURL())
+ , m_URL(get_management_url(game))
, m_SubModule(subModule)
, m_NexusGameID(game->getNexusGameID())
, m_Endorse(false)