<div dir="ltr"><div><div><div><div>hi,<br></div>to get version of MY app while running I'm creating a variable :<br></div><div><br></div><div>in .spec, add / change :</div><div>%qtc_qmake5  \<br>    VERSION=%{version}</div><div><br></div><div>in .pro add :<br>DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"<br><br></div>then in cpp, set version to the QGuiApplication :<br>app->setApplicationVersion(QString(APP_VERSION));<br><br></div>from qml :<br>Qt.application.version</div><div><br></div><div>from cpp :</div><div>QCoreApplication::applicationVersion();</div><div><br></div>Note, when you change version number, you need to to a full clean/rebuild<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-03 8:59 GMT+02:00 Dylan Van Assche via Devel <span dir="ltr"><<a href="mailto:devel@lists.sailfishos.org" target="_blank">devel@lists.sailfishos.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<br></div><div><br></div><div>I'm trying to update the application version everytime I change it in the .SPEC file but it seems that there's no Harbour allowed API is available to querry the application version when running?<br></div><div>My last help would be parsing a "pkcon search name <app>" but if there's a better method available, that would be great.<br></div><div><br></div><div>Kind regards,<br></div><div>Dylan Van Assche</div><div class="m_-3895827894974958164protonmail_signature_block m_-3895827894974958164protonmail_signature_block-empty"><div class="m_-3895827894974958164protonmail_signature_block-user m_-3895827894974958164protonmail_signature_block-empty"><div><br></div></div><div class="m_-3895827894974958164protonmail_signature_block-proton m_-3895827894974958164protonmail_signature_block-empty"><br></div></div><div><br></div><br>______________________________<wbr>_________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.<wbr>sailfishos.org</a><br></blockquote></div><br></div>