src: specify if file or directory path is returned by helpers (#1146)
This commit is contained in:
+2
-2
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<ApplicationSettings> 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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
@@ -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/");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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<std::wstring> 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())
|
||||
{
|
||||
|
||||
@@ -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<std::wstring>(
|
||||
"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<FilePath> ApplicationSettings::getRecentProjects() const
|
||||
}
|
||||
else
|
||||
{
|
||||
recentProjects.push_back(UserPaths::getUserDataPath().concatenate(project));
|
||||
recentProjects.push_back(UserPaths::getUserDataDirectoryPath().concatenate(project));
|
||||
}
|
||||
}
|
||||
return recentProjects;
|
||||
|
||||
@@ -83,11 +83,11 @@ std::vector<std::wstring> 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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,7 +15,7 @@ QtStatusBar::QtStatusBar(): m_text(this), m_ideStatusText(this)
|
||||
addWidget(new QWidget()); // add some space
|
||||
|
||||
m_movie = std::make_shared<QMovie>(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);
|
||||
|
||||
@@ -56,7 +56,7 @@ QtBookmark::QtBookmark(ControllerProxy<BookmarkController>* 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<BookmarkController>* 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")));
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ QtBookmarkCategory::QtBookmarkCategory(ControllerProxy<BookmarkController>* 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<BookmarkController>* 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")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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(""),
|
||||
|
||||
@@ -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")) +
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<SearchMatch>& 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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -371,7 +371,7 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font)
|
||||
m_charHeight2 = static_cast<float>(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<int>(m_charWidth2));
|
||||
m_arrow.colorize(ColorScheme::getInstance()->getColor("search/popup/by_text").c_str());
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -87,7 +87,7 @@ void QtGraphNodeData::updateStyle()
|
||||
TokenComponentFilePath* component = m_data->getComponent<TokenComponentFilePath>();
|
||||
if (component && !component->isComplete())
|
||||
{
|
||||
style.iconPath = ResourcePaths::getGuiPath().concatenate(
|
||||
style.iconPath = ResourcePaths::getGuiDirectoryPath().concatenate(
|
||||
L"graph_view/images/file_incomplete.png");
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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/<jdk_version>/Contents/MacOS/libjli.dylib"));
|
||||
m_javaPath->setPlaceholderText(QStringLiteral(
|
||||
"/Library/Java/JavaVirtualMachines/<jdk_version>/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("<maven_path>/bin/mvn.cmd"));
|
||||
#else
|
||||
#else
|
||||
m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn)"));
|
||||
m_mavenPath->setPlaceholderText(QStringLiteral("<binarypath>/mvn"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
addLabelAndWidget(QStringLiteral("Maven Path"), m_mavenPath, layout, row);
|
||||
|
||||
|
||||
@@ -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()));
|
||||
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::save()
|
||||
std::vector<FilePath> 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<FilePath> 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::vector<F
|
||||
}
|
||||
|
||||
m_list->setPaths({});
|
||||
m_list->addPaths({ResourcePaths::getCxxCompilerHeaderPath()}, true);
|
||||
m_list->addPaths({ResourcePaths::getCxxCompilerHeaderDirectoryPath()}, true);
|
||||
m_list->addPaths(paths);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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<QtViewWidgetWrapper>(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"));
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ void QtSearchView::setAutocompletionList(const std::vector<SearchMatch>& 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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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<SearchMatch>& 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(
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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<QApplication*>(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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");"
|
||||
"}"));
|
||||
}
|
||||
|
||||
@@ -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<FilePath> gradleGetAllSourceDirectories(
|
||||
const FilePath& projectDirectoryPath, bool addTestDirectories)
|
||||
{
|
||||
const FilePath gradleInitScriptPath = ResourcePaths::getJavaPath().concatenate(
|
||||
const FilePath gradleInitScriptPath = ResourcePaths::getJavaDirectoryPath().concatenate(
|
||||
L"gradle/init.gradle");
|
||||
|
||||
utility::setJavaHomeVariableIfNotExists();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -511,8 +511,8 @@ TEST_CASE("sourcegroup java gradle generates expected output")
|
||||
|
||||
std::shared_ptr<ApplicationSettings> 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<FilePath> storedJreSystemLibraryPaths =
|
||||
applicationSettings->getJreSystemLibraryPaths();
|
||||
@@ -522,7 +522,7 @@ TEST_CASE("sourcegroup java gradle generates expected output")
|
||||
projectName, std::make_shared<SourceGroupJavaGradle>(sourceGroupSettings));
|
||||
|
||||
applicationSettings->setJreSystemLibraryPaths(storedJreSystemLibraryPaths);
|
||||
AppPath::setSharedDataPath(storedAppPath);
|
||||
AppPath::setSharedDataDirectoryPath(storedAppPath);
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user