From 6516a6b7c19713de28db7142612f1c095e541317 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 17 Feb 2013 09:26:29 +0100 Subject: - moved shared and uibase libraries to namespaces - bugfix: the "fix mods" function was accessing the save game data incorrectly, causing a crash --- src/gameinfoimpl.cpp | 66 ++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) (limited to 'src/gameinfoimpl.cpp') diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index bb46ee3f..80c46bc8 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -17,34 +17,38 @@ You should have received a copy of the GNU General Public License along with Mod Organizer. If not, see . */ -#include "gameinfoimpl.h" -#include -#include -#include - - -GameInfoImpl::GameInfoImpl() -{ -} - -IGameInfo::Type GameInfoImpl::type() const -{ - switch (GameInfo::instance().getType()) { - case GameInfo::TYPE_OBLIVION: return IGameInfo::TYPE_OBLIVION; - case GameInfo::TYPE_FALLOUT3: return IGameInfo::TYPE_FALLOUT3; - case GameInfo::TYPE_FALLOUTNV: return IGameInfo::TYPE_FALLOUTNV; - case GameInfo::TYPE_SKYRIM: return IGameInfo::TYPE_SKYRIM; - default: throw MyException(QObject::tr("invalid game type %1").arg(GameInfo::instance().getType())); - } -} - - -QString GameInfoImpl::path() const -{ - return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); -} - -QString GameInfoImpl::binaryName() const -{ - return ToQString(GameInfo::instance().getBinaryName()); -} +#include "gameinfoimpl.h" +#include +#include +#include + + +using namespace MOBase; +using namespace MOShared; + + +GameInfoImpl::GameInfoImpl() +{ +} + +IGameInfo::Type GameInfoImpl::type() const +{ + switch (GameInfo::instance().getType()) { + case GameInfo::TYPE_OBLIVION: return IGameInfo::TYPE_OBLIVION; + case GameInfo::TYPE_FALLOUT3: return IGameInfo::TYPE_FALLOUT3; + case GameInfo::TYPE_FALLOUTNV: return IGameInfo::TYPE_FALLOUTNV; + case GameInfo::TYPE_SKYRIM: return IGameInfo::TYPE_SKYRIM; + default: throw MyException(QObject::tr("invalid game type %1").arg(GameInfo::instance().getType())); + } +} + + +QString GameInfoImpl::path() const +{ + return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); +} + +QString GameInfoImpl::binaryName() const +{ + return ToQString(GameInfo::instance().getBinaryName()); +} -- cgit v1.3.1