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:
parent
52623d6d9d
commit
e82bdee165
@ -120,7 +120,11 @@ void QFactoryLoader::update()
|
|||||||
if (!QDir(path).exists(QLatin1String(".")))
|
if (!QDir(path).exists(QLatin1String(".")))
|
||||||
continue;
|
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;
|
QLibraryPrivate *library = 0;
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
Loading…
Reference in New Issue
Block a user