summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-06-24 09:47:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-03-10 15:05:55 +0000
commite82bdee165d477280dc65f87388c77ff27e29281 (patch)
tree3d5b9302fd5f7a86dd1887b87346e10677a7d40b /src/corelib
parent52623d6d9d4a6d768476328d28ef4aa252f92acc (diff)
QFactoryLoader: Add namefilter for Windows.
No longer try to load all files in the directory as a plugin which can cause problems when for example installers move files around. [ChangeLog][QtCore][QFactoryLoader][Windows] QFactoryLoader now filters potential plugins by the ".dll" suffix. Task-number: QTBUG-31476 Change-Id: Ia19d6211c72765aaba0a5d06e6d3b501e8a40fff Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index dce750b5ad..53b38c3be2 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -120,7 +120,11 @@ void QFactoryLoader::update()
if (!QDir(path).exists(QLatin1String(".")))
continue;
- QStringList plugins = QDir(path).entryList(QDir::Files);
+ QStringList plugins = QDir(path).entryList(
+#ifdef Q_OS_WIN
+ QStringList(QStringLiteral("*.dll")),
+#endif
+ QDir::Files);
QLibraryPrivate *library = 0;
#ifdef Q_OS_MAC