mirror of
https://github.com/ModOrganizer2/modorganizer-diagnose_basic.git
synced 2026-07-27 14:03:10 -07:00
Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f114b3ee60 | ||
|
|
182ec5f85d | ||
|
|
41eb0d50d4 | ||
|
|
9cb9c2cc56 | ||
|
|
dd2203f647 | ||
|
|
926cdedf8c | ||
|
|
7ea85f751e | ||
|
|
fb4eacabed | ||
|
|
4bf94e9fda | ||
|
|
6f73fe05a4 | ||
|
|
41bd8cc0cd | ||
|
|
f0957919a5 | ||
|
|
4bce131613 | ||
|
|
849e946284 | ||
|
|
58a8406335 | ||
|
|
c8308f1612 | ||
|
|
75d821c46a | ||
|
|
f784c34877 | ||
|
|
b529b1f6a8 | ||
|
|
be9382e684 | ||
|
|
35cc2bb91c |
@@ -10,6 +10,8 @@ TEMPLATE = lib
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
DEFINES += DIAGNOSEBASIC_LIBRARY
|
||||
DEFINES += NOMINMAX
|
||||
|
||||
@@ -22,7 +24,7 @@ HEADERS += diagnosebasic.h
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
INCLUDEPATH += "$(BOOSTPATH)"
|
||||
INCLUDEPATH += "$${BOOSTPATH}"
|
||||
|
||||
#CONFIG += dll
|
||||
|
||||
|
||||
+318
-170
File diff suppressed because it is too large
Load Diff
+31
-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,7 +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;
|
||||
|
||||
@@ -83,6 +87,9 @@ private:
|
||||
QString modName;
|
||||
int pluginPriority;
|
||||
int modPriority;
|
||||
int sortGroup;
|
||||
bool avoidMove;
|
||||
QSet<QString> relevantScripts;
|
||||
};
|
||||
|
||||
struct Move {
|
||||
@@ -95,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