From abe5a0a432116963d22c4ef501a4dfd2393d66fb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 17 Nov 2011 17:09:32 +0100 Subject: qtbase: Warnings fixes. Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06 Reviewed-by: Bradley T. Hughes --- src/widgets/util/qcompleter.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/widgets/util') 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(source) != 0); + const bool isDirModel = (qobject_cast(source) != 0); +#else + const bool isDirModel = false; #endif + Q_UNUSED(isDirModel) #ifndef QT_NO_FILESYSTEMMODEL - isFsModel = (qobject_cast(source) != 0); + const bool isFsModel = (qobject_cast(source) != 0); +#else + const bool isFsModel = false; #endif + Q_UNUSED(isFsModel) QVector v; QIndexMapper im(v); QMatchData m(im, -1, true); -- cgit v1.2.3