Removed onlinepollerthread
[irwi] / src / selectremotedlg.cpp
index dbc8115..2ffc121 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "remote.h"
 #include "remotelistwidgetitem.h"
-#include "onlinepollerthread.h"
 
 #include <QHBoxLayout>
 #include <QLabel>
@@ -18,7 +17,6 @@
 SelectRemoteDlg::SelectRemoteDlg(QWidget *parent)
     : QDialog(parent)
 {
-    onlinePollerThread = NULL;
     this->setWindowTitle(tr("Select remote"));
     this->setMinimumHeight(320);
 
@@ -55,12 +53,6 @@ SelectRemoteDlg::SelectRemoteDlg(QWidget *parent)
 SelectRemoteDlg::~SelectRemoteDlg()
 {
     delete layout;
-    if (onlinePollerThread != NULL) {
-        onlinePollerThread->stop();
-        onlinePollerThread->wait();
-        delete onlinePollerThread;
-        onlinePollerThread = NULL;
-    }
 }
 
 void SelectRemoteDlg::setDB(RemoteDB *db)
@@ -116,30 +108,10 @@ void SelectRemoteDlg::downloadRemote()
     }
 }
 
-void SelectRemoteDlg::getDB()
-{
-    if (onlinePollerThread != NULL) {
-        onlinePollerThread->stop();
-        onlinePollerThread->wait();
-        delete onlinePollerThread;
-        onlinePollerThread = NULL;
-    }
-    remoteDBMgr.getDBAsync();
-}
-
 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();
+    remoteDBMgr.getDBAsync();
 }
 
 void SelectRemoteDlg::showEvent(QShowEvent *event)