]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/folders/folderspanel.cpp
GIT_SILENT: minor qstring optimization
[dolphin.git] / src / panels / folders / folderspanel.cpp
index 020c41e552a263e5b1b97a8082bf74a775b3fbfa..01f338461f0d8990651ed615612cab5d239fa589 100644 (file)
@@ -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));