Commit 5824b823 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to qDebug category

parent aec90658
......@@ -29,6 +29,7 @@ include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMQtDeclareLoggingCategory)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
......@@ -48,7 +49,7 @@ set(klines_SRCS
previewitem.cpp
animator.cpp
)
ecm_qt_declare_logging_category(klines_SRCS HEADER klines_debug.h IDENTIFIER KLINES_LOG CATEGORY_NAME org.kde.kdegames.klines)
qt5_add_resources(klines_SRCS klines.qrc)
kconfig_add_kcfg_files(klines_SRCS prefs.kcfgc)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-klines.png")
......@@ -81,5 +82,5 @@ ecm_install_icons(ICONS
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
install( FILES klines.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} )
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
org.kde.kdegames.klines (kdegames klines) IDENTIFIER [KLINES_LOG]
......@@ -21,7 +21,7 @@
*
********************************************************************/
#include "renderer.h"
#include "klines_debug.h"
#include <KGameRenderer>
#include <KgThemeProvider>
......@@ -113,10 +113,10 @@ QString KLinesRenderer::animationFrameId(AnimationType type, BallColor color, in
case DieAnim:
return QLatin1Char(color2char(color)) + QLatin1String("_die_") + QString::number(frame + 1);
case MoveAnim:
qDebug() << "Move animation type isn't supposed to be handled by KLinesRenderer!";
qCDebug(KLINES_LOG) << "Move animation type isn't supposed to be handled by KLinesRenderer!";
return QString();
default:
qDebug() << "Warning! Animation type not handled in switch!";
qCDebug(KLINES_LOG) << "Warning! Animation type not handled in switch!";
return QString();
}
}
......
......@@ -29,7 +29,7 @@
#include <QGraphicsSceneMouseEvent>
#include <QPainter>
#include <QSet>
#include <QDebug>
#include "klines_debug.h"
#include <KGamePopupItem>
#include <KLocalizedString>
......@@ -173,7 +173,7 @@ void KLinesScene::resizeScene(int width,int height)
m_previewItem->setPos( previewOriginX, previewOriginY );
m_previewItem->setPreviewColors( m_nextColors );
//qDebug() << "resize:" << width << "," << height << "; cellSize:" << m_cellSize;
//qCDebug(KLINES_LOG) << "resize:" << width << "," << height << "; cellSize:" << m_cellSize;
}
void KLinesScene::endTurn()
......@@ -683,7 +683,7 @@ void KLinesScene::gameOverHandler()
if( m_gameOver )
return; // don't emit twice
m_gameOver = true;
qDebug() << "GAME OVER";
qCDebug(KLINES_LOG) << "GAME OVER";
emit stateChanged(QStringLiteral( "not_undoable" ));
//emit enableUndo(false);
emit gameOver(m_score);
......
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