mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix some compilation errors caused by an incorrect merge
This commit is contained in:
parent
4ad0ed4d45
commit
3c3abba202
|
@ -1,9 +1,9 @@
|
||||||
#include "moderationpage.hpp"
|
#include "moderationpage.hpp"
|
||||||
|
|
||||||
#include "application.hpp"
|
#include "application.hpp"
|
||||||
#include "singletons/loggingmanager.hpp"
|
|
||||||
#include "controllers/taggedusers/taggeduserscontroller.hpp"
|
#include "controllers/taggedusers/taggeduserscontroller.hpp"
|
||||||
#include "controllers/taggedusers/taggedusersmodel.hpp"
|
#include "controllers/taggedusers/taggedusersmodel.hpp"
|
||||||
|
#include "singletons/loggingmanager.hpp"
|
||||||
#include "singletons/pathmanager.hpp"
|
#include "singletons/pathmanager.hpp"
|
||||||
#include "util/layoutcreator.hpp"
|
#include "util/layoutcreator.hpp"
|
||||||
#include "widgets/helper/editablemodelview.hpp"
|
#include "widgets/helper/editablemodelview.hpp"
|
||||||
|
@ -59,22 +59,21 @@ ModerationPage::ModerationPage()
|
||||||
created->setOpenExternalLinks(true);
|
created->setOpenExternalLinks(true);
|
||||||
logs.append(this->createCheckBox("Enable logging", app->settings->enableLogging));
|
logs.append(this->createCheckBox("Enable logging", app->settings->enableLogging));
|
||||||
|
|
||||||
<
|
|
||||||
logs->addStretch(1);
|
logs->addStretch(1);
|
||||||
|
|
||||||
auto selectDir = layout.emplace<QPushButton>("Set custom logpath");
|
auto selectDir = logs.emplace<QPushButton>("Set custom logpath");
|
||||||
|
|
||||||
// Setting custom logpath
|
// Setting custom logpath
|
||||||
QObject::connect(selectDir.getElement(), &QPushButton::clicked, this, [
|
QObject::connect(
|
||||||
this, created, app, dirMemory = QString{app->settings->logPath}
|
selectDir.getElement(), &QPushButton::clicked, this,
|
||||||
]() mutable {
|
[this, created, app, dirMemory = QString{app->settings->logPath}]() mutable {
|
||||||
auto dirName = QFileDialog::getExistingDirectory(this);
|
auto dirName = QFileDialog::getExistingDirectory(this);
|
||||||
created->setText("Logs are saved to " + CreateLink(dirName, true));
|
created->setText("Logs are saved to " + CreateLink(dirName, true));
|
||||||
|
|
||||||
if (dirName == "" && dirMemory == "") {
|
if (dirName == "" && dirMemory == "") {
|
||||||
created->setText(
|
created->setText("Logs are saved to " +
|
||||||
"Logs are saved to " +
|
CreateLink(QStandardPaths::writableLocation(
|
||||||
CreateLink(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation),
|
QStandardPaths::AppDataLocation),
|
||||||
true));
|
true));
|
||||||
} else if (dirName == "") {
|
} else if (dirName == "") {
|
||||||
dirName = dirMemory;
|
dirName = dirMemory;
|
||||||
|
@ -84,10 +83,9 @@ ModerationPage::ModerationPage()
|
||||||
app->settings->logPath = dirName;
|
app->settings->logPath = dirName;
|
||||||
dirMemory = dirName;
|
dirMemory = dirName;
|
||||||
app->logging->refreshLoggingPath();
|
app->logging->refreshLoggingPath();
|
||||||
|
|
||||||
});
|
});
|
||||||
// Reset custom logpath
|
// Reset custom logpath
|
||||||
auto resetDir = layout.emplace<QPushButton>("Reset logpath");
|
auto resetDir = logs.emplace<QPushButton>("Reset logpath");
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
resetDir.getElement(), &QPushButton::clicked, this, [this, created, app]() mutable {
|
resetDir.getElement(), &QPushButton::clicked, this, [this, created, app]() mutable {
|
||||||
app->settings->logPath = "";
|
app->settings->logPath = "";
|
||||||
|
|
Loading…
Reference in a new issue