From 6af8e7795da1e86745364af1538fa76d4e0fc07e Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 Apr 2011 20:23:33 +0200 Subject: minor improvments: better debug messages + no tabs :D --- pacman-c++/mainwidget.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pacman-c++/mainwidget.cpp') diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index ba09f7d..89cbd58 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp @@ -31,7 +31,7 @@ MainWidget::MainWidget(QWidget *parent) connect(sendTimer, SIGNAL(timeout()), this, SLOT(sendKeyUpdate())); sendTimer->start(Constants::tick); - qDebug() << "mycolor=" << m_scene->color(); + qDebug() << "[Connect] mycolor=" << m_scene->color(); //TODO: play intro as soon as there are enough players //connect(AudioPlayer::self(), SIGNAL(finished()), this, SLOT(startGame())); @@ -134,7 +134,6 @@ void MainWidget::tick() std::string dataStr; Util::QByteArrayToStdString(m_socket->readAll(), dataStr); - //qDebug() << "read str " << dataStr.length(); ProtoBuf::MapUpdate packet; bool worked = packet.ParseFromString(dataStr); Q_ASSERT(worked); @@ -174,7 +173,7 @@ void MainWidget::sendKeyUpdate() return; if (m_currentKey == Transmission::direction_none) return; - qDebug() << "send key: " << m_currentKey; + qDebug() << "[SendKey] key=" << m_currentKey; ProtoBuf::KeyPressUpdate packet; packet.set_newkey(m_currentKey); Util::sendPacket(packet, m_socket); @@ -207,7 +206,7 @@ Color::Color MainWidget::connectToServer() // check command line arguments for server port const QStringList &args = QCoreApplication::arguments(); QString srv = args.value(1, "127.0.0.1"); - qDebug() << "srv: " << srv; + qDebug() << "[Connect] server=" << srv; // connect to server m_socket = new QTcpSocket(this); -- cgit v1.2.3