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 s...@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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to