UI improvements installer/update info

This commit is contained in:
Klaus Basan
2018-02-14 04:13:40 +01:00
parent a06f59723a
commit 71de1bf02a
4 changed files with 22 additions and 12 deletions

View File

@@ -206,7 +206,7 @@ namespace BlackGui
const CRemoteFileList remoteFiles = artifacts.asRemoteFiles();
if (!remoteFiles.isEmpty())
{
const QStringList xSwiftBusFiles(remoteFiles.getNamesPlusSize(true));
const QStringList xSwiftBusFiles(remoteFiles.getNamesPlusSize(false));
ui->cb_DownloadFile->addItems(xSwiftBusFiles);
// current text
@@ -218,7 +218,7 @@ namespace BlackGui
}
ui->cb_DownloadFile->setCurrentText(
current.isEmpty() ?
remoteFiles.backOrDefault().getNameAndSize() :
remoteFiles.frontOrDefault().getNameAndSize() :
current
); // latest version
}

View File

@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>262</width>
<height>126</height>
<width>230</width>
<height>108</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>90</height>
<height>100</height>
</size>
</property>
<property name="windowTitle">
@@ -85,13 +85,6 @@
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pb_CheckForUpdates">
<property name="text">
<string> check again </string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lbl_CurrentVersionDisplay">
<property name="text">
@@ -120,6 +113,13 @@
</property>
</widget>
</item>
<item row="0" column="2" rowspan="2">
<widget class="QPushButton" name="pb_CheckForUpdates">
<property name="text">
<string> check again </string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>

View File

@@ -47,6 +47,13 @@ namespace BlackMisc
return artifacts;
}
CArtifactList CUpdateInfo::getArtifactsXSwiftBusOldestVersionFirst() const
{
CArtifactList artifacts(m_artifactsXSwiftBus);
artifacts.sortByVersion(Qt::DescendingOrder);
return artifacts;
}
CArtifactList CUpdateInfo::getArtifactsXSwiftBusForCurrentPlatform() const
{
CArtifactList artifacts = m_artifactsXSwiftBus.findMatchingForCurrentPlatform();

View File

@@ -58,6 +58,9 @@ namespace BlackMisc
//! Artifacts (XSwiftBus)
CArtifactList getArtifactsXSwiftBusLatestVersionFirst() const;
//! Artifacts (XSwiftBus)
CArtifactList getArtifactsXSwiftBusOldestVersionFirst() const;
//! Artifacts for current platform
//! \note sorted by version
CArtifactList getArtifactsXSwiftBusForCurrentPlatform() const;