Work on updating...
This commit is contained in:
parent
50dd668481
commit
843b349007
@ -11,7 +11,12 @@
|
||||
[#] Saving of webbrowser progressbar color.
|
||||
[~] Usability of some GUI elements.
|
||||
[@] Completely switched to new website.
|
||||
[+] Some missing shortcuts.]]>
|
||||
[+] Some missing shortcuts.
|
||||
|
||||
[+] added
|
||||
[#] fixed
|
||||
[~] changed
|
||||
[@] other action]]>
|
||||
</changes>
|
||||
</release>
|
||||
</releases>
|
@ -161,9 +161,20 @@ QList<UpdateInfo> SystemFactory::parseUpdatesFile(const QByteArray &updates_file
|
||||
|
||||
info.m_availableVersion = rel_elem.attributes().namedItem("version").toAttr().value();
|
||||
info.m_changes = rel_elem.namedItem("changes").toElement().text();
|
||||
info.m_fileUrl = rel_elem.namedItem("url").toElement().text();
|
||||
info.m_os = rel_elem.attributes().namedItem("os").toAttr().value();
|
||||
info.m_platform = rel_elem.attributes().namedItem("platform").toAttr().value();
|
||||
|
||||
QDomNodeList urls = rel_elem.elementsByTagName("url");
|
||||
|
||||
for (int j = 0; j < urls.size(); j++) {
|
||||
UpdateUrl url;
|
||||
QDomElement url_elem = urls.at(j).toElement();
|
||||
|
||||
url.m_fileUrl = url_elem.text();
|
||||
url.m_os = url_elem.attributes().namedItem("os").toAttr().value();
|
||||
url.m_platform = url_elem.attributes().namedItem("platform").toAttr().value();
|
||||
|
||||
info.m_urls.insert(url.m_os,
|
||||
url);
|
||||
}
|
||||
|
||||
if (type == "maintenance") {
|
||||
info.m_type = UpdateInfo::Maintenance;
|
||||
|
@ -5,8 +5,16 @@
|
||||
#include <QPointer>
|
||||
#include <QMutex>
|
||||
#include <QMetaType>
|
||||
#include <QHash>
|
||||
|
||||
|
||||
class UpdateUrl {
|
||||
public:
|
||||
QString m_fileUrl;
|
||||
QString m_platform;
|
||||
QString m_os;
|
||||
};
|
||||
|
||||
class UpdateInfo {
|
||||
public:
|
||||
enum UpdateType {
|
||||
@ -17,11 +25,9 @@ class UpdateInfo {
|
||||
};
|
||||
|
||||
QString m_availableVersion;
|
||||
QString m_fileUrl;
|
||||
QString m_platform;
|
||||
QString m_os;
|
||||
UpdateType m_type;
|
||||
QString m_changes;
|
||||
UpdateType m_type;
|
||||
QHash<QString, UpdateUrl> m_urls;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(UpdateInfo)
|
||||
|
@ -36,6 +36,13 @@ FormUpdate::~FormUpdate() {
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
// TODO: tady v update nacist do m_lblSupportedPlatforms
|
||||
// seznam platform ktery danej release podporuje oddelenej carkama
|
||||
// treba "Windows, OS2" atp atp.
|
||||
// ten combobox se statusem previst na normalni combobox
|
||||
// asi. jednotlivy URL souborů pro danej release
|
||||
// sou dostupny v qhashi podle klice podle OS.
|
||||
|
||||
void FormUpdate::updateChanges(int new_release_index) {
|
||||
if (new_release_index >= 0) {
|
||||
UpdateInfo info = m_ui->m_cmbAvailableRelease->comboBox()->itemData(new_release_index).value<UpdateInfo>();
|
||||
|
@ -43,14 +43,14 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="ComboBoxWithStatus" name="m_cmbAvailableRelease" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QTextEdit" name="m_txtChanges">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
@ -67,6 +67,20 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Supported platforms</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="m_lblSupportedPlatforms">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user