Renamed variables to clear some warnings.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user