Fixx some typos in #15.

This commit is contained in:
Martin Rotter 2016-06-23 19:53:26 +02:00
parent cb63b96304
commit ef1204828c
3 changed files with 8 additions and 6 deletions

View File

@ -581,8 +581,8 @@ unix:!mac {
desktop_file.files = resources/desktop/$${TARGET}.desktop desktop_file.files = resources/desktop/$${TARGET}.desktop
desktop_file.path = $$quote($$PREFIX/share/applications/) desktop_file.path = $$quote($$PREFIX/share/applications/)
desktop_file_autostart.files = resources/desktop/$${TARGET}.autostart desktop_file_autostart.files = resources/desktop/$${TARGET}.desktop.autostart
desktop_file_autostart.path = $$quote($$PREFIX/share/$$TARGET/autostart/) desktop_file_autostart.path = $$quote($$PREFIX/share/$${TARGET}/autostart/)
translations.files = $$OUT_PWD/l10n translations.files = $$OUT_PWD/l10n
translations.path = $$quote($$PREFIX/share/$$TARGET/) translations.path = $$quote($$PREFIX/share/$$TARGET/)

View File

@ -207,7 +207,7 @@
#endif #endif
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
#define APP_DESKTOP_ENTRY_PATH APP_PREFIX + QString("/share/autostart") #define APP_DESKTOP_ENTRY_PATH APP_PREFIX + QString("/share/rssguard/autostart")
#define APP_DESKTOP_SOURCE_ENTRY_FILE "rssguard.desktop.autostart" #define APP_DESKTOP_SOURCE_ENTRY_FILE "rssguard.desktop.autostart"
#define APP_DESKTOP_ENTRY_FILE "rssguard.desktop" #define APP_DESKTOP_ENTRY_FILE "rssguard.desktop"
#define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n") #define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n")

View File

@ -147,7 +147,7 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) {
const QString destination_file = getAutostartDesktopFileLocation(); const QString destination_file = getAutostartDesktopFileLocation();
switch (new_status) { switch (new_status) {
case SystemFactory::Enabled: case SystemFactory::Enabled: {
if (QFile::exists(destination_file)) { if (QFile::exists(destination_file)) {
if (!QFile::remove(destination_file)) { if (!QFile::remove(destination_file)) {
return false; return false;
@ -158,8 +158,10 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) {
return false; return false;
} }
return QFile::copy(QString(APP_DESKTOP_ENTRY_PATH) + QDir::separator() + APP_DESKTOP_SOURCE_ENTRY_FILE, const QString source_autostart_desktop_file = QString(APP_DESKTOP_ENTRY_PATH) + QDir::separator() + APP_DESKTOP_SOURCE_ENTRY_FILE;
getAutostartDesktopFileLocation());
return QFile::copy(source_autostart_desktop_file, getAutostartDesktopFileLocation());
}
case SystemFactory::Disabled: case SystemFactory::Disabled:
return QFile::remove(getAutostartDesktopFileLocation()); return QFile::remove(getAutostartDesktopFileLocation());