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>
This commit is contained in:
Friedemann Kleint 2013-06-24 09:47:35 +02:00 committed by Friedemann Kleint
parent 52623d6d9d
commit e82bdee165

View File

@ -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