Ignore:
Timestamp:
Sep 9, 2009, 2:38:34 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui/dialogs: Fixed: Duplicate file names were added to the file list in QFileDialog when an existing directory was typed directly in the filename entry field with a different case of letters than in the original (on platforms with case insensitive file systems), #65.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/dialogs/qfilesystemmodel.cpp

    r172 r173  
    353353        absolutePath = QDir(longPath).absolutePath();
    354354
    355     // ### TODO can we use bool QAbstractFileEngine::caseSensitive() const?
    356355    QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
    357356    if ((pathElements.isEmpty())
     
    10891088
    10901089    QList<QPair<QFileSystemModelPrivate::QFileSystemNode*, int> > values;
    1091     QHash<QString, QFileSystemNode *>::const_iterator iterator;
     1090    QHash<FileNameKey, QFileSystemNode *>::const_iterator iterator;
    10921091    int i = 0;
    10931092    for(iterator = indexNode->children.begin() ; iterator != indexNode->children.end() ; ++iterator) {
     
    15881587    QStringList newFiles = files;
    15891588    qSort(newFiles.begin(), newFiles.end());
    1590     QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
     1589    QHash<FileNameKey, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
    15911590    while (i != parentNode->children.constEnd()) {
    15921591        QStringList::iterator iterator;
Note: See TracChangeset for help on using the changeset viewer.