diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-11-28 14:53:32 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-11-28 14:53:32 +0000 |
| commit | 9e2bcffc32157b99a2d7364b869a4423ba827a32 (patch) | |
| tree | 0983cb8b1b915c016d39b9e2632562fcc813b40b /src/loadmechanism.cpp | |
| parent | ca54ee2e9a8f1d49d81d5c3b66a860b9b16992d6 (diff) | |
Reworked startup considerably so now no longer dependant on GameInfo
Did some const correctness to the "managed_game" property as you shouldn't really be altering the plugin details whilst MO is running
Diffstat (limited to 'src/loadmechanism.cpp')
| -rw-r--r-- | src/loadmechanism.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 0d95c51c..521473b0 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -65,7 +65,7 @@ void LoadMechanism::removeHintFile(QDir &targetDirectory) bool LoadMechanism::isDirectLoadingSupported()
{
//FIXME: Seriously? isn't there a 'do i need steam' thing?
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
if (game->gameName().compare("oblivion", Qt::CaseInsensitive) == 0) {
// oblivion can be loaded directly if it's not the steam variant
return !game->gameDirectory().exists("steam_api.dll");
@@ -77,7 +77,7 @@ bool LoadMechanism::isDirectLoadingSupported() bool LoadMechanism::isScriptExtenderSupported()
{
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
// test if there even is an extender for the managed game and if so whether it's installed
@@ -93,7 +93,7 @@ bool LoadMechanism::isProxyDLLSupported() // plus: the proxy dll hasn't been working for at least the whole 1.12.x versions of MO and
// noone reported it so why maintain an unused feature?
return false;
-/* IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+/* IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
return game->gameDirectory().exists(QString::fromStdWString(AppConfig::proxyDLLTarget()));*/
}
@@ -125,7 +125,7 @@ bool LoadMechanism::hashIdentical(const QString &fileNameLHS, const QString &fil void LoadMechanism::deactivateScriptExtender()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
if (extender == nullptr) {
throw MyException(QObject::tr("game doesn't support a script extender"));
@@ -151,7 +151,7 @@ void LoadMechanism::deactivateScriptExtender() void LoadMechanism::deactivateProxyDLL()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget()));
@@ -180,7 +180,7 @@ void LoadMechanism::deactivateProxyDLL() void LoadMechanism::activateScriptExtender()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
if (extender == nullptr) {
throw MyException(QObject::tr("game doesn't support a script extender"));
@@ -220,7 +220,7 @@ void LoadMechanism::activateScriptExtender() void LoadMechanism::activateProxyDLL()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget()));
|
