diff options
author | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-01 03:11:09 +0200 |
---|---|---|
committer | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-01 03:11:09 +0200 |
commit | 918defcaea2b570a927a2884ce0e720b03e32d8a (patch) | |
tree | 5c05b21f2c565a3ccc0124edf3af175657205d04 /client/ProxyClientApp.cpp | |
parent | 70dc6021943eacded7c26f2ca66375f64f19d819 (diff) |
FIX file transfer; FIX packet parsing bug; + many various fixes and improvements
Diffstat (limited to 'client/ProxyClientApp.cpp')
-rw-r--r-- | client/ProxyClientApp.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/client/ProxyClientApp.cpp b/client/ProxyClientApp.cpp index 6dcfed2..e2968b0 100644 --- a/client/ProxyClientApp.cpp +++ b/client/ProxyClientApp.cpp @@ -5,8 +5,6 @@ #include "client.h" #include "Dialog.h" -#include "DownloadClient.h" -#include "FileOpThread.h" #include "ProxyClientApp.h" #include "UpdatedConfig.h" @@ -15,7 +13,6 @@ using namespace std; ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv) { /* initiates UpdatedConfig singleton that start sending configuration requests */ - /* UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); connect(cfg, SIGNAL(updated()), this, SLOT(configUpdated())); @@ -62,6 +59,10 @@ ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv Logger::Info("CSS stylesheet file 'style.qss' wasn't found.\n"); } + /** + * @todo FIX: trying to access cfg while it is being updated + * (note that initial config is still read from config.cfg) + */ QString msg = QString::fromLocal8Bit(cfg->WelcomeMsg.c_str()); QMessageBox welcomeMsg; welcomeMsg.setText(msg); @@ -69,18 +70,17 @@ ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv welcomeMsg.setStandardButtons(QMessageBox::Ok); welcomeMsg.setIcon(QMessageBox::Information); welcomeMsg.exec(); - */ + /* vector<pair<string, string> > files; pair<string, string> file; - file = make_pair("server.workspace.session", "70ba1d68907cc9d3"); - files.push_back(file); - file = make_pair("tz/TZ_v.1.2.pdf", "80e28032841aca45"); + file = make_pair("../main.cpp", "70ba1d68907cc9d3"); files.push_back(file); //QString addr = QString::fromLocal8Bit(); DownloadClient downloadClient("127.0.0.1"); downloadClient.Download(files); + */ } void ProxyClientApp::trayActivated(QSystemTrayIcon::ActivationReason reason) @@ -100,7 +100,8 @@ void ProxyClientApp::showProxyDialog() void ProxyClientApp::configUpdated() { - FileOpThread fileOpThread; + // start downloading files in seperate thread + // (all necessary check are done by the thread) fileOpThread.start(QThread::NormalPriority); UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); |