<div dir="ltr">Wikipedia project uses similar idea passing version string from yaml to pro to cpp to qml. And project is small (mostly educational), so it's easy to see. You can check it out at <a href="https://github.com/amarchen/Wikipedia">https://github.com/amarchen/Wikipedia</a><div><br></div><div>Cheers,</div><div>Artem.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 10:21 AM, Luca Donaggio <span dir="ltr"><<a href="mailto:donaggio@gmail.com" target="_blank">donaggio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>This is the way I solved #1:<br><br></div>a) in your .yaml add the lines:<br><br>QMakeOptions:<br>- VERSION=%{version}<br><br></div>b) in your .pro add the lines:<br><br># App version<br>DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"<br><br></div>c) in your .c's main() function add the lines:<br><br>    QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));<br><br>    app->setApplicationVersion(QString(APP_VERSION));<br><br></div>d) now your app's version is available in QML through<br><br>Qt.application.version<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 23, 2014 at 5:44 PM, Alfonso Martone <span dir="ltr"><<a href="mailto:alfq@bk.ru" target="_blank">alfq@bk.ru</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Sorry to ask here, but I wasn't able to get some official
    guidelines.<br>
    <br>
    1) Version/Release numbers:<br>
    <br>
    - I have to place them both in the <i>.yaml </i>file (for RPM
    build) and in some <i>.h</i> or <i>.qml </i>source (to show it in
    some "about" dialog): is there a way to define the Version/Release
    numbers in a <i>single</i> file of the project, making them
    available to C++, QML and RPM-build ?<br>
    <br>
    2) from time to time my software has to write some output file
    (collected data) that the user may use in another app:<br>
    <br>
    - is it correct to save in <i>$HOME/Documents</i> ?<br>
    <br>
    Thanks.<br>
  </div>

<br></div></div>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Luca Donaggio</div>
</font></span></div>
<br>_______________________________________________<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.sailfishos.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Artem Marchenko<br><a href="http://agilesoftwaredevelopment.com" target="_blank">http://agilesoftwaredevelopment.com</a><br><a href="http://twitter.com/AgileArtem" target="_blank">http://twitter.com/AgileArtem</a></div>
</div>