Bugfix to settingsdlg progress indicator
authorJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 7 Jul 2010 11:54:04 +0000 (14:54 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 7 Jul 2010 11:54:04 +0000 (14:54 +0300)
src/settingsdlg.cpp

index 535a4d0..f7b4cfa 100644 (file)
@@ -15,6 +15,7 @@
 
 SettingsDlg::SettingsDlg(QWidget *parent)
     : QDialog(parent)
+    , m_busy(false)
     , m_netConfMan(NULL)
 {
     QSettings settings(this);
@@ -66,12 +67,11 @@ SettingsDlg::SettingsDlg(QWidget *parent)
 
     QString selectedRemote = settings.value("remoteName", "").toString();
     if (selectedRemote == "") {
-        setBusy(false);
         m_remoteNameLabel->setText(tr("No remote selected"));
         enableRateBtns(false);
     } else {
         // Create remote by name and update it's info if online
-        setBusy(true);
+        m_busy = true;
         m_remote = Remote(selectedRemote);
         connect(&m_remote, SIGNAL(infoUpdated()),
                 this, SLOT(updateRemoteInfo()));
@@ -139,6 +139,7 @@ void SettingsDlg::setRemote(Remote r)
 void SettingsDlg::onNetworkStatusUpdate()
 {
     if (m_netConfMan->isOnline()) {
+        setBusy();
         m_remote.updateInfo();
         enableRateBtns();
     } else {