Commit 901e0b13 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Print the version number into the about dialog

parent 20266b06
......@@ -36,6 +36,9 @@ About::About( QWidget *parent ) :
setText( ":/text/AUTHORS", m_ui.plainTextEditAuthors );
setText( ":/text/TRANSLATORS", m_ui.plainTextEditTranslators );
setText( ":/text/COPYING", m_ui.plainTextEditLicense );
m_ui.labelVersion->setText(
m_ui.labelVersion->text().arg( qApp->applicationVersion() )
);
connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( deleteLater() ) );
}
......
......@@ -23,6 +23,7 @@
#ifndef ABOUT_H
#define ABOUT_H
#include <QApplication>
#include <QPlainTextEdit>
#include "ui_About.h"
......
......@@ -75,7 +75,31 @@ p, li { white-space: pre-wrap; }
<attribute name="title">
<string>About</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2"/>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>10</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelVersion">
<property name="text">
<string>Version: %1</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Authors">
<attribute name="title">
......
......@@ -29,6 +29,13 @@
#include <QApplication>
#include "MainWindow.h"
#ifndef VLMC_VERSION
#define VLMC_VERSION Unknown
#endif
#define EXPAND(x) #x
#define STRINGIFY(x) EXPAND(x)
/**
* VLMC Entry point
* \brief this is the VLMC entry point
......@@ -42,6 +49,7 @@ int main( int argc, char **argv )
app.setApplicationName( "vlmc" );
app.setOrganizationName( "vlmc" );
app.setOrganizationDomain( "vlmc.org" );
app.setApplicationVersion( STRINGIFY(VLMC_VERSION) );
QSettings::setDefaultFormat( QSettings::IniFormat );
Preferences::changeLang( QSettings().value( "Lang" ).toString() );
......
......@@ -2,6 +2,7 @@ TARGET = vlmc
DESTDIR = bin
CONFIG += debug
TEMPLATE = app
VERSION = 0.0.1
OBJECTS_DIR = build
MOC_DIR = build/moc
UI_DIR = build/ui
......@@ -142,5 +143,6 @@ INCLUDEPATH += src/LibVLCpp \
LIBS = -L/usr/local/lib \
-lvlc
SUBDIRS += modules
DEFINES += VLMC_VERSION="$$VERSION"
CODECFORTR = UTF-8
include(locale.pri)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment