From 71de1bf02aa7de551d64212fa24da4a0505eb2c1 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 14 Feb 2018 04:13:40 +0100 Subject: [PATCH] UI improvements installer/update info --- .../components/installxswiftbuscomponent.cpp | 4 ++-- .../components/updateinfocomponent.ui | 20 +++++++++---------- src/blackmisc/db/updateinfo.cpp | 7 +++++++ src/blackmisc/db/updateinfo.h | 3 +++ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/blackgui/components/installxswiftbuscomponent.cpp b/src/blackgui/components/installxswiftbuscomponent.cpp index 80d60ee20..5ac8fe0ae 100644 --- a/src/blackgui/components/installxswiftbuscomponent.cpp +++ b/src/blackgui/components/installxswiftbuscomponent.cpp @@ -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 } diff --git a/src/blackgui/components/updateinfocomponent.ui b/src/blackgui/components/updateinfocomponent.ui index f06039721..e35227dd2 100644 --- a/src/blackgui/components/updateinfocomponent.ui +++ b/src/blackgui/components/updateinfocomponent.ui @@ -6,14 +6,14 @@ 0 0 - 262 - 126 + 230 + 108 0 - 90 + 100 @@ -85,13 +85,6 @@ - - - - check again - - - @@ -120,6 +113,13 @@ + + + + check again + + + diff --git a/src/blackmisc/db/updateinfo.cpp b/src/blackmisc/db/updateinfo.cpp index 384cb6b97..16a2433bb 100644 --- a/src/blackmisc/db/updateinfo.cpp +++ b/src/blackmisc/db/updateinfo.cpp @@ -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(); diff --git a/src/blackmisc/db/updateinfo.h b/src/blackmisc/db/updateinfo.h index 64895fcf3..e4bb26e03 100644 --- a/src/blackmisc/db/updateinfo.h +++ b/src/blackmisc/db/updateinfo.h @@ -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;