mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
change qapp applicationName to lower case
Summary: NB: this changes the standard config name of default constructed QSettings (a quick grep seems to suggest there is no default constructed QSettings though, so this should be fine). Aligning the applicationName with the spelling in the installation paths on case sensitive systems allows us to use QStandardPaths' built-in handling for application-specific paths instead of having to manually append /falkon to various paths. Test Plan: still seems to be working on linux Reviewers: drosca Reviewed By: drosca Differential Revision: https://phabricator.kde.org/D7721
This commit is contained in:
parent
eecaf2e9d6
commit
2b3b95ae36
@ -88,13 +88,12 @@ void DataPaths::init()
|
||||
#if defined(Q_OS_MACOS)
|
||||
m_paths[AppData].append(QApplication::applicationDirPath() + QLatin1String("/../Resources"));
|
||||
#elif defined(Q_OS_UNIX) && !defined(NO_SYSTEM_DATAPATH)
|
||||
// Add standard data lookup paths (our appname has a capital F so we manually construct
|
||||
// the final paths for now)
|
||||
for (const auto& location : QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) {
|
||||
m_paths[AppData].append(location + QLatin1String("/falkon"));
|
||||
m_paths[Translations].append(location + QLatin1String("/falkon/locale"));
|
||||
m_paths[Themes].append(location + QLatin1String("/falkon/themes"));
|
||||
m_paths[Plugins].append(location + QLatin1String("/falkon/plugins"));
|
||||
// Add standard data lookup paths
|
||||
for (const auto &location : QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)) {
|
||||
m_paths[AppData].append(location);
|
||||
m_paths[Translations].append(location + QLatin1String("/locale"));
|
||||
m_paths[Themes].append(location + QLatin1String("/themes"));
|
||||
m_paths[Plugins].append(location + QLatin1String("/plugins"));
|
||||
}
|
||||
#else
|
||||
m_paths[AppData].append(QApplication::applicationDirPath());
|
||||
@ -113,7 +112,7 @@ void DataPaths::init()
|
||||
#elif defined(Q_OS_MACOS)
|
||||
m_paths[Config].append(QDir::homePath() + QLatin1String("/Library/Application Support/Falkon"));
|
||||
#else // Unix
|
||||
m_paths[Config].append(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QL1S("/falkon"));
|
||||
m_paths[Config].append(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation));
|
||||
#endif
|
||||
|
||||
// Profiles
|
||||
@ -130,9 +129,7 @@ void DataPaths::init()
|
||||
|
||||
// Cache
|
||||
#ifdef Q_OS_UNIX
|
||||
const QString &cachePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation);
|
||||
if (!cachePath.isEmpty())
|
||||
m_paths[Cache].append(cachePath + QLatin1String("/falkon"));
|
||||
m_paths[Cache].append(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||
#endif
|
||||
|
||||
// Make sure the Config and Temp paths exists
|
||||
|
@ -107,7 +107,7 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
||||
|
||||
setApplicationName(QLatin1String("Falkon"));
|
||||
setApplicationName(QLatin1String("falkon"));
|
||||
setOrganizationDomain(QLatin1String("org.kde"));
|
||||
setWindowIcon(QIcon::fromTheme(QSL("qupzilla"), QIcon(QSL(":icons/exeicons/qupzilla-window.png"))));
|
||||
setDesktopFileName(QSL("org.kde.Falkon"));
|
||||
|
Loading…
Reference in New Issue
Block a user