summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qcompleter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/util/qcompleter.cpp')
-rw-r--r--src/gui/util/qcompleter.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index bed10dc..aba0245 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -482,7 +482,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) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN)
&& (!dirModel || QDir::toNativeSeparators(str) != QDir::separator())
#endif
)
@@ -987,7 +987,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) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
setCaseSensitivity(Qt::CaseInsensitive);
#else
setCaseSensitivity(Qt::CaseSensitive);
@@ -1620,7 +1620,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) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN)
if (list.count() == 1) // only the separator or some other text
return list[0];
list[0].clear() ; // the join below will provide the separator
@@ -1654,7 +1654,10 @@ QStringList QCompleter::splitPath(const QString& path) const
QString pathCopy = QDir::toNativeSeparators(path);
QString sep = QDir::separator();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_SYMBIAN)
+ if (pathCopy == QLatin1String("\\"))
+ return QStringList(pathCopy);
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\"))
return QStringList(pathCopy);
QString doubleSlash(QLatin1String("\\\\"));
@@ -1667,7 +1670,9 @@ QStringList QCompleter::splitPath(const QString& path) const
QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']'));
QStringList parts = pathCopy.split(re);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_SYMBIAN)
+ // Do nothing
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if (!doubleSlash.isEmpty())
parts[0].prepend(doubleSlash);
#else