Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75521

Be precise in API dox of QGuiApplication::desktopFileName whether .desktop suffix is included

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      By real world samples (like searching github or KDE software sources) it seems people are not sure whether to include or not to include the ".desktop" suffix for the value passed in QGuiApplication::desktopFileName . So it would help to explicitly state this in the API dox.

      My proposal would be:

      favour the suffix-less variant in the API dox, given that usually any processing code only needs the suffix-less variant (actually there might be only one, which isĀ  QWaylandWindow::initWindow()). At the same time state that for backward compatibility with some clients also a .desktop suffix is supported and could be expected as value, but deprecated in use.

      By the real world examples using that property, the majority of KDE software sets the desktopFileName property via KF KCoreAddons' KAboutData class (cmp. API dox , which itself expects the value without the suffix and also passes it on to QGuiApplication without the suffix.

      Same for felt half of hits on github.

      When fixing the API dox, the related test in qtbase/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp should be adapted as well, given it serves some people as sample.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kossebau Friedrich W. H. Kossebau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes