This repository was archived by the owner on Mar 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 4
4
#include < QFileInfo>
5
5
#include < QDebug>
6
6
#include < QJsonArray>
7
+ #include < QDir>
7
8
8
9
extern bool __qpluginfactory_is_debug ();
9
10
@@ -112,18 +113,11 @@ void QPluginFactoryBase::reloadPlugins()
112
113
113
114
QList<QDir> allDirs;
114
115
// first: dirs in path
115
- auto path = qgetenv (QStringLiteral (" PLUGIN_%1_PATH" ).arg (_pluginType.toUpper ()).toUtf8 ().constData ());
116
- if (!path.isEmpty ()) {
117
- #ifdef Q_OS_WIN
118
- const static auto seperator = ' ;' ;
119
- #else
120
- const static auto seperator = ' :' ;
121
- #endif
122
- foreach (auto p, path.split (seperator)) {
123
- QDir dir (QString::fromUtf8 (p));
124
- if (dir.exists ())
125
- allDirs.append (dir);
126
- }
116
+ auto path = qEnvironmentVariable (QStringLiteral (" PLUGIN_%1_PATH" ).arg (_pluginType.toUpper ()).toUtf8 ().constData ());
117
+ foreach (auto p, path.split (QDir::listSeparator (), QString::SkipEmptyParts)) {
118
+ QDir dir (p);
119
+ if (dir.exists ())
120
+ allDirs.append (dir);
127
121
}
128
122
129
123
// second: extra dirs
Original file line number Diff line number Diff line change 15
15
},
16
16
"version" : {
17
17
"fingerprint" : " " ,
18
- "label" : " 1.2.0 " ,
18
+ "label" : " 1.2.1 " ,
19
19
"revision" : " "
20
20
},
21
21
"webpage" : " https://github.com/Skycoder42/QPluginFactory"
You can’t perform that action at this time.
0 commit comments