comparison ui/mainwindow.cpp @ 27:62cd56cea09b

Start on polarssl Downloader. This breaks the windows build for now
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 12 Mar 2014 16:15:52 +0100
parents 9af6198deb8e
children 37fc66967517
comparison
equal deleted inserted replaced
26:cbd57d767dfa 27:62cd56cea09b
18 #include "downloader.h" 18 #include "downloader.h"
19 19
20 MainWindow::MainWindow() { 20 MainWindow::MainWindow() {
21 createActions(); 21 createActions();
22 createTrayIcon(); 22 createTrayIcon();
23 qRegisterMetaType<Downloader::ErrorCode>("Downloader::ErrorCode");
23 24
24 connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), 25 connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
25 this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason))); 26 this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
26 27
27 mMessageTimer = new QTimer(this); 28 mMessageTimer = new QTimer(this);
121 verifyAvailableData(); 122 verifyAvailableData();
122 123
123 QDateTime listInstalledLastMod = mSettings.value("List/installedDate").toDateTime(); 124 QDateTime listInstalledLastMod = mSettings.value("List/installedDate").toDateTime();
124 QDateTime swInstalledLastMod = mSettings.value("Software/installedDate").toDateTime(); 125 QDateTime swInstalledLastMod = mSettings.value("Software/installedDate").toDateTime();
125 126
126 Downloader* downloader = new Downloader(this, QString::fromLatin1("www.files.kolab.org"), 127 Downloader* downloader = new Downloader(this, QString::fromLatin1("https://files.kolab.org"),
127 QByteArray(), swInstalledLastMod, listInstalledLastMod); 128 QByteArray(), swInstalledLastMod, listInstalledLastMod);
128 129
129 connect(downloader, SIGNAL(newListAvailable(const QString&, const QDateTime&)), 130 connect(downloader, SIGNAL(newListAvailable(const QString&, const QDateTime&)),
130 this, SLOT(handleNewList(const QString&, const QDateTime&))); 131 this, SLOT(handleNewList(const QString&, const QDateTime&)));
131 connect(downloader, SIGNAL(newSoftwareAvailable(const QString&, const QDateTime&)), 132 connect(downloader, SIGNAL(newSoftwareAvailable(const QString&, const QDateTime&)),
137 } 138 }
138 139
139 140
140 void MainWindow::downloaderError(const QString &message, Downloader::ErrorCode error) 141 void MainWindow::downloaderError(const QString &message, Downloader::ErrorCode error)
141 { 142 {
142 // TODO decide what to show when and how.
143 mCurMessage = message; 143 mCurMessage = message;
144 showMessage();
144 } 145 }
145 146
146 147
147 void MainWindow::createActions() 148 void MainWindow::createActions()
148 { 149 {

http://wald.intevation.org/projects/trustbridge/