feat: add details signal to Task

feat: add details to mod pack downloading
feat: add logging rule sloading form `ligging.ini at data path root
feat: add `launcher.task` `launcher.task.net` and `launcher.task.net.[down|up]load` logging categories
fix: add new subtask progress to the end of the lay out not the beginning (cuts down on flickering)

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-03-31 19:25:01 -07:00
parent f1028fa66d
commit b6452215c1
26 changed files with 249 additions and 95 deletions

View File

@ -46,6 +46,7 @@
#include "net/PasteUpload.h"
#include "pathmatcher/MultiMatcher.h"
#include "pathmatcher/SimplePrefixMatcher.h"
#include "settings/INIFile.h"
#include "ui/MainWindow.h"
#include "ui/InstanceWindow.h"
@ -410,6 +411,24 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
" " "|" " "
"%{if-category}[%{category}]: %{endif}"
"%{message}");
if(QFile::exists("logging.ini")) {
// load and set logging rules
qDebug() << "Loading logging rules from:" << QString("%1/logging.ini").arg(dataPath);
INIFile loggingRules;
bool rulesLoaded = loggingRules.loadFile(QString("logging.ini"));
if (rulesLoaded) {
QStringList rules;
qDebug() << "Setting log rules:";
for (auto it = loggingRules.begin(); it != loggingRules.end(); ++it) {
auto rule = it.key() + "=" + it.value().toString();
rules.append(rule);
qDebug() << " " << rule;
}
auto rules_str = rules.join("\n");
QLoggingCategory::setFilterRules(rules_str);
}
}
qDebug() << "<> Log initialized.";
}