From ef1204828c9f5213b881d16e13ecdf63c24393f6 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 23 Jun 2016 19:53:26 +0200 Subject: [PATCH] Fixx some typos in #15. --- rssguard.pro | 4 ++-- src/definitions/definitions.h | 2 +- src/miscellaneous/systemfactory.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rssguard.pro b/rssguard.pro index 6f0cb43f7..71a432a00 100755 --- a/rssguard.pro +++ b/rssguard.pro @@ -581,8 +581,8 @@ unix:!mac { desktop_file.files = resources/desktop/$${TARGET}.desktop desktop_file.path = $$quote($$PREFIX/share/applications/) - desktop_file_autostart.files = resources/desktop/$${TARGET}.autostart - desktop_file_autostart.path = $$quote($$PREFIX/share/$$TARGET/autostart/) + desktop_file_autostart.files = resources/desktop/$${TARGET}.desktop.autostart + desktop_file_autostart.path = $$quote($$PREFIX/share/$${TARGET}/autostart/) translations.files = $$OUT_PWD/l10n translations.path = $$quote($$PREFIX/share/$$TARGET/) diff --git a/src/definitions/definitions.h b/src/definitions/definitions.h index 4f67eb205..4286c260d 100755 --- a/src/definitions/definitions.h +++ b/src/definitions/definitions.h @@ -207,7 +207,7 @@ #endif #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_ENTRY_FILE "rssguard.desktop" #define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n") diff --git a/src/miscellaneous/systemfactory.cpp b/src/miscellaneous/systemfactory.cpp index 40f22a1ce..251cee6e7 100755 --- a/src/miscellaneous/systemfactory.cpp +++ b/src/miscellaneous/systemfactory.cpp @@ -147,7 +147,7 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) { const QString destination_file = getAutostartDesktopFileLocation(); switch (new_status) { - case SystemFactory::Enabled: + case SystemFactory::Enabled: { if (QFile::exists(destination_file)) { if (!QFile::remove(destination_file)) { return false; @@ -158,8 +158,10 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) { return false; } - return QFile::copy(QString(APP_DESKTOP_ENTRY_PATH) + QDir::separator() + APP_DESKTOP_SOURCE_ENTRY_FILE, - getAutostartDesktopFileLocation()); + const QString source_autostart_desktop_file = QString(APP_DESKTOP_ENTRY_PATH) + QDir::separator() + APP_DESKTOP_SOURCE_ENTRY_FILE; + + return QFile::copy(source_autostart_desktop_file, getAutostartDesktopFileLocation()); + } case SystemFactory::Disabled: return QFile::remove(getAutostartDesktopFileLocation());