diff options
| author | Laurent Montel <[email protected]> | 2019-09-08 09:33:41 +0200 |
|---|---|---|
| committer | Laurent Montel <[email protected]> | 2019-09-08 09:33:41 +0200 |
| commit | 81065795b78e06ec679ec0589fba7082e777ef2a (patch) | |
| tree | 67acbba969c750a69734326179815474be25f42b /src/panels | |
| parent | dfe713edf0c3b0b44ff18c19ebd4d616a9004f48 (diff) | |
GIT_SILENT: minor qstring optimization
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/folders/folderspanel.cpp | 4 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 2 | ||||
| -rw-r--r-- | src/panels/places/placespanel.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 020c41e55..01f338461 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -111,7 +111,7 @@ void FoldersPanel::rename(const KFileItem& item) bool FoldersPanel::urlChanged() { - if (!url().isValid() || url().scheme().contains(QStringLiteral("search"))) { + if (!url().isValid() || url().scheme().contains(QLatin1String("search"))) { // Skip results shown by a search, as possible identical // directory names are useless without parent-path information. return false; @@ -258,7 +258,7 @@ void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, co if (role == "text") { const KFileItem item = m_model->fileItem(index); const QString newName = value.toString(); - if (!newName.isEmpty() && newName != item.text() && newName != QLatin1String(".") && newName != QLatin1String("..")) { + if (!newName.isEmpty() && newName != item.text() && newName != QLatin1Char('.') && newName != QLatin1String("..")) { const QUrl oldUrl = item.url(); QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename); newUrl.setPath(newUrl.path() + KIO::encodeFileName(newName)); diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index d54ed66b6..8c5d56da5 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -223,7 +223,7 @@ void InformationPanelContent::refreshPreview() if (InformationPanelSettings::previewsShown()) { const QUrl itemUrl = m_item.url(); - const bool isSearchUrl = itemUrl.scheme().contains(QStringLiteral("search")) && m_item.localPath().isEmpty(); + const bool isSearchUrl = itemUrl.scheme().contains(QLatin1String("search")) && m_item.localPath().isEmpty(); if (isSearchUrl) { m_preview->show(); diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 3ee36dc08..8469399a7 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -77,7 +77,7 @@ void PlacesPanel::proceedWithTearDown() bool PlacesPanel::urlChanged() { - if (!url().isValid() || url().scheme().contains(QStringLiteral("search"))) { + if (!url().isValid() || url().scheme().contains(QLatin1String("search"))) { // Skip results shown by a search, as possible identical // directory names are useless without parent-path information. return false; |
