removed callback support

This commit is contained in:
canpadawan
2016-06-24 17:31:20 +02:00
parent d422a5c592
commit 7ed160f527
2 changed files with 0 additions and 26 deletions
-18
View File
@@ -80,11 +80,6 @@ ConnectionWindow::ConnectionWindow(CANFrameModel *cModel, QWidget *parent) :
mTicker.setInterval(500); /*tick twice a second */ mTicker.setInterval(500); /*tick twice a second */
mTicker.setSingleShot(false); mTicker.setSingleShot(false);
mTicker.start(); mTicker.start();
/*test*/
/* retrieve pointer on method */
int methodIndex = metaObject()->indexOfMethod(QMetaObject::normalizedSignature("refreshCanList()"));
mRefreshM = metaObject()->method(methodIndex);
} }
ConnectionWindow::~ConnectionWindow() ConnectionWindow::~ConnectionWindow()
@@ -130,19 +125,6 @@ void ConnectionWindow::refreshCanList() {
mRefreshReqOngoing.store(FALSE); 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() void ConnectionWindow::handleNewConn()
{ {
ui->tableConnections->selectionModel()->clearSelection(); ui->tableConnections->selectionModel()->clearSelection();
-8
View File
@@ -8,9 +8,6 @@
#include <QDebug> #include <QDebug>
#include <QSettings> #include <QSettings>
#include <QTimer> #include <QTimer>
/*test*/
#include <QMetaMethod>
/******/
#include "canconnectionmodel.h" #include "canconnectionmodel.h"
#include "canframemodel.h" #include "canframemodel.h"
@@ -34,7 +31,6 @@ public:
QString getPortName(); //name of port to connect to QString getPortName(); //name of port to connect to
CANCon::type getConnectionType(); CANCon::type getConnectionType();
bool getSWMode(); bool getSWMode();
void callback(CANCon::cbtype pType);
signals: signals:
void updateBusSettings(CANBus *bus); void updateBusSettings(CANBus *bus);
@@ -72,10 +68,6 @@ private:
QAtomicInt mRefreshReqOngoing; QAtomicInt mRefreshReqOngoing;
/*test*/
QMetaMethod mRefreshM;
void selectSerial(); void selectSerial();
void selectKvaser(); void selectKvaser();
void selectSocketCan(); void selectSocketCan();