diff options
Diffstat (limited to 'client/Dialog.cpp')
-rw-r--r-- | client/Dialog.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/client/Dialog.cpp b/client/Dialog.cpp index 45ef01b..3a7f473 100644 --- a/client/Dialog.cpp +++ b/client/Dialog.cpp @@ -3,7 +3,7 @@ #include <iostream> #include <sstream> #include "client.h" -#include "Config.h" +#include "UpdatedConfig.h" #include "Dialog.h" #include "Proxy.h" @@ -12,13 +12,8 @@ using namespace std; ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent) { //WIPE it out!!! COnfig shoud be reread by timer event! - Config *cfg = Config::CurrentConfig(); + UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); cfg->AcquireConfig(); - if (! cfg->IsConfigValid()) - { - Logger::Fatal((string)"No valid configuration found! Can't proceed."); - return ; - } /* generic proxy panel */ topLabel = new QLabel(QString::fromLocal8Bit(cfg->TopPanelText.c_str())); @@ -109,7 +104,7 @@ void ProxyDialog::CountryActivated(int index) string country(countryBox->currentText().toUtf8().constData()); Logger::Info("Country %s was selected\n", country.c_str()); - Config *cfg = Config::CurrentConfig(); + UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); vector<string> states = cfg->GetStates(country); if (states.empty()) { @@ -152,7 +147,7 @@ void ProxyDialog::StateActivated(int index) string state(stateBox->currentText().toUtf8().constData()); Logger::Info("State %s was selected\n", state.c_str()); - Config *cfg = Config::CurrentConfig(); + UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); vector<string> cities = cfg->GetCities(country, state); cityBox->clear(); for (unsigned i = 0; i < cities.size(); i++) @@ -174,7 +169,7 @@ void ProxyDialog::CityActivated(int index) } vector<string> proxies; - Config *cfg = Config::CurrentConfig(); + UpdatedConfig *cfg = UpdatedConfig::CurrentConfig(); string country(countryBox->currentText().toUtf8().constData()); string city(cityBox->currentText().toUtf8().constData()); if (stateBox->isVisible()) |