mirror of
https://github.com/ModOrganizer2/modorganizer-diagnose_basic.git
synced 2026-07-27 14:03:10 -07:00
Compare commits
46
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d983c908ee | ||
|
|
0cc077b8c4 | ||
|
|
b245bc2ce3 | ||
|
|
0a1707fa9c | ||
|
|
b10b1f28ff | ||
|
|
59c10d78cd | ||
|
|
7dd29a68e2 | ||
|
|
ce0dc685ca | ||
|
|
e426d8efb4 | ||
|
|
bf00944706 | ||
|
|
97c8769334 | ||
|
|
05d1782cf1 | ||
|
|
f114b3ee60 | ||
|
|
0320bd719a | ||
|
|
943689d5c3 | ||
|
|
ecf0ff0d02 | ||
|
|
182ec5f85d | ||
|
|
2632e79de7 | ||
|
|
41eb0d50d4 | ||
|
|
863233e1ab | ||
|
|
9cb9c2cc56 | ||
|
|
8529da255f | ||
|
|
dd2203f647 | ||
|
|
123d291dc1 | ||
|
|
926cdedf8c | ||
|
|
0cc55698f7 | ||
|
|
7ea85f751e | ||
|
|
2cf83c7681 | ||
|
|
fb4eacabed | ||
|
|
366b3854b8 | ||
|
|
4bf94e9fda | ||
|
|
016a2efb88 | ||
|
|
6f73fe05a4 | ||
|
|
4531207250 | ||
|
|
266b597e4c | ||
|
|
41bd8cc0cd | ||
|
|
06487c2653 | ||
|
|
9b0637fa66 | ||
|
|
f0957919a5 | ||
|
|
4bce131613 | ||
|
|
849e946284 | ||
|
|
58a8406335 | ||
|
|
c8308f1612 | ||
|
|
75d821c46a | ||
|
|
f784c34877 | ||
|
|
b529b1f6a8 |
@@ -0,0 +1,20 @@
|
||||
Import('qt_env')
|
||||
|
||||
env = qt_env.Clone()
|
||||
|
||||
env.AppendUnique(CPPDEFINES = [
|
||||
'DIAGNOSEBASIC_LIBRARY',
|
||||
'NOMINMAX',
|
||||
# suppress a few warnings caused by boost vs vc++ paranoia
|
||||
'_SCL_SECURE_NO_WARNINGS'
|
||||
])
|
||||
|
||||
env.AppendUnique(CPPPATH = [
|
||||
'${BOOSTPATH}'
|
||||
])
|
||||
|
||||
lib = env.SharedLibrary('diagnoseBasic', env.Glob('*.cpp'))
|
||||
env.InstallModule(lib)
|
||||
|
||||
res = env['QT_USED_MODULES']
|
||||
Return('res')
|
||||
@@ -10,9 +10,7 @@ TEMPLATE = lib
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
contains(QT_VERSION, "^5.*") {
|
||||
QT += widgets
|
||||
}
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
DEFINES += DIAGNOSEBASIC_LIBRARY
|
||||
DEFINES += NOMINMAX
|
||||
@@ -26,11 +24,12 @@ HEADERS += diagnosebasic.h
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
INCLUDEPATH += "$(BOOSTPATH)"
|
||||
INCLUDEPATH += "$${BOOSTPATH}"
|
||||
|
||||
#CONFIG += dll
|
||||
|
||||
#DEFINES += INIEDITOR_LIBRARY
|
||||
|
||||
OTHER_FILES += \
|
||||
diagnosebasic.json
|
||||
diagnosebasic.json\
|
||||
SConscript
|
||||
|
||||
+326
-182
File diff suppressed because it is too large
Load Diff
+30
-2
@@ -25,9 +25,11 @@ along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <iplugindiagnose.h>
|
||||
#include <imoinfo.h>
|
||||
#include <imodlist.h>
|
||||
#include <QString>
|
||||
#include <QSet>
|
||||
|
||||
|
||||
class DiagnoseBasic : public QObject, MOBase::IPlugin, MOBase::IPluginDiagnose
|
||||
class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
|
||||
@@ -64,6 +66,7 @@ private:
|
||||
bool invalidFontConfig() const;
|
||||
bool nitpickInstalled() const;
|
||||
bool assetOrder() const;
|
||||
bool missingMasters() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -72,8 +75,8 @@ private:
|
||||
static const unsigned int PROBLEM_INVALIDFONT = 3;
|
||||
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 PROBLEM_MISSINGMASTERS = 8;
|
||||
|
||||
static const unsigned int NUM_CONTEXT_ROWS = 5;
|
||||
|
||||
@@ -84,6 +87,9 @@ private:
|
||||
QString modName;
|
||||
int pluginPriority;
|
||||
int modPriority;
|
||||
int sortGroup;
|
||||
bool avoidMove;
|
||||
QSet<QString> relevantScripts;
|
||||
};
|
||||
|
||||
struct Move {
|
||||
@@ -96,14 +102,36 @@ private:
|
||||
Move(const ListElement &initItem, const ListElement &initReference, EType initType)
|
||||
: item(initItem), reference(initReference), type(initType) {}
|
||||
};
|
||||
|
||||
struct Sorter {
|
||||
struct {
|
||||
int operator()(const ListElement &lhs, const ListElement &rhs)
|
||||
{
|
||||
return lhs.modPriority < rhs.modPriority;
|
||||
}
|
||||
} minMod;
|
||||
|
||||
std::vector<Move> moves;
|
||||
|
||||
void operator()(std::vector<ListElement> modList);
|
||||
private:
|
||||
void sortGroup(std::vector<ListElement> modList);
|
||||
};
|
||||
|
||||
|
||||
friend bool operator<(const Move &lhs, const Move &rhs);
|
||||
|
||||
private:
|
||||
|
||||
void topoSort(std::vector<ListElement> &list) const;
|
||||
|
||||
private:
|
||||
|
||||
MOBase::IOrganizer *m_MOInfo;
|
||||
mutable QString m_ErrorMessage;
|
||||
mutable std::vector <Move> m_SuggestedMoves;
|
||||
mutable QString m_NewestModlistBackup;
|
||||
mutable std::set<QString> m_MissingMasters;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user