Skip to content

Commit

Permalink
Use the version number for the RPM spec file (#32)
Browse files Browse the repository at this point in the history
Don't hardcode the version in QML, but use
instead the one given in the RPM spec file;
closes issue #29.
  • Loading branch information
dcaliste authored Feb 3, 2024
1 parent be4f410 commit 4b5b678
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions FlowPlayer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TARGET = flowplayer

QT += core network sql xml

DEFINES += VERSION=\\\"$${VERSION}\\\"

CONFIG += link_pkgconfig
PKGCONFIG += gstreamer-1.0 libresource libresource-glib taglib
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Page {

Label {
color: Theme.secondaryHighlightColor
text: "version 0.3.1"
text: "version " + appVersion
font.pixelSize: Theme.fontSizeSmall
}
}
Expand Down
1 change: 1 addition & 0 deletions src/FlowPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ int main(int argc, char *argv[])
window->setTitle("FlowPlayer");

window->engine()->addImportPath("/usr/share/flowplayer/qml");
window->rootContext()->setContextProperty("appVersion", VERSION);

qmlRegisterType<Utils>("FlowPlayer", 1, 0, "Utils");
qmlRegisterType<CoverSearch>("FlowPlayer", 1, 0, "CoverSearch");
Expand Down

0 comments on commit 4b5b678

Please sign in to comment.