Commit 65cbbba8 authored by Laurent Montel's avatar Laurent Montel
Browse files

const'ify variables

parent fffe10df
Pipeline #150826 passed with stage
in 1 minute and 54 seconds
......@@ -110,7 +110,7 @@ QList<QUrl> KDEPlatformFileDialog::selectedFiles()
void KDEPlatformFileDialog::selectFile(const QUrl &filename)
{
QUrl dirUrl = filename.adjusted(QUrl::RemoveFilename);
const QUrl dirUrl = filename.adjusted(QUrl::RemoveFilename);
m_fileWidget->setUrl(dirUrl);
m_fileWidget->setSelectedUrl(filename);
}
......@@ -332,7 +332,7 @@ void KDEPlatformFileDialogHelper::initializeDialog()
dialog->m_fileWidget->setConfirmOverwrite(true);
}
QStringList schemes = options()->supportedSchemes();
const QStringList schemes = options()->supportedSchemes();
dialog->m_fileWidget->setSupportedSchemes(schemes);
}
}
......
......@@ -161,14 +161,14 @@ void KFileTreeView::setShowHiddenFiles(bool enabled)
void KFileTreeView::setCurrentUrl(const QUrl &url)
{
QModelIndex baseIndex = d->mSourceModel->indexForUrl(url);
const QModelIndex baseIndex = d->mSourceModel->indexForUrl(url);
if (!baseIndex.isValid()) {
d->mSourceModel->expandToUrl(url);
return;
}
QModelIndex proxyIndex = d->mProxyModel->mapFromSource(baseIndex);
const QModelIndex proxyIndex = d->mProxyModel->mapFromSource(baseIndex);
selectionModel()->clearSelection();
selectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::SelectCurrent);
scrollTo(proxyIndex);
......
......@@ -67,7 +67,7 @@ static inline bool checkUsePortalSupport()
return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QStringLiteral("flatpak-info")).isEmpty() || qEnvironmentVariableIsSet("SNAP");
}
KHintsSettings::KHintsSettings(KSharedConfig::Ptr kdeglobals)
KHintsSettings::KHintsSettings(const KSharedConfig::Ptr &kdeglobals)
: QObject(nullptr)
, mKdeGlobals(kdeglobals)
, mUsePortal(checkUsePortalSupport())
......
......@@ -51,7 +51,7 @@ public:
SETTINGS_LOCALE,
SETTINGS_STYLE,
};
explicit KHintsSettings(KSharedConfig::Ptr kdeglobals = KSharedConfig::Ptr());
explicit KHintsSettings(const KSharedConfig::Ptr &kdeglobals = KSharedConfig::Ptr());
~KHintsSettings() override;
inline QVariant hint(QPlatformTheme::ThemeHint hint) const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment