Renamed variables to clear some warnings.

This commit is contained in:
23rd
2019-05-08 09:51:14 +03:00
committed by pajlada
parent efec76df5b
commit 9654650bee
19 changed files with 73 additions and 109 deletions
+7 -20
View File
@@ -61,15 +61,10 @@ QString formatSize(qint64 size)
QString fetchLogDirectorySize()
{
QString logPathDirectory;
if (getSettings()->logPath == "")
{
logPathDirectory = getPaths()->messageLogDirectory;
}
else
{
logPathDirectory = getSettings()->logPath;
}
QString logPathDirectory = getSettings()->logPath.getValue().isEmpty()
? getPaths()->messageLogDirectory
: getSettings()->logPath;
qint64 logsSize = dirSize(logPathDirectory);
QString logsSizeLabel = "Your logs currently take up ";
logsSizeLabel += formatSize(logsSize);
@@ -98,16 +93,9 @@ ModerationPage::ModerationPage()
// Logs (copied from LoggingMananger)
getSettings()->logPath.connect(
[logsPathLabel](const QString &logPath, auto) mutable {
QString pathOriginal;
if (logPath == "")
{
pathOriginal = getPaths()->messageLogDirectory;
}
else
{
pathOriginal = logPath;
}
QString pathOriginal = logPath.isEmpty()
? getPaths()->messageLogDirectory
: logPath;
QString pathShortened =
"Logs are saved at <a href=\"file:///" + pathOriginal +
@@ -120,7 +108,6 @@ ModerationPage::ModerationPage()
logsPathLabel->setTextFormat(Qt::RichText);
logsPathLabel->setTextInteractionFlags(Qt::TextBrowserInteraction |
Qt::LinksAccessibleByKeyboard |
Qt::LinksAccessibleByKeyboard);
logsPathLabel->setOpenExternalLinks(true);
logs.append(this->createCheckBox("Enable logging",