Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/krsort.cpp
Context not available. | |||||
213 | else | 213 | else | ||
---|---|---|---|---|---|
214 | // if localeAwareCompare is not case sensitive then use simple compare is enough | 214 | // if localeAwareCompare is not case sensitive then use simple compare is enough | ||
215 | return QString::compare(aS1, aS2) < 0; | 215 | return QString::compare(aS1, aS2) < 0; | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | bool compareTexts(QString aS1, QString aS2, const KrViewProperties * _viewProperties, bool asc, bool isName) | 218 | bool compareTexts(QString aS1, QString aS2, const KrViewProperties * _viewProperties, bool asc, bool isName) | ||
219 | { | 219 | { | ||
220 | //check empty strings | 220 | //check empty strings | ||
221 | if (aS1.length() == 0) { | 221 | if (aS1.length() == 0 && aS2.length() == 0) { | ||
222 | return false; | 222 | return false; | ||
223 | } else { | 223 | } else if (aS1.length() == 0) { | ||
224 | if (aS2.length() == 0) | 224 | return true; | ||
225 | return true; | 225 | } else if (aS2.length() == 0) { | ||
226 | return false; | ||||
226 | } | 227 | } | ||
227 | 228 | | |||
228 | if (isName) { | 229 | if (isName) { | ||
229 | if (aS1 == "..") { | 230 | if (aS1 == "..") { | ||
230 | return !asc; | 231 | return !asc; | ||
231 | } else { | 232 | } else { | ||
232 | if (aS2 == "..") | 233 | if (aS2 == "..") | ||
233 | return asc; | 234 | return asc; | ||
Context not available. |