mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OP-1453 - Add mouse area to new version text that will launch the
software download page when clicked. Strip CR from end of version read from website.
This commit is contained in:
parent
b1b086e09a
commit
efeeb705b5
@ -117,10 +117,12 @@ Rectangle {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: textOpVersion.width + textOpVersionAvailable.width
|
width: textOpVersion.width + textOpVersionAvailable.width
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: textOpVersion
|
id: textOpVersion
|
||||||
color: "#c4c0c0"
|
color: "#c4c0c0"
|
||||||
text: welcomePlugin.versionString
|
text: welcomePlugin.versionString
|
||||||
|
verticalAlignment: Text.AlignTop
|
||||||
anchors.left: parent.anchors.left
|
anchors.left: parent.anchors.left
|
||||||
font.bold: true
|
font.bold: true
|
||||||
styleColor: "#00000000"
|
styleColor: "#00000000"
|
||||||
@ -136,7 +138,13 @@ Rectangle {
|
|||||||
styleColor: "#00000000"
|
styleColor: "#00000000"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
anchors.right: parent.right
|
anchors.left: textOpVersion.right
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
onClicked: welcomePlugin.openUrl("http://wiki.openpilot.org/display/BUILDS/OpenPilot+Software+Downloads")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,10 +153,11 @@ void WelcomeMode::networkResponseReady(QNetworkReply* reply)
|
|||||||
if(reply != NULL)
|
if(reply != NULL)
|
||||||
{
|
{
|
||||||
QString version(reply->readAll());
|
QString version(reply->readAll());
|
||||||
|
QString trimmedVersion = version.trimmed();
|
||||||
|
|
||||||
if(version != VersionInfo::revision())
|
if(trimmedVersion != VersionInfo::tagOrHash8())
|
||||||
{
|
{
|
||||||
m_newVersionText = tr("(Update Available: %1)").arg(version);
|
m_newVersionText = tr("(Update Available: %1) ").arg(trimmedVersion);
|
||||||
emit newVersionTextChanged();
|
emit newVersionTextChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
}
|
}
|
||||||
QString versionString() const
|
QString versionString() const
|
||||||
{
|
{
|
||||||
return tr("OpenPilot GCS Version: %1").arg(VersionInfo::revision());
|
return tr("OpenPilot GCS Version: %1 ").arg(VersionInfo::tagOrHash8());
|
||||||
}
|
}
|
||||||
QString newVersionText() const
|
QString newVersionText() const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user