OnlinePollerThread now works as intended
[irwi] / src / selectremotedlg.cpp
index dbc8115..89a69f6 100644 (file)
@@ -56,8 +56,6 @@ SelectRemoteDlg::~SelectRemoteDlg()
 {
     delete layout;
     if (onlinePollerThread != NULL) {
-        onlinePollerThread->stop();
-        onlinePollerThread->wait();
         delete onlinePollerThread;
         onlinePollerThread = NULL;
     }
@@ -119,8 +117,6 @@ void SelectRemoteDlg::downloadRemote()
 void SelectRemoteDlg::getDB()
 {
     if (onlinePollerThread != NULL) {
-        onlinePollerThread->stop();
-        onlinePollerThread->wait();
         delete onlinePollerThread;
         onlinePollerThread = NULL;
     }
@@ -131,15 +127,13 @@ void SelectRemoteDlg::refreshDB()
 {
     setBusy(true);
     if (onlinePollerThread != NULL) {
-        onlinePollerThread->stop();
-        onlinePollerThread->wait();
         delete onlinePollerThread;
         onlinePollerThread = NULL;
     }
     onlinePollerThread = new OnlinePollerThread();
     connect(onlinePollerThread, SIGNAL(online()),
             this, SLOT(getDB()));
-    onlinePollerThread->run();
+    onlinePollerThread->start();
 }
 
 void SelectRemoteDlg::showEvent(QShowEvent *event)