Ticket #238: qfilesystemmodel.diff
File qfilesystemmodel.diff, 1.0 KB (added by , 13 years ago) |
---|
-
qfilesystemmodel.cpp
1078 1078 bool right = r->isDir(); 1079 1079 if (left ^ right) 1080 1080 return left; 1081 1082 // place "." and ".." entries before any other dirs 1083 if (left) { 1084 int lw = 0, rw = 0; 1085 1086 if (l->fileName == QLatin1String(".")) 1087 lw = 2; 1088 else if (l->fileName == QLatin1String("..")) 1089 lw = 1; 1090 1091 if (r->fileName == QLatin1String(".")) 1092 rw = 2; 1093 else if (r->fileName == QLatin1String("..")) 1094 rw = 1; 1095 1096 if (lw != rw) 1097 return lw > rw; 1098 } 1081 1099 #endif 1082 1100 return QFileSystemModelPrivate::naturalCompare(l->fileName, 1083 1101 r->fileName, Qt::CaseInsensitive) < 0;