From 256854cf9760f2b8e8702c2ce2066f67213c0169 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 28 Jul 2017 10:54:44 +0200 Subject: Windows/QFileSystemModel: Fix updating of removed drives Previously, the updating of drives in QFileSystemModel was connected to a signal triggering when a drive containing watched files was removed via QFileSystemWatcher notification. This did not trigger when a drive that was not expanded in the view was removed, since no files were watched. Since QFileSystemModel is not interested in the path of the drive being removed, add a generic signal triggered by DBT_DEVTYP_VOLUME/DBT_DEVICEREMOVECOMPLETE and use that to update the drives. Complements 8e79806d08ab77aa0f87b69a2ef65789216f41c0. Task-number: QTBUG-18729 Task-number: QTBUG-53436 Change-Id: Ibcde4665824c41151042237d4d620c48bc1e2e18 Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/qfileinfogatherer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index 9f2d15d31b..710ee611b9 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -98,7 +98,7 @@ QFileInfoGatherer::QFileInfoGatherer(QObject *parent) if (listener.canConvert()) { if (QObject *driveListener = listener.value()) { connect(driveListener, SIGNAL(driveAdded()), this, SLOT(driveAdded())); - connect(driveListener, SIGNAL(driveRemoved(QString)), this, SLOT(driveRemoved())); + connect(driveListener, SIGNAL(driveRemoved()), this, SLOT(driveRemoved())); } } # endif // Q_OS_WIN && !Q_OS_WINRT -- cgit v1.2.3