From 85e8d2573dd8a1a6674da685a636279cfc0e2e7a Mon Sep 17 00:00:00 2001 From: carlou Date: Fri, 9 Sep 2016 11:20:39 +0200 Subject: [PATCH] Optimization --- src/Server.cpp | 3 ++- src/Server.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Server.cpp b/src/Server.cpp index 5184da2..2e03f60 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -212,6 +212,7 @@ bool Server::initConf(QSettings *c) { c->setValue(it->key, it->value.toString()); } + // Debugging QStringList lst = c->allKeys(); for(QStringList::const_iterator k = lst.constBegin(); kvalue(*k).toString(); @@ -461,7 +462,7 @@ void Server::updateBeat(double t) { // in seconds m_previousBeat = time; sendBeatCount(time); - if(time == 8 || time == 16 || time == 24){ //sync + if(time%8 == 0){ //sync sendActivatedTracks(); sendBeatCount(time); } diff --git a/src/Server.h b/src/Server.h index 543dd72..3892c3d 100644 --- a/src/Server.h +++ b/src/Server.h @@ -34,7 +34,7 @@ struct Settings { * * Handles the events and dispatch the corresponding actions */ -class Server : public /*QCoreApplication*/ QObject { +class Server : public QObject { Q_OBJECT Q_PROPERTY(int tempo READ getTempo WRITE setTempo)