Commit 23d779e4 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Port away from kDebug

It now uses qCDebug, for details and how to enable categories see here:
    https://doc.qt.io/qt-5/qloggingcategory.html

REVIEW: 128622
parent 59a7bb36
......@@ -164,6 +164,7 @@ set(kolourpaint_lib1_SRCS
) # kolourpaint_lib1_SRCS
set(kolourpaint_lib2_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/kpLogCategories.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kolourpaint.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kpThumbnail.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kpViewScrollableContainer.cpp
......
......@@ -33,7 +33,7 @@
#include "imagelib/effects/kpEffectBalance.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -31,7 +31,7 @@
#include "kpEffectBlurSharpenCommand.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -33,7 +33,7 @@
#include "document/kpDocument.h"
#include "pixmapfx/kpPixmapFX.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -32,7 +32,7 @@
#include "kpEffectEmbossCommand.h"
#include "imagelib/effects/kpEffectEmboss.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -32,7 +32,7 @@
#include "kpEffectFlattenCommand.h"
#include "imagelib/effects/kpEffectFlatten.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -39,7 +39,7 @@
#include <qlayout.h>
#include <qpixmap.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -33,7 +33,7 @@
#include "imagelib/effects/kpEffectReduceColors.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
//---------------------------------------------------------------------
......
......@@ -31,7 +31,7 @@
#include "imagelib/effects/kpEffectToneEnhance.h"
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......
......@@ -34,7 +34,7 @@
#include <qpixmap.h>
#include <qradiobutton.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/image/kpAbstractImageSelection.h"
......@@ -79,7 +79,7 @@ QString kpTransformFlipCommand::name () const
opName = i18n ("Flip vertically");
else
{
kError () << "kpTransformFlipCommand::name() not asked to flip" << endl;
qCCritical(kpLogCommands) << "kpTransformFlipCommand::name() not asked to flip" << endl;
return QString();
}
#endif
......
......@@ -54,7 +54,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <kiconeffect.h>
#include <kiconloader.h>
#include <klocale.h>
......@@ -195,7 +195,7 @@ bool kpTransformResizeScaleCommand::scaleSelectionWithImage () const
void kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument ()
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_COMMAND
kDebug () << "kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument"
qCDebug(kpLogCommands) << "kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument"
<< endl;
#endif
......@@ -253,7 +253,7 @@ void kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument ()
void kpTransformResizeScaleCommand::execute ()
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_COMMAND
kDebug () << "kpTransformResizeScaleCommand::execute() type="
qCDebug(kpLogCommands) << "kpTransformResizeScaleCommand::execute() type="
<< (int) m_type
<< " oldWidth=" << m_oldWidth
<< " oldHeight=" << m_oldHeight
......@@ -373,7 +373,7 @@ void kpTransformResizeScaleCommand::execute ()
void kpTransformResizeScaleCommand::unexecute ()
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_COMMAND
kDebug () << "kpTransformResizeScaleCommand::unexecute() type="
qCDebug(kpLogCommands) << "kpTransformResizeScaleCommand::unexecute() type="
<< m_type << endl;
#endif
......
......@@ -44,7 +44,7 @@
#include <qpolygon.h>
#include <qmatrix.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
......@@ -159,7 +159,7 @@ void kpTransformRotateCommand::execute ()
// allowing the border width & height != pixmap width & height
// Or maybe autocrop?
#if DEBUG_KP_TOOL_ROTATE
kDebug () << "kpTransformRotateCommand::execute() currentPoints.boundingRect="
qCDebug(kpLogCommands) << "kpTransformRotateCommand::execute() currentPoints.boundingRect="
<< currentPoints.boundingRect ()
<< " newPixmap: w=" << newImage.width ()
<< " h=" << newImage.height ()
......
......@@ -45,7 +45,7 @@
#include <qpixmap.h>
#include <qpolygon.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
// TODO: nasty, should avoid using GUI class in this command class
......@@ -146,7 +146,7 @@ void kpTransformSkewCommand::execute ()
// allowing the border width & height != pixmap width & height
// Or maybe autocrop?
#if DEBUG_KP_TOOL_SKEW
kDebug () << "kpTransformSkewCommand::execute() currentPoints.boundingRect="
qCDebug(kpLogCommands) << "kpTransformSkewCommand::execute() currentPoints.boundingRect="
<< currentPoints.boundingRect ()
<< " newPixmap: w=" << newImage.width ()
<< " h=" << newImage.height ()
......
......@@ -92,12 +92,12 @@ void kpCommandHistory::addCreateSelectionCommand (kpToolSelectionCreateCommand *
void kpCommandHistory::undo ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistory::undo() CALLED!";
qCDebug(kpLogCommands) << "kpCommandHistory::undo() CALLED!";
#endif
if (m_mainWindow && m_mainWindow->toolHasBegunShape ())
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\thas begun shape - cancel draw";
qCDebug(kpLogCommands) << "\thas begun shape - cancel draw";
#endif
m_mainWindow->tool ()->cancelShapeInternal ();
}
......
......@@ -39,7 +39,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include "kpLogCategories.h"
#include <klocale.h>
#include <kstandardshortcut.h>
#include <kstandardaction.h>
......@@ -143,14 +143,14 @@ int kpCommandHistoryBase::undoMinLimit () const
void kpCommandHistoryBase::setUndoMinLimit (int limit)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::setUndoMinLimit("
qCDebug(kpLogCommands) << "kpCommandHistoryBase::setUndoMinLimit("
<< limit << ")"
<< endl;
#endif
if (limit < 1 || limit > 5000/*"ought to be enough for anybody"*/)
{
kError () << "kpCommandHistoryBase::setUndoMinLimit("
qCCritical(kpLogCommands) << "kpCommandHistoryBase::setUndoMinLimit("
<< limit << ")"
<< endl;
return;
......@@ -174,14 +174,14 @@ int kpCommandHistoryBase::undoMaxLimit () const
void kpCommandHistoryBase::setUndoMaxLimit (int limit)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::setUndoMaxLimit("
qCDebug(kpLogCommands) << "kpCommandHistoryBase::setUndoMaxLimit("
<< limit << ")"
<< endl;
#endif
if (limit < 1 || limit > 5000/*"ought to be enough for anybody"*/)
{
kError () << "kpCommandHistoryBase::setUndoMaxLimit("
qCCritical(kpLogCommands) << "kpCommandHistoryBase::setUndoMaxLimit("
<< limit << ")"
<< endl;
return;
......@@ -205,7 +205,7 @@ kpCommandSize::SizeType kpCommandHistoryBase::undoMaxLimitSizeLimit () const
void kpCommandHistoryBase::setUndoMaxLimitSizeLimit (kpCommandSize::SizeType sizeLimit)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::setUndoMaxLimitSizeLimit("
qCDebug(kpLogCommands) << "kpCommandHistoryBase::setUndoMaxLimitSizeLimit("
<< sizeLimit << ")"
<< endl;
#endif
......@@ -213,7 +213,7 @@ void kpCommandHistoryBase::setUndoMaxLimitSizeLimit (kpCommandSize::SizeType siz
if (sizeLimit < 0 ||
sizeLimit > (500 * 1048576)/*"ought to be enough for anybody"*/)
{
kError () << "kpCommandHistoryBase::setUndoMaxLimitSizeLimit("
qCCritical(kpLogCommands) << "kpCommandHistoryBase::setUndoMaxLimitSizeLimit("
<< sizeLimit << ")"
<< endl;
return;
......@@ -231,7 +231,7 @@ void kpCommandHistoryBase::setUndoMaxLimitSizeLimit (kpCommandSize::SizeType siz
void kpCommandHistoryBase::readConfig ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::readConfig()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::readConfig()";
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupUndoRedo);
......@@ -248,7 +248,7 @@ void kpCommandHistoryBase::readConfig ()
void kpCommandHistoryBase::writeConfig ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::writeConfig()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::writeConfig()";
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupUndoRedo);
......@@ -265,7 +265,7 @@ void kpCommandHistoryBase::writeConfig ()
void kpCommandHistoryBase::addCommand (kpCommand *command, bool execute)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::addCommand("
qCDebug(kpLogCommands) << "kpCommandHistoryBase::addCommand("
<< command
<< ",execute=" << execute << ")"
<< endl;
......@@ -278,7 +278,7 @@ void kpCommandHistoryBase::addCommand (kpCommand *command, bool execute)
::ClearPointerList (&m_redoCommandList);
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
if (m_documentRestoredPosition != INT_MAX)
......@@ -288,7 +288,7 @@ void kpCommandHistoryBase::addCommand (kpCommand *command, bool execute)
else
m_documentRestoredPosition--;
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
}
......@@ -300,7 +300,7 @@ void kpCommandHistoryBase::addCommand (kpCommand *command, bool execute)
void kpCommandHistoryBase::clear ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::clear()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::clear()";
#endif
::ClearPointerList (&m_undoCommandList);
......@@ -317,7 +317,7 @@ void kpCommandHistoryBase::clear ()
void kpCommandHistoryBase::undoInternal ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::undoInternal()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::undoInternal()";
#endif
kpCommand *undoCommand = nextUndoCommand ();
......@@ -332,7 +332,7 @@ void kpCommandHistoryBase::undoInternal ()
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
if (m_documentRestoredPosition != INT_MAX)
......@@ -341,7 +341,7 @@ void kpCommandHistoryBase::undoInternal ()
if (m_documentRestoredPosition == 0)
emit documentRestored ();
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
}
......@@ -353,7 +353,7 @@ void kpCommandHistoryBase::undoInternal ()
void kpCommandHistoryBase::redoInternal ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::redoInternal()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::redoInternal()";
#endif
kpCommand *redoCommand = nextRedoCommand ();
......@@ -368,7 +368,7 @@ void kpCommandHistoryBase::redoInternal ()
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
if (m_documentRestoredPosition != INT_MAX)
......@@ -377,7 +377,7 @@ void kpCommandHistoryBase::redoInternal ()
if (m_documentRestoredPosition == 0)
emit documentRestored ();
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\t\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
}
......@@ -389,7 +389,7 @@ void kpCommandHistoryBase::redoInternal ()
void kpCommandHistoryBase::undo ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::undo()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::undo()";
#endif
undoInternal ();
......@@ -402,7 +402,7 @@ void kpCommandHistoryBase::undo ()
void kpCommandHistoryBase::redo ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::redo()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::redo()";
#endif
redoInternal ();
......@@ -415,7 +415,7 @@ void kpCommandHistoryBase::redo ()
void kpCommandHistoryBase::undoUpToNumber (QAction *which)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::undoUpToNumber(" << which << ")";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::undoUpToNumber(" << which << ")";
#endif
for (int i = 0;
......@@ -432,7 +432,7 @@ void kpCommandHistoryBase::undoUpToNumber (QAction *which)
void kpCommandHistoryBase::redoUpToNumber (QAction *which)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::redoUpToNumber(" << which << ")";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::redoUpToNumber(" << which << ")";
#endif
for (int i = 0;
......@@ -496,7 +496,7 @@ QString kpCommandHistoryBase::redoActionToolTip () const
void kpCommandHistoryBase::trimCommandListsUpdateActions ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::trimCommandListsUpdateActions()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::trimCommandListsUpdateActions()";
#endif
trimCommandLists ();
......@@ -507,20 +507,20 @@ void kpCommandHistoryBase::trimCommandListsUpdateActions ()
void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandList)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::trimCommandList()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::trimCommandList()";
QTime timer; timer.start ();
#endif
if (!commandList)
{
kError () << "kpCommandHistoryBase::trimCommandList() passed 0 commandList"
qCCritical(kpLogCommands) << "kpCommandHistoryBase::trimCommandList() passed 0 commandList"
<< endl;
return;
}
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tsize=" << commandList->size ()
qCDebug(kpLogCommands) << "\tsize=" << commandList->size ()
<< " undoMinLimit=" << m_undoMinLimit
<< " undoMaxLimit=" << m_undoMaxLimit
<< " undoMaxLimitSizeLimit=" << m_undoMaxLimitSizeLimit
......@@ -529,14 +529,14 @@ void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandLi
if ((int) commandList->size () <= m_undoMinLimit)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\tsize under undoMinLimit - done";
qCDebug(kpLogCommands) << "\t\tsize under undoMinLimit - done";
#endif
return;
}
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\tsize over undoMinLimit - iterating thru cmds:";
qCDebug(kpLogCommands) << "\tsize over undoMinLimit - iterating thru cmds:";
#endif
QLinkedList <kpCommand *>::iterator it = commandList->begin ();
......@@ -554,7 +554,7 @@ void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandLi
}
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\t\t" << upto << ":"
qCDebug(kpLogCommands) << "\t\t" << upto << ":"
<< " name='" << (*it)->name ()
<< "' size=" << (*it)->size ()
<< " sizeSoFar=" << sizeSoFar
......@@ -567,7 +567,7 @@ void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandLi
sizeSoFar > m_undoMaxLimitSizeLimit)
{
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\t\t\tkill";
qCDebug(kpLogCommands) << "\t\t\tkill";
#endif
delete (*it);
it = m_undoCommandList.erase (it);
......@@ -581,7 +581,7 @@ void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandLi
}
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\ttook " << timer.elapsed () << "ms";
qCDebug(kpLogCommands) << "\ttook " << timer.elapsed () << "ms";
#endif
}
......@@ -589,20 +589,20 @@ void kpCommandHistoryBase::trimCommandList (QLinkedList <kpCommand *> *commandLi
void kpCommandHistoryBase::trimCommandLists ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::trimCommandLists()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::trimCommandLists()";
#endif
trimCommandList (&m_undoCommandList);
trimCommandList (&m_redoCommandList);
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
qCDebug(kpLogCommands) << "\tdocumentRestoredPosition=" << m_documentRestoredPosition
<< endl;
#endif
if (m_documentRestoredPosition != INT_MAX)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\tundoCmdList.size=" << m_undoCommandList.size ()
qCDebug(kpLogCommands) << "\t\tundoCmdList.size=" << m_undoCommandList.size ()
<< " redoCmdList.size=" << m_redoCommandList.size ()
<< endl;
#endif
......@@ -610,7 +610,7 @@ void kpCommandHistoryBase::trimCommandLists ()
-m_documentRestoredPosition > (int) m_undoCommandList.size ())
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\t\t\tinvalidate documentRestoredPosition";
qCDebug(kpLogCommands) << "\t\t\tinvalidate documentRestoredPosition";
#endif
m_documentRestoredPosition = INT_MAX;
}
......@@ -651,7 +651,7 @@ static void populatePopupMenu (QMenu *popupMenu,
void kpCommandHistoryBase::updateActions ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::updateActions()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::updateActions()";
#endif
m_actionUndo->setEnabled ((bool) nextUndoCommand ());
......@@ -671,7 +671,7 @@ void kpCommandHistoryBase::updateActions ()
i18n ("Undo"),
m_undoCommandList);
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tpopuplatePopupMenu undo=" << timer.elapsed ()
qCDebug(kpLogCommands) << "\tpopuplatePopupMenu undo=" << timer.elapsed ()
<< "ms" << endl;;
#endif
......@@ -692,7 +692,7 @@ void kpCommandHistoryBase::updateActions ()
i18n ("Redo"),
m_redoCommandList);
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\tpopuplatePopupMenu redo=" << timer.elapsed ()
qCDebug(kpLogCommands) << "\tpopuplatePopupMenu redo=" << timer.elapsed ()
<< "ms" << endl;
#endif
}
......@@ -721,7 +721,7 @@ kpCommand *kpCommandHistoryBase::nextRedoCommand () const
void kpCommandHistoryBase::setNextUndoCommand (kpCommand *command)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::setNextUndoCommand("
qCDebug(kpLogCommands) << "kpCommandHistoryBase::setNextUndoCommand("
<< command
<< ")"
<< endl;
......@@ -743,7 +743,7 @@ void kpCommandHistoryBase::setNextUndoCommand (kpCommand *command)
void kpCommandHistoryBase::documentSaved ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::documentSaved()";
qCDebug(kpLogCommands) << "kpCommandHistoryBase::documentSaved()";
#endif
m_documentRestoredPosition = 0;
......
......@@ -58,7 +58,7 @@ kpCommandSize::SizeType kpCommandSize::PixmapSize (int width, int height, int de
(kpCommandSize::SizeType) width * height * roundedDepth / 8;
#if DEBUG_KP_COMMAND_SIZE && 0
kDebug () << "kpCommandSize::PixmapSize() w=" << width
qCDebug(kpLogCommands) << "kpCommandSize::PixmapSize() w=" << width
<< " h=" << height
<< " d=" << depth
<< " roundedDepth=" << roundedDepth
......@@ -90,7 +90,7 @@ kpCommandSize::SizeType kpCommandSize::QImageSize (int width, int height, int de
(kpCommandSize::SizeType) width * height * roundedDepth / 8;
#if DEBUG_KP_COMMAND_SIZE && 0
kDebug () << "kpCommandSize::QImageSize() w=" << width
qCDebug(kpLogCommands) << "kpCommandSize::QImageSize() w=" << width
<< " h=" << height
<< " d=" << depth
<< " roundedDepth=" << roundedDepth
......@@ -132,7 +132,7 @@ kpCommandSize::SizeType kpCommandSize::SelectionSize (const kpAbstractSelection
kpCommandSize::SizeType kpCommandSize::StringSize (const QString &string)
{
#if DEBUG_KP_COMMAND_SIZE && 1
kDebug () << "kpCommandSize::StringSize(" << string << ")"
qCDebug(kpLogCommands) << "kpCommandSize::StringSize(" << string << ")"
<< " len=" << string.length ()
<< " sizeof(QChar)=" << sizeof (QChar)
<< endl;
......@@ -145,7 +145,7 @@ kpCommandSize::SizeType kpCommandSize::StringSize (const QString &string)
kpCommandSize::SizeType kpCommandSize::PolygonSize (const QPolygon &points)
{
#if DEBUG_KP_COMMAND_SIZE && 1
kDebug () << "kpCommandSize::PolygonSize() points.size="
qCDebug(kpLogCommands) << "kpCommandSize::PolygonSize() points.size="
<< points.size ()
<< " sizeof(QPoint)=" << sizeof (QPoint)
<< endl;
......
......@@ -63,17 +63,17 @@ kpMacroCommand::~kpMacroCommand ()
kpCommandSize::SizeType kpMacroCommand::size () const
{
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "kpMacroCommand::size()";
qCDebug(kpLogCommands) << "kpMacroCommand::size()";
#endif
SizeType s = 0;
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\tcalculating:";
qCDebug(kpLogCommands) << "\tcalculating:";
#endif
foreach (kpCommand *cmd, m_commandList)
{
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\t\tcurrentSize=" << s << " + "
qCDebug(kpLogCommands) << "\t\tcurrentSize=" << s << " + "
<< cmd->name () << ".size=" << cmd->size ()
<< endl;
#endif
......@@ -81,7 +81,7 @@ kpCommandSize::SizeType kpMacroCommand::size () const
}
#if DEBUG_KP_COMMAND_HISTORY && 0
kDebug () << "\treturning " << s;
qCDebug(kpLogCommands) << "\treturning " << s;
#endif
return s;
}
......@@ -92,7 +92,7 @@ kpCommandSize::SizeType kpMacroCommand::size () const
void kpMacroCommand::execute ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpMacroCommand::execute()";
qCDebug(kpLogCommands) << "kpMacroCommand::execute()";
#endif
viewManager()->setQueueUpdates();
......@@ -102,7 +102,7 @@ void kpMacroCommand::execute ()
++it)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "\texecuting " << (*it)->name ();
qCDebug(kpLogCommands) << "\texecuting " << (*it)->name ();
#endif
(*it)->execute ();