diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-17 17:09:32 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-18 10:31:07 +0100 |
commit | abe5a0a432116963d22c4ef501a4dfd2393d66fb (patch) | |
tree | d747af4558d05f98e1132403aedc5e81134f55f9 /src/widgets/util | |
parent | 572ca4363791f7bbed78dab9f7f5dd0c6b5d11d1 (diff) |
qtbase: Warnings fixes.
Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/widgets/util')
-rw-r--r-- | src/widgets/util/qcompleter.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 358ecf0277..e99dd9ffc5 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -474,14 +474,19 @@ QMatchData QCompletionEngine::filterHistory() QAbstractItemModel *source = c->proxy->sourceModel(); if (curParts.count() <= 1 || c->proxy->showAll || !source) return QMatchData(); - bool isDirModel = false; - bool isFsModel = false; + #ifndef QT_NO_DIRMODEL - isDirModel = (qobject_cast<QDirModel *>(source) != 0); + const bool isDirModel = (qobject_cast<QDirModel *>(source) != 0); +#else + const bool isDirModel = false; #endif + Q_UNUSED(isDirModel) #ifndef QT_NO_FILESYSTEMMODEL - isFsModel = (qobject_cast<QFileSystemModel *>(source) != 0); + const bool isFsModel = (qobject_cast<QFileSystemModel *>(source) != 0); +#else + const bool isFsModel = false; #endif + Q_UNUSED(isFsModel) QVector<int> v; QIndexMapper im(v); QMatchData m(im, -1, true); |