From 7ed160f527e91e1c283a21129c50906abd02227b Mon Sep 17 00:00:00 2001 From: canpadawan Date: Fri, 24 Jun 2016 17:31:20 +0200 Subject: [PATCH] removed callback support --- connectionwindow.cpp | 18 ------------------ connectionwindow.h | 8 -------- 2 files changed, 26 deletions(-) diff --git a/connectionwindow.cpp b/connectionwindow.cpp index 69b42c6..9ef7f3b 100644 --- a/connectionwindow.cpp +++ b/connectionwindow.cpp @@ -80,11 +80,6 @@ ConnectionWindow::ConnectionWindow(CANFrameModel *cModel, QWidget *parent) : mTicker.setInterval(500); /*tick twice a second */ mTicker.setSingleShot(false); mTicker.start(); - - /*test*/ - /* retrieve pointer on method */ - int methodIndex = metaObject()->indexOfMethod(QMetaObject::normalizedSignature("refreshCanList()")); - mRefreshM = metaObject()->method(methodIndex); } ConnectionWindow::~ConnectionWindow() @@ -130,19 +125,6 @@ void ConnectionWindow::refreshCanList() { mRefreshReqOngoing.store(FALSE); } -/*test*/ -void ConnectionWindow::callback(CANCon::cbtype pType) -{ - if(mRefreshReqOngoing.testAndSetRelaxed(FALSE, TRUE)) - { - /* ask for a refresh */ - mRefreshM.invoke(this, Qt::AutoConnection); - } - else { - //qDebug() << "skip event"; - } -} - void ConnectionWindow::handleNewConn() { ui->tableConnections->selectionModel()->clearSelection(); diff --git a/connectionwindow.h b/connectionwindow.h index 91f292d..5cc9b4c 100644 --- a/connectionwindow.h +++ b/connectionwindow.h @@ -8,9 +8,6 @@ #include #include #include -/*test*/ -#include -/******/ #include "canconnectionmodel.h" #include "canframemodel.h" @@ -34,7 +31,6 @@ public: QString getPortName(); //name of port to connect to CANCon::type getConnectionType(); bool getSWMode(); - void callback(CANCon::cbtype pType); signals: void updateBusSettings(CANBus *bus); @@ -72,10 +68,6 @@ private: QAtomicInt mRefreshReqOngoing; - /*test*/ - QMetaMethod mRefreshM; - - void selectSerial(); void selectKvaser(); void selectSocketCan();