Commit 2601d8c6 authored by Laurent Montel's avatar Laurent Montel 😁

Use qCDebug

parent 5e18a140
......@@ -4,6 +4,7 @@
include_directories( ${OPENGL_INCLUDE_DIR} )
set(kubrick_SRCS
kubrick_debug.cpp
main.cpp
kubrick.cpp
game.cpp
......
......@@ -21,7 +21,7 @@
#include "movetracker.h"
#include "scenelabel.h"
#include <KUrl>
#include <KDebug>
#include "kubrick_debug.h"
#include <KConfig>
#include <QTimer>
#include <KLocalizedString>
......@@ -684,7 +684,7 @@ void Game::smWaitingForInput (const SingmasterMove smCode)
keyboardState = SingmasterFaceIDSeen; // Change the state.
break;
default:
kDebug() << "Unknown Singmaster code" << smCode;
qCDebug(KUBRICK_LOG) << "Unknown Singmaster code" << smCode;
break;
}
}
......@@ -717,7 +717,7 @@ void Game::smSingmasterPrefixSeen (const SingmasterMove smCode)
keyboardState = SingmasterFaceIDSeen; // Change the state.
break;
default:
kDebug() << "Unknown Singmaster code" << smCode;
qCDebug(KUBRICK_LOG) << "Unknown Singmaster code" << smCode;
break;
}
}
......@@ -755,7 +755,7 @@ void Game::smSingmasterFaceIDSeen (const SingmasterMove smCode)
keyboardState = SingmasterFaceIDSeen; // No change of state.
break;
default:
kDebug() << "Unknown Singmaster code" << smCode;
qCDebug(KUBRICK_LOG) << "Unknown Singmaster code" << smCode;
break;
}
}
......@@ -792,7 +792,7 @@ void Game::saveSingmasterFaceID (const SingmasterMove smCode)
direction = -1; // Face not visible.
break;
default:
kDebug() << "'Impossible' Singmaster code" << smCode;
qCDebug(KUBRICK_LOG) << "'Impossible' Singmaster code" << smCode;
return;
break;
}
......@@ -851,7 +851,7 @@ void Game::executeSingmasterMove (const SingmasterMove smCode)
smTempString.append (SingmasterNotation [SM_SPACER]);
break;
default:
kDebug() << "'Impossible' Singmaster code" << smCode;
qCDebug(KUBRICK_LOG) << "'Impossible' Singmaster code" << smCode;
return;
break;
}
......@@ -1291,7 +1291,7 @@ void Game::appendMove (Move * move)
move->degrees = 180;
}
// IDW testing - kDebug() << move->axis << move->slice <<
// IDW testing - qCDebug(KUBRICK_LOG) << move->axis << move->slice <<
// IDW testing - move->direction << move->degrees;
moves.append (move);
}
......@@ -1911,7 +1911,7 @@ void Game::startAnimatedMove (Move * move, int speed)
// defines a range of characters and does not get matched as a "-".
QRegExp smPattern ("[.C]*[FBLRUD]['2 +-]*");
// IDW testing - kDebug() << "Undoing" << undoing << singmasterString <<
// IDW testing - qCDebug(KUBRICK_LOG) << "Undoing" << undoing << singmasterString <<
// IDW testing - smSelectionStart << smSelectionLength;
if (undoing) {
int pos1 = 0;
......
......@@ -30,7 +30,7 @@
#include <KCmdLineArgs>
#include <KAboutData>
#include <QSvgRenderer>
#include <KDebug>
#include "kubrick_debug.h"
#include <KGlobal>
#include <K4AboutData>
#include <KStandardDirs>
......
/* This file is part of the KDE project
Copyright (C) 2014 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kubrick_debug.h"
Q_LOGGING_CATEGORY(KUBRICK_LOG, "LOG_KUBRICK")
/* This file is part of the KDE project
Copyright (C) 2014 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KUBRICK_DEBUG_H
#define KUBRICK_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KUBRICK_LOG)
#endif
......@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <QWidget>
#include <KDebug>
#include "kubrick_debug.h"
MoveTracker::MoveTracker (QWidget * parent)
:
......@@ -742,7 +742,7 @@ void MoveTracker::getGLPosition (int sX, int sY, GLfloat depth,
&objx, &objy, &objz);
if (ret != GL_TRUE) {
kDebug() << "gluUnProject() unsuccessful at point" << sX << sY << depth;
qCDebug(KUBRICK_LOG) << "gluUnProject() unsuccessful at point" << sX << sY << depth;
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment