From 56850aef55da2d05c30b92b0e11ac853a07a8aff Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 13 Jan 2023 15:57:27 +0200 Subject: [PATCH] Rename .desktop file names to reverse DNS convention. --- dist/AppImage/appimage.yml | 2 +- dist/rpm/valentina.spec | 6 +++--- .../{puzzle.desktop => ua.com.smart-pattern.puzzle.desktop} | 0 dist/{tape.desktop => ua.com.smart-pattern.tape.desktop} | 0 ...ntina.desktop => ua.com.smart-pattern.valentina.desktop} | 0 qbs/imports/VToolApp.qbs | 2 +- src/app/puzzle/main.cpp | 2 +- src/app/tape/main.cpp | 2 +- src/app/valentina/main.cpp | 2 +- src/app/valentina/valentina.pro | 6 +++--- 10 files changed, 11 insertions(+), 11 deletions(-) rename dist/{puzzle.desktop => ua.com.smart-pattern.puzzle.desktop} (100%) rename dist/{tape.desktop => ua.com.smart-pattern.tape.desktop} (100%) rename dist/{valentina.desktop => ua.com.smart-pattern.valentina.desktop} (100%) diff --git a/dist/AppImage/appimage.yml b/dist/AppImage/appimage.yml index 59ae86247..24406dec2 100644 --- a/dist/AppImage/appimage.yml +++ b/dist/AppImage/appimage.yml @@ -66,6 +66,6 @@ script: # bundle icu's data - mkdir -p $BUILD_APPDIR/usr/share/icu - cp /usr/share/icu/*/icudt*.dat $BUILD_APPDIR/usr/share/icu/ - - linuxdeployqt $BUILD_APPDIR/usr/share/applications/valentina.desktop -bundle-non-qt-libs -verbose=2 -no-strip + - linuxdeployqt $BUILD_APPDIR/usr/share/applications/ua.com.smart-pattern.valentina.desktop -bundle-non-qt-libs -verbose=2 -no-strip # Show what we have done - find $BUILD_APPDIR/ diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index 6acb1224c..2fe5e489a 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -216,9 +216,9 @@ fi %dir %{_datadir}/mime/ %dir %{_datadir}/mime/packages/ %{_datadir}/mime/packages/%{name}.xml -%{_datadir}/applications/%{name}.desktop -%{_datadir}/applications/tape.desktop -%{_datadir}/applications/puzzle.desktop +%{_datadir}/applications/ua.com.smart-pattern.valentina.desktop +%{_datadir}/applications/ua.com.smart-pattern.tape.desktop +%{_datadir}/applications/ua.com.smart-pattern.puzzle.desktop %{_datadir}/icons/hicolor diff --git a/dist/puzzle.desktop b/dist/ua.com.smart-pattern.puzzle.desktop similarity index 100% rename from dist/puzzle.desktop rename to dist/ua.com.smart-pattern.puzzle.desktop diff --git a/dist/tape.desktop b/dist/ua.com.smart-pattern.tape.desktop similarity index 100% rename from dist/tape.desktop rename to dist/ua.com.smart-pattern.tape.desktop diff --git a/dist/valentina.desktop b/dist/ua.com.smart-pattern.valentina.desktop similarity index 100% rename from dist/valentina.desktop rename to dist/ua.com.smart-pattern.valentina.desktop diff --git a/qbs/imports/VToolApp.qbs b/qbs/imports/VToolApp.qbs index bb035a140..fbf9902e1 100644 --- a/qbs/imports/VToolApp.qbs +++ b/qbs/imports/VToolApp.qbs @@ -25,7 +25,7 @@ VApp { name: "freedesktop" prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", FileInfo.pathSeparator()) files: [ - product.targetName + ".desktop" + "ua.com.smart-pattern." + product.targetName + ".desktop" ] } diff --git a/src/app/puzzle/main.cpp b/src/app/puzzle/main.cpp index 5964d2173..1b5bb9174 100644 --- a/src/app/puzzle/main.cpp +++ b/src/app/puzzle/main.cpp @@ -72,7 +72,7 @@ auto main(int argc, char *argv[]) -> int app.InitOptions(); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - app.setDesktopFileName("puzzle.desktop"); + VPApplication::setDesktopFileName(QStringLiteral("ua.com.smart-pattern.puzzle.desktop")); #endif QTimer::singleShot(0, &app, &VPApplication::ProcessCMD); diff --git a/src/app/tape/main.cpp b/src/app/tape/main.cpp index 3fc1f13ce..f5d58306e 100644 --- a/src/app/tape/main.cpp +++ b/src/app/tape/main.cpp @@ -69,7 +69,7 @@ auto main(int argc, char *argv[]) -> int app.InitOptions(); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - app.setDesktopFileName("tape.desktop"); + MApplication::setDesktopFileName(QStringLiteral("ua.com.smart-pattern.tape.desktop")); #endif QTimer::singleShot(0, &app, &MApplication::ProcessCMD); diff --git a/src/app/valentina/main.cpp b/src/app/valentina/main.cpp index 4d1bda49a..761bf9ba5 100644 --- a/src/app/valentina/main.cpp +++ b/src/app/valentina/main.cpp @@ -81,7 +81,7 @@ auto main(int argc, char *argv[]) -> int app.InitOptions(); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - app.setDesktopFileName("valentina.desktop"); + VApplication::setDesktopFileName(QStringLiteral("ua.com.smart-pattern.valentina.desktop")); #endif if (VApplication::IsGUIMode() && VAbstractApplication::VApp()->Settings()->IsAutomaticallyCheckUpdates()) diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 884b08639..bc2fbc4b4 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -154,9 +154,9 @@ unix{ # .desktop file desktop.path = $$DATADIR/applications/ - desktop.files += ../../../dist/$${TARGET}.desktop \ - desktop.files += ../../../dist/tape.desktop \ - desktop.files += ../../../dist/puzzle.desktop + desktop.files += ../../../dist/ua.com.smart-pattern.$${TARGET}.desktop \ + desktop.files += ../../../dist/ua.com.smart-pattern.tape.desktop \ + desktop.files += ../../../dist/ua.com.smart-pattern.puzzle.desktop # logo hicolor_48_apps.path = $$DATADIR/icons/hicolor/48x48/apps/