mirror of
https://github.com/ModOrganizer2/modorganizer-diagnose_basic.git
synced 2026-07-27 14:03:10 -07:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be9382e684 | ||
|
|
35cc2bb91c |
@@ -10,6 +10,10 @@ TEMPLATE = lib
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
contains(QT_VERSION, "^5.*") {
|
||||
QT += widgets
|
||||
}
|
||||
|
||||
DEFINES += DIAGNOSEBASIC_LIBRARY
|
||||
DEFINES += NOMINMAX
|
||||
|
||||
|
||||
+20
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user