fix search paths

This commit is contained in:
Michael Zanetti 2014-10-11 04:03:41 +02:00 committed by Michael Zanetti
parent c9e6b7ed81
commit d3579c6262

View File

@ -514,15 +514,15 @@ void DeviceManager::loadPlugins()
{
QStringList searchDirs;
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh";
searchDirs << QCoreApplication::applicationDirPath() + "/../";
searchDirs << QCoreApplication::applicationDirPath() + "/../../../";
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh/guh";
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/deviceplugins";
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/deviceplugins";
foreach (const QString &path, searchDirs) {
QDir dir(path + "/plugins/deviceplugins");
QDir dir(path);
qDebug() << "Loading plugins from:" << dir.absolutePath();
foreach (const QString &entry, dir.entryList()) {
QFileInfo fi(path + "/plugins/deviceplugins/" + entry + "/libguh_deviceplugin" + entry + ".so");
QFileInfo fi(path + "/" + entry + "/libguh_deviceplugin" + entry + ".so");
if (!fi.exists()) {
continue;
}