comparison ui/mainwindow.cpp @ 45:c6125d73faf4

Move SSLConnection into it's own class
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 14 Mar 2014 16:40:53 +0000
parents 37fc66967517
children f22a99f7cb69
comparison
equal deleted inserted replaced
44:b3e8e047bc2c 45:c6125d73faf4
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 qRegisterMetaType<SSLConnection::ErrorCode>("SSLConnection::ErrorCode");
24 24
25 connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), 25 connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
26 this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason))); 26 this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
27 27
28 mMessageTimer = new QTimer(this); 28 mMessageTimer = new QTimer(this);
130 connect(downloader, SIGNAL(newListAvailable(const QString&, const QDateTime&)), 130 connect(downloader, SIGNAL(newListAvailable(const QString&, const QDateTime&)),
131 this, SLOT(handleNewList(const QString&, const QDateTime&))); 131 this, SLOT(handleNewList(const QString&, const QDateTime&)));
132 connect(downloader, SIGNAL(newSoftwareAvailable(const QString&, const QDateTime&)), 132 connect(downloader, SIGNAL(newSoftwareAvailable(const QString&, const QDateTime&)),
133 this, SLOT(handleNewSW(const QString&, const QDateTime&))); 133 this, SLOT(handleNewSW(const QString&, const QDateTime&)));
134 connect(downloader, SIGNAL(finished()), downloader, SLOT(deleteLater())); 134 connect(downloader, SIGNAL(finished()), downloader, SLOT(deleteLater()));
135 connect(downloader, SIGNAL(error(const QString &, Downloader::ErrorCode)), 135 connect(downloader, SIGNAL(error(const QString &, SSLConnection::ErrorCode)),
136 this, SLOT(downloaderError(const QString &, Downloader::ErrorCode))); 136 this, SLOT(downloaderError(const QString &, SSLConnection::ErrorCode)));
137 downloader->start(); 137 downloader->start();
138 } 138 }
139 139
140 140
141 void MainWindow::downloaderError(const QString &message, Downloader::ErrorCode error) 141 void MainWindow::downloaderError(const QString &message, SSLConnection::ErrorCode error)
142 { 142 {
143 mCurMessage = message; 143 mCurMessage = message;
144 showMessage(); 144 showMessage();
145 } 145 }
146 146

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