| 101 | } |
| 102 | |
| 103 | QStringList pluginPaths(const QString &probeABI) |
| 104 | { |
| 105 | QStringList l; |
| 106 | // TODO based on environment variable for custom plugins |
| 107 | |
| 108 | // based on rootPath() |
| 109 | addPluginPath(l, rootPath() + QLatin1String("/" GAMMARAY_PLUGIN_INSTALL_DIR "/" GAMMARAY_PLUGIN_VERSION "/") + probeABI); |
| 110 | addPluginPath(l, rootPath() + QLatin1String("/" GAMMARAY_PLUGIN_INSTALL_DIR)); |
| 111 | |
| 112 | // based on Qt plugin search paths |
| 113 | foreach (const auto &path, QCoreApplication::libraryPaths()) { |
| 114 | addPluginPath(l, path + QLatin1String("/gammaray/" GAMMARAY_PLUGIN_VERSION "/") + probeABI); |
| 115 | addPluginPath(l, path + QLatin1String("/gammaray")); |
| 116 | |
| 117 | #if defined(Q_OS_ANDROID) |
| 118 | addPluginPath(l, path); |
| 119 | #endif |
| 120 | } |
| 121 | |
| 122 | // based on Qt's own install layout and/or qt.conf |
| 123 | const auto path = QLibraryInfo::path(QLibraryInfo::PluginsPath); |
| 124 | addPluginPath(l, path + QLatin1String("/gammaray/" GAMMARAY_PLUGIN_VERSION "/") + probeABI); |
| 125 | addPluginPath(l, path + QLatin1String("/gammaray")); |
| 126 | |
| 127 | |
| 128 | return l; |
| 129 | } |
| 130 | |
| 131 | QStringList targetPluginPaths(const QString &probeABI) |
| 132 | { |
no test coverage detected