diff --git a/AudioGameGUI.pro b/AudioGameGUI.pro index ed3cf8a..63f4146 100644 --- a/AudioGameGUI.pro +++ b/AudioGameGUI.pro @@ -16,6 +16,8 @@ RESOURCES = application.qrc RC_FILE = app.rc QT += axcontainer + +# QT automatically generates the classes from the com object TYPELIBS = $$system(dumpcpp -getfile {D323A622-1D13-11D4-8858-444553540000}) isEmpty(TYPELIBS) { diff --git a/SocketClient.cpp b/SocketClient.cpp index 8c13718..2ddae2b 100644 --- a/SocketClient.cpp +++ b/SocketClient.cpp @@ -92,6 +92,7 @@ void SocketClient::connectToHost() connect(tcpSocket, SIGNAL(connected()), this, SLOT(onConnected())); connect(tcpSocket, SIGNAL(disconnected()), this, SLOT(onDisconnected())); connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(onReadData()), Qt::QueuedConnection); + qDebug() << "Connected"; } } diff --git a/SocketClient.h b/SocketClient.h index aec1e70..61b44c5 100644 --- a/SocketClient.h +++ b/SocketClient.h @@ -21,7 +21,7 @@ class QNetworkSession; #define SOCKET_FILENAME 3 #define SOCKET_TRACKINGRESULT 4 -class SocketClient : public QDialog +class SocketClient : public QObject { Q_OBJECT diff --git a/StateMachineController.cpp b/StateMachineController.cpp index f8c2224..e064f52 100644 --- a/StateMachineController.cpp +++ b/StateMachineController.cpp @@ -3,6 +3,8 @@ StateMachineController::StateMachineController(QObject *parent): QObject(parent) { + qRegisterMetaType>("QVector"); + // seed randomizer srand(time(0)); timerDialog = new TimerDialog(); @@ -84,6 +86,7 @@ StateMachineController::StateMachineController(QObject *parent): connect(socketClient, SIGNAL(socketTrackingResult(QVector)), logFileWriter, SLOT(onWriteTrackingResult(QVector))); socketClient->moveToThread(socketThread); + socketThread->start(); logFileWriter->moveToThread(logFileThread); logFileThread->start(); }else{ @@ -243,5 +246,6 @@ void StateMachineController::onStateSoundEntered() void StateMachineController::onStatePauseEntered() { qDebug()<<"Pause state entered"; + mainTimer->stop(); timerDialog->removeTimer(); }