diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-11-25 08:22:40 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-11-25 08:22:40 +0000 |
| commit | 78b686b2bc507a5606bc7c673745b02346bc667a (patch) | |
| tree | d161d6096289aed99cfb1bf79cce4c2404c202dd /src/modinfo.cpp | |
| parent | 42a68689fe60ba29367dc0c8f65083d9bde93e1f (diff) | |
Removes all references to GameInfo::getGameDirectory apart from one during startup
Did some const correctness improvements
Also may have fixed a potential crash as the Profile copy constructor didn't copy the m_GamePlugin membber
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index a0628bd8..d79a7919 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -1134,14 +1134,15 @@ QDateTime ModInfoForeign::creationTime() const QString ModInfoForeign::absolutePath() const { - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"; + //I ought to store this, it's used elsewhere + IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>(); + return game->dataDirectory().absolutePath(); } std::vector<ModInfo::EFlag> ModInfoForeign::getFlags() const { std::vector<ModInfo::EFlag> result = ModInfoWithConflictInfo::getFlags(); result.push_back(FLAG_FOREIGN); - return result; } |
