Warning if XSwiftBus version does not match swift pilot client version

This commit is contained in:
Klaus Basan
2019-03-10 03:12:50 +01:00
committed by Mat Sutcliffe
parent f90486fcdc
commit 3dd13051e5
2 changed files with 24 additions and 4 deletions

View File

@@ -14,9 +14,11 @@
#include "blackmisc/network/networkutils.h" #include "blackmisc/network/networkutils.h"
#include "blackmisc/db/distributionlist.h" #include "blackmisc/db/distributionlist.h"
#include "blackmisc/logmessage.h" #include "blackmisc/logmessage.h"
#include "blackmisc/stringutils.h"
#include "blackconfig/buildconfig.h" #include "blackconfig/buildconfig.h"
#include<QDesktopServices> #include <QDesktopServices>
#include <QMessageBox>
using namespace BlackConfig; using namespace BlackConfig;
using namespace BlackCore::Application; using namespace BlackCore::Application;
@@ -119,14 +121,23 @@ namespace BlackGui
void CUpdateInfoComponent::downloadXSwiftBusDialog() void CUpdateInfoComponent::downloadXSwiftBusDialog()
{ {
const QString currentXsb = ui->cb_ArtifactsXsb->currentText();
const QString currentSwift = ui->cb_ArtifactsPilotClient->currentText();
if (!stringCompare(currentXsb, currentSwift, Qt::CaseInsensitive))
{
const QString msg = QStringLiteral("XSwiftBus '%1' does NOT match swift version, download anyway?").arg(currentXsb, currentSwift);
const QMessageBox::StandardButton reply = QMessageBox::question(this, QStringLiteral("Download XSwiftBus"), msg, QMessageBox::Yes | QMessageBox::No);
if (reply != QMessageBox::Yes) { return; }
}
if (!m_installXSwiftBusDialog) if (!m_installXSwiftBusDialog)
{ {
m_installXSwiftBusDialog.reset(new CInstallXSwiftBusDialog(this)); m_installXSwiftBusDialog.reset(new CInstallXSwiftBusDialog(this));
m_installXSwiftBusDialog->setModal(true); m_installXSwiftBusDialog->setModal(true);
} }
const QString current = ui->cb_ArtifactsXsb->currentText(); m_installXSwiftBusDialog->setDefaultDownloadName(currentXsb);
m_installXSwiftBusDialog->setDefaultDownloadName(current);
m_installXSwiftBusDialog->show(); m_installXSwiftBusDialog->show();
} }

View File

@@ -116,12 +116,21 @@
<item row="0" column="2" rowspan="2"> <item row="0" column="2" rowspan="2">
<widget class="QPushButton" name="pb_CheckForUpdates"> <widget class="QPushButton" name="pb_CheckForUpdates">
<property name="text"> <property name="text">
<string> check again </string> <string>check again</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<tabstops>
<tabstop>pb_CheckForUpdates</tabstop>
<tabstop>cb_Channels</tabstop>
<tabstop>cb_Platforms</tabstop>
<tabstop>cb_ArtifactsPilotClient</tabstop>
<tabstop>pb_DownloadInstaller</tabstop>
<tabstop>cb_ArtifactsXsb</tabstop>
<tabstop>pb_DownloadXSwiftBus</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>