Chore: Proper Lambda Formatting (#2167)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Leon Richardt
2020-11-08 12:02:19 +01:00
committed by GitHub
parent fbd5df53d8
commit 0eed45ae67
71 changed files with 712 additions and 415 deletions
+16 -13
View File
@@ -120,21 +120,23 @@ ModerationPage::ModerationPage()
// Show how big (size-wise) the logs are
auto logsPathSizeLabel = logs.emplace<QLabel>();
logsPathSizeLabel->setText(
QtConcurrent::run([] { return fetchLogDirectorySize(); }));
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}));
// 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();
}));
});
buttons->addSpacing(16);
@@ -144,8 +146,9 @@ ModerationPage::ModerationPage()
getSettings()->logPath = "";
// Refresh: Show how big (size-wise) the logs are
logsPathSizeLabel->setText(QtConcurrent::run(
[] { return fetchLogDirectorySize(); }));
logsPathSizeLabel->setText(QtConcurrent::run([] {
return fetchLogDirectorySize();
}));
});
} // logs end