mirror of
https://github.com/ModOrganizer2/modorganizer-diagnose_basic.git
synced 2026-07-27 14:03:10 -07:00
Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
182ec5f85d | ||
|
|
41eb0d50d4 | ||
|
|
9cb9c2cc56 | ||
|
|
dd2203f647 | ||
|
|
926cdedf8c | ||
|
|
7ea85f751e | ||
|
|
fb4eacabed | ||
|
|
4bf94e9fda | ||
|
|
6f73fe05a4 | ||
|
|
41bd8cc0cd | ||
|
|
f0957919a5 | ||
|
|
4bce131613 | ||
|
|
849e946284 | ||
|
|
58a8406335 | ||
|
|
c8308f1612 | ||
|
|
75d821c46a | ||
|
|
f784c34877 | ||
|
|
b529b1f6a8 | ||
|
|
be9382e684 | ||
|
|
35cc2bb91c | ||
|
|
402d6b3a7d | ||
|
|
6e84aac467 | ||
|
|
2b711162ff | ||
|
|
b9aa3d7668 | ||
|
|
d4a7f6fcb9 |
@@ -4,24 +4,27 @@
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT -= gui
|
||||
|
||||
TARGET = diagnoseBasic
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
DEFINES += DIAGNOSEBASIC_LIBRARY
|
||||
DEFINES += NOMINMAX
|
||||
|
||||
# suppress a few warnings caused by boost vs vc++ paranoia
|
||||
DEFINES += _SCL_SECURE_NO_WARNINGS
|
||||
|
||||
SOURCES += diagnosebasic.cpp
|
||||
|
||||
HEADERS += diagnosebasic.h
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
INCLUDEPATH += "$(BOOSTPATH)"
|
||||
INCLUDEPATH += "$${BOOSTPATH}"
|
||||
|
||||
#CONFIG += dll
|
||||
|
||||
|
||||
+406
-15
File diff suppressed because it is too large
Load Diff
+76
-1
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
Copyright (C) 2013 Sebastian Herbord. All rights reserved.
|
||||
|
||||
This file is part of basic diagnosis plugin for MO
|
||||
|
||||
This plugin is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DIAGNOSEBASIC_H
|
||||
#define DIAGNOSEBASIC_H
|
||||
|
||||
@@ -5,6 +24,9 @@
|
||||
#include <iplugin.h>
|
||||
#include <iplugindiagnose.h>
|
||||
#include <imoinfo.h>
|
||||
#include <imodlist.h>
|
||||
#include <QString>
|
||||
#include <QSet>
|
||||
|
||||
|
||||
class DiagnoseBasic : public QObject, MOBase::IPlugin, MOBase::IPluginDiagnose
|
||||
@@ -43,6 +65,8 @@ private:
|
||||
bool overwriteFiles() const;
|
||||
bool invalidFontConfig() const;
|
||||
bool nitpickInstalled() const;
|
||||
bool assetOrder() const;
|
||||
bool missingMasters() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -50,13 +74,64 @@ private:
|
||||
static const unsigned int PROBLEM_OVERWRITE = 2;
|
||||
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_PROFILETWEAKS = 7;
|
||||
static const unsigned int PROBLEM_MISSINGMASTERS = 8;
|
||||
|
||||
static const unsigned int NUM_CONTEXT_ROWS = 5;
|
||||
|
||||
private:
|
||||
|
||||
const MOBase::IOrganizer *m_MOInfo;
|
||||
struct ListElement {
|
||||
QString espName;
|
||||
QString modName;
|
||||
int pluginPriority;
|
||||
int modPriority;
|
||||
int sortGroup;
|
||||
bool avoidMove;
|
||||
QSet<QString> relevantScripts;
|
||||
};
|
||||
|
||||
struct Move {
|
||||
ListElement item;
|
||||
ListElement reference;
|
||||
enum EType {
|
||||
BEFORE,
|
||||
AFTER
|
||||
} type;
|
||||
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