summaryrefslogtreecommitdiff
path: root/src/nexusinterface.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-11-06 18:35:27 +0100
committerTannin <devnull@localhost>2013-11-06 18:35:27 +0100
commitf010c22a3b2ec31bc4ebc3f577ac4455c5de5dfb (patch)
treeca37c8e7480b449289c091dd040bc3f782a52dd0 /src/nexusinterface.cpp
parentd1594798e6e78bb329e744a72e92d3f292f38a20 (diff)
- diagnosis plugins can now request to be re-evaluated
- main application now contains means for plugins to react on some changes (to be extended) - plugins can now retrieve more information about a mod - user-agent sent to nexus now automatically contains the current MO version - included updated russian translation - problems dialog now refreshes itself after a fix was applied - fixed new esp/asset ordering diagnosis. May be fully functional now - bugfix: restoring locked load order could leave MO in an endless loop (not sure if this fix is correct yet) - bugfix: plugin list was not visually updated after some changes - bugfix: nmm importer threw away mod ordering
Diffstat (limited to 'src/nexusinterface.cpp')
-rw-r--r--src/nexusinterface.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 936ff400..6a4ae046 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -22,8 +22,10 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "utility.h"
#include "json.h"
#include "selectiondialog.h"
+#include <QApplication>
#include <utility.h>
#include <regex>
+#include <util.h>
using QtJson::Json;
@@ -148,6 +150,13 @@ NexusInterface::NexusInterface()
m_DiskCache = new QNetworkDiskCache(this);
connect(m_AccessManager, SIGNAL(requestNXMDownload(QString)), this, SLOT(downloadRequestedNXM(QString)));
+
+
+ VS_FIXEDFILEINFO version = GetFileVersion(ToWString(QApplication::applicationFilePath()));
+
+ m_MOVersion = VersionInfo(version.dwFileVersionMS >> 16,
+ version.dwFileVersionMS & 0xFFFF,
+ version.dwFileVersionLS >> 16);
}
@@ -396,8 +405,10 @@ void NexusInterface::nextRequest()
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/xml");
-#pragma message("automatically insert the correct version number")
- request.setRawHeader("User-Agent", QString("Mod Organizer v1.0.5 (compatible to Nexus Client v%1)").arg(m_NMMVersion).toUtf8());
+ request.setRawHeader("User-Agent",
+ QString("Mod Organizer v%1 (compatible to Nexus Client v%2)")
+ .arg(m_MOVersion.displayString())
+ .arg(m_NMMVersion).toUtf8());
info.m_Reply = m_AccessManager->get(request);