diff options
Diffstat (limited to 'src/widgets/util/qcompleter.cpp')
-rw-r--r-- | src/widgets/util/qcompleter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 2c7dbf63be..3006f0c9ce 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -480,7 +480,7 @@ QMatchData QCompletionEngine::filterHistory() for (int i = 0; i < source->rowCount(); i++) { QString str = source->index(i, c->column).data().toString(); if (str.startsWith(c->prefix, c->cs) -#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN) && ((!isFsModel && !isDirModel) || QDir::toNativeSeparators(str) != QDir::separator()) #endif ) @@ -1055,7 +1055,7 @@ void QCompleter::setModel(QAbstractItemModel *model) delete oldModel; #ifndef QT_NO_DIRMODEL if (qobject_cast<QDirModel *>(model)) { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) setCaseSensitivity(Qt::CaseInsensitive); #else setCaseSensitivity(Qt::CaseSensitive); @@ -1065,7 +1065,7 @@ void QCompleter::setModel(QAbstractItemModel *model) #ifndef QT_NO_FILESYSTEMMODEL QFileSystemModel *fsModel = qobject_cast<QFileSystemModel *>(model); if (fsModel) { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) setCaseSensitivity(Qt::CaseInsensitive); #else setCaseSensitivity(Qt::CaseSensitive); @@ -1790,7 +1790,7 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const idx = parent.sibling(parent.row(), index.column()); } while (idx.isValid()); -#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN) if (list.count() == 1) // only the separator or some other text return list[0]; list[0].clear() ; // the join below will provide the separator @@ -1830,7 +1830,7 @@ QStringList QCompleter::splitPath(const QString& path) const return QStringList(completionPrefix()); QString pathCopy = QDir::toNativeSeparators(path); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) return QStringList(pathCopy); const bool startsWithDoubleSlash = pathCopy.startsWith(QLatin1String("\\\\")); @@ -1841,7 +1841,7 @@ QStringList QCompleter::splitPath(const QString& path) const const QChar sep = QDir::separator(); QStringList parts = pathCopy.split(sep); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) if (startsWithDoubleSlash) parts[0].prepend(QLatin1String("\\\\")); #else |