Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
901e0b13
Commit
901e0b13
authored
Sep 10, 2009
by
Ludovic Fauvet
Browse files
Print the version number into the about dialog
parent
20266b06
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/GUI/About.cpp
View file @
901e0b13
...
...
@@ -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
()
)
);
}
...
...
src/GUI/About.h
View file @
901e0b13
...
...
@@ -23,6 +23,7 @@
#ifndef ABOUT_H
#define ABOUT_H
#include
<QApplication>
#include
<QPlainTextEdit>
#include
"ui_About.h"
...
...
src/GUI/ui/About.ui
View file @
901e0b13
...
...
@@ -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"
>
...
...
src/main.cpp
View file @
901e0b13
...
...
@@ -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
()
);
...
...
vlmc.pro
View file @
901e0b13
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment