Changed: Install shorcuts in Applications instead of /Applications

This commit is contained in:
kervala 2016-10-15 17:13:51 +02:00
parent eeb2f09a08
commit 8ea1c911c2

View file

@ -307,7 +307,16 @@ QString CConfigFile::getDesktopDirectory() const
QString CConfigFile::getMenuDirectory() const QString CConfigFile::getMenuDirectory() const
{ {
return QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/" + QApplication::applicationName(); QString applicationLocation;
#ifdef O_OS_MAC
// QStandardPaths::ApplicationsLocation returns read-only location so fix it, will be installed in ~/Applications
applicationLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Applications";
#else
applicationLocation = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
#endif
return applicationLocation + "/" + QApplication::applicationName();
} }
bool CConfigFile::has64bitsOS() bool CConfigFile::has64bitsOS()