From efb54100dcfe8ac83284ec59e6706c488ecb10e7 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 21 Nov 2015 12:30:33 +0000 Subject: Removal of (get)BinaryName --- src/gameinfoimpl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gameinfoimpl.cpp') diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 025ce4e6..a0dd832e 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -47,8 +47,9 @@ QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); } - +/* QString GameInfoImpl::binaryName() const { - return ToQString(GameInfo::instance().getBinaryName()); + return ToQString(GameInfo::instance().getgetBinaryName()); } +*/ -- cgit v1.3.1 From 408b7933d22dbea35215d5b5b136ce0749b97e12 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sat, 21 Nov 2015 16:32:48 +0000 Subject: Replace GameInfo::path with iPluginGame::gameDirectory (or dataDirectory where applicable) --- src/gameinfoimpl.cpp | 4 ++-- src/gameinfoimpl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gameinfoimpl.cpp') diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index a0dd832e..133c6de6 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -42,12 +42,12 @@ IGameInfo::Type GameInfoImpl::type() const } } - +/* QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); } -/* + QString GameInfoImpl::binaryName() const { return ToQString(GameInfo::instance().getgetBinaryName()); diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index b78321c4..b764b224 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -31,7 +31,7 @@ public: GameInfoImpl(); virtual Type type() const; - virtual QString path() const; +// virtual QString path() const; // virtual QString binaryName() const; }; -- cgit v1.3.1 From 159501d0763c3e801d3997d8d4d72accd5f7a9f9 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 22 Nov 2015 08:46:46 +0000 Subject: Removes igameinfo.h from everywhere apart from (sort of) the pythonrunner plugin. Also comment out the filemapping function because it's large and doesn't appear to be used anywhere --- src/gameinfoimpl.cpp | 2 +- src/gameinfoimpl.h | 2 +- src/organizercore.cpp | 3 ++- src/organizercore.h | 6 ++++-- src/profile.cpp | 1 - 5 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/gameinfoimpl.cpp') diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp index 133c6de6..580ee02c 100644 --- a/src/gameinfoimpl.cpp +++ b/src/gameinfoimpl.cpp @@ -31,6 +31,7 @@ GameInfoImpl::GameInfoImpl() { } +/* IGameInfo::Type GameInfoImpl::type() const { switch (GameInfo::instance().getType()) { @@ -42,7 +43,6 @@ IGameInfo::Type GameInfoImpl::type() const } } -/* QString GameInfoImpl::path() const { return QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())); diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h index b764b224..f3a21669 100644 --- a/src/gameinfoimpl.h +++ b/src/gameinfoimpl.h @@ -30,7 +30,7 @@ class GameInfoImpl : public MOBase::IGameInfo public: GameInfoImpl(); - virtual Type type() const; +// virtual Type type() const; // virtual QString path() const; // virtual QString binaryName() const; diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 517a9bfb..704dc734 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1568,6 +1568,7 @@ void OrganizerCore::prepareStart() { storeSettings(); } +/* std::vector> OrganizerCore::fileMapping() { return fileMapping(managedGame()->dataDirectory().absolutePath(), @@ -1606,4 +1607,4 @@ std::vector> OrganizerCore::fileMapping( return result; } - +*/ diff --git a/src/organizercore.h b/src/organizercore.h index 3524dcb5..00cf6934 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -157,7 +157,7 @@ public: bool onFinishedRun(const std::function &func); void refreshModList(bool saveChanges = true); - std::vector > fileMapping(); + //std::vector > fileMapping(); public: // IPluginDiagnose interface @@ -210,9 +210,11 @@ private: bool testForSteam(); - std::vector> fileMapping(const QString &dataPath, + /* + * std::vector> fileMapping(const QString &dataPath, const MOShared::DirectoryEntry *base, const MOShared::DirectoryEntry *directoryEntry); +*/ private slots: diff --git a/src/profile.cpp b/src/profile.cpp index cf3622b0..c6a2b43d 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -19,7 +19,6 @@ along with Mod Organizer. If not, see . #include "profile.h" -#include "gameinfo.h" #include "windows_error.h" #include "modinfo.h" #include "safewritefile.h" -- cgit v1.3.1 From efaba9070639dbdc77955784b5de3365c9271738 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 22 Nov 2015 21:18:56 +0000 Subject: Final eradication of igameinfo and adding python wrappers for IPluginGame --- src/CMakeLists.txt | 2 -- src/gameinfoimpl.cpp | 55 -------------------------------------------------- src/gameinfoimpl.h | 39 ----------------------------------- src/mainwindow.cpp | 1 - src/organizer.pro | 2 -- src/organizercore.cpp | 10 +-------- src/organizercore.h | 3 --- src/organizerproxy.cpp | 5 ----- src/organizerproxy.h | 1 - 9 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 src/gameinfoimpl.cpp delete mode 100644 src/gameinfoimpl.h (limited to 'src/gameinfoimpl.cpp') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22b725de..8a2964d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,7 +61,6 @@ SET(organizer_SRCS moapplication.cpp profileinputdialog.cpp icondelegate.cpp - gameinfoimpl.cpp csvbuilder.cpp savetextasdialog.cpp qtgroupingproxy.cpp @@ -150,7 +149,6 @@ SET(organizer_HDRS moapplication.h profileinputdialog.h icondelegate.h - gameinfoimpl.h csvbuilder.h savetextasdialog.h qtgroupingproxy.h diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp deleted file mode 100644 index 580ee02c..00000000 --- a/src/gameinfoimpl.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -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 - - -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().getgetBinaryName()); -} -*/ diff --git a/src/gameinfoimpl.h b/src/gameinfoimpl.h deleted file mode 100644 index f3a21669..00000000 --- a/src/gameinfoimpl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Mod Organizer. If not, see . -*/ - -#ifndef GAMEINFOIMPL_H -#define GAMEINFOIMPL_H - - -#include -#include - - -class GameInfoImpl : public MOBase::IGameInfo -{ -public: - GameInfoImpl(); - -// virtual Type type() const; -// virtual QString path() const; -// virtual QString binaryName() const; - -}; - -#endif // GAMEINFOIMPL_H diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 84a51b62..7142bcb1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -52,7 +52,6 @@ along with Mod Organizer. If not, see . #include "credentialsdialog.h" #include "selectiondialog.h" #include "csvbuilder.h" -#include "gameinfoimpl.h" #include "savetextasdialog.h" #include "problemsdialog.h" #include "previewdialog.h" diff --git a/src/organizer.pro b/src/organizer.pro index 65c1e4d3..2869fda5 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -70,7 +70,6 @@ SOURCES += \ moapplication.cpp \ profileinputdialog.cpp \ icondelegate.cpp \ - gameinfoimpl.cpp \ csvbuilder.cpp \ savetextasdialog.cpp \ qtgroupingproxy.cpp \ @@ -145,7 +144,6 @@ HEADERS += \ moapplication.h \ profileinputdialog.h \ icondelegate.h \ - gameinfoimpl.h \ csvbuilder.h \ savetextasdialog.h \ qtgroupingproxy.h \ diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 704dc734..826d5bea 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1,7 +1,6 @@ #include "organizercore.h" #include "mainwindow.h" -#include "gameinfoimpl.h" #include "messagedialog.h" #include "logbuffer.h" #include "credentialsdialog.h" @@ -119,8 +118,7 @@ QStringList toStringList(InputIterator current, InputIterator end) OrganizerCore::OrganizerCore(const QSettings &initSettings) - : m_GameInfo(new GameInfoImpl()) - , m_UserInterface(nullptr) + : m_UserInterface(nullptr) , m_PluginContainer(nullptr) , m_GameName() , m_CurrentProfile(nullptr) @@ -187,7 +185,6 @@ OrganizerCore::~OrganizerCore() m_ModList.setProfile(nullptr); NexusInterface::instance()->cleanup(); - delete m_GameInfo; delete m_DirectoryStructure; } @@ -556,11 +553,6 @@ void OrganizerCore::setCurrentProfile(const QString &profileName) refreshDirectoryStructure(); } -MOBase::IGameInfo &OrganizerCore::gameInfo() const -{ - return *m_GameInfo; -} - MOBase::IModRepositoryBridge *OrganizerCore::createNexusBridge() const { return new NexusBridge(); diff --git a/src/organizercore.h b/src/organizercore.h index 00cf6934..6075eb18 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -126,7 +126,6 @@ public: MOBase::DelayedFileWriter &pluginsWriter() { return m_PluginListsWriter; } public: - MOBase::IGameInfo &gameInfo() const; MOBase::IModRepositoryBridge *createNexusBridge() const; QString profileName() const; QString profilePath() const; @@ -231,8 +230,6 @@ private: private: - MOBase::IGameInfo *m_GameInfo; - IUserInterface *m_UserInterface; PluginContainer *m_PluginContainer; QString m_GameName; diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 17c5a16f..3c103ff0 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -15,11 +15,6 @@ OrganizerProxy::OrganizerProxy(OrganizerCore *organizer, const QString &pluginNa { } -IGameInfo &OrganizerProxy::gameInfo() const -{ - return m_Proxied->gameInfo(); -} - IModRepositoryBridge *OrganizerProxy::createNexusBridge() const { return new NexusBridge(m_PluginName); diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 31009c8a..2f5e0970 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -12,7 +12,6 @@ public: OrganizerProxy(OrganizerCore *organizer, const QString &pluginName); - virtual MOBase::IGameInfo &gameInfo() const; virtual MOBase::IModRepositoryBridge *createNexusBridge() const; virtual QString profileName() const; virtual QString profilePath() const; -- cgit v1.3.1