diff --git a/CMakeLists.txt b/CMakeLists.txt index 168dd6507..ac0b84241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ add_compile_definitions( APP_URL="${APP_URL}" APP_LONG_NAME="${APP_NAME} ${CMAKE_PROJECT_VERSION}" APP_LOW_NAME="${CMAKE_PROJECT_NAME}" - APP_REVERSE_NAME="com.github.${CMAKE_PROJECT_NAME}" + APP_REVERSE_NAME="${APP_REVERSE_NAME}" QT_USE_QSTRINGBUILDER QT_USE_FAST_CONCATENATION diff --git a/src/librssguard/miscellaneous/systemfactory.cpp b/src/librssguard/miscellaneous/systemfactory.cpp index 2493d9b2b..9d1986d76 100644 --- a/src/librssguard/miscellaneous/systemfactory.cpp +++ b/src/librssguard/miscellaneous/systemfactory.cpp @@ -188,14 +188,12 @@ bool SystemFactory::setAutoStartStatus(AutoStartStatus new_status) { .toStdList(); args = FROM_STD_LIST(QStringList, std_args); - QString app_run_line = args.join(QL1C(' ')); - desktop_file_contents = desktop_file_contents.arg(args.at(0), app_run_line); - - // #if defined(IS_FLATPAK_BUILD) - // desktop_file_contents = desktop_file_contents.arg(QSL("flatpak run %1").arg(QSL(APP_REVERSE_NAME))); - // #else - // desktop_file_contents = desktop_file_contents.arg(QSL(APP_LOW_NAME)); - // #endif +#if defined(IS_FLATPAK_BUILD) + desktop_file_contents = + desktop_file_contents.arg(QSL("flatpak run %1").arg(QSL(APP_REVERSE_NAME)), args.mid(1).join(QL1C(' '))); +#else + desktop_file_contents = desktop_file_contents.arg(args.at(0), args.join(QL1C(' '))); +#endif IOFactory::writeFile(destination_file, desktop_file_contents.toUtf8()); }