summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@theqtcompany.com>2015-05-12 15:06:53 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-05-18 08:59:55 +0000
commitf65c04b37e63526540f9717a63fd305f4c3ac579 (patch)
treeaea1cf9118e7df6350fa7407879a9420412e9edc /src/widgets
parent31e055cee97b5d41ff0bed3246b5e85a8d954164 (diff)
WinRT/Winphone: Fix warnings in qtbase
Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp4
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp9
3 files changed, 10 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp
index df07de7975..7329019a87 100644
--- a/src/widgets/dialogs/qfileinfogatherer.cpp
+++ b/src/widgets/dialogs/qfileinfogatherer.cpp
@@ -185,6 +185,8 @@ void QFileInfoGatherer::removePath(const QString &path)
#ifndef QT_NO_FILESYSTEMWATCHER
QMutexLocker locker(&mutex);
watcher->removePath(path);
+#else
+ Q_UNUSED(path);
#endif
}
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 88d327168c..4859231d95 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -653,10 +653,12 @@ int QFileSystemModel::columnCount(const QModelIndex &parent) const
*/
QVariant QFileSystemModel::myComputer(int role) const
{
+#ifndef QT_NO_FILESYSTEMWATCHER
Q_D(const QFileSystemModel);
+#endif
switch (role) {
case Qt::DisplayRole:
- return d->myComputer();
+ return QFileSystemModelPrivate::myComputer();
#ifndef QT_NO_FILESYSTEMWATCHER
case Qt::DecorationRole:
return d->fileInfoGatherer.iconProvider()->icon(QFileIconProvider::Computer);
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index bed2b5c57a..14af5ede39 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -299,8 +299,8 @@ void QWindowsStyle::polish(QPalette &pal)
int QWindowsStylePrivate::pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *, const QWidget *widget)
{
- switch (pm) {
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+ switch (pm) {
case QStyle::PM_DockWidgetFrameWidth:
# ifndef Q_OS_WINCE
return GetSystemMetrics(SM_CXFRAME);
@@ -337,13 +337,14 @@ int QWindowsStylePrivate::pixelMetricFromSystemDp(QStyle::PixelMetric pm, const
# else
return GetSystemMetrics(SM_CYDLGFRAME);
# endif
-#else
- Q_UNUSED(widget)
-#endif // Q_OS_WIN
default:
break;
}
+#else // Q_OS_WIN && !Q_OS_WINRT
+ Q_UNUSED(pm);
+ Q_UNUSED(widget);
+#endif
return QWindowsStylePrivate::InvalidMetric;
}