]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix regression introduced by an obviously untested "krazy fix" (r973284). Setting a
authorDavid Faure <faure@kde.org>
Fri, 10 Jul 2009 11:46:48 +0000 (11:46 +0000)
committerDavid Faure <faure@kde.org>
Fri, 10 Jul 2009 11:46:48 +0000 (11:46 +0000)
QVariant to QString() is not the same as calling clear on the QVariant (which makes the variant invalid).
(BUG 194502)

svn path=/trunk/KDE/kdebase/apps/; revision=994217

src/dolphinmodel.cpp

index f37452c80dbf938459916f4419876aaa582ecf34..819b37d2a2a52f28655bd9a1d55fd49023bb14bd 100644 (file)
@@ -411,7 +411,8 @@ QVariant DolphinModel::sortRoleData(const QModelIndex& index) const
 
     case KDirModel::Type:
         if (item.isDir()) {
 
     case KDirModel::Type:
         if (item.isDir()) {
-            retVariant.clear(); // when sorting we want folders to be placed first
+            // when sorting we want folders to be placed first
+            retVariant = QString(); // krazy:exclude=nullstrassign
         } else {
             retVariant = item.mimeComment();
         }
         } else {
             retVariant = item.mimeComment();
         }