| 35 | namespace Paths { |
| 36 | |
| 37 | QString rootPath() |
| 38 | { |
| 39 | QMutexLocker locker(&s_pathData()->mutex); |
| 40 | if (s_pathData()->rootPath.isEmpty()) { |
| 41 | QFileInfo fi(SelfLocator::findMe()); |
| 42 | fi.setFile(fi.absolutePath() + QLatin1String("/" GAMMARAY_INVERSE_LIB_DIR)); |
| 43 | if (fi.isDir()) |
| 44 | s_pathData()->rootPath = fi.absoluteFilePath(); |
| 45 | } |
| 46 | Q_ASSERT(!s_pathData()->rootPath.isEmpty()); |
| 47 | return s_pathData()->rootPath; |
| 48 | } |
| 49 | |
| 50 | void setRootPath(const QString &rootPath) |
| 51 | { |