fix plugin loading when installed
This commit is contained in:
parent
d3579c6262
commit
97047a5f39
@ -514,7 +514,7 @@ void DeviceManager::loadPlugins()
|
|||||||
{
|
{
|
||||||
|
|
||||||
QStringList searchDirs;
|
QStringList searchDirs;
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh/guh";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh/plugins";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/deviceplugins";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/deviceplugins";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/deviceplugins";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/deviceplugins";
|
||||||
|
|
||||||
@ -522,7 +522,12 @@ void DeviceManager::loadPlugins()
|
|||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
qDebug() << "Loading plugins from:" << dir.absolutePath();
|
qDebug() << "Loading plugins from:" << dir.absolutePath();
|
||||||
foreach (const QString &entry, dir.entryList()) {
|
foreach (const QString &entry, dir.entryList()) {
|
||||||
QFileInfo fi(path + "/" + entry + "/libguh_deviceplugin" + entry + ".so");
|
QFileInfo fi;
|
||||||
|
if (entry.startsWith("libguh_deviceplugin") && entry.endsWith(".so")) {
|
||||||
|
fi.setFile(path + "/" + entry);
|
||||||
|
} else {
|
||||||
|
fi.setFile(path + "/" + entry + "/libguh_deviceplugin" + entry + ".so");
|
||||||
|
}
|
||||||
if (!fi.exists()) {
|
if (!fi.exists()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user