Compare commits

...
Author SHA1 Message Date
Tannin be9382e684 some fixes towards qt5 compatibility 2014-03-16 20:04:57 +01:00
Tannin 35cc2bb91c - ini file changes that would have to overwrite ini tweaks are now stored in a separate file
and actually get used.
- a warning message advices users to clean out that separate file
- slightly improved default main window layout
- bugfix: newly created ini tweaks were added to the list with incorrect  properties
2014-02-17 21:15:20 +01:00
3 changed files with 25 additions and 1 deletions
+4
View File
@@ -10,6 +10,10 @@ TEMPLATE = lib
CONFIG += plugins
CONFIG += dll
contains(QT_VERSION, "^5.*") {
QT += widgets
}
DEFINES += DIAGNOSEBASIC_LIBRARY
DEFINES += NOMINMAX
+20 -1
View File
@@ -357,6 +357,10 @@ std::vector<unsigned int> DiagnoseBasic::activeProblems() const
result.push_back(PROBLEM_MODLISTBACKUP);
}
if (QFile::exists(m_MOInfo->profilePath() + "/profile_tweaks.ini")) {
result.push_back(PROBLEM_PROFILETWEAKS);
}
return result;
}
@@ -375,6 +379,8 @@ QString DiagnoseBasic::shortDescription(unsigned int key) const
return tr("Potential Mod order problem");
case PROBLEM_MODLISTBACKUP:
return tr("Modlist backup exists");
case PROBLEM_PROFILETWEAKS:
return tr("Ini Tweaks overwritten");
default:
throw MyException(tr("invalid problem key %1").arg(key));
}
@@ -420,6 +426,16 @@ QString DiagnoseBasic::fullDescription(unsigned int key) const
"This backup contains both the info which mods are enabled and the ordering.<br>"
"You can restore that backup here.").arg(time.toString());
} break;
case PROBLEM_PROFILETWEAKS: {
QString fileContent = readFileText(m_MOInfo->profilePath() + "/profile_tweaks.ini");
return tr("Settings provided in ini tweaks have been overwritten in-game or in an applications.<br>"
"These overwrites are stored in a separate file (<i>profile_tweaks.ini</i> within the profile directory)<br>"
"to keep ini-tweaks in their original state but you should really get rid of this file as there is<br>"
"no tool support in MO to work on it. <br>"
"Advice: Copy settings you want to keep to an appropriate ini tweak, then delete <i>profile_tweaks.ini</i>.<br>"
"Hitting the <i>Fix</i> button will delete that file")
+ "<hr><i>profile_tweaks.ini:</i><pre>" + fileContent + "</pre>";
} break;
default:
throw MyException(tr("invalid problem key %1").arg(key));
}
@@ -427,7 +443,7 @@ QString DiagnoseBasic::fullDescription(unsigned int key) const
bool DiagnoseBasic::hasGuidedFix(unsigned int key) const
{
return /*(key == PROBLEM_ASSETORDER) || */(key == PROBLEM_MODLISTBACKUP);
return /*(key == PROBLEM_ASSETORDER) || */(key == PROBLEM_MODLISTBACKUP) || (key == PROBLEM_PROFILETWEAKS);
}
void DiagnoseBasic::startGuidedFix(unsigned int key) const
@@ -468,6 +484,9 @@ void DiagnoseBasic::startGuidedFix(unsigned int key) const
shellDelete(QStringList(m_MOInfo->profilePath() + "/" + m_NewestModlistBackup));
}
} break;
case PROBLEM_PROFILETWEAKS: {
shellDeleteQuiet(m_MOInfo->profilePath() + "/profile_tweaks.ini");
} break;
default: throw MyException(tr("invalid problem key %1").arg(key));
}
}
+1
View File
@@ -73,6 +73,7 @@ private:
static const unsigned int PROBLEM_NITPICKINSTALLED = 4;
static const unsigned int PROBLEM_ASSETORDER = 5;
static const unsigned int PROBLEM_MODLISTBACKUP = 6;
static const unsigned int PROBLEM_PROFILETWEAKS = 7;
static const unsigned int NUM_CONTEXT_ROWS = 5;