Commit 2152dbbd authored by Karel Slaný's avatar Karel Slaný

Removed loadVersion() and sendVersionData().

parent 352e2b2c
......@@ -179,9 +179,6 @@ ApplicationWindow {
visible: false
anchors.fill: parent
color: "transparent"
Component.onCompleted: {
settings.loadVersion()
}
Column {
spacing: formItemVerticalSpacing
anchors.centerIn: parent
......@@ -244,15 +241,9 @@ ApplicationWindow {
id: versionLabel
anchors.horizontalCenter: parent.horizontalCenter
color: datovkaPalette.text
text: qsTr("Version") + ": 1.0.0"
text: qsTr("Version") + ": " + settings.appVersion()
}
}
Connections {
target: settings
onSendVersionData: {
versionLabel.text = qsTr("Version") + ": " + version
}
}
Connections {
target: settings
onSendPinReply: {
......
......@@ -29,9 +29,6 @@ Component {
id: aboutDialog
Item {
id: aboutLayout
Component.onCompleted: {
settings.loadVersion()
}
property int myWidht: aboutLayout.width - 2 * defaultMargin
Rectangle {
id: header
......@@ -99,7 +96,7 @@ Component {
anchors.horizontalCenter: parent.horizontalCenter
font.bold: true
color: datovkaPalette.text
text: qsTr("Version") + ": " + qsTr("unknown")
text: qsTr("Version") + ": " + settings.appVersion()
}
Text {
id: infoLabel
......@@ -140,12 +137,6 @@ Component {
onLinkActivated: Qt.openUrlExternally("http://www.nic.cz/")
text: "<a href=\"http://www.nic.cz\">www.nic.cz</a>"
}
Connections {
target: settings
onSendVersionData: {
versionLabel.text = qsTr("Version") + ": " + version
}
}
}
}
ListModel {
......
......@@ -38,24 +38,11 @@ GlobalSettingsQmlWrapper::GlobalSettingsQmlWrapper(QObject *parent)
{
}
GlobalSettingsQmlWrapper::~GlobalSettingsQmlWrapper(void)
{
}
/* ========================================================================= */
/*
* Slot: Load application version string.
*/
void GlobalSettingsQmlWrapper::loadVersion(void)
/* ========================================================================= */
QString GlobalSettingsQmlWrapper::appVersion(void) const
{
/* Send data to QML */
emit sendVersionData(VERSION);
return QStringLiteral(VERSION);
}
/* ========================================================================= */
/*
* Slot: Load current global settings from global structure.
......
......@@ -39,18 +39,15 @@ public:
/*!
* @brief Constructor.
*/
GlobalSettingsQmlWrapper(QObject* parent = 0);
GlobalSettingsQmlWrapper(QObject* parent = Q_NULLPTR);
/*!
* @brief Destructor.
*/
~GlobalSettingsQmlWrapper(void);
/*!
* @brief Load application version string.
* @brief Get application version string.
*
* @return Application version string.
*/
Q_INVOKABLE
void loadVersion(void);
QString appVersion(void) const;
/*!
* @brief Load current global settings.
......@@ -157,14 +154,6 @@ public:
void setInactivityInterval(int secs);
signals:
/*!
* @brief Send application version to about QML.
*
* @param[in] version - Version string.
*/
void sendVersionData(QString version);
/*!
* @brief Send current general settings to QML.
*
......
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