From e8105e4783f3932885695353eefa1a60937929a1 Mon Sep 17 00:00:00 2001 From: Xizhi Zhu Date: Mon, 23 Jan 2012 19:37:27 +0100 Subject: Remove Symbian and Maemo 5 code from QtWidgets. Change-Id: I715c0ec70cbad05a6ba9737e49be9da7cbd65bf9 Reviewed-by: Lars Knoll --- src/widgets/util/qcompleter.cpp | 17 ++++++----------- src/widgets/util/qscroller.cpp | 13 ++----------- 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'src/widgets/util') diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index d8a4ceb3be..503e5aa596 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -494,7 +494,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)) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) && ((!isFsModel && !isDirModel) || QDir::toNativeSeparators(str) != QDir::separator()) #endif ) @@ -1036,7 +1036,7 @@ void QCompleter::setModel(QAbstractItemModel *model) delete oldModel; #ifndef QT_NO_DIRMODEL if (qobject_cast(model)) { -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) setCaseSensitivity(Qt::CaseInsensitive); #else setCaseSensitivity(Qt::CaseSensitive); @@ -1046,7 +1046,7 @@ void QCompleter::setModel(QAbstractItemModel *model) #ifndef QT_NO_FILESYSTEMMODEL QFileSystemModel *fsModel = qobject_cast(model); if (fsModel) { -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) setCaseSensitivity(Qt::CaseInsensitive); #else setCaseSensitivity(Qt::CaseSensitive); @@ -1725,7 +1725,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)) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) if (list.count() == 1) // only the separator or some other text return list[0]; list[0].clear() ; // the join below will provide the separator @@ -1766,10 +1766,7 @@ QStringList QCompleter::splitPath(const QString& path) const QString pathCopy = QDir::toNativeSeparators(path); QString sep = QDir::separator(); -#if defined(Q_OS_SYMBIAN) - if (pathCopy == QLatin1String("\\")) - return QStringList(pathCopy); -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) return QStringList(pathCopy); QString doubleSlash(QLatin1String("\\\\")); @@ -1782,9 +1779,7 @@ QStringList QCompleter::splitPath(const QString& path) const QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']')); QStringList parts = pathCopy.split(re); -#if defined(Q_OS_SYMBIAN) - // Do nothing -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (!doubleSlash.isEmpty()) parts[0].prepend(doubleSlash); #else diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index 1e3ba144f7..4482134c7b 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -568,7 +568,7 @@ void QScroller::stop() \note Please note that this value should be physically correct. The actual DPI settings that Qt returns for the display may be reported wrongly on purpose by the underlying - windowing system, for example on Mac OS X or Maemo 5. + windowing system, for example on Mac OS X. */ QPointF QScroller::pixelPerMeter() const { @@ -1018,16 +1018,7 @@ bool QScroller::handleInput(Input input, const QPointF &position, qint64 timesta QPointF QScrollerPrivate::realDpi(int screen) { -# ifdef Q_WS_MAEMO_5 - Q_UNUSED(screen); - - // The DPI value is hardcoded to 96 on Maemo5: - // https://projects.maemo.org/bugzilla/show_bug.cgi?id=152525 - // This value (260) is only correct for the N900 though, but - // there's no way to get the real DPI at run time. - return QPointF(260, 260); - -# elif defined(Q_WS_X11) && !defined(QT_NO_XRANDR) +# if defined(Q_WS_X11) && !defined(QT_NO_XRANDR) if (X11 && X11->use_xrandr && X11->ptrXRRSizes && X11->ptrXRRRootToScreen) { int nsizes = 0; // QDesktopWidget is based on Xinerama screens, which do not always -- cgit v1.2.3