Update lib search paths for all plugin types

qt6-qmake
Simon Stürz 2025-08-25 10:11:48 +02:00
parent 12c2c7b168
commit c15a31eeab
1 changed files with 7 additions and 0 deletions

View File

@ -96,9 +96,16 @@ QStringList ExperiencePluginEnergy::pluginSearchDirs() const
searchDirs << QString::fromUtf8(envDefaultPathData).split(':');
}
} else {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("qt5", "nymea").replace("plugins", "energy");
}
#else
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("qt6", "nymea").replace("plugins", "energy");
}
#endif
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../lib/nymea/energy").absolutePath();
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../energy/").absolutePath();
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../../../energy/").absolutePath();