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
+1 -1
View File
@@ -110,7 +110,7 @@ void Scrollbar::setSmallChange(qreal value)
void Scrollbar::setDesiredValue(qreal value, bool animated)
{
animated &= getSettings()->enableSmoothScrolling.getValue();
animated &= getSettings()->enableSmoothScrolling;
value = std::max(this->minimum_,
std::min(this->maximum_ - this->largeChange_, value));
@@ -319,7 +319,6 @@ bool SelectChannelDialog::EventFilter::eventFilter(QObject *watched,
{
return false;
}
return true;
}
else if (event->type() == QEvent::KeyRelease)
{
+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",