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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.0
    • None
    • 0c5135a9d (dev), 6577e74a3 (6.5)

    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

            docteam Qt Documentation Team
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes