diff --git a/src/app/main.cpp b/src/app/main.cpp index 4ae66d6c..589aeea4 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -207,8 +207,8 @@ int main(int argc, char* argv[]) ApplicationSettingsPrefiller::prefillPaths(ApplicationSettings::getInstance().get()); addLanguagePackages(); - utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), L".otf"); - utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), L".ttf"); + utility::loadFontsFromDirectory(ResourcePaths::getFontsDirectoryPath(), L".otf"); + utility::loadFontsFromDirectory(ResourcePaths::getFontsDirectoryPath(), L".ttf"); if (commandLineParser.hasError()) { diff --git a/src/indexer/main.cpp b/src/indexer/main.cpp index 64f3d2d1..c4d027d5 100644 --- a/src/indexer/main.cpp +++ b/src/indexer/main.cpp @@ -74,8 +74,8 @@ int main(int argc, char* argv[]) logFilePath = argv[5]; } - AppPath::setSharedDataPath(FilePath(appPath)); - UserPaths::setUserDataPath(FilePath(userDataPath)); + AppPath::setSharedDataDirectoryPath(FilePath(appPath)); + UserPaths::setUserDataDirectoryPath(FilePath(userDataPath)); if (!logFilePath.empty()) { @@ -85,11 +85,11 @@ int main(int argc, char* argv[]) suppressCrashMessage(); ApplicationSettings* appSettings = ApplicationSettings::getInstance().get(); - appSettings->load(FilePath(UserPaths::getAppSettingsPath())); + appSettings->load(FilePath(UserPaths::getAppSettingsFilePath())); LogManager::getInstance()->setLoggingEnabled(appSettings->getLoggingEnabled()); - LOG_INFO(L"sharedDataPath: " + AppPath::getSharedDataPath().wstr()); - LOG_INFO(L"userDataPath: " + UserPaths::getUserDataPath().wstr()); + LOG_INFO(L"sharedDataPath: " + AppPath::getSharedDataDirectoryPath().wstr()); + LOG_INFO(L"userDataPath: " + UserPaths::getUserDataDirectoryPath().wstr()); #if BUILD_CXX_LANGUAGE_PACKAGE diff --git a/src/lib/app/Application.cpp b/src/lib/app/Application.cpp index 3ecc19e0..08dddb39 100644 --- a/src/lib/app/Application.cpp +++ b/src/lib/app/Application.cpp @@ -109,10 +109,10 @@ std::string Application::getUUID() void Application::loadSettings() { - MessageStatus(L"Load settings: " + UserPaths::getAppSettingsPath().wstr()).dispatch(); + MessageStatus(L"Load settings: " + UserPaths::getAppSettingsFilePath().wstr()).dispatch(); std::shared_ptr settings = ApplicationSettings::getInstance(); - settings->load(UserPaths::getAppSettingsPath()); + settings->load(UserPaths::getAppSettingsFilePath()); LogManager::getInstance()->setLoggingEnabled(settings->getLoggingEnabled()); Logger* logger = LogManager::getInstance()->getLoggerByType("FileLogger"); @@ -464,7 +464,7 @@ void Application::updateRecentProjects(const FilePath& projectSettingsFilePath) } appSettings->setRecentProjects(recentProjects); - appSettings->save(UserPaths::getAppSettingsPath()); + appSettings->save(UserPaths::getAppSettingsFilePath()); m_mainView->updateRecentProjectMenu(); } diff --git a/src/lib/app/paths/AppPath.cpp b/src/lib/app/paths/AppPath.cpp index c37ee503..26533e04 100644 --- a/src/lib/app/paths/AppPath.cpp +++ b/src/lib/app/paths/AppPath.cpp @@ -1,43 +1,45 @@ #include "AppPath.h" -FilePath AppPath::m_sharedDataPath(L""); -FilePath AppPath::m_cxxIndexerPath(L""); +#include "utilityApp.h" -FilePath AppPath::getSharedDataPath() +FilePath AppPath::s_sharedDataDirectoryPath(L""); +FilePath AppPath::s_cxxIndexerDirectoryPath(L""); + +FilePath AppPath::getSharedDataDirectoryPath() { - return m_sharedDataPath; + return s_sharedDataDirectoryPath; } -bool AppPath::setSharedDataPath(const FilePath& path) +bool AppPath::setSharedDataDirectoryPath(const FilePath& path) { if (!path.empty()) { - m_sharedDataPath = path; + s_sharedDataDirectoryPath = path; return true; } return false; } -FilePath AppPath::getCxxIndexerPath() +FilePath AppPath::getCxxIndexerFilePath() { -#if _WIN32 - const std::wstring cxxIndexerName(L"sourcetrail_indexer.exe"); -#else - const std::wstring cxxIndexerName(L"sourcetrail_indexer"); -#endif - - if (!m_cxxIndexerPath.empty()) + std::wstring cxxIndexerName(L"sourcetrail_indexer"); + if (utility::getOsType() == OS_WINDOWS) { - return m_cxxIndexerPath.getConcatenated(cxxIndexerName); + cxxIndexerName = L"sourcetrail_indexer.exe"; } - return m_sharedDataPath.getConcatenated(cxxIndexerName); + + if (!s_cxxIndexerDirectoryPath.empty()) + { + return s_cxxIndexerDirectoryPath.getConcatenated(cxxIndexerName); + } + return s_sharedDataDirectoryPath.getConcatenated(cxxIndexerName); } -bool AppPath::setCxxIndexerPath(const FilePath& path) +bool AppPath::setCxxIndexerDirectoryPath(const FilePath& path) { if (!path.empty()) { - m_cxxIndexerPath = path; + s_cxxIndexerDirectoryPath = path; return true; } return false; diff --git a/src/lib/app/paths/AppPath.h b/src/lib/app/paths/AppPath.h index 20dd8935..d5138299 100644 --- a/src/lib/app/paths/AppPath.h +++ b/src/lib/app/paths/AppPath.h @@ -6,15 +6,15 @@ class AppPath { public: - static FilePath getSharedDataPath(); - static bool setSharedDataPath(const FilePath& path); + static FilePath getSharedDataDirectoryPath(); + static bool setSharedDataDirectoryPath(const FilePath& path); - static FilePath getCxxIndexerPath(); - static bool setCxxIndexerPath(const FilePath& path); + static FilePath getCxxIndexerFilePath(); + static bool setCxxIndexerDirectoryPath(const FilePath& path); private: - static FilePath m_sharedDataPath; - static FilePath m_cxxIndexerPath; + static FilePath s_sharedDataDirectoryPath; + static FilePath s_cxxIndexerDirectoryPath; }; #endif // APP_PATH_H diff --git a/src/lib/app/paths/ResourcePaths.cpp b/src/lib/app/paths/ResourcePaths.cpp index acb8489c..a3e0e262 100644 --- a/src/lib/app/paths/ResourcePaths.cpp +++ b/src/lib/app/paths/ResourcePaths.cpp @@ -3,49 +3,49 @@ #include "AppPath.h" #include "utilityApp.h" -FilePath ResourcePaths::getColorSchemesPath() +FilePath ResourcePaths::getColorSchemesDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/color_schemes/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/color_schemes/"); } -FilePath ResourcePaths::getSyntaxHighlightingRulesPath() +FilePath ResourcePaths::getSyntaxHighlightingRulesDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/syntax_highlighting_rules/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/syntax_highlighting_rules/"); } -FilePath ResourcePaths::getFallbackPath() +FilePath ResourcePaths::getFallbackDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/fallback/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/fallback/"); } -FilePath ResourcePaths::getFontsPath() +FilePath ResourcePaths::getFontsDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/fonts/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/fonts/"); } -FilePath ResourcePaths::getGuiPath() +FilePath ResourcePaths::getGuiDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/gui/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/gui/"); } -FilePath ResourcePaths::getLicensePath() +FilePath ResourcePaths::getLicenseDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/license/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/license/"); } -FilePath ResourcePaths::getJavaPath() +FilePath ResourcePaths::getJavaDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/java/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/java/"); } FilePath ResourcePaths::getPythonDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/python/"); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/python/"); } -FilePath ResourcePaths::getCxxCompilerHeaderPath() +FilePath ResourcePaths::getCxxCompilerHeaderDirectoryPath() { - return AppPath::getSharedDataPath().concatenate(L"data/cxx/include/").getCanonical(); + return AppPath::getSharedDataDirectoryPath().concatenate(L"data/cxx/include/").getCanonical(); } FilePath ResourcePaths::getPythonIndexerFilePath() diff --git a/src/lib/app/paths/ResourcePaths.h b/src/lib/app/paths/ResourcePaths.h index 79b1617f..8401b82a 100644 --- a/src/lib/app/paths/ResourcePaths.h +++ b/src/lib/app/paths/ResourcePaths.h @@ -8,15 +8,15 @@ class ResourcePaths { public: - static FilePath getColorSchemesPath(); - static FilePath getSyntaxHighlightingRulesPath(); - static FilePath getFallbackPath(); - static FilePath getFontsPath(); - static FilePath getGuiPath(); - static FilePath getLicensePath(); - static FilePath getJavaPath(); + static FilePath getColorSchemesDirectoryPath(); + static FilePath getSyntaxHighlightingRulesDirectoryPath(); + static FilePath getFallbackDirectoryPath(); + static FilePath getFontsDirectoryPath(); + static FilePath getGuiDirectoryPath(); + static FilePath getLicenseDirectoryPath(); + static FilePath getJavaDirectoryPath(); static FilePath getPythonDirectoryPath(); - static FilePath getCxxCompilerHeaderPath(); + static FilePath getCxxCompilerHeaderDirectoryPath(); static FilePath getPythonIndexerFilePath(); }; diff --git a/src/lib/app/paths/UserPaths.cpp b/src/lib/app/paths/UserPaths.cpp index a3b61aa8..ddea8e1d 100644 --- a/src/lib/app/paths/UserPaths.cpp +++ b/src/lib/app/paths/UserPaths.cpp @@ -1,28 +1,28 @@ #include "UserPaths.h" -FilePath UserPaths::s_userDataPath; +FilePath UserPaths::s_userDataDirectoryPath; -FilePath UserPaths::getUserDataPath() +FilePath UserPaths::getUserDataDirectoryPath() { - return s_userDataPath; + return s_userDataDirectoryPath; } -void UserPaths::setUserDataPath(const FilePath& path) +void UserPaths::setUserDataDirectoryPath(const FilePath& path) { - s_userDataPath = path; + s_userDataDirectoryPath = path; } -FilePath UserPaths::getAppSettingsPath() +FilePath UserPaths::getAppSettingsFilePath() { - return getUserDataPath().concatenate(L"ApplicationSettings.xml"); + return getUserDataDirectoryPath().concatenate(L"ApplicationSettings.xml"); } -FilePath UserPaths::getWindowSettingsPath() +FilePath UserPaths::getWindowSettingsFilePath() { - return getUserDataPath().concatenate(L"window_settings.ini"); + return getUserDataDirectoryPath().concatenate(L"window_settings.ini"); } -FilePath UserPaths::getLogPath() +FilePath UserPaths::getLogDirectoryPath() { - return getUserDataPath().concatenate(L"log/"); + return getUserDataDirectoryPath().concatenate(L"log/"); } diff --git a/src/lib/app/paths/UserPaths.h b/src/lib/app/paths/UserPaths.h index 28ec7768..8607896b 100644 --- a/src/lib/app/paths/UserPaths.h +++ b/src/lib/app/paths/UserPaths.h @@ -8,15 +8,15 @@ class UserPaths { public: - static FilePath getUserDataPath(); - static void setUserDataPath(const FilePath& path); + static FilePath getUserDataDirectoryPath(); + static void setUserDataDirectoryPath(const FilePath& path); - static FilePath getAppSettingsPath(); - static FilePath getWindowSettingsPath(); - static FilePath getLogPath(); + static FilePath getAppSettingsFilePath(); + static FilePath getWindowSettingsFilePath(); + static FilePath getLogDirectoryPath(); private: - static FilePath s_userDataPath; + static FilePath s_userDataDirectoryPath; }; #endif // USER_PATHS_H diff --git a/src/lib/component/view/GraphViewStyle.cpp b/src/lib/component/view/GraphViewStyle.cpp index 50cf59f1..05e57155 100644 --- a/src/lib/component/view/GraphViewStyle.cpp +++ b/src/lib/component/view/GraphViewStyle.cpp @@ -553,7 +553,7 @@ GraphViewStyle::NodeStyle GraphViewStyle::getStyleOfBundleNode(bool isFocused) return getStyleForNodeType( NodeType::STYLE_BIG_NODE, "bundle", - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/bundle.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/bundle.png"), true, false, isFocused, diff --git a/src/lib/data/NodeType.cpp b/src/lib/data/NodeType.cpp index 187d1854..bf1a1d67 100644 --- a/src/lib/data/NodeType.cpp +++ b/src/lib/data/NodeType.cpp @@ -183,21 +183,22 @@ FilePath NodeType::getIconPath() const if (isPackage()) { // this icon cannot be changed - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/namespace.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/namespace.png"); } switch (m_kind) { case NODE_ANNOTATION: - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/annotation.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate( + L"graph_view/images/annotation.png"); case NODE_ENUM: - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/enum.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/enum.png"); case NODE_TYPEDEF: - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/typedef.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/typedef.png"); case NODE_MACRO: - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/macro.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/macro.png"); case NODE_FILE: - return ResourcePaths::getGuiPath().concatenate(L"graph_view/images/file.png"); + return ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/file.png"); default: return FilePath(); } diff --git a/src/lib/data/indexer/TaskBuildIndex.cpp b/src/lib/data/indexer/TaskBuildIndex.cpp index 15026ced..f2313145 100644 --- a/src/lib/data/indexer/TaskBuildIndex.cpp +++ b/src/lib/data/indexer/TaskBuildIndex.cpp @@ -178,7 +178,7 @@ void TaskBuildIndex::handleMessage(MessageIndexingInterrupted* message) void TaskBuildIndex::runIndexerProcess(int processId, const std::wstring& logFilePath) { - const FilePath indexerProcessPath = AppPath::getCxxIndexerPath(); + const FilePath indexerProcessPath = AppPath::getCxxIndexerFilePath(); if (!indexerProcessPath.exists()) { m_interrupted = true; @@ -191,8 +191,8 @@ void TaskBuildIndex::runIndexerProcess(int processId, const std::wstring& logFil std::vector commandArguments; commandArguments.push_back(std::to_wstring(processId)); commandArguments.push_back(utility::decodeFromUtf8(m_appUUID)); - commandArguments.push_back(AppPath::getSharedDataPath().getAbsolute().wstr()); - commandArguments.push_back(UserPaths::getUserDataPath().getAbsolute().wstr()); + commandArguments.push_back(AppPath::getSharedDataDirectoryPath().getAbsolute().wstr()); + commandArguments.push_back(UserPaths::getUserDataDirectoryPath().getAbsolute().wstr()); if (!logFilePath.empty()) { diff --git a/src/lib/settings/ApplicationSettings.cpp b/src/lib/settings/ApplicationSettings.cpp index be6fca3b..2e652afb 100644 --- a/src/lib/settings/ApplicationSettings.cpp +++ b/src/lib/settings/ApplicationSettings.cpp @@ -210,8 +210,9 @@ std::wstring ApplicationSettings::getColorSchemeName() const FilePath ApplicationSettings::getColorSchemePath() const { - FilePath defaultPath(ResourcePaths::getColorSchemesPath().concatenate(L"bright.xml")); - FilePath path(ResourcePaths::getColorSchemesPath().concatenate(getColorSchemeName() + L".xml")); + FilePath defaultPath(ResourcePaths::getColorSchemesDirectoryPath().concatenate(L"bright.xml")); + FilePath path( + ResourcePaths::getColorSchemesDirectoryPath().concatenate(getColorSchemeName() + L".xml")); if (path != defaultPath && !path.exists()) { @@ -340,7 +341,7 @@ void ApplicationSettings::setVerboseIndexerLoggingEnabled(bool value) FilePath ApplicationSettings::getLogDirectoryPath() const { return FilePath(getValue( - "application/log_directory_path", UserPaths::getLogPath().getAbsolute().wstr())); + "application/log_directory_path", UserPaths::getLogDirectoryPath().getAbsolute().wstr())); } void ApplicationSettings::setLogDirectoryPath(const FilePath& path) @@ -570,7 +571,7 @@ std::vector ApplicationSettings::getRecentProjects() const } else { - recentProjects.push_back(UserPaths::getUserDataPath().concatenate(project)); + recentProjects.push_back(UserPaths::getUserDataDirectoryPath().concatenate(project)); } } return recentProjects; diff --git a/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp b/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp index 56ae79eb..415e3fa8 100644 --- a/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp +++ b/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp @@ -83,11 +83,11 @@ std::vector IndexerCommandCxx::getCompilerFlagsForSystemHeaderSear #ifdef _WIN32 // prepend clang system includes on windows compilerFlags = utility::concat( - {L"-isystem", ResourcePaths::getCxxCompilerHeaderPath().wstr()}, compilerFlags); + {L"-isystem", ResourcePaths::getCxxCompilerHeaderDirectoryPath().wstr()}, compilerFlags); #else // append otherwise compilerFlags.push_back(L"-isystem"); - compilerFlags.push_back(ResourcePaths::getCxxCompilerHeaderPath().wstr()); + compilerFlags.push_back(ResourcePaths::getCxxCompilerHeaderDirectoryPath().wstr()); #endif return compilerFlags; diff --git a/src/lib_gui/platform_includes/includesLinux.h b/src/lib_gui/platform_includes/includesLinux.h index e5024e4b..54d0bb61 100644 --- a/src/lib_gui/platform_includes/includesLinux.h +++ b/src/lib_gui/platform_includes/includesLinux.h @@ -17,11 +17,11 @@ void setupPlatform(int argc, char* argv[]) { std::string home = std::getenv("HOME"); - UserPaths::setUserDataPath(FilePath(home + "/.config/sourcetrail/")); + UserPaths::setUserDataDirectoryPath(FilePath(home + "/.config/sourcetrail/")); // Set QT screen scaling factor ApplicationSettings appSettings; - appSettings.load(UserPaths::getAppSettingsPath(), true); + appSettings.load(UserPaths::getAppSettingsFilePath(), true); qputenv("QT_AUTO_SCREEN_SCALE_FACTOR_SOURCETRAIL", qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR")); qputenv("QT_SCALE_FACTOR_SOURCETRAIL", qgetenv("QT_SCALE_FACTOR")); @@ -47,13 +47,13 @@ void setupApp(int argc, char* argv[]) { FilePath appPath = FilePath(QCoreApplication::applicationDirPath().toStdWString() + L"/").getAbsolute(); - AppPath::setSharedDataPath(appPath); - AppPath::setCxxIndexerPath(appPath); + AppPath::setSharedDataDirectoryPath(appPath); + AppPath::setCxxIndexerDirectoryPath(appPath); // Check if bundled as Linux AppImage if (appPath.getConcatenated(L"/../share/data").exists()) { - AppPath::setSharedDataPath(appPath.getConcatenated(L"/../share").getAbsolute()); + AppPath::setSharedDataDirectoryPath(appPath.getConcatenated(L"/../share").getAbsolute()); } std::string userdir(std::getenv("HOME")); @@ -67,14 +67,15 @@ void setupApp(int argc, char* argv[]) } utility::copyNewFilesFromDirectory( - QString::fromStdWString(ResourcePaths::getFallbackPath().wstr()), userDataPath); + QString::fromStdWString(ResourcePaths::getFallbackDirectoryPath().wstr()), userDataPath); utility::copyNewFilesFromDirectory( - QString::fromStdWString(AppPath::getSharedDataPath().concatenate(L"user/").wstr()), + QString::fromStdWString(AppPath::getSharedDataDirectoryPath().concatenate(L"user/").wstr()), userDataPath); // Add u+w permissions because the source files may be marked read-only in some distros QDirIterator it(userDataPath, QDir::Files, QDirIterator::Subdirectories); - while (it.hasNext()) { + while (it.hasNext()) + { QFile f(it.next()); f.setPermissions(f.permissions() | QFile::WriteOwner); } diff --git a/src/lib_gui/platform_includes/includesMac.h b/src/lib_gui/platform_includes/includesMac.h index e1f63bd6..61593ea7 100644 --- a/src/lib_gui/platform_includes/includesMac.h +++ b/src/lib_gui/platform_includes/includesMac.h @@ -15,7 +15,7 @@ void setupPlatform(int argc, char* argv[]) { - UserPaths::setUserDataPath(FilePath(L"./user/").getAbsolute()); + UserPaths::setUserDataDirectoryPath(FilePath(L"./user/").getAbsolute()); // ---------------------------------------------------------------------------- // This makes relative paths work in C++ in Xcode by changing directory to the Resources folder @@ -60,7 +60,7 @@ void setupPlatform(int argc, char* argv[]) // ---------------------------------------------------------------------------- // Makes the mac bundle copy the user files to the Application Support folder QString dataPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); - QString oldDataPath = QString::fromStdWString(ResourcePaths::getFallbackPath().wstr()); + QString oldDataPath = QString::fromStdWString(ResourcePaths::getFallbackDirectoryPath().wstr()); QDir dataDir(dataPath); if (!dataDir.exists()) @@ -71,13 +71,13 @@ void setupPlatform(int argc, char* argv[]) utility::copyNewFilesFromDirectory(oldDataPath, dataPath); // ---------------------------------------------------------------------------- - UserPaths::setUserDataPath(FilePath(dataPath.toStdWString() + L"/").getAbsolute()); + UserPaths::setUserDataDirectoryPath(FilePath(dataPath.toStdWString() + L"/").getAbsolute()); } void setupApp(int argc, char* argv[]) { const FilePath path(QDir::currentPath().toStdWString() + L"/"); - AppPath::setSharedDataPath(path.getAbsolute()); + AppPath::setSharedDataDirectoryPath(path.getAbsolute()); } #endif // INCLUDES_MAC_H diff --git a/src/lib_gui/platform_includes/includesWindows.h b/src/lib_gui/platform_includes/includesWindows.h index dccae272..db174e65 100644 --- a/src/lib_gui/platform_includes/includesWindows.h +++ b/src/lib_gui/platform_includes/includesWindows.h @@ -34,11 +34,11 @@ void setupApp(int argc, char* argv[]) { appPath = appPath.substr(0, pos + 1); } - AppPath::setSharedDataPath(FilePath(appPath)); + AppPath::setSharedDataDirectoryPath(FilePath(appPath)); } { - FilePath userDataPath = AppPath::getSharedDataPath().concatenate(L"user/"); + FilePath userDataPath = AppPath::getSharedDataDirectoryPath().concatenate(L"user/"); if (!userDataPath.exists()) { #pragma warning(push) @@ -65,7 +65,7 @@ void setupApp(int argc, char* argv[]) } else { - userDataPath = AppPath::getSharedDataPath().concatenate(L"user_fallback/"); + userDataPath = AppPath::getSharedDataDirectoryPath().concatenate(L"user_fallback/"); LOG_ERROR( L"The \"%LOCALAPPDATA%\" path could not be found. Falling back to \"" + userDataPath.wstr() + L"\" to store settings data."); @@ -73,16 +73,16 @@ void setupApp(int argc, char* argv[]) } } - UserPaths::setUserDataPath(userDataPath); + UserPaths::setUserDataDirectoryPath(userDataPath); } // This "copyFile" method does nothing if the copy destination already exist FileSystem::copyFile( - ResourcePaths::getFallbackPath().concatenate(L"ApplicationSettings.xml"), - UserPaths::getAppSettingsPath()); + ResourcePaths::getFallbackDirectoryPath().concatenate(L"ApplicationSettings.xml"), + UserPaths::getAppSettingsFilePath()); FileSystem::copyFile( - ResourcePaths::getFallbackPath().concatenate(L"window_settings.ini"), - UserPaths::getWindowSettingsPath()); + ResourcePaths::getFallbackDirectoryPath().concatenate(L"window_settings.ini"), + UserPaths::getWindowSettingsFilePath()); } #endif // INCLUDES_WINDOWS_H diff --git a/src/lib_gui/qt/element/QtStatusBar.cpp b/src/lib_gui/qt/element/QtStatusBar.cpp index 327ca58e..287f5c1c 100644 --- a/src/lib_gui/qt/element/QtStatusBar.cpp +++ b/src/lib_gui/qt/element/QtStatusBar.cpp @@ -15,7 +15,7 @@ QtStatusBar::QtStatusBar(): m_text(this), m_ideStatusText(this) addWidget(new QWidget()); // add some space m_movie = std::make_shared(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"statusbar_view/loader.gif").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"statusbar_view/loader.gif").wstr())); // if movie doesn't loop forever, force it to. if (m_movie->loopCount() != -1) { @@ -55,7 +55,7 @@ QtStatusBar::QtStatusBar(): m_text(this), m_ideStatusText(this) m_errorButton.setIcon( utility::colorizePixmap( QPixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"statusbar_view/dot.png").wstr())), + ResourcePaths::getGuiDirectoryPath().concatenate(L"statusbar_view/dot.png").wstr())), QColor(0xD0, 0, 0)) .scaledToHeight(12)); m_errorButton.setCursor(Qt::PointingHandCursor); diff --git a/src/lib_gui/qt/element/bookmark/QtBookmark.cpp b/src/lib_gui/qt/element/bookmark/QtBookmark.cpp index bd22a169..f39f5183 100644 --- a/src/lib_gui/qt/element/bookmark/QtBookmark.cpp +++ b/src/lib_gui/qt/element/bookmark/QtBookmark.cpp @@ -56,7 +56,7 @@ QtBookmark::QtBookmark(ControllerProxy* controllerProxy) m_editButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); m_editButton->setIconSize(QSize(20, 20)); m_editButton->setIcon(QPixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/bookmark_edit_icon.png").wstr()))); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/bookmark_edit_icon.png").wstr()))); utility::setWidgetRetainsSpaceWhenHidden(m_editButton); m_editButton->hide(); buttonsLayout->addWidget(m_editButton); @@ -67,7 +67,7 @@ QtBookmark::QtBookmark(ControllerProxy* controllerProxy) m_deleteButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); m_deleteButton->setIconSize(QSize(20, 20)); m_deleteButton->setIcon(QPixmap( - QString::fromStdWString(ResourcePaths::getGuiPath() + QString::fromStdWString(ResourcePaths::getGuiDirectoryPath() .concatenate(L"bookmark_view/images/bookmark_delete_icon.png") .wstr()))); utility::setWidgetRetainsSpaceWhenHidden(m_deleteButton); @@ -237,7 +237,7 @@ void QtBookmark::elideButtonText() void QtBookmark::updateArrow() { QPixmap pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/" + m_arrowImageName).wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/" + m_arrowImageName).wstr())); m_toggleCommentButton->setIcon( QIcon(utility::colorizePixmap(pixmap, m_hovered ? "#707070" : "black"))); } diff --git a/src/lib_gui/qt/element/bookmark/QtBookmarkCategory.cpp b/src/lib_gui/qt/element/bookmark/QtBookmarkCategory.cpp index 5fa03772..1bebba11 100644 --- a/src/lib_gui/qt/element/bookmark/QtBookmarkCategory.cpp +++ b/src/lib_gui/qt/element/bookmark/QtBookmarkCategory.cpp @@ -25,7 +25,7 @@ QtBookmarkCategory::QtBookmarkCategory(ControllerProxy* cont m_expandButton->setToolTip(QStringLiteral("Show/Hide bookmarks in this category")); m_expandButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); m_expandButton->setIcon(QPixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/arrow_down.png").wstr()))); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/arrow_down.png").wstr()))); m_expandButton->setIconSize(QSize(8, 8)); layout->addWidget(m_expandButton); @@ -44,7 +44,7 @@ QtBookmarkCategory::QtBookmarkCategory(ControllerProxy* cont m_deleteButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); m_deleteButton->setIconSize(QSize(20, 20)); m_deleteButton->setIcon(QPixmap( - QString::fromStdWString(ResourcePaths::getGuiPath() + QString::fromStdWString(ResourcePaths::getGuiDirectoryPath() .concatenate(L"bookmark_view/images/bookmark_delete_icon.png") .wstr()))); utility::setWidgetRetainsSpaceWhenHidden(m_deleteButton); @@ -88,13 +88,13 @@ void QtBookmarkCategory::updateArrow() if (m_treeItem->isExpanded()) { QPixmap pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/arrow_down.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/arrow_down.png").wstr())); m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black"))); } else { QPixmap pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/arrow_right.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/arrow_right.png").wstr())); m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black"))); } } diff --git a/src/lib_gui/qt/element/button/QtHelpButton.cpp b/src/lib_gui/qt/element/button/QtHelpButton.cpp index cd98a44c..8305554e 100644 --- a/src/lib_gui/qt/element/button/QtHelpButton.cpp +++ b/src/lib_gui/qt/element/button/QtHelpButton.cpp @@ -4,8 +4,8 @@ QtHelpButton::QtHelpButton(const QtHelpButtonInfo& info, QWidget* parent) : QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/help.png"), - ResourcePaths::getGuiPath().concatenate(L"window/help_hover.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/help.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/help_hover.png"), parent) , m_info(info) { diff --git a/src/lib_gui/qt/element/code/QtCodeFileList.cpp b/src/lib_gui/qt/element/code/QtCodeFileList.cpp index dd3347c0..b5a1b051 100644 --- a/src/lib_gui/qt/element/code/QtCodeFileList.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFileList.cpp @@ -62,7 +62,7 @@ QtCodeFileList::QtCodeFileList(QtCodeNavigator* navigator) { // set style on scrollbar because it always has bright background by default m_lastSnippetScrollBar->setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"main/scrollbar.css")) + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"main/scrollbar.css")) .c_str()); m_styleSize = m_lastSnippetScrollBar->styleSheet().size(); } diff --git a/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp b/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp index 8a0aa078..ac1c1476 100644 --- a/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp @@ -30,7 +30,7 @@ QtCodeFileTitleBar::QtCodeFileTitleBar(QWidget* parent, bool isHovering, bool is titleLayout->setAlignment(Qt::AlignLeft); setLayout(titleLayout); - FilePath imageDir = ResourcePaths::getGuiPath().concatenate(L"code_view/images/"); + FilePath imageDir = ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/"); m_expandButton = new QtSelfRefreshIconButton( QLatin1String(""), diff --git a/src/lib_gui/qt/element/code/QtCodeFileTitleButton.cpp b/src/lib_gui/qt/element/code/QtCodeFileTitleButton.cpp index 944279e3..280a20be 100644 --- a/src/lib_gui/qt/element/code/QtCodeFileTitleButton.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFileTitleButton.cpp @@ -245,16 +245,16 @@ void QtCodeFileTitleButton::updateIcon() { if (m_filePath.empty()) { - setIconPath(ResourcePaths::getGuiPath().concatenate(L"code_view/images/edit.png")); + setIconPath(ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/edit.png")); } else if (!m_isComplete) { setIconPath( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/file_incomplete.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/file_incomplete.png")); } else { - setIconPath(ResourcePaths::getGuiPath().concatenate(L"code_view/images/file.png")); + setIconPath(ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/file.png")); } } @@ -262,7 +262,7 @@ void QtCodeFileTitleButton::updateHatching() { if (!m_isIndexed) { - FilePath hatchingFilePath = ResourcePaths::getGuiPath().concatenate( + FilePath hatchingFilePath = ResourcePaths::getGuiDirectoryPath().concatenate( L"code_view/images/pattern_" + utility::decodeFromUtf8( ColorScheme::getInstance()->getColor("code/file/title/hatching")) + diff --git a/src/lib_gui/qt/element/code/QtCodeNavigator.cpp b/src/lib_gui/qt/element/code/QtCodeNavigator.cpp index 5e83e2ab..8e20385e 100644 --- a/src/lib_gui/qt/element/code/QtCodeNavigator.cpp +++ b/src/lib_gui/qt/element/code/QtCodeNavigator.cpp @@ -60,9 +60,9 @@ QtCodeNavigator::QtCodeNavigator(QWidget* parent) { m_prevReferenceButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_up.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_up.png"), true); m_nextReferenceButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_down.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_down.png"), true); m_prevReferenceButton->setObjectName(QStringLiteral("reference_button_previous")); m_nextReferenceButton->setObjectName(QStringLiteral("reference_button_next")); @@ -91,9 +91,9 @@ QtCodeNavigator::QtCodeNavigator(QWidget* parent) { m_prevLocalReferenceButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_up.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_up.png"), true); m_nextLocalReferenceButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_down.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_down.png"), true); m_prevLocalReferenceButton->setObjectName( QStringLiteral("local_reference_button_previous")); @@ -136,9 +136,9 @@ QtCodeNavigator::QtCodeNavigator(QWidget* parent) } m_listButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/list.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/list.png"), true); m_fileButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/file.png"), true); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/file.png"), true); m_listButton->setObjectName(QStringLiteral("mode_button_list")); m_fileButton->setObjectName(QStringLiteral("mode_button_single")); diff --git a/src/lib_gui/qt/element/dialog/QtListBox.cpp b/src/lib_gui/qt/element/dialog/QtListBox.cpp index 27076a6c..7315a257 100644 --- a/src/lib_gui/qt/element/dialog/QtListBox.cpp +++ b/src/lib_gui/qt/element/dialog/QtListBox.cpp @@ -46,7 +46,7 @@ QtListBox::QtListBox(QWidget* parent, const QString& listName): QFrame(parent), connect(m_list, &QListWidget::doubleClicked, this, &QtListBox::doubleClicked); setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/listbox.css")).c_str()); + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/listbox.css")).c_str()); layout->addWidget(m_list, 5); QWidget* buttonContainer = new QWidget(this); @@ -57,16 +57,16 @@ QtListBox::QtListBox(QWidget* parent, const QString& listName): QFrame(parent), barLayout->setSpacing(0); m_addButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/plus.png"), - ResourcePaths::getGuiPath().concatenate(L"window/plus_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/plus.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/plus_hover.png")); m_addButton->setIconSize(QSize(16, 16)); m_addButton->setObjectName(QStringLiteral("plusButton")); m_addButton->setToolTip(QStringLiteral("add line")); barLayout->addWidget(m_addButton); m_removeButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/minus.png"), - ResourcePaths::getGuiPath().concatenate(L"window/minus_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/minus.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/minus_hover.png")); m_removeButton->setIconSize(QSize(16, 16)); m_removeButton->setObjectName(QStringLiteral("minusButton")); m_removeButton->setToolTip(QStringLiteral("remove line")); @@ -78,7 +78,7 @@ QtListBox::QtListBox(QWidget* parent, const QString& listName): QFrame(parent), barLayout->addLayout(m_innerBarLayout); QPushButton* editButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"code_view/images/edit.png"), FilePath()); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/edit.png"), FilePath()); editButton->setIconSize(QSize(16, 16)); editButton->setObjectName(QStringLiteral("editButton")); editButton->setToolTip(QStringLiteral("edit plain text")); diff --git a/src/lib_gui/qt/element/dialog/QtLocationPicker.cpp b/src/lib_gui/qt/element/dialog/QtLocationPicker.cpp index 2b306c42..65c2e603 100644 --- a/src/lib_gui/qt/element/dialog/QtLocationPicker.cpp +++ b/src/lib_gui/qt/element/dialog/QtLocationPicker.cpp @@ -27,8 +27,8 @@ QtLocationPicker::QtLocationPicker(QWidget* parent): QWidget(parent), m_pickDire layout->addWidget(m_data); m_button = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/dots.png"), - ResourcePaths::getGuiPath().concatenate(L"window/dots_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/dots.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/dots_hover.png")); m_button->setIconSize(QSize(16, 16)); m_button->setObjectName(QStringLiteral("dotsButton")); m_button->setToolTip(QStringLiteral("pick file")); diff --git a/src/lib_gui/qt/element/dialog/QtPathListBoxItem.cpp b/src/lib_gui/qt/element/dialog/QtPathListBoxItem.cpp index 93dd2d09..a6aedb54 100644 --- a/src/lib_gui/qt/element/dialog/QtPathListBoxItem.cpp +++ b/src/lib_gui/qt/element/dialog/QtPathListBoxItem.cpp @@ -14,8 +14,8 @@ QtPathListBoxItem::QtPathListBoxItem(QtPathListBox* listBox, QListWidgetItem* it : QtListBoxItem(item, parent), m_listBox(listBox) { m_button = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/dots.png"), - ResourcePaths::getGuiPath().concatenate(L"window/dots_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/dots.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/dots_hover.png")); m_button->setIconSize(QSize(16, 16)); m_button->setObjectName(QStringLiteral("dotsButton")); layout()->addWidget(m_button); diff --git a/src/lib_gui/qt/element/dialog/QtProgressBar.cpp b/src/lib_gui/qt/element/dialog/QtProgressBar.cpp index bd0cab74..09eafc89 100644 --- a/src/lib_gui/qt/element/dialog/QtProgressBar.cpp +++ b/src/lib_gui/qt/element/dialog/QtProgressBar.cpp @@ -12,7 +12,7 @@ QtProgressBar::QtProgressBar(QWidget* parent) , m_percent(0) , m_count(0) , m_pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/progress_bar_element.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"indexing_dialog/progress_bar_element.png").wstr())) { m_timer = new QTimer(this); connect(m_timer, &QTimer::timeout, this, &QtProgressBar::animate); diff --git a/src/lib_gui/qt/element/history/QtHistoryList.cpp b/src/lib_gui/qt/element/history/QtHistoryList.cpp index e79e0376..f46928a0 100644 --- a/src/lib_gui/qt/element/history/QtHistoryList.cpp +++ b/src/lib_gui/qt/element/history/QtHistoryList.cpp @@ -66,7 +66,7 @@ QtHistoryItem::QtHistoryItem(const SearchMatch& match, size_t index, bool isCurr if (isCurrent) { QtDeviceScaledPixmap pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"history_list/images/arrow.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"history_list/images/arrow.png").wstr())); pixmap.scaleToHeight(size.height() / 3); QLabel* arrow = new QLabel(this); @@ -164,7 +164,7 @@ QtHistoryList::QtHistoryList(const std::vector& history, size_t cur } setStyleSheet(utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"history_list/history_list.css")) + ResourcePaths::getGuiDirectoryPath().concatenate(L"history_list/history_list.css")) .c_str()); connect(m_list, &QListWidget::itemClicked, this, &QtHistoryList::onItemClicked); diff --git a/src/lib_gui/qt/element/history/QtUndoRedo.cpp b/src/lib_gui/qt/element/history/QtUndoRedo.cpp index 2ea1e6b4..ac7cee0c 100644 --- a/src/lib_gui/qt/element/history/QtUndoRedo.cpp +++ b/src/lib_gui/qt/element/history/QtUndoRedo.cpp @@ -17,19 +17,19 @@ QtUndoRedo::QtUndoRedo() setObjectName(QStringLiteral("undo_redo_bar")); m_undoButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"undoredo_view/images/arrow_left.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"undoredo_view/images/arrow_left.png")); m_undoButton->setObjectName(QStringLiteral("undo_button")); m_undoButton->setToolTip(QStringLiteral("back")); m_undoButton->setEnabled(false); m_historyButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"undoredo_view/images/history.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"undoredo_view/images/history.png")); m_historyButton->setObjectName(QStringLiteral("history_button")); m_historyButton->setToolTip(QStringLiteral("history")); m_historyButton->setEnabled(false); m_redoButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"undoredo_view/images/arrow_right.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"undoredo_view/images/arrow_right.png")); m_redoButton->setObjectName(QStringLiteral("redo_button")); m_redoButton->setToolTip(QStringLiteral("forward")); m_redoButton->setEnabled(false); diff --git a/src/lib_gui/qt/element/search/QtAutocompletionList.cpp b/src/lib_gui/qt/element/search/QtAutocompletionList.cpp index 5e0ad75e..4c2f6b2c 100644 --- a/src/lib_gui/qt/element/search/QtAutocompletionList.cpp +++ b/src/lib_gui/qt/element/search/QtAutocompletionList.cpp @@ -371,7 +371,7 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font) m_charHeight2 = static_cast(metrics2.height()); m_arrow = QtDeviceScaledPixmap( - QString::fromStdString(ResourcePaths::getGuiPath().str() + "search_view/images/arrow.png")); + QString::fromStdString(ResourcePaths::getGuiDirectoryPath().str() + "search_view/images/arrow.png")); m_arrow.scaleToWidth(static_cast(m_charWidth2)); m_arrow.colorize(ColorScheme::getInstance()->getColor("search/popup/by_text").c_str()); } diff --git a/src/lib_gui/qt/element/search/QtScreenSearchBox.cpp b/src/lib_gui/qt/element/search/QtScreenSearchBox.cpp index c9ddf66e..651df76c 100644 --- a/src/lib_gui/qt/element/search/QtScreenSearchBox.cpp +++ b/src/lib_gui/qt/element/search/QtScreenSearchBox.cpp @@ -43,7 +43,7 @@ QtScreenSearchBox::QtScreenSearchBox( { m_searchButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"search_view/images/search.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"search_view/images/search.png"), "screen_search/button"); m_searchButton->setObjectName(QStringLiteral("search_button")); m_searchButton->setIconSize(QSize(12, 12)); @@ -78,11 +78,11 @@ QtScreenSearchBox::QtScreenSearchBox( { m_prevButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_left.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_left.png"), "screen_search/button"); m_nextButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"code_view/images/arrow_right.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/arrow_right.png"), "screen_search/button"); m_prevButton->setObjectName(QStringLiteral("prev_button")); @@ -109,7 +109,7 @@ QtScreenSearchBox::QtScreenSearchBox( { m_closeButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"screen_search_view/images/close.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"screen_search_view/images/close.png"), "screen_search/button"); m_closeButton->setObjectName(QStringLiteral("close_button")); m_closeButton->setIconSize(QSize(15, 15)); diff --git a/src/lib_gui/qt/element/search/QtSearchBar.cpp b/src/lib_gui/qt/element/search/QtSearchBar.cpp index bd988cd7..9b519359 100644 --- a/src/lib_gui/qt/element/search/QtSearchBar.cpp +++ b/src/lib_gui/qt/element/search/QtSearchBar.cpp @@ -21,7 +21,7 @@ QtSearchBar::QtSearchBar() setLayout(layout); m_homeButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"search_view/images/home.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"search_view/images/home.png")); m_homeButton->setObjectName(QStringLiteral("home_button")); m_homeButton->setToolTip(QStringLiteral("to overview")); layout->addWidget(m_homeButton); @@ -47,7 +47,7 @@ QtSearchBar::QtSearchBar() m_searchBox, &QtSmartSearchBox::fullTextSearch, this, &QtSearchBar::requestFullTextSearch); m_searchButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"search_view/images/search.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"search_view/images/search.png")); m_searchButton->setObjectName(QStringLiteral("search_button")); m_searchButton->setToolTip(QStringLiteral("search")); layout->addWidget(m_searchButton); diff --git a/src/lib_gui/qt/graphics/QtGraphicsView.cpp b/src/lib_gui/qt/graphics/QtGraphicsView.cpp index 5432bf6f..d4baf38b 100644 --- a/src/lib_gui/qt/graphics/QtGraphicsView.cpp +++ b/src/lib_gui/qt/graphics/QtGraphicsView.cpp @@ -140,7 +140,7 @@ QtGraphicsView::QtGraphicsView(GraphFocusHandler* focusHandler, QWidget* parent) m_zoomInButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/zoom_in.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/zoom_in.png"), "search/button", this); m_zoomInButton->setObjectName(QStringLiteral("zoom_in_button")); @@ -150,7 +150,7 @@ QtGraphicsView::QtGraphicsView(GraphFocusHandler* focusHandler, QWidget* parent) m_zoomOutButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/zoom_out.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/zoom_out.png"), "search/button", this); m_zoomOutButton->setObjectName(QStringLiteral("zoom_out_button")); @@ -160,7 +160,7 @@ QtGraphicsView::QtGraphicsView(GraphFocusHandler* focusHandler, QWidget* parent) m_legendButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/legend.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/legend.png"), "search/button", this); m_legendButton->setObjectName(QStringLiteral("legend_button")); diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp index e49fc8dd..e7a2fd18 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp @@ -644,7 +644,7 @@ void QtGraphNode::setStyle(const GraphViewStyle::NodeStyle& style) if (style.hasHatching) { QtDeviceScaledPixmap pattern(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/pattern.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/pattern.png").wstr())); pattern.scaleToHeight(12); QPixmap pixmap = utility::colorizePixmap(pattern.pixmap(), style.color.hatching.c_str()); diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNodeAccess.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNodeAccess.cpp index d94fa472..75baafdc 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNodeAccess.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNodeAccess.cpp @@ -46,7 +46,7 @@ QtGraphNodeAccess::QtGraphNodeAccess(AccessKind accessKind) if (iconFileName.size() > 0) { QtDeviceScaledPixmap pixmap( - QString::fromStdWString(ResourcePaths::getGuiPath() + QString::fromStdWString(ResourcePaths::getGuiDirectoryPath() .concatenate(L"graph_view/images/" + iconFileName + L".png") .wstr())); pixmap.scaleToHeight(m_accessIconSize); diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNodeData.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNodeData.cpp index 4ac12f4e..558b6f6b 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNodeData.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNodeData.cpp @@ -87,7 +87,7 @@ void QtGraphNodeData::updateStyle() TokenComponentFilePath* component = m_data->getComponent(); if (component && !component->isComplete()) { - style.iconPath = ResourcePaths::getGuiPath().concatenate( + style.iconPath = ResourcePaths::getGuiDirectoryPath().concatenate( L"graph_view/images/file_incomplete.png"); } diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp index b153078e..6c49a496 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp @@ -25,7 +25,7 @@ QtGraphNodeExpandToggle::QtGraphNodeExpandToggle(bool expanded, int invisibleSub m_icon->setShapeMode(QGraphicsPixmapItem::BoundingRectShape); QtDeviceScaledPixmap pixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/arrow.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/arrow.png").wstr())); pixmap.scaleToHeight(iconHeight); if (invisibleSubNodeCount) diff --git a/src/lib_gui/qt/project_wizard/QtProjectWizard.cpp b/src/lib_gui/qt/project_wizard/QtProjectWizard.cpp index 586188dc..7db1c3e7 100644 --- a/src/lib_gui/qt/project_wizard/QtProjectWizard.cpp +++ b/src/lib_gui/qt/project_wizard/QtProjectWizard.cpp @@ -451,16 +451,16 @@ void QtProjectWizard::populateWindow(QWidget* widget) buttonsLayout->setSpacing(0); QPushButton* addButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/source_group_add.png"), - ResourcePaths::getGuiPath().concatenate(L"window/source_group_add_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_add.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_add_hover.png")); m_removeButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/source_group_delete.png"), - ResourcePaths::getGuiPath().concatenate(L"window/source_group_delete_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_delete.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_delete_hover.png")); m_duplicateButton = new QtIconButton( - ResourcePaths::getGuiPath().concatenate(L"window/source_group_copy.png"), - ResourcePaths::getGuiPath().concatenate(L"window/source_group_copy_hover.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_copy.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"window/source_group_copy_hover.png")); addButton->setIconSize(QSize(20, 20)); m_removeButton->setIconSize(QSize(20, 20)); diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp index 66a7834a..1365837e 100644 --- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp +++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp @@ -27,7 +27,7 @@ QtProjectWizardContentPreferences::QtProjectWizardContentPreferences(QtProjectWi , m_screenScaleFactor(nullptr) { m_colorSchemePaths = FileSystem::getFilePathsFromDirectory( - ResourcePaths::getColorSchemesPath(), {L".xml"}); + ResourcePaths::getColorSchemesDirectoryPath(), {L".xml"}); } QtProjectWizardContentPreferences::~QtProjectWizardContentPreferences() @@ -357,8 +357,8 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row) case OS_MAC: m_javaPath->setFileFilter( QStringLiteral("JLI or JVM Library (libjli.dylib libjvm.dylib)")); - m_javaPath->setPlaceholderText( - QStringLiteral("/Library/Java/JavaVirtualMachines//Contents/MacOS/libjli.dylib")); + m_javaPath->setPlaceholderText(QStringLiteral( + "/Library/Java/JavaVirtualMachines//Contents/MacOS/libjli.dylib")); break; case OS_LINUX: m_javaPath->setFileFilter(QStringLiteral("JVM Library (libjvm.so)")); @@ -425,13 +425,13 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row) // maven path m_mavenPath = new QtLocationPicker(this); - #ifdef WIN32 +#ifdef WIN32 m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn.cmd)")); m_mavenPath->setPlaceholderText(QStringLiteral("/bin/mvn.cmd")); - #else +#else m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn)")); m_mavenPath->setPlaceholderText(QStringLiteral("/mvn")); - #endif +#endif addLabelAndWidget(QStringLiteral("Maven Path"), m_mavenPath, layout, row); diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp index 2f93091a..8dd4e376 100644 --- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp +++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp @@ -207,7 +207,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row) QToolButton* b = createSourceGroupButton( utility::insertLineBreaksAtBlankSpaces(name, 15).c_str(), QString::fromStdWString( - ResourcePaths::getGuiPath() + ResourcePaths::getGuiDirectoryPath() .concatenate(L"icon/" + m_sourceGroupTypeIconName[sourceGroupIt.type] + L".png") .wstr())); diff --git a/src/lib_gui/qt/project_wizard/content/paths/QtProjectWizardContentPathsHeaderSearchGlobal.cpp b/src/lib_gui/qt/project_wizard/content/paths/QtProjectWizardContentPathsHeaderSearchGlobal.cpp index fd740cac..bc7c6c07 100644 --- a/src/lib_gui/qt/project_wizard/content/paths/QtProjectWizardContentPathsHeaderSearchGlobal.cpp +++ b/src/lib_gui/qt/project_wizard/content/paths/QtProjectWizardContentPathsHeaderSearchGlobal.cpp @@ -39,7 +39,7 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::save() std::vector paths; for (const FilePath& headerPath: m_list->getPathsAsDisplayed()) { - if (headerPath != ResourcePaths::getCxxCompilerHeaderPath()) + if (headerPath != ResourcePaths::getCxxCompilerHeaderDirectoryPath()) { paths.push_back(headerPath); } @@ -60,7 +60,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check() QString compilerHeaderPaths; for (const FilePath& headerPath: m_list->getPathsAsDisplayed()) { - if (headerPath != ResourcePaths::getCxxCompilerHeaderPath() && + if (headerPath != ResourcePaths::getCxxCompilerHeaderDirectoryPath() && headerPath.getCanonical().getConcatenated(L"/stdarg.h").exists()) { compilerHeaderPaths += QString::fromStdWString(headerPath.wstr()) + "\n"; @@ -103,7 +103,7 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::detectedPaths(const std::vec std::vector headerPaths; for (const FilePath& headerPath: paths) { - if (headerPath != ResourcePaths::getCxxCompilerHeaderPath()) + if (headerPath != ResourcePaths::getCxxCompilerHeaderDirectoryPath()) { headerPaths.push_back(headerPath); } @@ -141,6 +141,6 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::setPaths(const std::vectorsetPaths({}); - m_list->addPaths({ResourcePaths::getCxxCompilerHeaderPath()}, true); + m_list->addPaths({ResourcePaths::getCxxCompilerHeaderDirectoryPath()}, true); m_list->addPaths(paths); } diff --git a/src/lib_gui/qt/utility/QtHighlighter.cpp b/src/lib_gui/qt/utility/QtHighlighter.cpp index 991f6e06..83624f31 100644 --- a/src/lib_gui/qt/utility/QtHighlighter.cpp +++ b/src/lib_gui/qt/utility/QtHighlighter.cpp @@ -88,7 +88,7 @@ void QtHighlighter::loadHighlightingRules() } for (const FilePath& path: FileSystem::getFilePathsFromDirectory( - ResourcePaths::getSyntaxHighlightingRulesPath(), {L".rules"})) + ResourcePaths::getSyntaxHighlightingRulesDirectoryPath(), {L".rules"})) { std::wstring language = path.withoutExtension().fileName(); diff --git a/src/lib_gui/qt/utility/utilityQt.cpp b/src/lib_gui/qt/utility/utilityQt.cpp index 4763cd79..03180895 100644 --- a/src/lib_gui/qt/utility/utilityQt.cpp +++ b/src/lib_gui/qt/utility/utilityQt.cpp @@ -146,7 +146,7 @@ std::string getStyleSheet(const FilePath& path) } else if (val == "gui_path") { - val = ResourcePaths::getGuiPath().str(); + val = ResourcePaths::getGuiDirectoryPath().str(); size_t index = 0; while (true) diff --git a/src/lib_gui/qt/view/QtBookmarkButtonsView.cpp b/src/lib_gui/qt/view/QtBookmarkButtonsView.cpp index afcc51e9..b045908a 100644 --- a/src/lib_gui/qt/view/QtBookmarkButtonsView.cpp +++ b/src/lib_gui/qt/view/QtBookmarkButtonsView.cpp @@ -27,7 +27,7 @@ QtBookmarkButtonsView::QtBookmarkButtonsView(ViewLayout* viewLayout) m_widget->setLayout(layout); m_createBookmarkButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/edit_bookmark_icon.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/edit_bookmark_icon.png")); m_createBookmarkButton->setObjectName(QStringLiteral("bookmark_button")); m_createBookmarkButton->setToolTip(QStringLiteral("create a bookmark for the active symbol")); m_createBookmarkButton->setEnabled(false); @@ -40,7 +40,7 @@ QtBookmarkButtonsView::QtBookmarkButtonsView(ViewLayout* viewLayout) &QtBookmarkButtonsView::createBookmarkClicked); m_showBookmarksButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"bookmark_view/images/bookmark_list_icon.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/images/bookmark_list_icon.png")); m_showBookmarksButton->setObjectName(QStringLiteral("show_bookmark_button")); m_showBookmarksButton->setToolTip(QStringLiteral("Show bookmarks")); layout->addWidget(m_showBookmarksButton); @@ -60,7 +60,7 @@ void QtBookmarkButtonsView::createWidgetWrapper() void QtBookmarkButtonsView::refreshView() { m_onQtThread([=]() { - m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"bookmark_view/bookmark_view.css")) .c_str()); }); @@ -71,7 +71,7 @@ void QtBookmarkButtonsView::setCreateButtonState(const MessageBookmarkButtonStat m_onQtThread([=]() { m_createButtonState = state; - m_createBookmarkButton->setIconPath(ResourcePaths::getGuiPath().concatenate( + m_createBookmarkButton->setIconPath(ResourcePaths::getGuiDirectoryPath().concatenate( L"bookmark_view/images/edit_bookmark_icon.png")); if (state == MessageBookmarkButtonState::CAN_CREATE) @@ -86,7 +86,7 @@ void QtBookmarkButtonsView::setCreateButtonState(const MessageBookmarkButtonStat { m_createBookmarkButton->setEnabled(true); - m_createBookmarkButton->setIconPath(ResourcePaths::getGuiPath().concatenate( + m_createBookmarkButton->setIconPath(ResourcePaths::getGuiDirectoryPath().concatenate( L"bookmark_view/images/bookmark_active.png")); } else diff --git a/src/lib_gui/qt/view/QtCodeView.cpp b/src/lib_gui/qt/view/QtCodeView.cpp index 3594adf4..a587c1ff 100644 --- a/src/lib_gui/qt/view/QtCodeView.cpp +++ b/src/lib_gui/qt/view/QtCodeView.cpp @@ -265,7 +265,7 @@ void QtCodeView::setStyleSheet() const m_widget, ColorScheme::getInstance()->getColor("code/background")); std::string styleSheet = utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"code_view/code_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/code_view.css")); m_widget->setStyleSheet(styleSheet.c_str()); } diff --git a/src/lib_gui/qt/view/QtCustomTrailView.cpp b/src/lib_gui/qt/view/QtCustomTrailView.cpp index 6d7d7a16..7a37c1f1 100644 --- a/src/lib_gui/qt/view/QtCustomTrailView.cpp +++ b/src/lib_gui/qt/view/QtCustomTrailView.cpp @@ -443,9 +443,9 @@ void QtCustomTrailView::keyPressEvent(QKeyEvent* event) void QtCustomTrailView::updateStyleSheet() { std::string css = utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"search_view/search_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"search_view/search_view.css")); css += utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"custom_trail_view/custom_trail_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"custom_trail_view/custom_trail_view.css")); setStyleSheet(css.c_str()); @@ -497,7 +497,7 @@ QVBoxLayout* QtCustomTrailView::addFilters( mainLayout->addLayout(filterBLayout); QPixmap pixmap(QString::fromStdString( - ResourcePaths::getGuiPath().concatenate(L"custom_trail_view/images/circle.png").str())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"custom_trail_view/images/circle.png").str())); for (size_t i = 0; i < filters.size(); i++) { QCheckBox* checkBox = new QCheckBox(filters[i]); diff --git a/src/lib_gui/qt/view/QtErrorView.cpp b/src/lib_gui/qt/view/QtErrorView.cpp index b6127fc0..09996c10 100644 --- a/src/lib_gui/qt/view/QtErrorView.cpp +++ b/src/lib_gui/qt/view/QtErrorView.cpp @@ -29,7 +29,7 @@ QtErrorView::QtErrorView(ViewLayout* viewLayout) : ErrorView(viewLayout), m_controllerProxy(this, TabId::app()) { s_errorIcon = QIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/error.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"indexing_dialog/error.png").wstr())); setWidgetWrapper(std::make_shared(new QFrame())); @@ -126,7 +126,7 @@ QtErrorView::QtErrorView(ViewLayout* viewLayout) { m_editButton = new QtSelfRefreshIconButton( QStringLiteral("Edit Project"), - ResourcePaths::getGuiPath().concatenate(L"code_view/images/edit.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"code_view/images/edit.png"), "window/button"); m_editButton->setObjectName(QStringLiteral("screen_button")); m_editButton->setToolTip(QStringLiteral("edit project")); diff --git a/src/lib_gui/qt/view/QtGraphView.cpp b/src/lib_gui/qt/view/QtGraphView.cpp index 27d40a1b..81c72ac8 100644 --- a/src/lib_gui/qt/view/QtGraphView.cpp +++ b/src/lib_gui/qt/view/QtGraphView.cpp @@ -83,7 +83,7 @@ QtGraphView::QtGraphView(ViewLayout* viewLayout) { m_expandButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/graph.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/graph.png"), "search/button"); m_expandButton->setObjectName(QStringLiteral("expand_button")); m_expandButton->setToolTip(QStringLiteral("show trail controls")); @@ -100,7 +100,7 @@ QtGraphView::QtGraphView(ViewLayout* viewLayout) m_collapseButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/graph_arrow.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/graph_arrow.png"), "search/button", ui); m_collapseButton->setObjectName(QStringLiteral("collapse_button")); @@ -114,7 +114,7 @@ QtGraphView::QtGraphView(ViewLayout* viewLayout) m_customTrailButton->setIconSize(QSize(16, 16)); m_customTrailButton->setToolTip(QStringLiteral("custom trail")); m_customTrailButton->setIconPath( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/graph_custom.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/graph_custom.png")); connect( m_customTrailButton, &QPushButton::clicked, this, &QtGraphView::clickedCustomTrail); @@ -177,11 +177,11 @@ QtGraphView::QtGraphView(ViewLayout* viewLayout) { m_groupFileButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/file.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/file.png"), "search/button"); m_groupNamespaceButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/group_namespace.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/group_namespace.png"), "search/button"); m_groupFileButton->setObjectName(QStringLiteral("group_right_button")); @@ -238,7 +238,7 @@ void QtGraphView::refreshView() QtGraphicsView* view = getView(); const std::string css = utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"graph_view/graph_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/graph_view.css")); view->setStyleSheet(css.c_str()); view->setAppZoomFactor(GraphViewStyle::getZoomFactor()); @@ -930,9 +930,9 @@ void QtGraphView::updateTrailButtons() } m_forwardTrailButton->setIconPath( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/" + forwardImagePath)); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/" + forwardImagePath)); m_backwardTrailButton->setIconPath( - ResourcePaths::getGuiPath().concatenate(L"graph_view/images/" + backwardImagePath)); + ResourcePaths::getGuiDirectoryPath().concatenate(L"graph_view/images/" + backwardImagePath)); } void QtGraphView::switchToNewGraphData() diff --git a/src/lib_gui/qt/view/QtRefreshView.cpp b/src/lib_gui/qt/view/QtRefreshView.cpp index edb3c076..d4f31d80 100644 --- a/src/lib_gui/qt/view/QtRefreshView.cpp +++ b/src/lib_gui/qt/view/QtRefreshView.cpp @@ -22,7 +22,7 @@ QtRefreshView::QtRefreshView(ViewLayout* viewLayout): RefreshView(viewLayout) layout->setAlignment(Qt::AlignTop); QtSearchBarButton* refreshButton = new QtSearchBarButton( - ResourcePaths::getGuiPath().concatenate(L"refresh_view/images/refresh.png")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"refresh_view/images/refresh.png")); refreshButton->setObjectName(QStringLiteral("refresh_button")); refreshButton->setToolTip(QStringLiteral("refresh")); m_widget->connect(refreshButton, &QPushButton::clicked, []() { @@ -42,7 +42,7 @@ void QtRefreshView::createWidgetWrapper() void QtRefreshView::refreshView() { m_onQtThread([this]() { - m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"refresh_view/refresh_view.css")) .c_str()); }); diff --git a/src/lib_gui/qt/view/QtScreenSearchView.cpp b/src/lib_gui/qt/view/QtScreenSearchView.cpp index 6a60f785..3541e551 100644 --- a/src/lib_gui/qt/view/QtScreenSearchView.cpp +++ b/src/lib_gui/qt/view/QtScreenSearchView.cpp @@ -40,7 +40,7 @@ void QtScreenSearchView::refreshView() { m_onQtThread([=]() { m_bar->setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"screen_search_view/screen_search_view.css")) .c_str()); }); diff --git a/src/lib_gui/qt/view/QtSearchView.cpp b/src/lib_gui/qt/view/QtSearchView.cpp index 5e3117e4..6253726f 100644 --- a/src/lib_gui/qt/view/QtSearchView.cpp +++ b/src/lib_gui/qt/view/QtSearchView.cpp @@ -58,7 +58,7 @@ void QtSearchView::setAutocompletionList(const std::vector& autocom void QtSearchView::setStyleSheet() { const std::string css = utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"search_view/search_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"search_view/search_view.css")); m_widget->setStyleSheet(css.c_str()); diff --git a/src/lib_gui/qt/view/QtTabbedView.cpp b/src/lib_gui/qt/view/QtTabbedView.cpp index f7c65b34..58e01caf 100644 --- a/src/lib_gui/qt/view/QtTabbedView.cpp +++ b/src/lib_gui/qt/view/QtTabbedView.cpp @@ -28,7 +28,7 @@ QtTabbedView::QtTabbedView(ViewLayout* viewLayout, const std::string& name) m_closeButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"screen_search_view/images/close.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"screen_search_view/images/close.png"), "screen_search/button", widget); m_closeButton->setIconSize(QSize(15, 15)); @@ -68,7 +68,7 @@ void QtTabbedView::setStyleSheet() QtViewWidgetWrapper::getWidgetOfView(this), ColorScheme::getInstance()->getColor("tab/background")); - m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"tabbed_view/tabbed_view.css")) .c_str()); } diff --git a/src/lib_gui/qt/view/QtTabsView.cpp b/src/lib_gui/qt/view/QtTabsView.cpp index 27f1b7a6..fdded7da 100644 --- a/src/lib_gui/qt/view/QtTabsView.cpp +++ b/src/lib_gui/qt/view/QtTabsView.cpp @@ -41,7 +41,7 @@ QtTabsView::QtTabsView(ViewLayout* viewLayout) QPushButton* addButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"tabs_view/images/add.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"tabs_view/images/add.png"), "tab/bar/button"); addButton->setObjectName(QStringLiteral("add_button")); addButton->setIconSize(QSize(14, 14)); @@ -164,7 +164,7 @@ void QtTabsView::insertTab(bool showTab, const SearchMatch& match) QPushButton* closeButton = new QtSelfRefreshIconButton( QLatin1String(""), - ResourcePaths::getGuiPath().concatenate(L"tabs_view/images/close.png"), + ResourcePaths::getGuiDirectoryPath().concatenate(L"tabs_view/images/close.png"), "tab/bar/button"); closeButton->setObjectName(QStringLiteral("close_button")); closeButton->setIconSize(QSize(10, 10)); @@ -269,7 +269,7 @@ void QtTabsView::setTabState(int idx, const std::vector& matches) void QtTabsView::setStyleSheet() { const std::string css = utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"tabs_view/tabs_view.css")); + ResourcePaths::getGuiDirectoryPath().concatenate(L"tabs_view/tabs_view.css")); m_widget->setStyleSheet(css.c_str()); utility::setWidgetBackgroundColor( diff --git a/src/lib_gui/qt/view/QtTooltipView.cpp b/src/lib_gui/qt/view/QtTooltipView.cpp index ab4ce995..e1ebd6d7 100644 --- a/src/lib_gui/qt/view/QtTooltipView.cpp +++ b/src/lib_gui/qt/view/QtTooltipView.cpp @@ -20,7 +20,7 @@ void QtTooltipView::createWidgetWrapper() void QtTooltipView::refreshView() { m_onQtThread([=]() { - m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"tooltip_view/tooltip_view.css")) .c_str()); }); diff --git a/src/lib_gui/qt/view/QtUndoRedoView.cpp b/src/lib_gui/qt/view/QtUndoRedoView.cpp index 7548ae4c..e821166b 100644 --- a/src/lib_gui/qt/view/QtUndoRedoView.cpp +++ b/src/lib_gui/qt/view/QtUndoRedoView.cpp @@ -18,7 +18,7 @@ void QtUndoRedoView::createWidgetWrapper() void QtUndoRedoView::refreshView() { m_onQtThread([=]() { - m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"undoredo_view/undoredo_view.css")) .c_str()); }); diff --git a/src/lib_gui/qt/window/QtAbout.cpp b/src/lib_gui/qt/window/QtAbout.cpp index 0086e73c..c02d19a2 100644 --- a/src/lib_gui/qt/window/QtAbout.cpp +++ b/src/lib_gui/qt/window/QtAbout.cpp @@ -22,7 +22,7 @@ QSize QtAbout::sizeHint() const void QtAbout::setupAbout() { setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"about/about.css")).c_str()); + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"about/about.css")).c_str()); QVBoxLayout* windowLayout = new QVBoxLayout(); windowLayout->setContentsMargins(10, 10, 10, 0); @@ -31,7 +31,7 @@ void QtAbout::setupAbout() { QtDeviceScaledPixmap sourcetrailLogo(QString::fromStdWString( - ResourcePaths::getGuiPath().wstr() + L"about/logo_sourcetrail.png")); + ResourcePaths::getGuiDirectoryPath().wstr() + L"about/logo_sourcetrail.png")); sourcetrailLogo.scaleToHeight(150); QLabel* sourcetrailLogoLabel = new QLabel(this); sourcetrailLogoLabel->setPixmap(sourcetrailLogo.pixmap()); diff --git a/src/lib_gui/qt/window/QtBookmarkBrowser.cpp b/src/lib_gui/qt/window/QtBookmarkBrowser.cpp index a055ab6a..976c61f8 100644 --- a/src/lib_gui/qt/window/QtBookmarkBrowser.cpp +++ b/src/lib_gui/qt/window/QtBookmarkBrowser.cpp @@ -21,8 +21,8 @@ QtBookmarkBrowser::~QtBookmarkBrowser() {} void QtBookmarkBrowser::setupBookmarkBrowser() { setStyleSheet( - (utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")) + - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"bookmark_view/" + (utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/window.css")) + + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/" L"bookmark_view.css"))) .c_str()); diff --git a/src/lib_gui/qt/window/QtBookmarkCreator.cpp b/src/lib_gui/qt/window/QtBookmarkCreator.cpp index 3b708589..f53010e0 100644 --- a/src/lib_gui/qt/window/QtBookmarkCreator.cpp +++ b/src/lib_gui/qt/window/QtBookmarkCreator.cpp @@ -100,8 +100,8 @@ void QtBookmarkCreator::setupBookmarkCreator() void QtBookmarkCreator::refreshStyle() { setStyleSheet( - (utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")) + - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"bookmark_view/" + (utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/window.css")) + + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"bookmark_view/" L"bookmark_view.css"))) .c_str()); } diff --git a/src/lib_gui/qt/window/QtIndexingDialog.cpp b/src/lib_gui/qt/window/QtIndexingDialog.cpp index 1e957c6e..05a65a83 100644 --- a/src/lib_gui/qt/window/QtIndexingDialog.cpp +++ b/src/lib_gui/qt/window/QtIndexingDialog.cpp @@ -45,7 +45,7 @@ QWidget* QtIndexingDialog::createErrorWidget(QBoxLayout* layout) errorCount->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac errorCount->setIcon(QPixmap(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/error.png").wstr()))); + ResourcePaths::getGuiDirectoryPath().concatenate(L"indexing_dialog/error.png").wstr()))); errorLayout->addWidget(errorCount); QtHelpButton* helpButton = new QtHelpButton(QtHelpButtonInfo(createErrorHelpButtonInfo())); @@ -60,7 +60,7 @@ QWidget* QtIndexingDialog::createErrorWidget(QBoxLayout* layout) QLabel* QtIndexingDialog::createFlagLabel(QWidget* parent) { QtDeviceScaledPixmap flag(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/flag.png").wstr())); + ResourcePaths::getGuiDirectoryPath().concatenate(L"indexing_dialog/flag.png").wstr())); flag.scaleToWidth(120); QLabel* flagLabel = new QLabel(parent); @@ -84,8 +84,8 @@ QtIndexingDialog::QtIndexingDialog(bool isSubWindow, QWidget* parent) "}")); setStyleSheet( - (utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")) + - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/" + (utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/window.css")) + + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"indexing_dialog/" L"indexing_dialog.css"))) .c_str()); diff --git a/src/lib_gui/qt/window/QtKeyboardShortcuts.cpp b/src/lib_gui/qt/window/QtKeyboardShortcuts.cpp index c7f96087..0ec8e8d7 100644 --- a/src/lib_gui/qt/window/QtKeyboardShortcuts.cpp +++ b/src/lib_gui/qt/window/QtKeyboardShortcuts.cpp @@ -64,7 +64,7 @@ void QtKeyboardShortcuts::populateWindow(QWidget* widget) widget->setLayout(layout); - widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate( + widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate( L"keyboard_shortcuts/keyboard_shortcuts.css")) .c_str()); } diff --git a/src/lib_gui/qt/window/QtMainWindow.cpp b/src/lib_gui/qt/window/QtMainWindow.cpp index cae27560..7336e761 100644 --- a/src/lib_gui/qt/window/QtMainWindow.cpp +++ b/src/lib_gui/qt/window/QtMainWindow.cpp @@ -122,7 +122,7 @@ QtMainWindow::QtMainWindow() setDockNestingEnabled(true); setWindowIcon(QIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/logo_1024_1024.png").wstr()))); + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/logo_1024_1024.png").wstr()))); setWindowFlags(Qt::Widget); QApplication* app = dynamic_cast(QCoreApplication::instance()); @@ -134,7 +134,7 @@ QtMainWindow::QtMainWindow() { // can only be done once, because resetting the style on the QCoreApplication causes crash app->setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"main/scrollbar.css")) + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"main/scrollbar.css")) .c_str()); } @@ -291,7 +291,7 @@ View* QtMainWindow::findFloatingView(const std::string& name) const void QtMainWindow::loadLayout() { QSettings settings( - QString::fromStdWString(UserPaths::getWindowSettingsPath().wstr()), QSettings::IniFormat); + QString::fromStdWString(UserPaths::getWindowSettingsFilePath().wstr()), QSettings::IniFormat); settings.beginGroup(QStringLiteral("MainWindow")); resize(settings.value(QStringLiteral("size"), QSize(600, 400)).toSize()); @@ -308,7 +308,7 @@ void QtMainWindow::loadLayout() void QtMainWindow::loadDockWidgetLayout() { QSettings settings( - QString::fromStdWString(UserPaths::getWindowSettingsPath().wstr()), QSettings::IniFormat); + QString::fromStdWString(UserPaths::getWindowSettingsFilePath().wstr()), QSettings::IniFormat); this->restoreState(settings.value(QStringLiteral("DOCK_LOCATIONS")).toByteArray()); for (DockWidget dock: m_dockWidgets) @@ -328,7 +328,7 @@ void QtMainWindow::loadWindow(bool showStartWindow) void QtMainWindow::saveLayout() { QSettings settings( - QString::fromStdWString(UserPaths::getWindowSettingsPath().wstr()), QSettings::IniFormat); + QString::fromStdWString(UserPaths::getWindowSettingsFilePath().wstr()), QSettings::IniFormat); settings.beginGroup(QStringLiteral("MainWindow")); settings.setValue(QStringLiteral("maximized"), isMaximized()); @@ -406,7 +406,7 @@ void QtMainWindow::setContentEnabled(bool enabled) void QtMainWindow::refreshStyle() { setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"main/main.css")).c_str()); + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"main/main.css")).c_str()); QFont tooltipFont = QToolTip::font(); tooltipFont.setPixelSize(ApplicationSettings::getInstance()->getFontSize()); @@ -543,7 +543,7 @@ void QtMainWindow::showLicenses() void QtMainWindow::showDataFolder() { QDesktopServices::openUrl(QUrl( - QString::fromStdWString(L"file:///" + UserPaths::getUserDataPath().makeCanonical().wstr()), + QString::fromStdWString(L"file:///" + UserPaths::getUserDataDirectoryPath().makeCanonical().wstr()), QUrl::TolerantMode)); } @@ -751,10 +751,10 @@ void QtMainWindow::resetZoom() void QtMainWindow::resetWindowLayout() { - FileSystem::remove(UserPaths::getWindowSettingsPath()); + FileSystem::remove(UserPaths::getWindowSettingsFilePath()); FileSystem::copyFile( - ResourcePaths::getFallbackPath().concatenate(L"window_settings.ini"), - UserPaths::getWindowSettingsPath()); + ResourcePaths::getFallbackDirectoryPath().concatenate(L"window_settings.ini"), + UserPaths::getWindowSettingsFilePath()); loadDockWidgetLayout(); } diff --git a/src/lib_gui/qt/window/QtStartScreen.cpp b/src/lib_gui/qt/window/QtStartScreen.cpp index a9b5a79f..9d4bd827 100644 --- a/src/lib_gui/qt/window/QtStartScreen.cpp +++ b/src/lib_gui/qt/window/QtStartScreen.cpp @@ -82,19 +82,19 @@ void QtRecentProjectButton::handleButtonClick() QtStartScreen::QtStartScreen(QWidget* parent) : QtWindow(true, parent) , m_cppIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/cpp_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/cpp_icon.png").wstr())) , m_cIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/c_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/c_icon.png").wstr())) , m_pythonIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/python_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/python_icon.png").wstr())) , m_javaIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/java_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/java_icon.png").wstr())) , m_projectIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"icon/empty_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"icon/empty_icon.png").wstr())) , m_githubIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"startscreen/github_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"startscreen/github_icon.png").wstr())) , m_patreonIcon(QString::fromStdWString( - ResourcePaths::getGuiPath().concatenate(L"startscreen/patreon_icon.png").wstr())) + ResourcePaths::getGuiDirectoryPath().concatenate(L"startscreen/patreon_icon.png").wstr())) { } @@ -165,14 +165,14 @@ void QtStartScreen::updateButtons() i++; } setStyleSheet(utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"startscreen/startscreen.css")) + ResourcePaths::getGuiDirectoryPath().concatenate(L"startscreen/startscreen.css")) .c_str()); } void QtStartScreen::setupStartScreen() { setStyleSheet(utility::getStyleSheet( - ResourcePaths::getGuiPath().concatenate(L"startscreen/startscreen.css")) + ResourcePaths::getGuiDirectoryPath().concatenate(L"startscreen/startscreen.css")) .c_str()); addLogo(); diff --git a/src/lib_gui/qt/window/QtWindow.cpp b/src/lib_gui/qt/window/QtWindow.cpp index d8fb4e40..6489475b 100644 --- a/src/lib_gui/qt/window/QtWindow.cpp +++ b/src/lib_gui/qt/window/QtWindow.cpp @@ -25,7 +25,7 @@ QtWindow::QtWindow(bool isSubWindow, QWidget* parent) void QtWindow::setup() { setStyleSheet( - utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")).c_str()); + utility::getStyleSheet(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/window.css")).c_str()); QVBoxLayout* layout = new QVBoxLayout(); layout->setContentsMargins(10, 10, 10, 10); @@ -346,7 +346,7 @@ void QtWindow::setupDone() void QtWindow::addLogo() { QtDeviceScaledPixmap sourcetrailLogo( - QString::fromStdWString(ResourcePaths::getGuiPath().concatenate(L"window/logo.png").wstr())); + QString::fromStdWString(ResourcePaths::getGuiDirectoryPath().concatenate(L"window/logo.png").wstr())); sourcetrailLogo.scaleToWidth(240); QLabel* sourcetrailLogoLabel = new QLabel(this); diff --git a/src/lib_gui/qt/window/QtWindowBase.cpp b/src/lib_gui/qt/window/QtWindowBase.cpp index 9732d422..22296db9 100644 --- a/src/lib_gui/qt/window/QtWindowBase.cpp +++ b/src/lib_gui/qt/window/QtWindowBase.cpp @@ -89,7 +89,7 @@ void QtWindowBase::setSizeGripStyle(bool isBlack) " max-height: 16px;" " max-width: 16px;" " border-image: url(" + - ResourcePaths::getGuiPath().wstr() + L"window/" + path + + ResourcePaths::getGuiDirectoryPath().wstr() + L"window/" + path + L");" "}")); } diff --git a/src/lib_java/utility/utilityGradle.cpp b/src/lib_java/utility/utilityGradle.cpp index bc7f5c40..d0966977 100644 --- a/src/lib_java/utility/utilityGradle.cpp +++ b/src/lib_java/utility/utilityGradle.cpp @@ -17,7 +17,7 @@ namespace utility bool gradleCopyDependencies( const FilePath& projectDirectoryPath, const FilePath& outputDirectoryPath, bool addTestDependencies) { - const FilePath gradleInitScriptPath = ResourcePaths::getJavaPath().concatenate( + const FilePath gradleInitScriptPath = ResourcePaths::getJavaDirectoryPath().concatenate( L"gradle/init.gradle"); utility::setJavaHomeVariableIfNotExists(); @@ -48,7 +48,7 @@ bool gradleCopyDependencies( std::vector gradleGetAllSourceDirectories( const FilePath& projectDirectoryPath, bool addTestDirectories) { - const FilePath gradleInitScriptPath = ResourcePaths::getJavaPath().concatenate( + const FilePath gradleInitScriptPath = ResourcePaths::getJavaDirectoryPath().concatenate( L"gradle/init.gradle"); utility::setJavaHomeVariableIfNotExists(); diff --git a/src/lib_java/utility/utilityJava.cpp b/src/lib_java/utility/utilityJava.cpp index 7f866c33..87214e2e 100644 --- a/src/lib_java/utility/utilityJava.cpp +++ b/src/lib_java/utility/utilityJava.cpp @@ -59,7 +59,8 @@ std::string prepareJavaEnvironment() { classPath += separator; } - classPath += ResourcePaths::getJavaPath().concatenate(L"lib/" + jarNames[i]).str(); + classPath += + ResourcePaths::getJavaDirectoryPath().concatenate(L"lib/" + jarNames[i]).str(); } } diff --git a/src/test/SourceGroupTestSuite.cpp b/src/test/SourceGroupTestSuite.cpp index 6c64c25e..e78db1ce 100644 --- a/src/test/SourceGroupTestSuite.cpp +++ b/src/test/SourceGroupTestSuite.cpp @@ -511,8 +511,8 @@ TEST_CASE("sourcegroup java gradle generates expected output") std::shared_ptr applicationSettings = ApplicationSettings::getInstance(); - const FilePath storedAppPath = AppPath::getSharedDataPath(); - AppPath::setSharedDataPath(storedAppPath.getConcatenated(L"../app").makeAbsolute()); + const FilePath storedAppPath = AppPath::getSharedDataDirectoryPath(); + AppPath::setSharedDataDirectoryPath(storedAppPath.getConcatenated(L"../app").makeAbsolute()); std::vector storedJreSystemLibraryPaths = applicationSettings->getJreSystemLibraryPaths(); @@ -522,7 +522,7 @@ TEST_CASE("sourcegroup java gradle generates expected output") projectName, std::make_shared(sourceGroupSettings)); applicationSettings->setJreSystemLibraryPaths(storedJreSystemLibraryPaths); - AppPath::setSharedDataPath(storedAppPath); + AppPath::setSharedDataDirectoryPath(storedAppPath); # endif }