Fix Qt6 building (#4393)

This commit is contained in:
pajlada
2023-02-19 20:19:18 +01:00
committed by GitHub
parent d3499e814e
commit c95a65c153
22 changed files with 114 additions and 37 deletions
+21 -20
View File
@@ -112,35 +112,36 @@ ModerationPage::ModerationPage()
// Show how big (size-wise) the logs are
auto logsPathSizeLabel = logs.emplace<QLabel>();
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}));
return fetchLogDirectorySize();
}).result());
// Select event
QObject::connect(selectDir.getElement(), &QPushButton::clicked, this,
[this, logsPathSizeLabel]() mutable {
auto dirName =
QFileDialog::getExistingDirectory(this);
QObject::connect(
selectDir.getElement(), &QPushButton::clicked, this,
[this, logsPathSizeLabel]() mutable {
auto dirName = QFileDialog::getExistingDirectory(this);
getSettings()->logPath = dirName;
getSettings()->logPath = dirName;
// Refresh: Show how big (size-wise) the logs are
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}));
});
// Refresh: Show how big (size-wise) the logs are
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}).result());
});
buttons->addSpacing(16);
// Reset custom logpath
QObject::connect(resetDir.getElement(), &QPushButton::clicked, this,
[logsPathSizeLabel]() mutable {
getSettings()->logPath = "";
QObject::connect(
resetDir.getElement(), &QPushButton::clicked, this,
[logsPathSizeLabel]() mutable {
getSettings()->logPath = "";
// Refresh: Show how big (size-wise) the logs are
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}));
});
// Refresh: Show how big (size-wise) the logs are
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}).result());
});
QCheckBox *onlyLogListedChannels =
this->createCheckBox("Only log channels listed below",