Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 4fe4df6

Browse files
committed
use QDir::listSeperator
1 parent 274e9e7 commit 4fe4df6

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

qpluginfactory.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <QFileInfo>
55
#include <QDebug>
66
#include <QJsonArray>
7+
#include <QDir>
78

89
extern bool __qpluginfactory_is_debug();
910

@@ -112,18 +113,11 @@ void QPluginFactoryBase::reloadPlugins()
112113

113114
QList<QDir> allDirs;
114115
//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);
127121
}
128122

129123
//second: extra dirs

qpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"version": {
1717
"fingerprint": "",
18-
"label": "1.2.0",
18+
"label": "1.2.1",
1919
"revision": ""
2020
},
2121
"webpage": "https://github.com/Skycoder42/QPluginFactory"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy