summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJochen Seemann <seemann.jochen@gmail.com>2014-09-23 21:10:23 +0200
committerJochen Seemann <seemann.jochen@gmail.com>2014-09-25 06:50:09 +0200
commitfaefd37db6a1ada4be7ca0c659c6bb04bf8042ad (patch)
tree1bfd432d76a815e6854246a8dee0c50ca37d96f6 /src/widgets
parent8f2519660b2f8a00492928d3fdb07f0a47ba6934 (diff)
Fix MSVC2013-compiler warnings with QT_NO_FILESYSTEMWATCHER
dialogs\qfilesystemmodel.cpp(203,1667,1680): C4189: 'd': local variable is initialized but not referenced dialogs\qfilesystemmodel.cpp(1547,1720,1847): C4100: 'variable': unreferenced formal parameter Change-Id: Ic3cef264dcd0b939748bec914eb9c29f86f6ed0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 398eae8393..988d3ad3c7 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -192,8 +192,8 @@ QT_BEGIN_NAMESPACE
bool QFileSystemModel::remove(const QModelIndex &aindex)
{
const QString path = filePath(aindex);
- QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
#ifndef QT_NO_FILESYSTEMWATCHER
+ QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
d->fileInfoGatherer.removePath(path);
#endif
if (QFileInfo(path).isFile())
@@ -1541,6 +1541,8 @@ void QFileSystemModel::setResolveSymlinks(bool enable)
#ifndef QT_NO_FILESYSTEMWATCHER
Q_D(QFileSystemModel);
d->fileInfoGatherer.setResolveSymlinks(enable);
+#else
+ Q_UNUSED(enable)
#endif
}
@@ -1656,21 +1658,21 @@ QStringList QFileSystemModel::nameFilters() const
*/
bool QFileSystemModel::event(QEvent *event)
{
+#ifndef QT_NO_FILESYSTEMWATCHER
Q_D(QFileSystemModel);
if (event->type() == QEvent::LanguageChange) {
-#ifndef QT_NO_FILESYSTEMWATCHER
d->root.retranslateStrings(d->fileInfoGatherer.iconProvider(), QString());
-#endif
return true;
}
+#endif
return QAbstractItemModel::event(event);
}
bool QFileSystemModel::rmdir(const QModelIndex &aindex)
{
QString path = filePath(aindex);
- QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
#ifndef QT_NO_FILESYSTEMWATCHER
+ QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
d->fileInfoGatherer.removePath(path);
#endif
return QDir().rmdir(path);
@@ -1715,6 +1717,8 @@ QFileSystemModelPrivate::QFileSystemNode* QFileSystemModelPrivate::addNode(QFile
QFileSystemModelPrivate::QFileSystemNode *node = new QFileSystemModelPrivate::QFileSystemNode(fileName, parentNode);
#ifndef QT_NO_FILESYSTEMWATCHER
node->populate(info);
+#else
+ Q_UNUSED(info)
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
//The parentNode is "" so we are listing the drives
@@ -1935,6 +1939,9 @@ void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QL
forceSort = true;
delayedSort();
}
+#else
+ Q_UNUSED(path)
+ Q_UNUSED(updates)
#endif // !QT_NO_FILESYSTEMWATCHER
}