[SailfishDevel] applicationDisplayName and applicationName
Matthias Fehring
buschmann at huessenbergnetz.de
Fri Mar 20 12:51:53 UTC 2015
Hey Stefan,
this behaviour is correct.The entries in the desktop file are not connected to
the properties of QGuiApplication and QCoreApplication.
QCoreApplication.applicationName is used to name configuration directories for
QSettings. If it is not set, it takes the executable name (harbour-myapp). [0]
You can use this name inside QML via Qt.application.name . [1]
QGuiApplication.applicationDisplayName is not used by SailfishOS/Silica. It
would for example be used by windows managers to display the set name in the
window top border. [2]
Best greetings
Buschmann
[0] http://doc.qt.io/qt-5/qcoreapplication.html#applicationName-prop
[1] http://doc.qt.io/qt-5/qml-qtqml-qt.html#application-prop
[2] http://doc.qt.io/qt-5/qguiapplication.html#applicationDisplayName-prop
Am Freitag, 20. März 2015, 12:49:44 schrieb stol at bredband.net:
> Hi
>
> [...]
>
> If my
> harbour-myapp.desktop file look like this
>
> [Desktop
> Entry]
> Type=Application
> X-Nemo-Application-Type=silica-qt5
> Icon=harbour-myapp
> Exec=harbour-myapp
> Name=MyApp
> Name[de]=MyApp
>
>
> And I do
>
> QGuiApplication app(argc, argv);
> appDispName =
> app.applicationDisplayName();
> appName = app.applicationName();
>
> I would
> expect that
>
> appDispName="myApp"
> appName = harbour-myapp
>
> but they
> don't, both are "harbour-myapp", is this correct ?
> (in the emulator i
> can see that the emulator is reading the application display name
> desktop file correctly
> because when i remove the application is says
> MyApp.
>
> Or should i use other function calls to "read" the entries in
> the desktop file ?
>
> /Stefan
--
Das Gesetz hat zum Schneckengang verdorben, was Adlerflug geworden wäre.
(Friedrich Schiller - Die Räuber)
Und der Buschfunk spielt gerade "Zuviel für Berlin" von "Pascow".
www.buschmann23.de
GPG-Key: 0x614C3258
GPG Fingerprint: B770 E0D0 69CF BFC1 5FE1 D78E 3A70 A936 614C 3258
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150320/b3c9ac33/attachment.pgp>
More information about the Devel
mailing list