summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-07 09:55:18 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-07 17:55:54 (GMT)
commit23d779e4e202e2ea7b986e0a872deeaa1a7e95fe (patch)
tree54ad3630f5e1b45d009754eccc93952282a76cb6
parent59a7bb367885b1001731200eb36809a0f78dba33 (diff)
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
-rw-r--r--CMakeLists.txt1
-rw-r--r--commands/imagelib/effects/kpEffectBalanceCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectClearCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectEmbossCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectFlattenCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectInvertCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectReduceColorsCommand.cpp2
-rw-r--r--commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp2
-rw-r--r--commands/imagelib/transforms/kpTransformFlipCommand.cpp4
-rw-r--r--commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp8
-rw-r--r--commands/imagelib/transforms/kpTransformRotateCommand.cpp4
-rw-r--r--commands/imagelib/transforms/kpTransformSkewCommand.cpp4
-rw-r--r--commands/kpCommandHistory.cpp4
-rw-r--r--commands/kpCommandHistoryBase.cpp82
-rw-r--r--commands/kpCommandSize.cpp8
-rw-r--r--commands/kpMacroCommand.cpp16
-rw-r--r--commands/tools/flow/kpToolFlowCommand.cpp4
-rw-r--r--commands/tools/kpToolFloodFillCommand.cpp8
-rw-r--r--commands/tools/polygonal/kpToolPolygonalCommand.cpp2
-rw-r--r--commands/tools/rectangular/kpToolRectangularCommand.cpp2
-rw-r--r--commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp6
-rw-r--r--commands/tools/selection/kpToolSelectionCreateCommand.cpp8
-rw-r--r--commands/tools/selection/kpToolSelectionDestroyCommand.cpp12
-rw-r--r--commands/tools/selection/kpToolSelectionMoveCommand.cpp12
-rw-r--r--commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp8
-rw-r--r--commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp8
-rw-r--r--commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp6
-rw-r--r--commands/tools/selection/text/kpToolTextGiveContentCommand.cpp8
-rw-r--r--cursors/kpCursorLightCross.cpp4
-rw-r--r--dialogs/imagelib/effects/kpEffectsDialog.cpp26
-rw-r--r--dialogs/imagelib/kpDocumentMetaInfoDialog.cpp32
-rw-r--r--dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp22
-rw-r--r--dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp14
-rw-r--r--dialogs/imagelib/transforms/kpTransformRotateDialog.cpp2
-rw-r--r--dialogs/imagelib/transforms/kpTransformSkewDialog.cpp2
-rw-r--r--dialogs/kpDocumentSaveOptionsPreviewDialog.cpp16
-rw-r--r--document/kpDocument.cpp12
-rw-r--r--document/kpDocumentSaveOptions.cpp6
-rw-r--r--document/kpDocument_Open.cpp16
-rw-r--r--document/kpDocument_Save.cpp44
-rw-r--r--document/kpDocument_Selection.cpp14
-rw-r--r--environments/document/kpDocumentEnvironment.cpp20
-rw-r--r--generic/widgets/kpResizeSignallingLabel.cpp4
-rw-r--r--imagelib/effects/kpEffectBalance.cpp8
-rw-r--r--imagelib/effects/kpEffectBlurSharpen.cpp10
-rw-r--r--imagelib/effects/kpEffectEmboss.cpp4
-rw-r--r--imagelib/effects/kpEffectHSV.cpp2
-rw-r--r--imagelib/effects/kpEffectInvert.cpp4
-rw-r--r--imagelib/effects/kpEffectReduceColors.cpp18
-rw-r--r--imagelib/effects/kpEffectToneEnhance.cpp2
-rw-r--r--imagelib/kpColor.cpp22
-rw-r--r--imagelib/kpColor.h2
-rw-r--r--imagelib/kpDocumentMetaInfo.cpp10
-rw-r--r--imagelib/kpFloodFill.cpp18
-rw-r--r--imagelib/kpPainter.cpp20
-rw-r--r--imagelib/transforms/kpTransformAutoCrop.cpp36
-rw-r--r--imagelib/transforms/kpTransformCrop_ImageSelection.cpp16
-rw-r--r--imagelib/transforms/kpTransformCrop_TextSelection.cpp6
-rw-r--r--kpLogCategories.cpp41
-rw-r--r--kpLogCategories.h46
-rw-r--r--kpThumbnail.cpp8
-rw-r--r--kpViewScrollableContainer.cpp28
-rw-r--r--layers/selections/image/kpAbstractImageSelection.cpp30
-rw-r--r--layers/selections/image/kpFreeFormImageSelection.cpp10
-rw-r--r--layers/selections/image/kpImageSelectionTransparency.cpp18
-rw-r--r--layers/selections/kpAbstractSelection.cpp22
-rw-r--r--layers/selections/kpSelectionDrag.cpp20
-rw-r--r--layers/selections/kpSelectionFactory.cpp4
-rw-r--r--layers/selections/text/kpTextSelection.cpp2
-rw-r--r--layers/selections/text/kpTextSelection_Cursor.cpp4
-rw-r--r--layers/selections/text/kpTextSelection_Paint.cpp8
-rw-r--r--lgpl/generic/kpColorCollection.cpp30
-rw-r--r--lgpl/generic/widgets/kpColorCellsBase.cpp20
-rw-r--r--mainWindow/kpMainWindow.cpp64
-rw-r--r--mainWindow/kpMainWindow_Colors.cpp12
-rw-r--r--mainWindow/kpMainWindow_Edit.cpp46
-rw-r--r--mainWindow/kpMainWindow_File.cpp88
-rw-r--r--mainWindow/kpMainWindow_Image.cpp6
-rw-r--r--mainWindow/kpMainWindow_Settings.cpp6
-rw-r--r--mainWindow/kpMainWindow_StatusBar.cpp40
-rw-r--r--mainWindow/kpMainWindow_Text.cpp22
-rw-r--r--mainWindow/kpMainWindow_Tools.cpp24
-rw-r--r--mainWindow/kpMainWindow_View.cpp8
-rw-r--r--mainWindow/kpMainWindow_View_Thumbnail.cpp60
-rw-r--r--mainWindow/kpMainWindow_View_Zoom.cpp56
-rw-r--r--pixmapfx/kpPixmapFX_DrawShapes.cpp14
-rw-r--r--pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp4
-rw-r--r--pixmapfx/kpPixmapFX_Transforms.cpp72
-rw-r--r--scan/sanedialog.cpp2
-rw-r--r--tools/flow/kpToolColorEraser.cpp10
-rw-r--r--tools/flow/kpToolEraser.cpp2
-rw-r--r--tools/flow/kpToolFlowBase.cpp12
-rw-r--r--tools/flow/kpToolSpraycan.cpp18
-rw-r--r--tools/kpTool.cpp2
-rw-r--r--tools/kpToolColorPicker.cpp4
-rw-r--r--tools/kpToolFloodFill.cpp6
-rw-r--r--tools/kpToolZoom.cpp8
-rw-r--r--tools/kpTool_Drawing.cpp20
-rw-r--r--tools/kpTool_KeyboardEvents.cpp30
-rw-r--r--tools/kpTool_MouseEvents.cpp38
-rw-r--r--tools/kpTool_OtherEvents.cpp14
-rw-r--r--tools/kpTool_Utilities.cpp20
-rw-r--r--tools/polygonal/kpToolCurve.cpp6
-rw-r--r--tools/polygonal/kpToolLine.cpp4
-rw-r--r--tools/polygonal/kpToolPolygon.cpp4
-rw-r--r--tools/polygonal/kpToolPolygonalBase.cpp22
-rw-r--r--tools/polygonal/kpToolPolyline.cpp6
-rw-r--r--tools/rectangular/kpToolRectangularBase.cpp10
-rw-r--r--tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp12
-rw-r--r--tools/selection/image/kpToolEllipticalSelection.cpp4
-rw-r--r--tools/selection/image/kpToolFreeFormSelection.cpp10
-rw-r--r--tools/selection/image/kpToolRectSelection.cpp4
-rw-r--r--tools/selection/kpAbstractSelectionTool.cpp36
-rw-r--r--tools/selection/kpAbstractSelectionTool_Create.cpp16
-rw-r--r--tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp8
-rw-r--r--tools/selection/kpAbstractSelectionTool_Move.cpp16
-rw-r--r--tools/selection/kpAbstractSelectionTool_ResizeScale.cpp14
-rw-r--r--tools/selection/text/kpToolText.cpp12
-rw-r--r--tools/selection/text/kpToolText_Commands.cpp2
-rw-r--r--tools/selection/text/kpToolText_Create.cpp12
-rw-r--r--tools/selection/text/kpToolText_CursorCalc.cpp2
-rw-r--r--tools/selection/text/kpToolText_InputMethodEvents.cpp4
-rw-r--r--tools/selection/text/kpToolText_KeyboardEvents.cpp18
-rw-r--r--tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp22
-rw-r--r--tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp12
-rw-r--r--tools/selection/text/kpToolText_SelectText.cpp8
-rw-r--r--tools/selection/text/kpToolText_TextStyle.cpp28
-rw-r--r--views/kpThumbnailView.cpp6
-rw-r--r--views/kpUnzoomedThumbnailView.cpp12
-rw-r--r--views/kpView.cpp18
-rw-r--r--views/kpView_Events.cpp36
-rw-r--r--views/kpView_Paint.cpp62
-rw-r--r--views/kpView_Selections.cpp22
-rw-r--r--views/kpZoomedThumbnailView.cpp12
-rw-r--r--views/kpZoomedView.cpp6
-rw-r--r--views/manager/kpViewManager.cpp14
-rw-r--r--views/manager/kpViewManager_TextCursor.cpp8
-rw-r--r--views/manager/kpViewManager_ViewUpdates.cpp22
-rw-r--r--widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp6
-rw-r--r--widgets/colorSimilarity/kpColorSimilarityFrame.cpp2
-rw-r--r--widgets/colorSimilarity/kpColorSimilarityHolder.cpp4
-rw-r--r--widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp14
-rw-r--r--widgets/imagelib/effects/kpEffectBalanceWidget.cpp2
-rw-r--r--widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp10
-rw-r--r--widgets/imagelib/effects/kpEffectEmbossWidget.cpp2
-rw-r--r--widgets/imagelib/effects/kpEffectFlattenWidget.cpp6
-rw-r--r--widgets/imagelib/effects/kpEffectHSVWidget.cpp2
-rw-r--r--widgets/imagelib/effects/kpEffectInvertWidget.cpp6
-rw-r--r--widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp2
-rw-r--r--widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp2
-rw-r--r--widgets/kpColorCells.cpp16
-rw-r--r--widgets/kpDocumentSaveOptionsWidget.cpp44
-rw-r--r--widgets/kpDualColorButton.cpp24
-rw-r--r--widgets/kpPrintDialogPage.cpp8
-rw-r--r--widgets/kpTransparentColorCell.cpp2
-rw-r--r--widgets/toolbars/kpColorToolBar.cpp12
-rw-r--r--widgets/toolbars/kpToolToolBar.cpp12
-rw-r--r--widgets/toolbars/options/kpToolWidgetBase.cpp60
-rw-r--r--widgets/toolbars/options/kpToolWidgetBrush.cpp6
-rw-r--r--widgets/toolbars/options/kpToolWidgetEraserSize.cpp2
-rw-r--r--widgets/toolbars/options/kpToolWidgetFillStyle.cpp4
-rw-r--r--widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp8
-rw-r--r--widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp6
164 files changed, 1251 insertions, 1163 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67b5aa9..8129b13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/commands/imagelib/effects/kpEffectBalanceCommand.cpp b/commands/imagelib/effects/kpEffectBalanceCommand.cpp
index 0dfe028..e3f5341 100644
--- a/commands/imagelib/effects/kpEffectBalanceCommand.cpp
+++ b/commands/imagelib/effects/kpEffectBalanceCommand.cpp
@@ -33,7 +33,7 @@
#include "imagelib/effects/kpEffectBalance.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp b/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
index 9a48aee..e3bf9ed 100644
--- a/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
+++ b/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
@@ -31,7 +31,7 @@
#include "kpEffectBlurSharpenCommand.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectClearCommand.cpp b/commands/imagelib/effects/kpEffectClearCommand.cpp
index 748f184..e1299a7 100644
--- a/commands/imagelib/effects/kpEffectClearCommand.cpp
+++ b/commands/imagelib/effects/kpEffectClearCommand.cpp
@@ -33,7 +33,7 @@
#include "document/kpDocument.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectEmbossCommand.cpp b/commands/imagelib/effects/kpEffectEmbossCommand.cpp
index 1d08c62..8189b3a 100644
--- a/commands/imagelib/effects/kpEffectEmbossCommand.cpp
+++ b/commands/imagelib/effects/kpEffectEmbossCommand.cpp
@@ -32,7 +32,7 @@
#include "kpEffectEmbossCommand.h"
#include "imagelib/effects/kpEffectEmboss.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectFlattenCommand.cpp b/commands/imagelib/effects/kpEffectFlattenCommand.cpp
index d696cd2..8edbf56 100644
--- a/commands/imagelib/effects/kpEffectFlattenCommand.cpp
+++ b/commands/imagelib/effects/kpEffectFlattenCommand.cpp
@@ -32,7 +32,7 @@
#include "kpEffectFlattenCommand.h"
#include "imagelib/effects/kpEffectFlatten.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectInvertCommand.cpp b/commands/imagelib/effects/kpEffectInvertCommand.cpp
index 6b8e2f8..ed306ad 100644
--- a/commands/imagelib/effects/kpEffectInvertCommand.cpp
+++ b/commands/imagelib/effects/kpEffectInvertCommand.cpp
@@ -39,7 +39,7 @@
#include <qlayout.h>
#include <qpixmap.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp b/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp
index c0499ec..cd68939 100644
--- a/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp
+++ b/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp
@@ -33,7 +33,7 @@
#include "imagelib/effects/kpEffectReduceColors.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
//---------------------------------------------------------------------
diff --git a/commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp b/commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp
index 83ae3c7..d394c4c 100644
--- a/commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp
+++ b/commands/imagelib/effects/kpEffectToneEnhanceCommand.cpp
@@ -31,7 +31,7 @@
#include "imagelib/effects/kpEffectToneEnhance.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
diff --git a/commands/imagelib/transforms/kpTransformFlipCommand.cpp b/commands/imagelib/transforms/kpTransformFlipCommand.cpp
index 221d8c9..120ae37 100644
--- a/commands/imagelib/transforms/kpTransformFlipCommand.cpp
+++ b/commands/imagelib/transforms/kpTransformFlipCommand.cpp
@@ -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
diff --git a/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp b/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp
index 5fbf996..ea55cd4 100644
--- a/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp
+++ b/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp
@@ -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
diff --git a/commands/imagelib/transforms/kpTransformRotateCommand.cpp b/commands/imagelib/transforms/kpTransformRotateCommand.cpp
index 36f2ad0..5d18a37 100644
--- a/commands/imagelib/transforms/kpTransformRotateCommand.cpp
+++ b/commands/imagelib/transforms/kpTransformRotateCommand.cpp
@@ -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 ()
diff --git a/commands/imagelib/transforms/kpTransformSkewCommand.cpp b/commands/imagelib/transforms/kpTransformSkewCommand.cpp
index 227c751..3db5f9f 100644
--- a/commands/imagelib/transforms/kpTransformSkewCommand.cpp
+++ b/commands/imagelib/transforms/kpTransformSkewCommand.cpp
@@ -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 ()
diff --git a/commands/kpCommandHistory.cpp b/commands/kpCommandHistory.cpp
index 640b893..f73de58 100644
--- a/commands/kpCommandHistory.cpp
+++ b/commands/kpCommandHistory.cpp
@@ -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 ();
}
diff --git a/commands/kpCommandHistoryBase.cpp b/commands/kpCommandHistoryBase.cpp
index b5a0d5a..839eed2 100644
--- a/commands/kpCommandHistoryBase.cpp
+++ b/commands/kpCommandHistoryBase.cpp
@@ -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;
diff --git a/commands/kpCommandSize.cpp b/commands/kpCommandSize.cpp
index f20629f..82a073e 100644
--- a/commands/kpCommandSize.cpp
+++ b/commands/kpCommandSize.cpp
@@ -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;
diff --git a/commands/kpMacroCommand.cpp b/commands/kpMacroCommand.cpp
index d933451..d89e174 100644
--- a/commands/kpMacroCommand.cpp
+++ b/commands/kpMacroCommand.cpp
@@ -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 ();
}
@@ -116,7 +116,7 @@ void kpMacroCommand::execute ()
void kpMacroCommand::unexecute ()
{
#if DEBUG_KP_COMMAND_HISTORY
- kDebug () << "kpMacroCommand::unexecute()";
+ qCDebug(kpLogCommands) << "kpMacroCommand::unexecute()";
#endif
viewManager()->setQueueUpdates();
@@ -127,7 +127,7 @@ void kpMacroCommand::unexecute ()
while (it != m_commandList.end ())
{
#if DEBUG_KP_COMMAND_HISTORY
- kDebug () << "\tunexecuting " << (*it)->name ();
+ qCDebug(kpLogCommands) << "\tunexecuting " << (*it)->name ();
#endif
(*it)->unexecute ();
diff --git a/commands/tools/flow/kpToolFlowCommand.cpp b/commands/tools/flow/kpToolFlowCommand.cpp
index 2b99c40..b2dfc39 100644
--- a/commands/tools/flow/kpToolFlowCommand.cpp
+++ b/commands/tools/flow/kpToolFlowCommand.cpp
@@ -103,7 +103,7 @@ void kpToolFlowCommand::updateBoundingRect (const QPoint &point)
void kpToolFlowCommand::updateBoundingRect (const QRect &rect)
{
#if DEBUG_KP_TOOL_FLOW_COMMAND & 0
- kDebug () << "kpToolFlowCommand::updateBoundingRect() existing="
+ qCDebug(kpLogCommands) << "kpToolFlowCommand::updateBoundingRect() existing="
<< d->boundingRect
<< " plus="
<< rect
@@ -111,7 +111,7 @@ void kpToolFlowCommand::updateBoundingRect (const QRect &rect)
#endif
d->boundingRect = d->boundingRect.united (rect);
#if DEBUG_KP_TOOL_FLOW_COMMAND & 0
- kDebug () << "\tresult=" << d->boundingRect;
+ qCDebug(kpLogCommands) << "\tresult=" << d->boundingRect;
#endif
}
diff --git a/commands/tools/kpToolFloodFillCommand.cpp b/commands/tools/kpToolFloodFillCommand.cpp
index c812950..388d0b6 100644
--- a/commands/tools/kpToolFloodFillCommand.cpp
+++ b/commands/tools/kpToolFloodFillCommand.cpp
@@ -37,7 +37,7 @@
#include "imagelib/kpImage.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qapplication.h>
@@ -100,7 +100,7 @@ void kpToolFloodFillCommand::setFillEntireImage (bool yes)
void kpToolFloodFillCommand::execute ()
{
#if DEBUG_KP_TOOL_FLOOD_FILL && 1
- kDebug () << "kpToolFloodFillCommand::execute() fillEntireImage="
+ qCDebug(kpLogCommands) << "kpToolFloodFillCommand::execute() fillEntireImage="
<< d->fillEntireImage << endl;
#endif
@@ -129,7 +129,7 @@ void kpToolFloodFillCommand::execute ()
else
{
#if DEBUG_KP_TOOL_FLOOD_FILL && 1
- kDebug () << "\tinvalid boundingRect - must be NOP case";
+ qCDebug(kpLogCommands) << "\tinvalid boundingRect - must be NOP case";
#endif
}
}
@@ -141,7 +141,7 @@ void kpToolFloodFillCommand::execute ()
void kpToolFloodFillCommand::unexecute ()
{
#if DEBUG_KP_TOOL_FLOOD_FILL && 1
- kDebug () << "kpToolFloodFillCommand::unexecute() fillEntireImage="
+ qCDebug(kpLogCommands) << "kpToolFloodFillCommand::unexecute() fillEntireImage="
<< d->fillEntireImage << endl;
#endif
diff --git a/commands/tools/polygonal/kpToolPolygonalCommand.cpp b/commands/tools/polygonal/kpToolPolygonalCommand.cpp
index 4849bcd..3cefc34 100644
--- a/commands/tools/polygonal/kpToolPolygonalCommand.cpp
+++ b/commands/tools/polygonal/kpToolPolygonalCommand.cpp
@@ -44,7 +44,7 @@
#include <float.h>
#include <math.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qbitmap.h>
diff --git a/commands/tools/rectangular/kpToolRectangularCommand.cpp b/commands/tools/rectangular/kpToolRectangularCommand.cpp
index b316faa..de10c0b 100644
--- a/commands/tools/rectangular/kpToolRectangularCommand.cpp
+++ b/commands/tools/rectangular/kpToolRectangularCommand.cpp
@@ -43,7 +43,7 @@
#include "views/kpView.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qbitmap.h>
diff --git a/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp b/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp
index 46a6ae7..6968cd9 100644
--- a/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp
+++ b/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp
@@ -36,7 +36,7 @@
#include "kpDefs.h"
#include "generic/kpSetOverrideCursorSaver.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qcursor.h>
@@ -69,7 +69,7 @@ kpCommandSize::SizeType kpToolImageSelectionTransparencyCommand::size () const
void kpToolImageSelectionTransparencyCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolImageSelectionTransparencyCommand::execute()";
+ qCDebug(kpLogCommands) << "kpToolImageSelectionTransparencyCommand::execute()";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
@@ -84,7 +84,7 @@ void kpToolImageSelectionTransparencyCommand::execute ()
void kpToolImageSelectionTransparencyCommand::unexecute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolImageSelectionTransparencyCommand::unexecute()";
+ qCDebug(kpLogCommands) << "kpToolImageSelectionTransparencyCommand::unexecute()";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
diff --git a/commands/tools/selection/kpToolSelectionCreateCommand.cpp b/commands/tools/selection/kpToolSelectionCreateCommand.cpp
index 3533b14..8af5512 100644
--- a/commands/tools/selection/kpToolSelectionCreateCommand.cpp
+++ b/commands/tools/selection/kpToolSelectionCreateCommand.cpp
@@ -42,7 +42,7 @@
#include "views/kpView.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qapplication.h>
@@ -96,7 +96,7 @@ void kpToolSelectionCreateCommand::setFromSelection (const kpAbstractSelection &
void kpToolSelectionCreateCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionCreateCommand::execute()";
+ qCDebug(kpLogCommands) << "kpToolSelectionCreateCommand::execute()";
#endif
kpDocument *doc = document ();
@@ -105,8 +105,8 @@ void kpToolSelectionCreateCommand::execute ()
if (m_fromSelection)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\tusing fromSelection";
- kDebug () << "\t\thave sel=" << doc->selection ()
+ qCDebug(kpLogCommands) << "\tusing fromSelection";
+ qCDebug(kpLogCommands) << "\t\thave sel=" << doc->selection ()
<< endl;
#endif
kpAbstractImageSelection *imageSel =
diff --git a/commands/tools/selection/kpToolSelectionDestroyCommand.cpp b/commands/tools/selection/kpToolSelectionDestroyCommand.cpp
index 773c4b8..7d95410 100644
--- a/commands/tools/selection/kpToolSelectionDestroyCommand.cpp
+++ b/commands/tools/selection/kpToolSelectionDestroyCommand.cpp
@@ -40,7 +40,7 @@
#include <qpolygon.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/kpAbstractSelection.h"
@@ -87,7 +87,7 @@ kpCommandSize::SizeType kpToolSelectionDestroyCommand::size () const
void kpToolSelectionDestroyCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionDestroyCommand::execute () CALLED";
+ qCDebug(kpLogCommands) << "kpToolSelectionDestroyCommand::execute () CALLED";
#endif
kpDocument *doc = document ();
@@ -117,7 +117,7 @@ void kpToolSelectionDestroyCommand::execute ()
void kpToolSelectionDestroyCommand::unexecute ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionDestroyCommand::unexecute () CALLED";
+ qCDebug(kpLogCommands) << "kpToolSelectionDestroyCommand::unexecute () CALLED";
#endif
kpDocument *doc = document ();
@@ -128,7 +128,7 @@ void kpToolSelectionDestroyCommand::unexecute ()
// not error because it's possible that the user dragged out a new
// region (without pulling image), and then CTRL+Z
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionDestroyCommand::unexecute() already has sel region";
+ qCDebug(kpLogCommands) << "kpToolSelectionDestroyCommand::unexecute() already has sel region";
#endif
if (doc->selection ()->hasContent ())
@@ -143,13 +143,13 @@ void kpToolSelectionDestroyCommand::unexecute ()
if (m_pushOntoDocument)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\tunpush oldDocImage onto doc first";
+ qCDebug(kpLogCommands) << "\tunpush oldDocImage onto doc first";
#endif
doc->setImageAt (m_oldDocImage, m_oldSelectionPtr->topLeft ());
}
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\tsetting selection to: rect=" << m_oldSelectionPtr->boundingRect ()
+ qCDebug(kpLogCommands) << "\tsetting selection to: rect=" << m_oldSelectionPtr->boundingRect ()
<< " hasContent=" << m_oldSelectionPtr->hasContent ()
<< endl;
#endif
diff --git a/commands/tools/selection/kpToolSelectionMoveCommand.cpp b/commands/tools/selection/kpToolSelectionMoveCommand.cpp
index 2f9bdf9..d9d422c 100644
--- a/commands/tools/selection/kpToolSelectionMoveCommand.cpp
+++ b/commands/tools/selection/kpToolSelectionMoveCommand.cpp
@@ -40,7 +40,7 @@
#include "views/kpView.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qapplication.h>
@@ -96,7 +96,7 @@ kpCommandSize::SizeType kpToolSelectionMoveCommand::size () const
void kpToolSelectionMoveCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolSelectionMoveCommand::execute()";
+ qCDebug(kpLogCommands) << "kpToolSelectionMoveCommand::execute()";
#endif
kpDocument *doc = document ();
@@ -128,7 +128,7 @@ void kpToolSelectionMoveCommand::execute ()
void kpToolSelectionMoveCommand::unexecute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolSelectionMoveCommand::unexecute()";
+ qCDebug(kpLogCommands) << "kpToolSelectionMoveCommand::unexecute()";
#endif
kpDocument *doc = document ();
@@ -146,7 +146,7 @@ void kpToolSelectionMoveCommand::unexecute ()
if (!m_oldDocumentImage.isNull ())
doc->setImageAt (m_oldDocumentImage, m_documentBoundingRect.topLeft ());
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\tmove to startPoint=" << m_startPoint;
+ qCDebug(kpLogCommands) << "\tmove to startPoint=" << m_startPoint;
#endif
sel->moveTo (m_startPoint);
@@ -159,7 +159,7 @@ void kpToolSelectionMoveCommand::unexecute ()
void kpToolSelectionMoveCommand::moveTo (const QPoint &point, bool moveLater)
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "kpToolSelectionMoveCommand::moveTo" << point
+ qCDebug(kpLogCommands) << "kpToolSelectionMoveCommand::moveTo" << point
<< " moveLater=" << moveLater
<<endl;
#endif
@@ -192,7 +192,7 @@ void kpToolSelectionMoveCommand::moveTo (int x, int y, bool moveLater)
void kpToolSelectionMoveCommand::copyOntoDocument ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionMoveCommand::copyOntoDocument()";
+ qCDebug(kpLogCommands) << "kpToolSelectionMoveCommand::copyOntoDocument()";
#endif
kpDocument *doc = document ();
diff --git a/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp b/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp
index 1285473..f550fa9 100644
--- a/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp
+++ b/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp
@@ -36,7 +36,7 @@
#include "document/kpDocument.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
@@ -49,7 +49,7 @@ kpToolSelectionPullFromDocumentCommand::kpToolSelectionPullFromDocumentCommand (
m_backgroundColor (backgroundColor)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolSelectionPullFromDocumentCommand::<ctor>() environ="
+ qCDebug(kpLogCommands) << "kpToolSelectionPullFromDocumentCommand::<ctor>() environ="
<< environ
<< endl;
#endif
@@ -64,7 +64,7 @@ kpToolSelectionPullFromDocumentCommand::~kpToolSelectionPullFromDocumentCommand
void kpToolSelectionPullFromDocumentCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolSelectionPullFromDocumentCommand::execute()";
+ qCDebug(kpLogCommands) << "kpToolSelectionPullFromDocumentCommand::execute()";
#endif
kpDocument *doc = document ();
@@ -125,7 +125,7 @@ void kpToolSelectionPullFromDocumentCommand::execute ()
void kpToolSelectionPullFromDocumentCommand::unexecute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolSelectionPullFromDocumentCommand::unexecute()";
+ qCDebug(kpLogCommands) << "kpToolSelectionPullFromDocumentCommand::unexecute()";
#endif
kpDocument *doc = document ();
diff --git a/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp b/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp
index 4713978..1314abc 100644
--- a/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp
+++ b/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp
@@ -42,7 +42,7 @@
#include "views/kpView.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qapplication.h>
@@ -168,7 +168,7 @@ void kpToolSelectionResizeScaleCommand::killSmoothScaleTimer ()
void kpToolSelectionResizeScaleCommand::resizeScaleAndMove (bool delayed)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionResizeScaleCommand::resizeScaleAndMove(delayed="
+ qCDebug(kpLogCommands) << "kpToolSelectionResizeScaleCommand::resizeScaleAndMove(delayed="
<< delayed << ")" << endl;
#endif
@@ -219,7 +219,7 @@ void kpToolSelectionResizeScaleCommand::resizeScaleAndMove (bool delayed)
void kpToolSelectionResizeScaleCommand::resizeScaleAndMove ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionResizeScaleCommand::resizeScaleAndMove()";
+ qCDebug(kpLogCommands) << "kpToolSelectionResizeScaleCommand::resizeScaleAndMove()";
#endif
resizeScaleAndMove (false/*no delay*/);
}
@@ -229,7 +229,7 @@ void kpToolSelectionResizeScaleCommand::resizeScaleAndMove ()
void kpToolSelectionResizeScaleCommand::finalize ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpToolSelectionResizeScaleCommand::finalize()"
+ qCDebug(kpLogCommands) << "kpToolSelectionResizeScaleCommand::finalize()"
<< " smoothScaleTimer->isActive="
<< m_smoothScaleTimer->isActive ()
<< endl;
diff --git a/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp b/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp
index 08cfc07..f915da2 100644
--- a/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp
+++ b/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp
@@ -33,7 +33,7 @@
#include "environments/commands/kpCommandEnvironment.h"
#include "layers/selections/text/kpTextSelection.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
kpToolTextChangeStyleCommand::kpToolTextChangeStyleCommand (const QString &name,
@@ -61,7 +61,7 @@ kpCommandSize::SizeType kpToolTextChangeStyleCommand::size () const
void kpToolTextChangeStyleCommand::execute ()
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "kpToolTextChangeStyleCommand::execute()"
+ qCDebug(kpLogCommands) << "kpToolTextChangeStyleCommand::execute()"
<< " font=" << m_newTextStyle.fontFamily ()
<< " fontSize=" << m_newTextStyle.fontSize ()
<< " isBold=" << m_newTextStyle.isBold ()
@@ -81,7 +81,7 @@ void kpToolTextChangeStyleCommand::execute ()
void kpToolTextChangeStyleCommand::unexecute ()
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "kpToolTextChangeStyleCommand::unexecute()"
+ qCDebug(kpLogCommands) << "kpToolTextChangeStyleCommand::unexecute()"
<< " font=" << m_newTextStyle.fontFamily ()
<< " fontSize=" << m_newTextStyle.fontSize ()
<< " isBold=" << m_newTextStyle.isBold ()
diff --git a/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp b/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp
index 5bfee24..3e736ef 100644
--- a/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp
+++ b/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp
@@ -36,7 +36,7 @@
#include "layers/selections/text/kpTextSelection.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
@@ -47,7 +47,7 @@ kpToolTextGiveContentCommand::kpToolTextGiveContentCommand (
: kpAbstractSelectionContentCommand (originalSelBorder, name, environ)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolTextGiveContentCommand::<ctor>() environ="
+ qCDebug(kpLogCommands) << "kpToolTextGiveContentCommand::<ctor>() environ="
<< environ
<< endl;
#endif
@@ -62,7 +62,7 @@ kpToolTextGiveContentCommand::~kpToolTextGiveContentCommand ()
void kpToolTextGiveContentCommand::execute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolTextGiveContentCommand::execute()";
+ qCDebug(kpLogCommands) << "kpToolTextGiveContentCommand::execute()";
#endif
kpDocument *doc = document ();
@@ -128,7 +128,7 @@ void kpToolTextGiveContentCommand::execute ()
void kpToolTextGiveContentCommand::unexecute ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpToolTextGiveContentCommand::unexecute()";
+ qCDebug(kpLogCommands) << "kpToolTextGiveContentCommand::unexecute()";
#endif
kpDocument *doc = document ();
diff --git a/cursors/kpCursorLightCross.cpp b/cursors/kpCursorLightCross.cpp
index 8a5beaf..cdfdf13 100644
--- a/cursors/kpCursorLightCross.cpp
+++ b/cursors/kpCursorLightCross.cpp
@@ -30,7 +30,7 @@
#include "kpCursorLightCross.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <qbitmap.h>
#include <qcursor.h>
@@ -84,7 +84,7 @@ static void setPixel (unsigned char *colorBitmap,
const QCursor *kpCursorLightCrossCreate ()
{
#if DEBUG_KP_CURSOR_LIGHT_CROSS
- kDebug () << "kpCursorLightCrossCreate() ";
+ qCDebug(kpLogMisc) << "kpCursorLightCrossCreate() ";
#endif
const int side = 24;
diff --git a/dialogs/imagelib/effects/kpEffectsDialog.cpp b/dialogs/imagelib/effects/kpEffectsDialog.cpp
index 8c1f5db..ab53e21 100644
--- a/dialogs/imagelib/effects/kpEffectsDialog.cpp
+++ b/dialogs/imagelib/effects/kpEffectsDialog.cpp
@@ -46,7 +46,7 @@
#include <kapplication.h>
#include <kconfig.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qcombobox.h>
@@ -80,7 +80,7 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
m_effectWidget (0)
{
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "kpEffectsDialog::kpEffectsDialog()";
+ qCDebug(kpLogDialogs) << "kpEffectsDialog::kpEffectsDialog()";
#endif
const bool e = updatesEnabled ();
setUpdatesEnabled (false);
@@ -138,13 +138,13 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "about to setUpdatesEnabled()";
+ qCDebug(kpLogDialogs) << "about to setUpdatesEnabled()";
#endif
// OPT: The preview pixmap gets recalculated here and then possibly
// again when QResizeEvent fires, when the dialog is shown.
setUpdatesEnabled (e);
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << endl
+ qCDebug(kpLogDialogs) << endl
<< endl
<< endl;
#endif
@@ -212,7 +212,7 @@ int kpEffectsDialog::selectedEffect () const
void kpEffectsDialog::selectEffect (int which)
{
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "kpEffectsDialog::selectEffect(" << which << ")";
+ qCDebug(kpLogDialogs) << "kpEffectsDialog::selectEffect(" << which << ")";
#endif
if (which < 0 ||
@@ -277,7 +277,7 @@ void kpEffectsDialog::selectEffect (int which)
setUpdatesEnabled (false);
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "widget exists for effect #";
+ qCDebug(kpLogDialogs) << "widget exists for effect #";
#endif
m_settingsGroupBox->setTitle (m_effectWidget->caption ());
@@ -286,11 +286,11 @@ void kpEffectsDialog::selectEffect (int which)
// Don't resize the whole dialog when doing this.
// This seems to work magically without any extra code with Qt4.
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "addWidget";
+ qCDebug(kpLogDialogs) << "addWidget";
#endif
m_settingsLayout->addWidget (m_effectWidget);
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "show widget";
+ qCDebug(kpLogDialogs) << "show widget";
#endif
m_effectWidget->show ();
@@ -302,14 +302,14 @@ void kpEffectsDialog::selectEffect (int which)
this, SLOT (slotDelayedUpdate ()));
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "about to setUpdatesEnabled()";
+ qCDebug(kpLogDialogs) << "about to setUpdatesEnabled()";
#endif
setUpdatesEnabled (e);
}
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "done"
+ qCDebug(kpLogDialogs) << "done"
<< endl
<< endl
<< endl;
@@ -321,7 +321,7 @@ void kpEffectsDialog::selectEffect (int which)
void kpEffectsDialog::slotUpdate ()
{
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "kpEffectsDialog::slotUpdate()"
+ qCDebug(kpLogDialogs) << "kpEffectsDialog::slotUpdate()"
<< " timerActive=" << m_delayedUpdateTimer->isActive ()
<< endl;
#endif
@@ -335,7 +335,7 @@ void kpEffectsDialog::slotUpdate ()
void kpEffectsDialog::slotUpdateWithWaitCursor ()
{
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "kpEffectsDialog::slotUpdateWithWaitCursor()"
+ qCDebug(kpLogDialogs) << "kpEffectsDialog::slotUpdateWithWaitCursor()"
<< " timerActive=" << m_delayedUpdateTimer->isActive ()
<< endl;
#endif
@@ -350,7 +350,7 @@ void kpEffectsDialog::slotUpdateWithWaitCursor ()
void kpEffectsDialog::slotDelayedUpdate ()
{
#if DEBUG_KP_EFFECTS_DIALOG
- kDebug () << "kpEffectsDialog::slotDelayedUpdate()"
+ qCDebug(kpLogDialogs) << "kpEffectsDialog::slotDelayedUpdate()"
<< " timerActive=" << m_delayedUpdateTimer->isActive ()
<< endl;
#endif
diff --git a/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp b/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp
index 9111fc8..91d946f 100644
--- a/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp
+++ b/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp
@@ -35,7 +35,7 @@
#include <KLocalizedString>
#include <KMessageBox>
-#include <KDebug>
+#include "kpLogCategories.h"
#include <QAbstractItemView>
#include <QDialogButtonBox>
@@ -559,7 +559,7 @@ bool kpDocumentMetaInfoDialog::isFieldsRowDeleteable (int row) const
void kpDocumentMetaInfoDialog::fieldsDeleteRow (int r)
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::fieldsDeleteRow("
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::fieldsDeleteRow("
<< "row=" << r << ")"
<< " currentRow=" << d->fieldsTableWidget->currentRow () << endl;
#endif
@@ -571,19 +571,19 @@ void kpDocumentMetaInfoDialog::fieldsDeleteRow (int r)
// Assertion follows from previous assertion.
const int newRow = r + 1;
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tnewRow=" << newRow;
+ qCDebug(kpLogDialogs) << "\tnewRow=" << newRow;
#endif
Q_ASSERT (newRow < d->fieldsTableWidget->rowCount ());
int newCol = d->fieldsTableWidget->currentColumn ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tnewCol=" << newCol;
+ qCDebug(kpLogDialogs) << "\tnewCol=" << newCol;
#endif
if (newCol != 0 && newCol != 1)
{
newCol = 0;
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\t\tcorrecting to " << newCol;
+ qCDebug(kpLogDialogs) << "\t\tcorrecting to " << newCol;
#endif
}
@@ -613,12 +613,12 @@ void kpDocumentMetaInfoDialog::fieldsDeleteRow (int r)
void kpDocumentMetaInfoDialog::enableFieldsDeleteRowButtonIfShould ()
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::enableFieldsDeleteRowButtonIfShould()";
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::enableFieldsDeleteRowButtonIfShould()";
#endif
const int r = d->fieldsTableWidget->currentRow ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tr=" << r;
+ qCDebug(kpLogDialogs) << "\tr=" << r;
#endif
d->fieldsDeleteRowButton->setEnabled (isFieldsRowDeleteable (r));
@@ -630,7 +630,7 @@ void kpDocumentMetaInfoDialog::slotFieldsCurrentCellChanged (int row, int col,
int oldRow, int oldCol)
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::slotFieldsCurrentCellChanged("
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::slotFieldsCurrentCellChanged("
<< "row=" << row << ",col=" << col
<< ",oldRow=" << oldRow << ",oldCol=" << oldCol
<< ")" << endl;
@@ -650,25 +650,25 @@ void kpDocumentMetaInfoDialog::slotFieldsCurrentCellChanged (int row, int col,
void kpDocumentMetaInfoDialog::slotFieldsItemChanged (QTableWidgetItem *it)
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::slotFieldsItemChanged("
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::slotFieldsItemChanged("
<< "item=" << it << ") rows=" << d->fieldsTableWidget->rowCount ()
<< endl;
#endif
const int r = d->fieldsTableWidget->row (it);
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tr=" << r;
+ qCDebug(kpLogDialogs) << "\tr=" << r;
#endif
Q_ASSERT (r >= 0 && r < d->fieldsTableWidget->rowCount ());
const QString key = d->fieldsTableWidget->item (r, 0)->text ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << " key='" << key << "'";
+ qCDebug(kpLogDialogs) << " key='" << key << "'";
#endif
const QString value = d->fieldsTableWidget->item (r, 1)->text ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << " value='" << value << "'";
+ qCDebug(kpLogDialogs) << " value='" << value << "'";
#endif
// At the last row?
@@ -711,13 +711,13 @@ void kpDocumentMetaInfoDialog::slotFieldsItemChanged (QTableWidgetItem *it)
void kpDocumentMetaInfoDialog::slotFieldsAddRowButtonClicked ()
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::slotFieldsAddRowButtonClicked()"
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::slotFieldsAddRowButtonClicked()"
<< endl;
#endif
const int r = d->fieldsTableWidget->currentRow ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tr=" << r;
+ qCDebug(kpLogDialogs) << "\tr=" << r;
#endif
// (if no row is selected, r = -1)
@@ -734,13 +734,13 @@ void kpDocumentMetaInfoDialog::slotFieldsAddRowButtonClicked ()
void kpDocumentMetaInfoDialog::slotFieldsDeleteRowButtonClicked ()
{
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "kpDocumentMetaInfoDialog::slotFieldsDeleteRowButtonClicked()"
+ qCDebug(kpLogDialogs) << "kpDocumentMetaInfoDialog::slotFieldsDeleteRowButtonClicked()"
<< endl;
#endif
const int r = d->fieldsTableWidget->currentRow ();
#if DEBUG_KP_DOCUMENT_META_INFO_DIALOG
- kDebug () << "\tr=" << r;
+ qCDebug(kpLogDialogs) << "\tr=" << r;
#endif
Q_ASSERT (isFieldsRowDeleteable (r));
diff --git a/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp b/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp
index acd4315..fcefaad 100644
--- a/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp
+++ b/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp
@@ -41,7 +41,7 @@
#include <qpixmap.h>
#include <qpushbutton.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/image/kpAbstractImageSelection.h"
@@ -237,14 +237,14 @@ void kpTransformPreviewDialog::updateDimensions ()
if (!updatesEnabled ())
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "updates not enabled - aborting";
+ qCDebug(kpLogDialogs) << "updates not enabled - aborting";
#endif
return;
}
QSize newDim = newDimensions ();
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::updateDimensions(): newDim=" << newDim;
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::updateDimensions(): newDim=" << newDim;
#endif
QString newDimString = i18n ("%1 x %2",
@@ -278,7 +278,7 @@ int kpTransformPreviewDialog::scaleDimension (int dimension, double scale, int m
void kpTransformPreviewDialog::updateShrunkenDocumentPixmap ()
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::updateShrunkenDocumentPixmap()"
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::updateShrunkenDocumentPixmap()"
<< " shrunkenDocPixmap.size="
<< m_shrunkenDocumentPixmap.size ()
<< " previewPixmapLabelSizeWhenUpdatedPixmap="
@@ -299,7 +299,7 @@ void kpTransformPreviewDialog::updateShrunkenDocumentPixmap ()
m_previewPixmapLabel->size () != m_previewPixmapLabelSizeWhenUpdatedPixmap)
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "\tupdating shrunkenDocPixmap";
+ qCDebug(kpLogDialogs) << "\tupdating shrunkenDocPixmap";
#endif
// TODO: Why the need to keep aspect ratio here?
@@ -349,7 +349,7 @@ void kpTransformPreviewDialog::updateShrunkenDocumentPixmap ()
void kpTransformPreviewDialog::updatePreview ()
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::updatePreview()";
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::updatePreview()";
#endif
if (!m_previewGroupBox)
@@ -364,7 +364,7 @@ void kpTransformPreviewDialog::updatePreview ()
if (!updatesEnabled ())
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "updates not enabled - aborting";
+ qCDebug(kpLogDialogs) << "updates not enabled - aborting";
#endif
return;
}
@@ -403,7 +403,7 @@ void kpTransformPreviewDialog::updatePreview ()
transformedShrunkenDocumentPixmap);
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::updatePreview ():"
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::updatePreview ():"
<< " shrunkenDocumentPixmap: w="
<< m_shrunkenDocumentPixmap.width ()
<< " h="
@@ -429,7 +429,7 @@ void kpTransformPreviewDialog::updatePreview ()
m_previewPixmapLabel->repaint ();
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "\tafter QLabel::setPixmap() previewPixmapLabel: w="
+ qCDebug(kpLogDialogs) << "\tafter QLabel::setPixmap() previewPixmapLabel: w="
<< m_previewPixmapLabel->width ()
<< " h="
<< m_previewPixmapLabel->height ()
@@ -443,7 +443,7 @@ void kpTransformPreviewDialog::updatePreview ()
void kpTransformPreviewDialog::slotUpdate ()
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::slotUpdate()";
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::slotUpdate()";
#endif
updateDimensions ();
updatePreview ();
@@ -453,7 +453,7 @@ void kpTransformPreviewDialog::slotUpdate ()
void kpTransformPreviewDialog::slotUpdateWithWaitCursor ()
{
#if DEBUG_KP_TRANSFORM_PREVIEW_DIALOG
- kDebug () << "kpTransformPreviewDialog::slotUpdateWithWaitCursor()";
+ qCDebug(kpLogDialogs) << "kpTransformPreviewDialog::slotUpdateWithWaitCursor()";
#endif
QApplication::setOverrideCursor (Qt::WaitCursor);
diff --git a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
index 6d860f1..0a7ac3c 100644
--- a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
+++ b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
@@ -50,7 +50,7 @@
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kiconeffect.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -448,7 +448,7 @@ bool kpTransformResizeScaleDialog::smoothScaleEnabled () const
void kpTransformResizeScaleDialog::slotActOnChanged ()
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::slotActOnChanged()";
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::slotActOnChanged()";
#endif
m_resizeButton->setEnabled (resizeEnabled ());
@@ -519,7 +519,7 @@ void kpTransformResizeScaleDialog::slotTypeChanged ()
void kpTransformResizeScaleDialog::slotWidthChanged (int width)
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::slotWidthChanged("
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::slotWidthChanged("
<< width << ")" << endl;
#endif
const double newPercentWidth = double (width) * 100 / double (originalWidth ());
@@ -537,7 +537,7 @@ void kpTransformResizeScaleDialog::slotWidthChanged (int width)
void kpTransformResizeScaleDialog::slotHeightChanged (int height)
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::slotHeightChanged("
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::slotHeightChanged("
<< height << ")" << endl;
#endif
const double newPercentHeight = double (height) * 100 / double (originalHeight ());
@@ -555,7 +555,7 @@ void kpTransformResizeScaleDialog::slotHeightChanged (int height)
void kpTransformResizeScaleDialog::slotPercentWidthChanged (double percentWidth)
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::slotPercentWidthChanged("
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::slotPercentWidthChanged("
<< percentWidth << ")" << endl;
#endif
@@ -573,7 +573,7 @@ void kpTransformResizeScaleDialog::slotPercentWidthChanged (double percentWidth)
void kpTransformResizeScaleDialog::slotPercentHeightChanged (double percentHeight)
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::slotPercentHeightChanged("
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::slotPercentHeightChanged("
<< percentHeight << ")" << endl;
#endif
@@ -591,7 +591,7 @@ void kpTransformResizeScaleDialog::slotPercentHeightChanged (double percentHeigh
void kpTransformResizeScaleDialog::setKeepAspectRatio (bool on)
{
#if DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG && 1
- kDebug () << "kpTransformResizeScaleDialog::setKeepAspectRatio("
+ qCDebug(kpLogDialogs) << "kpTransformResizeScaleDialog::setKeepAspectRatio("
<< on << ")" << endl;
#endif
if (on != m_keepAspectRatioCheckBox->isChecked ())
diff --git a/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp b/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
index 320ac8c..da33f14 100644
--- a/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
+++ b/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
@@ -36,7 +36,7 @@
#include "environments/dialogs/imagelib/transforms/kpTransformDialogEnvironment.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kiconloader.h>
#include <klocale.h>
diff --git a/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp b/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp
index 68bdd6a..81f2d88 100644
--- a/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp
+++ b/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp
@@ -41,7 +41,7 @@
#include <QImage>
#include <QSpinBox>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kiconloader.h>
#include <klocale.h>
diff --git a/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp b/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp
index 49fe389..64578d9 100644
--- a/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp
+++ b/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp
@@ -37,7 +37,7 @@
#include <qpixmap.h>
#include <kconfig.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandSize.h"
@@ -120,7 +120,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const QImage &pix
(int) ((kpCommandSize::SizeType) fileSize * 100 / pixmapSize)) :
0;
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()"
+ qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()"
<< " pixmapSize=" << pixmapSize
<< " fileSize=" << fileSize
<< " raw fileSize/pixmapSize%="
@@ -136,7 +136,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const QImage &pix
void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsPreviewDialog::updatePreviewPixmap()"
+ qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::updatePreviewPixmap()"
<< " filePixmapLabel.size=" << m_filePixmapLabel->size ()
<< " filePixmap.size=" << m_filePixmap->size ()
<< endl;
@@ -153,7 +153,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
maxNewWidth, maxNewHeight,
m_filePixmap->width (), m_filePixmap->height ());
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tmaxNewWidth=" << maxNewWidth
+ qCDebug(kpLogDialogs) << "\tmaxNewWidth=" << maxNewWidth
<< " maxNewHeight=" << maxNewHeight
<< " keepsAspect=" << keepsAspect
<< endl;
@@ -171,7 +171,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
1,
maxNewHeight);
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tnewWidth=" << newWidth
+ qCDebug(kpLogDialogs) << "\tnewWidth=" << newWidth
<< " newHeight=" << newHeight
<< endl;
#endif
@@ -204,7 +204,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
void kpDocumentSaveOptionsPreviewDialog::closeEvent (QCloseEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsPreviewDialog::closeEvent()";
+ qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::closeEvent()";
#endif
QWidget::closeEvent (e);
@@ -216,7 +216,7 @@ void kpDocumentSaveOptionsPreviewDialog::closeEvent (QCloseEvent *e)
void kpDocumentSaveOptionsPreviewDialog::moveEvent (QMoveEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsPreviewDialog::moveEvent()";
+ qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::moveEvent()";
#endif
QWidget::moveEvent (e);
@@ -228,7 +228,7 @@ void kpDocumentSaveOptionsPreviewDialog::moveEvent (QMoveEvent *e)
void kpDocumentSaveOptionsPreviewDialog::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsPreviewDialog::resizeEvent()";
+ qCDebug(kpLogDialogs) << "kpDocumentSaveOptionsPreviewDialog::resizeEvent()";
#endif
QWidget::resizeEvent (e);
diff --git a/document/kpDocument.cpp b/document/kpDocument.cpp
index a73581f..4fe8aca 100644
--- a/document/kpDocument.cpp
+++ b/document/kpDocument.cpp
@@ -48,7 +48,7 @@
#include <math.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kimageio.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -81,7 +81,7 @@ kpDocument::kpDocument (int w, int h,
d (new kpDocumentPrivate ())
{
#if DEBUG_KP_DOCUMENT && 0
- kDebug () << "kpDocument::kpDocument (" << w << "," << h << ")";
+ qCDebug(kpLogDocument) << "kpDocument::kpDocument (" << w << "," << h << ")";
#endif
m_image = new kpImage(w, h, QImage::Format_ARGB32_Premultiplied);
@@ -326,7 +326,7 @@ kpImage kpDocument::getImageAt (const QRect &rect) const
void kpDocument::setImageAt (const kpImage &image, const QPoint &at)
{
#if DEBUG_KP_DOCUMENT && 0
- kDebug () << "kpDocument::setImageAt (image (w="
+ qCDebug(kpLogDocument) << "kpDocument::setImageAt (image (w="
<< image.width ()
<< ",h=" << image.height ()
<< "), x=" << at.x ()
@@ -404,7 +404,7 @@ void kpDocument::setImage (bool ofSelection, const kpImage &image)
void kpDocument::fill (const kpColor &color)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::fill ()";
+ qCDebug(kpLogDocument) << "kpDocument::fill ()";
#endif
m_image->fill(color.toQRgb());
@@ -416,13 +416,13 @@ void kpDocument::fill (const kpColor &color)
void kpDocument::resize (int w, int h, const kpColor &backgroundColor)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::resize (" << w << "," << h << ")";
+ qCDebug(kpLogDocument) << "kpDocument::resize (" << w << "," << h << ")";
#endif
m_oldWidth = width (), m_oldHeight = height ();
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "\toldWidth=" << m_oldWidth
+ qCDebug(kpLogDocument) << "\toldWidth=" << m_oldWidth
<< " oldHeight=" << m_oldHeight
<< endl;
#endif
diff --git a/document/kpDocumentSaveOptions.cpp b/document/kpDocumentSaveOptions.cpp
index ad4a940..ae279ff 100644
--- a/document/kpDocumentSaveOptions.cpp
+++ b/document/kpDocumentSaveOptions.cpp
@@ -34,7 +34,7 @@
#include "pixmapfx/kpPixmapFX.h"
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <ksharedconfig.h>
#include <qbitmap.h>
@@ -136,7 +136,7 @@ void kpDocumentSaveOptions::printDebug (const QString &prefix) const
prefix + QLatin1String (": ") :
QString();
- kDebug () << usedPrefix
+ qCDebug(kpLogDocument) << usedPrefix
<< "mimeType=" << mimeType ()
<< " colorDepth=" << colorDepth ()
<< " dither=" << dither ()
@@ -378,7 +378,7 @@ bool kpDocumentSaveOptions::saveDefaultDifferences (KConfigGroup &config,
bool savedSomething = false;
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS
- kDebug () << "kpDocumentSaveOptions::saveDefaultDifferences()";
+ qCDebug(kpLogDocument) << "kpDocumentSaveOptions::saveDefaultDifferences()";
oldDocInfo.printDebug ("\told");
newDocInfo.printDebug ("\tnew");
#endif
diff --git a/document/kpDocument_Open.cpp b/document/kpDocument_Open.cpp
index 5aebb1c..65cc2d4 100644
--- a/document/kpDocument_Open.cpp
+++ b/document/kpDocument_Open.cpp
@@ -49,7 +49,7 @@
#include <qcolor.h>
#include <qimage.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kimageio.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -83,7 +83,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
kpDocumentMetaInfo *metaInfo)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")";
+ qCDebug(kpLogDocument) << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")";
#endif
if (saveOptions)
@@ -133,9 +133,9 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
saveOptions->setMimeType (detectedMimeType);
#if DEBUG_KP_DOCUMENT
- kDebug () << "\ttempFile=" << tempFile;
- kDebug () << "\tmimetype=" << detectedMimeType;
- kDebug () << "\tsrc=" << url.path ();
+ qCDebug(kpLogDocument) << "\ttempFile=" << tempFile;
+ qCDebug(kpLogDocument) << "\tmimetype=" << detectedMimeType;
+ qCDebug(kpLogDocument) << "\tsrc=" << url.path ();
#endif
if (detectedMimeType.isEmpty ())
@@ -173,7 +173,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
}
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tpixmap: depth=" << image.depth ()
+ qCDebug(kpLogDocument) << "\tpixmap: depth=" << image.depth ()
<< " hasAlphaChannel=" << image.hasAlphaChannel ()
<< endl;
#endif
@@ -194,7 +194,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
void kpDocument::openNew (const QUrl &url)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::openNew (" << url << ")";
+ qCDebug(kpLogDocument) << "kpDocument::openNew (" << url << ")";
#endif
m_image->fill(QColor(Qt::white).rgb());
@@ -218,7 +218,7 @@ void kpDocument::openNew (const QUrl &url)
bool kpDocument::open (const QUrl &url, bool newDocSameNameIfNotExist)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::open (" << url << ")";
+ qCDebug(kpLogDocument) << "kpDocument::open (" << url << ")";
#endif
kpDocumentSaveOptions newSaveOptions;
diff --git a/document/kpDocument_Save.cpp b/document/kpDocument_Save.cpp
index 13d624e..0fe3baf 100644
--- a/document/kpDocument_Save.cpp
+++ b/document/kpDocument_Save.cpp
@@ -47,7 +47,7 @@
#include <qtemporaryfile.h>
#include <qmatrix.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kimageio.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -71,7 +71,7 @@
bool kpDocument::save (bool overwritePrompt, bool lossyPrompt)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::save("
+ qCDebug(kpLogDocument) << "kpDocument::save("
<< "overwritePrompt=" << overwritePrompt
<< ",lossyPrompt=" << lossyPrompt
<< ") url=" << m_url
@@ -107,7 +107,7 @@ bool kpDocument::lossyPromptContinue (const QImage &pixmap,
QWidget *parent)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::lossyPromptContinue()";
+ qCDebug(kpLogDocument) << "kpDocument::lossyPromptContinue()";
#endif
#define QUIT_IF_CANCEL(messageBoxCommand) \
@@ -176,7 +176,7 @@ bool kpDocument::savePixmapToDevice (const QImage &image,
QStringList types = KImageIO::typeForMime (saveOptions.mimeType ());
#if DEBUG_KP_DOCUMENT
- kDebug () << "\ttypes=" << types;
+ qCDebug(kpLogDocument) << "\ttypes=" << types;
#endif
if (types.isEmpty ())
return false;
@@ -186,7 +186,7 @@ bool kpDocument::savePixmapToDevice (const QImage &image,
const QString type = types [0];
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tmimeType=" << saveOptions.mimeType ()
+ qCDebug(kpLogDocument) << "\tmimeType=" << saveOptions.mimeType ()
<< " type=" << type << endl;
#endif
@@ -196,7 +196,7 @@ bool kpDocument::savePixmapToDevice (const QImage &image,
*userCancelled = true;
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because of lossyPrompt";
+ qCDebug(kpLogDocument) << "\treturning false because of lossyPrompt";
#endif
return false;
}
@@ -216,7 +216,7 @@ bool kpDocument::savePixmapToDevice (const QImage &image,
//
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tuseSaveOptionsColorDepth=" << useSaveOptionsColorDepth
+ qCDebug(kpLogDocument) << "\tuseSaveOptionsColorDepth=" << useSaveOptionsColorDepth
<< "current image depth=" << image.depth ()
<< "save options depth=" << saveOptions.colorDepth ();
#endif
@@ -266,19 +266,19 @@ bool kpDocument::savePixmapToDevice (const QImage &image,
quality = saveOptions.quality ();
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tsaving";
+ qCDebug(kpLogDocument) << "\tsaving";
#endif
if (!imageToSave.save (device, type.toLatin1 (), quality))
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tQImage::save() returned false";
+ qCDebug(kpLogDocument) << "\tQImage::save() returned false";
#endif
return false;
}
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tsave OK";
+ qCDebug(kpLogDocument) << "\tsave OK";
#endif
return true;
}
@@ -316,7 +316,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
// such local URLs) for efficiency and because only local writes
// are atomic.
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::savePixmapToFile ("
+ qCDebug(kpLogDocument) << "kpDocument::savePixmapToFile ("
<< url
<< ",overwritePrompt=" << overwritePrompt
<< ",lossyPrompt=" << lossyPrompt
@@ -338,7 +338,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
if (result != KMessageBox::Continue)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tuser doesn't want to overwrite";
+ qCDebug(kpLogDocument) << "\tuser doesn't want to overwrite";
#endif
return false;
@@ -349,7 +349,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent))
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because of lossyPrompt";
+ qCDebug(kpLogDocument) << "\treturning false because of lossyPrompt";
#endif
return false;
}
@@ -372,7 +372,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
atomicFileWriter.cancelWriting ();
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not open QSaveFile"
+ qCDebug(kpLogDocument) << "\treturning false because could not open QSaveFile"
<< " error=" << atomicFileWriter.error () << endl;
#endif
::CouldNotCreateTemporaryFileDialog (parent);
@@ -388,7 +388,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
atomicFileWriter.cancelWriting ();
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not save pixmap to device"
+ qCDebug(kpLogDocument) << "\treturning false because could not save pixmap to device"
<< endl;
#endif
::CouldNotSaveDialog (url, parent);
@@ -402,7 +402,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
atomicFileWriter.cancelWriting ();
#if DEBUG_KP_DOCUMENT
- kDebug () << "\tcould not close QSaveFile";
+ qCDebug(kpLogDocument) << "\tcould not close QSaveFile";
#endif
::CouldNotSaveDialog (url, parent);
return false;
@@ -418,7 +418,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
if (!tempFile.open ())
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not open tempFile";
+ qCDebug(kpLogDocument) << "\treturning false because could not open tempFile";
#endif
::CouldNotCreateTemporaryFileDialog (parent);
return false;
@@ -431,7 +431,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
parent))
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not save pixmap to device"
+ qCDebug(kpLogDocument) << "\treturning false because could not save pixmap to device"
<< endl;
#endif
::CouldNotSaveDialog (url, parent);
@@ -442,7 +442,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
// stops working after close() is called.
const QString tempFileName = tempFile.fileName ();
#if DEBUG_KP_DOCUMENT
- kDebug () << "\ttempFileName='" << tempFileName << "'";
+ qCDebug(kpLogDocument) << "\ttempFileName='" << tempFileName << "'";
#endif
Q_ASSERT (!tempFileName.isEmpty ());
@@ -450,7 +450,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
if (tempFile.error () != QFile::NoError)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not close";
+ qCDebug(kpLogDocument) << "\treturning false because could not close";
#endif
::CouldNotSaveDialog (url, parent);
return false;
@@ -463,7 +463,7 @@ bool kpDocument::savePixmapToFile (const QImage &pixmap,
if (!KIO::NetAccess::upload (tempFileName, url, parent))
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "\treturning false because could not upload";
+ qCDebug(kpLogDocument) << "\treturning false because could not upload";
#endif
KMessageBox::error (parent,
i18n ("Could not save image - failed to upload."));
@@ -483,7 +483,7 @@ bool kpDocument::saveAs (const QUrl &url,
bool lossyPrompt)
{
#if DEBUG_KP_DOCUMENT
- kDebug () << "kpDocument::saveAs (" << url << ","
+ qCDebug(kpLogDocument) << "kpDocument::saveAs (" << url << ","
<< saveOptions.mimeType () << ")" << endl;
#endif
diff --git a/document/kpDocument_Selection.cpp b/document/kpDocument_Selection.cpp
index 195d2eb..f343211 100644
--- a/document/kpDocument_Selection.cpp
+++ b/document/kpDocument_Selection.cpp
@@ -38,7 +38,7 @@
#include <qpainter.h>
#include <qrect.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kimageio.h>
#include <klocale.h>
@@ -78,7 +78,7 @@ kpTextSelection *kpDocument::textSelection () const
void kpDocument::setSelection (const kpAbstractSelection &selection)
{
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "kpDocument::setSelection() sel boundingRect="
+ qCDebug(kpLogDocument) << "kpDocument::setSelection() sel boundingRect="
<< selection.boundingRect ()
<< endl;
#endif
@@ -122,7 +122,7 @@ void kpDocument::setSelection (const kpAbstractSelection &selection)
//
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "\tcheck sel " << (int *) m_selection
+ qCDebug(kpLogDocument) << "\tcheck sel " << (int *) m_selection
<< " boundingRect=" << m_selection->boundingRect ()
<< endl;
#endif
@@ -152,7 +152,7 @@ void kpDocument::setSelection (const kpAbstractSelection &selection)
d->environ->restoreQueueViewUpdates ();
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "\tkpDocument::setSelection() ended";
+ qCDebug(kpLogDocument) << "\tkpDocument::setSelection() ended";
#endif
}
@@ -310,7 +310,7 @@ void kpDocument::selectionPushOntoDocument (bool applySelTransparency)
kpImage kpDocument::imageWithSelection () const
{
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "kpDocument::imageWithSelection()";
+ qCDebug(kpLogDocument) << "kpDocument::imageWithSelection()";
#endif
// Have selection?
@@ -320,7 +320,7 @@ kpImage kpDocument::imageWithSelection () const
if (m_selection)
{
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "\tselection @ " << m_selection->boundingRect ();
+ qCDebug(kpLogDocument) << "\tselection @ " << m_selection->boundingRect ();
#endif
kpImage output = *m_image;
@@ -332,7 +332,7 @@ kpImage kpDocument::imageWithSelection () const
else
{
#if DEBUG_KP_DOCUMENT && 1
- kDebug () << "\tno selection";
+ qCDebug(kpLogDocument) << "\tno selection";
#endif
return *m_image;
}
diff --git a/environments/document/kpDocumentEnvironment.cpp b/environments/document/kpDocumentEnvironment.cpp
index 8a154b4..5b788aa 100644
--- a/environments/document/kpDocumentEnvironment.cpp
+++ b/environments/document/kpDocumentEnvironment.cpp
@@ -31,7 +31,7 @@
#include "environments/document/kpDocumentEnvironment.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include "mainWindow/kpMainWindow.h"
#include "layers/selections/kpAbstractSelection.h"
@@ -95,7 +95,7 @@ void kpDocumentEnvironment::switchToCompatibleTool (const kpAbstractSelection &s
bool *isTextChanged) const
{
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "kpDocumentEnvironment::switchToCompatibleTool("
+ qCDebug(kpLogEnvironments) << "kpDocumentEnvironment::switchToCompatibleTool("
<< &selection << ")"
<< " mainwindow.tool="
<< (mainWindow ()->tool () ? mainWindow ()->tool ()->objectName () : 0)
@@ -133,28 +133,28 @@ void kpDocumentEnvironment::switchToCompatibleTool (const kpAbstractSelection &s
if (dynamic_cast <const kpRectangularImageSelection *> (&selection))
{
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "\tswitch to rect selection tool";
+ qCDebug(kpLogEnvironments) << "\tswitch to rect selection tool";
#endif
mainWindow ()->slotToolRectSelection ();
}
else if (dynamic_cast <const kpEllipticalImageSelection *> (&selection))
{
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "\tswitch to elliptical selection tool";
+ qCDebug(kpLogEnvironments) << "\tswitch to elliptical selection tool";
#endif
mainWindow ()->slotToolEllipticalSelection ();
}
else if (dynamic_cast <const kpFreeFormImageSelection *> (&selection))
{
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "\tswitch to free form selection tool";
+ qCDebug(kpLogEnvironments) << "\tswitch to free form selection tool";
#endif
mainWindow ()->slotToolFreeFormSelection ();
}
else if (dynamic_cast <const kpTextSelection *> (&selection))
{
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "\tswitch to text selection tool";
+ qCDebug(kpLogEnvironments) << "\tswitch to text selection tool";
#endif
mainWindow ()->slotToolText ();
}
@@ -163,7 +163,7 @@ void kpDocumentEnvironment::switchToCompatibleTool (const kpAbstractSelection &s
}
#if DEBUG_KP_DOCUMENT_ENVIRONMENT
- kDebug () << "kpDocumentEnvironment::switchToCompatibleTool(" << &selection << ") finished";
+ qCDebug(kpLogEnvironments) << "kpDocumentEnvironment::switchToCompatibleTool(" << &selection << ") finished";
#endif
}
@@ -182,11 +182,11 @@ void kpDocumentEnvironment::assertMatchingUIState (const kpAbstractSelection &se
{
if (imageSelection->transparency () != mainWindow ()->imageSelectionTransparency ())
{
- kError () << "kpDocument::setSelection() sel's transparency differs "
+ qCCritical(kpLogEnvironments) << "kpDocument::setSelection() sel's transparency differs "
"from mainWindow's transparency - setting mainWindow's transparency "
"to sel"
<< endl;
- kError () << "\tisOpaque: sel=" << imageSelection->transparency ().isOpaque ()
+ qCCritical(kpLogEnvironments) << "\tisOpaque: sel=" << imageSelection->transparency ().isOpaque ()
<< " mainWindow=" << mainWindow ()->imageSelectionTransparency ().isOpaque ()
<< endl;
mainWindow ()->setImageSelectionTransparency (imageSelection->transparency ());
@@ -196,7 +196,7 @@ void kpDocumentEnvironment::assertMatchingUIState (const kpAbstractSelection &se
{
if (textSelection->textStyle () != mainWindow ()->textStyle ())
{
- kError () << "kpDocument::setSelection() sel's textStyle differs "
+ qCCritical(kpLogEnvironments) << "kpDocument::setSelection() sel's textStyle differs "
"from mainWindow's textStyle - setting mainWindow's textStyle "
"to sel"
<< endl;
diff --git a/generic/widgets/kpResizeSignallingLabel.cpp b/generic/widgets/kpResizeSignallingLabel.cpp
index afbc412..182e054 100644
--- a/generic/widgets/kpResizeSignallingLabel.cpp
+++ b/generic/widgets/kpResizeSignallingLabel.cpp
@@ -33,7 +33,7 @@
#include <qevent.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
kpResizeSignallingLabel::kpResizeSignallingLabel (const QString &string,
@@ -56,7 +56,7 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel ()
void kpResizeSignallingLabel::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_RESIZE_SIGNALLING_LABEL
- kDebug () << "kpResizeSignallingLabel::resizeEvent() newSize=" << e->size ()
+ qCDebug(kpLogMisc) << "kpResizeSignallingLabel::resizeEvent() newSize=" << e->size ()
<< " oldSize=" << e->oldSize () << endl;
#endif
QLabel::resizeEvent (e);
diff --git a/imagelib/effects/kpEffectBalance.cpp b/imagelib/effects/kpEffectBalance.cpp
index 5606689..905b641 100644
--- a/imagelib/effects/kpEffectBalance.cpp
+++ b/imagelib/effects/kpEffectBalance.cpp
@@ -35,7 +35,7 @@
#include <qimage.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
@@ -109,7 +109,7 @@ kpImage kpEffectBalance::applyEffect (const kpImage &image,
int brightness, int contrast, int gamma)
{
#if DEBUG_KP_EFFECT_BALANCE
- kDebug () << "kpEffectBalance::applyEffect("
+ qCDebug(kpLogImagelib) << "kpEffectBalance::applyEffect("
<< "channels=" << channels
<< ",brightness=" << brightness
<< ",contrast=" << contrast
@@ -120,7 +120,7 @@ kpImage kpEffectBalance::applyEffect (const kpImage &image,
QImage qimage = image;
#if DEBUG_KP_EFFECT_BALANCE
- kDebug () << "\tconvertToImage=" << timer.restart ();
+ qCDebug(kpLogImagelib) << "\tconvertToImage=" << timer.restart ();
#endif
@@ -149,7 +149,7 @@ kpImage kpEffectBalance::applyEffect (const kpImage &image,
}
#if DEBUG_KP_EFFECT_BALANCE
- kDebug () << "\tbuild lookup=" << timer.restart ();
+ qCDebug(kpLogImagelib) << "\tbuild lookup=" << timer.restart ();
#endif
diff --git a/imagelib/effects/kpEffectBlurSharpen.cpp b/imagelib/effects/kpEffectBlurSharpen.cpp
index 189097e..9f43156 100644
--- a/imagelib/effects/kpEffectBlurSharpen.cpp
+++ b/imagelib/effects/kpEffectBlurSharpen.cpp
@@ -31,7 +31,7 @@
#include "kpEffectBlurSharpen.h"
#include "blitz.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
@@ -80,7 +80,7 @@ static QImage BlurQImage (const QImage qimage_, int strength)
(kpEffectBlurSharpen::MaxStrength - 1);
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "kpEffectBlurSharpen.cpp:BlurQImage(strength=" << strength << ")"
+ qCDebug(kpLogImagelib) << "kpEffectBlurSharpen.cpp:BlurQImage(strength=" << strength << ")"
<< " radius=" << radius
<< endl;
#endif
@@ -149,7 +149,7 @@ static QImage SharpenQImage (const QImage &qimage_, int strength)
#endif
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "kpEffectBlurSharpen.cpp:SharpenQImage(strength=" << strength << ")"
+ qCDebug(kpLogImagelib) << "kpEffectBlurSharpen.cpp:SharpenQImage(strength=" << strength << ")"
<< " radius=" << radius
<< " sigma=" << sigma
<< " repeat=" << repeat
@@ -164,7 +164,7 @@ static QImage SharpenQImage (const QImage &qimage_, int strength)
#endif
qimage = Blitz::gaussianSharpen (qimage, radius, sigma);
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "\titeration #" + QString::number (i)
+ qCDebug(kpLogImagelib) << "\titeration #" + QString::number (i)
<< ": " + QString::number (timer.elapsed ()) << "ms" << endl;
#endif
}
@@ -180,7 +180,7 @@ kpImage kpEffectBlurSharpen::applyEffect (const kpImage &image,
Type type, int strength)
{
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "kpEffectBlurSharpen::applyEffect(image.rect=" << image.rect ()
+ qCDebug(kpLogImagelib) << "kpEffectBlurSharpen::applyEffect(image.rect=" << image.rect ()
<< ",type=" << int (type)
<< ",strength=" << strength
<< ")" << endl;
diff --git a/imagelib/effects/kpEffectEmboss.cpp b/imagelib/effects/kpEffectEmboss.cpp
index a8b8faa..b331293 100644
--- a/imagelib/effects/kpEffectEmboss.cpp
+++ b/imagelib/effects/kpEffectEmboss.cpp
@@ -31,7 +31,7 @@
#include "kpEffectEmboss.h"
#include "blitz.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
@@ -79,7 +79,7 @@ static QImage EmbossQImage (const QImage &qimage_, int strength)
kpImage kpEffectEmboss::applyEffect (const kpImage &image, int strength)
{
#if DEBUG_KP_EFFECT_EMBOSS
- kDebug () << "kpEffectEmboss::applyEffect(strength=" << strength << ")"
+ qCDebug(kpLogImagelib) << "kpEffectEmboss::applyEffect(strength=" << strength << ")"
<< endl;
#endif
diff --git a/imagelib/effects/kpEffectHSV.cpp b/imagelib/effects/kpEffectHSV.cpp
index 228ce6c..fdd8fee 100644
--- a/imagelib/effects/kpEffectHSV.cpp
+++ b/imagelib/effects/kpEffectHSV.cpp
@@ -34,7 +34,7 @@
#include <qbitmap.h>
#include <qimage.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
diff --git a/imagelib/effects/kpEffectInvert.cpp b/imagelib/effects/kpEffectInvert.cpp
index 340a148..ab09a94 100644
--- a/imagelib/effects/kpEffectInvert.cpp
+++ b/imagelib/effects/kpEffectInvert.cpp
@@ -34,7 +34,7 @@
#include <qimage.h>
#include <QImage>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
@@ -47,7 +47,7 @@ void kpEffectInvert::applyEffect (QImage *destImagePtr, int channels)
(channels & Blue) ? 0xFF : 0,
0/*don't invert alpha*/);
#if DEBUG_KP_EFFECT_INVERT
- kDebug () << "kpEffectInvert::applyEffect(channels=" << channels
+ qCDebug(kpLogImagelib) << "kpEffectInvert::applyEffect(channels=" << channels
<< ") mask=" << (int *) mask
<< endl;
#endif
diff --git a/imagelib/effects/kpEffectReduceColors.cpp b/imagelib/effects/kpEffectReduceColors.cpp
index e612815..949bb82 100644
--- a/imagelib/effects/kpEffectReduceColors.cpp
+++ b/imagelib/effects/kpEffectReduceColors.cpp
@@ -32,7 +32,7 @@
#include "imagelib/effects/kpEffectReduceColors.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
@@ -69,7 +69,7 @@ static QImage::Format DepthToFormat (int depth)
QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth, bool dither)
{
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "kpeffectreducecolors.cpp:ConvertImageDepth() changing image (w=" << image.width ()
+ qCDebug(kpLogImagelib) << "kpeffectreducecolors.cpp:ConvertImageDepth() changing image (w=" << image.width ()
<< ",h=" << image.height ()
<< ") depth from " << image.depth ()
<< " to " << depth
@@ -107,7 +107,7 @@ QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth,
if (depth == 1 && !dither)
{
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\tinvoking convert-to-depth 1 hack";
+ qCDebug(kpLogImagelib) << "\tinvoking convert-to-depth 1 hack";
#endif
QRgb color0 = 0, color1 = 0;
bool color0Valid = false, color1Valid = false;
@@ -117,7 +117,7 @@ QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth,
QImage monoImage (image.width (), image.height (), QImage::Format_MonoLSB);
monoImage.setNumColors (2);
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\t\tinitialising output image w=" << monoImage.width ()
+ qCDebug(kpLogImagelib) << "\t\tinitialising output image w=" << monoImage.width ()
<< ",h=" << monoImage.height ()
<< ",d=" << monoImage.depth ()
<< endl;
@@ -139,7 +139,7 @@ QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth,
color0Valid = true;
monoImage.setPixel (x, y, 0);
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\t\t\tcolor0=" << (int *) color0
+ qCDebug(kpLogImagelib) << "\t\t\tcolor0=" << (int *) color0
<< " at x=" << x << ",y=" << y << endl;
#endif
}
@@ -149,14 +149,14 @@ QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth,
color1Valid = true;
monoImage.setPixel (x, y, 1);
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\t\t\tcolor1=" << (int *) color1
+ qCDebug(kpLogImagelib) << "\t\t\tcolor1=" << (int *) color1
<< " at x=" << x << ",y=" << y << endl;
#endif
}
else
{
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\t\t\timagePixel=" << (int *) imagePixel
+ qCDebug(kpLogImagelib) << "\t\t\timagePixel=" << (int *) imagePixel
<< " at x=" << x << ",y=" << y
<< " moreThan2Colors - abort hack" << endl;
#endif
@@ -184,12 +184,12 @@ QImage kpEffectReduceColors::convertImageDepth (const QImage &image, int depth,
Qt::ThresholdAlphaDither |
(dither ? Qt::PreferDither : Qt::AvoidDither));
#if DEBUG_KP_EFFECT_REDUCE_COLORS
- kDebug () << "\tformat: before=" << image.format ()
+ qCDebug(kpLogImagelib) << "\tformat: before=" << image.format ()
<< "after=" << retImage.format ();
#endif
#if DEBUG_KP_EFFECT_REDUCE_COLORS && 0
- kDebug () << "After colour reduction:";
+ qCDebug(kpLogImagelib) << "After colour reduction:";
for (int y = 0; y < image.height (); y++)
{
for (int x = 0; x < image.width (); x++)
diff --git a/imagelib/effects/kpEffectToneEnhance.cpp b/imagelib/effects/kpEffectToneEnhance.cpp
index 4d6e085..0baa241 100644
--- a/imagelib/effects/kpEffectToneEnhance.cpp
+++ b/imagelib/effects/kpEffectToneEnhance.cpp
@@ -33,7 +33,7 @@
#include <qimage.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "pixmapfx/kpPixmapFX.h"
diff --git a/imagelib/kpColor.cpp b/imagelib/kpColor.cpp
index d797675..ff022d8 100644
--- a/imagelib/kpColor.cpp
+++ b/imagelib/kpColor.cpp
@@ -33,7 +33,7 @@
#include <qdatastream.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
@@ -50,14 +50,14 @@ kpColor::kpColor (int red, int green, int blue, bool isTransparent)
: m_rgba(0), m_colorCacheIsValid(false)
{
#if DEBUG_KP_COLOR
- kDebug () << "kpColor::<ctor>(r=" << red << ",g=" << green << ",b=" << blue
+ qCDebug(kpLogImagelib) << "kpColor::<ctor>(r=" << red << ",g=" << green << ",b=" << blue
<< ",isTrans=" << isTransparent << ")" << endl;
#endif
if (red < 0 || red > 255 ||
green < 0 || green > 255 ||
blue < 0 || blue > 255)
{
- kError () << "kpColor::<ctor>(r=" << red
+ qCCritical(kpLogImagelib) << "kpColor::<ctor>(r=" << red
<< ",g=" << green
<< ",b=" << blue
<< ",t=" << isTransparent
@@ -76,7 +76,7 @@ kpColor::kpColor (const QRgb &rgba)
: m_colorCacheIsValid (false)
{
#if DEBUG_KP_COLOR
- kDebug () << "kpColor::<ctor>(rgba=" << (int *) rgba << ")";
+ qCDebug(kpLogImagelib) << "kpColor::<ctor>(rgba=" << (int *) rgba << ")";
#endif
m_rgba = rgba;
m_rgbaIsValid = true;
@@ -91,7 +91,7 @@ kpColor::kpColor (const kpColor &rhs)
m_colorCache (rhs.m_colorCache)
{
#if DEBUG_KP_COLOR
- kDebug () << "kpColor::<copy_ctor>()";
+ qCDebug(kpLogImagelib) << "kpColor::<copy_ctor>()";
#endif
}
@@ -216,7 +216,7 @@ int kpColor::red () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::red() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::red() called with invalid kpColor" << endl;
return 0;
}
@@ -230,7 +230,7 @@ int kpColor::green () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::green() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::green() called with invalid kpColor" << endl;
return 0;
}
@@ -244,7 +244,7 @@ int kpColor::blue () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::blue() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::blue() called with invalid kpColor" << endl;
return 0;
}
@@ -258,7 +258,7 @@ int kpColor::alpha () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::alpha() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::alpha() called with invalid kpColor" << endl;
return 0;
}
@@ -280,7 +280,7 @@ QRgb kpColor::toQRgb () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::toQRgb() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::toQRgb() called with invalid kpColor" << endl;
return 0;
}
@@ -294,7 +294,7 @@ QColor kpColor::toQColor () const
{
if (!m_rgbaIsValid)
{
- kError () << "kpColor::toQColor() called with invalid kpColor" << endl;
+ qCCritical(kpLogImagelib) << "kpColor::toQColor() called with invalid kpColor" << endl;
return Qt::black;
}
diff --git a/imagelib/kpColor.h b/imagelib/kpColor.h
index 34ea5e3..30dc04d 100644
--- a/imagelib/kpColor.h
+++ b/imagelib/kpColor.h
@@ -40,7 +40,7 @@ class QDataStream;
// kpColor is an object-oriented abstraction of QRgb, for document image data.
// In the future, other color models such as
// 8-bit indexed will be supported. It also provides better error handling,
-// reporting (noisy kError()'s) and recovery compared to Qt. This abstraction
+// reporting (noisy qCCritical(kpLogImagelib)'s) and recovery compared to Qt. This abstraction
// will allow us to eventually dump the Qt paint routines.
//
// In general, you should pass around kpColor objects instead of QRgb
diff --git a/imagelib/kpDocumentMetaInfo.cpp b/imagelib/kpDocumentMetaInfo.cpp
index 1ca5520..53206d0 100644
--- a/imagelib/kpDocumentMetaInfo.cpp
+++ b/imagelib/kpDocumentMetaInfo.cpp
@@ -34,7 +34,7 @@
#include <qlist.h>
#include <qpoint.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpDefs.h"
@@ -139,9 +139,9 @@ void kpDocumentMetaInfo::printDebug (const QString &prefix) const
{
const QString usedPrefix = !prefix.isEmpty() ? QString(prefix + QLatin1String(":")) : QString();
- kDebug () << usedPrefix;
+ qCDebug(kpLogImagelib) << usedPrefix;
- kDebug () << "dotsPerMeter X=" << dotsPerMeterX ()
+ qCDebug(kpLogImagelib) << "dotsPerMeter X=" << dotsPerMeterX ()
<< " Y=" << dotsPerMeterY ()
<< " offset=" << offset () << endl;
@@ -150,12 +150,12 @@ void kpDocumentMetaInfo::printDebug (const QString &prefix) const
it != keyList.constEnd ();
++it)
{
- kDebug () << "key=" << (*it)
+ qCDebug(kpLogImagelib) << "key=" << (*it)
<< " text=" << text (*it)
<< endl;
}
- kDebug () << usedPrefix << "ENDS";
+ qCDebug(kpLogImagelib) << usedPrefix << "ENDS";
}
//---------------------------------------------------------------------
diff --git a/imagelib/kpFloodFill.cpp b/imagelib/kpFloodFill.cpp
index 2aaecef..9468a9f 100644
--- a/imagelib/kpFloodFill.cpp
+++ b/imagelib/kpFloodFill.cpp
@@ -37,7 +37,7 @@
#include <QList>
#include <QPainter>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpColor.h"
#include "kpImage.h"
@@ -164,7 +164,7 @@ void kpFloodFill::prepareColorToChange ()
return;
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "kpFloodFill::prepareColorToChange()";
+ qCDebug(kpLogImagelib) << "kpFloodFill::prepareColorToChange()";
#endif
d->colorToChange = kpPixmapFX::getColorAtPixel (*d->imagePtr, QPoint (d->x, d->y));
@@ -256,7 +256,7 @@ int kpFloodFill::findMaxX (int y, int x) const
void kpFloodFill::addLine (int y, int x1, int x2)
{
#if DEBUG_KP_FLOOD_FILL && 0
- kDebug () << "kpFillCommand::fillAddLine ("
+ qCDebug(kpLogImagelib) << "kpFillCommand::fillAddLine ("
<< y << "," << x1 << "," << x2 << ")" << endl;
#endif
@@ -302,7 +302,7 @@ void kpFloodFill::prepare ()
return;
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "kpFloodFill::prepare()";
+ qCDebug(kpLogImagelib) << "kpFloodFill::prepare()";
#endif
prepareColorToChange ();
@@ -311,7 +311,7 @@ void kpFloodFill::prepare ()
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "\tperforming NOP check";
+ qCDebug(kpLogImagelib) << "\tperforming NOP check";
#endif
// get the color we need to replace
@@ -324,7 +324,7 @@ void kpFloodFill::prepare ()
}
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "\tcreating fillLinesCache";
+ qCDebug(kpLogImagelib) << "\tcreating fillLinesCache";
#endif
// ready cache
@@ -332,7 +332,7 @@ void kpFloodFill::prepare ()
d->fillLinesCache.append (QLinkedList <kpFillLine> ());
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "\tcreating fill lines";
+ qCDebug(kpLogImagelib) << "\tcreating fill lines";
#endif
// draw initial line
@@ -343,7 +343,7 @@ void kpFloodFill::prepare ()
++it)
{
#if DEBUG_KP_FLOOD_FILL && 0
- kDebug () << "Expanding from y=" << (*it).m_y
+ qCDebug(kpLogImagelib) << "Expanding from y=" << (*it).m_y
<< " x1=" << (*it).m_x1
<< " x2=" << (*it).m_x2
<< endl;
@@ -363,7 +363,7 @@ void kpFloodFill::prepare ()
}
#if DEBUG_KP_FLOOD_FILL && 1
- kDebug () << "\tfinalising memory usage";
+ qCDebug(kpLogImagelib) << "\tfinalising memory usage";
#endif
// finalize memory usage
diff --git a/imagelib/kpPainter.cpp b/imagelib/kpPainter.cpp
index c5b3d69..a8dd33d 100644
--- a/imagelib/kpPainter.cpp
+++ b/imagelib/kpPainter.cpp
@@ -41,7 +41,7 @@
#include <QPainter>
#include <QPolygon>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <krandom.h>
//---------------------------------------------------------------------
@@ -72,7 +72,7 @@ QList <QPoint> kpPainter::interpolatePoints (const QPoint &startPoint,
double probability)
{
#if DEBUG_KP_PAINTER
- kDebug () << "CALL(startPoint=" << startPoint
+ qCDebug(kpLogImagelib) << "CALL(startPoint=" << startPoint
<< ",endPoint=" << endPoint << ")";
#endif
@@ -84,7 +84,7 @@ QList <QPoint> kpPainter::interpolatePoints (const QPoint &startPoint,
::RandomNumberFrom0to999 () < probabilityTimes1000)
#if 0
- kDebug () << "prob=" << probability
+ qCDebug(kpLogImagelib) << "prob=" << probability
<< " *1000=" << probabilityTimes1000;
#endif
@@ -285,7 +285,7 @@ static bool ReadableImageWashRect (QPainter *rgbPainter,
bool didSomething = false;
#if DEBUG_KP_PAINTER && 0
- kDebug () << "kppixmapfx.cpp:WashRect(imageRect=" << imageRect
+ qCDebug(kpLogImagelib) << "kppixmapfx.cpp:WashRect(imageRect=" << imageRect
<< ",drawRect=" << drawRect
<< ")" << endl;
#endif
@@ -395,7 +395,7 @@ static QRect Wash (kpImage *image,
pack.readableImageRect = kpTool::neededRect (normalizedRect,
qMax (pack.penWidth, pack.penHeight));
#if DEBUG_KP_PAINTER
- kDebug () << "kppainter.cpp:Wash() startPoint=" << startPoint
+ qCDebug(kpLogImagelib) << "kppainter.cpp:Wash() startPoint=" << startPoint
<< " endPoint=" << endPoint
<< " --> normalizedRect=" << normalizedRect
<< " readableImageRect=" << pack.readableImageRect
@@ -422,7 +422,7 @@ void WashHelperSetup (QPainter *rgbPainter, const WashPack *pack)
static QRect WashLineHelper (QPainter *rgbPainter, void *data)
{
#if DEBUG_KP_PAINTER && 0
- kDebug () << "Washing pixmap (w=" << rect.width ()
+ qCDebug(kpLogImagelib) << "Washing pixmap (w=" << rect.width ()
<< ",h=" << rect.height () << ")" << endl;
QTime timer;
int convAndWashTime;
@@ -463,7 +463,7 @@ static QRect WashLineHelper (QPainter *rgbPainter, void *data)
#if DEBUG_KP_PAINTER && 0
int ms = timer.restart ();
- kDebug () << "\ttried to wash: " << ms << "ms"
+ qCDebug(kpLogImagelib) << "\ttried to wash: " << ms << "ms"
<< " (" << (ms ? (rect.width () * rect.height () / ms) : -1234)
<< " pixels/ms)"
<< endl;
@@ -498,7 +498,7 @@ QRect kpPainter::washLine (kpImage *image,
static QRect WashRectHelper (QPainter *rgbPainter, void *data)
{
#if DEBUG_KP_PAINTER && 0
- kDebug () << "Washing pixmap (w=" << rect.width ()
+ qCDebug(kpLogImagelib) << "Washing pixmap (w=" << rect.width ()
<< ",h=" << rect.height () << ")" << endl;
QTime timer;
int convAndWashTime;
@@ -528,7 +528,7 @@ static QRect WashRectHelper (QPainter *rgbPainter, void *data)
#if DEBUG_KP_PAINTER && 0
int ms = timer.restart ();
- kDebug () << "\ttried to wash: " << ms << "ms"
+ qCDebug(kpLogImagelib) << "\ttried to wash: " << ms << "ms"
<< " (" << (ms ? (rect.width () * rect.height () / ms) : -1234)
<< " pixels/ms)"
<< endl;
@@ -565,7 +565,7 @@ void kpPainter::sprayPoints (kpImage *image,
int spraycanSize)
{
#if DEBUG_KP_PAINTER
- kDebug () << "kpPainter::sprayPoints()";
+ qCDebug(kpLogImagelib) << "kpPainter::sprayPoints()";
#endif
Q_ASSERT (spraycanSize > 0);
diff --git a/imagelib/transforms/kpTransformAutoCrop.cpp b/imagelib/transforms/kpTransformAutoCrop.cpp
index 10cf17c..9dcb4d7 100644
--- a/imagelib/transforms/kpTransformAutoCrop.cpp
+++ b/imagelib/transforms/kpTransformAutoCrop.cpp
@@ -59,7 +59,7 @@
#include "tools/kpTool.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kmessagebox.h>
@@ -206,7 +206,7 @@ bool kpTransformAutoCropBorder::isSingleColor () const
bool kpTransformAutoCropBorder::calculate (int isX, int dir)
{
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "kpTransformAutoCropBorder::calculate() CALLED!";
+ qCDebug(kpLogImagelib) << "kpTransformAutoCropBorder::calculate() CALLED!";
#endif
int maxX = m_imagePtr->width () - 1;
int maxY = m_imagePtr->height () - 1;
@@ -424,8 +424,8 @@ void kpTransformAutoCropCommand::getUndoImage (const kpTransformAutoCropBorder &
Q_ASSERT (doc);
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "kpTransformAutoCropCommand::getUndoImage()";
- kDebug () << "\timage=" << image
+ qCDebug(kpLogImagelib) << "kpTransformAutoCropCommand::getUndoImage()";
+ qCDebug(kpLogImagelib) << "\timage=" << image
<< " border: rect=" << border.rect ()
<< " isSingleColor=" << border.isSingleColor ()
<< endl;
@@ -436,7 +436,7 @@ void kpTransformAutoCropCommand::getUndoImage (const kpTransformAutoCropBorder &
if (*image)
{
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "\talready have *image - delete it";
+ qCDebug(kpLogImagelib) << "\talready have *image - delete it";
#endif
delete *image;
}
@@ -461,7 +461,7 @@ void kpTransformAutoCropCommand::getUndoImages ()
void kpTransformAutoCropCommand::deleteUndoImages ()
{
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "kpTransformAutoCropCommand::deleteUndoImages()";
+ qCDebug(kpLogImagelib) << "kpTransformAutoCropCommand::deleteUndoImages()";
#endif
delete d->leftImage; d->leftImage = 0;
@@ -517,7 +517,7 @@ void kpTransformAutoCropCommand::execute ()
void kpTransformAutoCropCommand::unexecute ()
{
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "kpTransformAutoCropCommand::unexecute()";
+ qCDebug(kpLogImagelib) << "kpTransformAutoCropCommand::unexecute()";
#endif
kpDocument *doc = document ();
@@ -555,7 +555,7 @@ void kpTransformAutoCropCommand::unexecute ()
{
kpColor col = (*b)->referenceColor ();
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "\tdrawing border " << (*b)->rect ()
+ qCDebug(kpLogImagelib) << "\tdrawing border " << (*b)->rect ()
<< " rgb=" << (int *) col.toQRgb () /* %X hack */ << endl;
#endif
@@ -567,7 +567,7 @@ void kpTransformAutoCropCommand::unexecute ()
else
{
#if DEBUG_KP_TOOL_AUTO_CROP && 1
- kDebug () << "\trestoring border image " << (*b)->rect ();
+ qCDebug(kpLogImagelib) << "\trestoring border image " << (*b)->rect ();
#endif
if (*p)
{
@@ -642,7 +642,7 @@ static void ShowNothingToAutocropMessage (kpMainWindow *mainWindow, bool actOnSe
bool kpTransformAutoCrop (kpMainWindow *mainWindow)
{
#if DEBUG_KP_TOOL_AUTO_CROP
- kDebug () << "kpTransformAutoCrop() CALLED!";
+ qCDebug(kpLogImagelib) << "kpTransformAutoCrop() CALLED!";
#endif
Q_ASSERT (mainWindow);
@@ -688,7 +688,7 @@ bool kpTransformAutoCrop (kpMainWindow *mainWindow)
botBorder.exists ()) == 0))
{
#if DEBUG_KP_TOOL_AUTO_CROP
- kDebug () << "\tcan't find border; leftBorder.rect=" << leftBorder.rect ()
+ qCDebug(kpLogImagelib) << "\tcan't find border; leftBorder.rect=" << leftBorder.rect ()
<< " rightBorder.rect=" << rightBorder.rect ()
<< " topBorder.rect=" << topBorder.rect ()
<< " botBorder.rect=" << botBorder.rect ()
@@ -699,20 +699,20 @@ bool kpTransformAutoCrop (kpMainWindow *mainWindow)
}
#if DEBUG_KP_TOOL_AUTO_CROP
- kDebug () << "\tnumRegions=" << numRegions;
- kDebug () << "\t\tleft=" << leftBorder.rect ()
+ qCDebug(kpLogImagelib) << "\tnumRegions=" << numRegions;
+ qCDebug(kpLogImagelib) << "\t\tleft=" << leftBorder.rect ()
<< " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toQRgb () : 0)
<< " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toQRgb () : 0)
<< endl;
- kDebug () << "\t\tright=" << rightBorder.rect ()
+ qCDebug(kpLogImagelib) << "\t\tright=" << rightBorder.rect ()
<< " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toQRgb () : 0)
<< " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toQRgb () : 0)
<< endl;
- kDebug () << "\t\ttop=" << topBorder.rect ()
+ qCDebug(kpLogImagelib) << "\t\ttop=" << topBorder.rect ()
<< " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toQRgb () : 0)
<< " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toQRgb () : 0)
<< endl;
- kDebug () << "\t\tbot=" << botBorder.rect ()
+ qCDebug(kpLogImagelib) << "\t\tbot=" << botBorder.rect ()
<< " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toQRgb () : 0)
<< " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toQRgb () : 0)
<< endl;
@@ -735,7 +735,7 @@ bool kpTransformAutoCrop (kpMainWindow *mainWindow)
leftBorder.right () >= rightBorder.left () - 1) // kissing or overlapping
{
#if DEBUG_KP_TOOL_AUTO_CROP
- kDebug () << "\tignoring left border";
+ qCDebug(kpLogImagelib) << "\tignoring left border";
#endif
leftBorder.invalidate ();
}
@@ -750,7 +750,7 @@ bool kpTransformAutoCrop (kpMainWindow *mainWindow)
topBorder.bottom () >= botBorder.top () - 1) // kissing or overlapping
{
#if DEBUG_KP_TOOL_AUTO_CROP
- kDebug () << "\tignoring top border";
+ qCDebug(kpLogImagelib) << "\tignoring top border";
#endif
topBorder.invalidate ();
}
diff --git a/imagelib/transforms/kpTransformCrop_ImageSelection.cpp b/imagelib/transforms/kpTransformCrop_ImageSelection.cpp
index 107f61c..a17302b 100644
--- a/imagelib/transforms/kpTransformCrop_ImageSelection.cpp
+++ b/imagelib/transforms/kpTransformCrop_ImageSelection.cpp
@@ -107,7 +107,7 @@ SetDocumentToSelectionImageCommand::~SetDocumentToSelectionImageCommand ()
void SetDocumentToSelectionImageCommand::execute ()
{
#if DEBUG_KP_TOOL_CROP
- kDebug () << "SetDocumentToSelectionImageCommand::execute()";
+ qCDebug(kpLogImagelib) << "SetDocumentToSelectionImageCommand::execute()";
#endif
viewManager ()->setQueueUpdates ();
@@ -143,7 +143,7 @@ void SetDocumentToSelectionImageCommand::execute ()
newDocImage.fill(m_backgroundColor.toQRgb());
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tsel: rect=" << m_fromSelectionPtr->boundingRect ()
+ qCDebug(kpLogImagelib) << "\tsel: rect=" << m_fromSelectionPtr->boundingRect ()
<< " pm=" << m_fromSelectionPtr->hasContent ()
<< endl;
#endif
@@ -154,7 +154,7 @@ void SetDocumentToSelectionImageCommand::execute ()
setTransparentImage = m_fromSelectionPtr->transparentImage ();
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\thave pixmap; rect="
+ qCDebug(kpLogImagelib) << "\thave pixmap; rect="
<< setTransparentImage.rect ()
<< endl;
#endif
@@ -163,7 +163,7 @@ void SetDocumentToSelectionImageCommand::execute ()
{
setTransparentImage = m_imageIfFromSelectionDoesntHaveOne;
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tno pixmap in sel - get it; rect="
+ qCDebug(kpLogImagelib) << "\tno pixmap in sel - get it; rect="
<< setTransparentImage.rect ()
<< endl;
#endif
@@ -195,7 +195,7 @@ void SetDocumentToSelectionImageCommand::execute ()
void SetDocumentToSelectionImageCommand::unexecute ()
{
#if DEBUG_KP_TOOL_CROP
- kDebug () << "SetDocumentToSelectionImageCommand::unexecute()";
+ qCDebug(kpLogImagelib) << "SetDocumentToSelectionImageCommand::unexecute()";
#endif
viewManager ()->setQueueUpdates ();
@@ -204,7 +204,7 @@ void SetDocumentToSelectionImageCommand::unexecute ()
m_oldImage = kpImage ();
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tsel: rect=" << m_fromSelectionPtr->boundingRect ()
+ qCDebug(kpLogImagelib) << "\tsel: rect=" << m_fromSelectionPtr->boundingRect ()
<< " pm=" << m_fromSelectionPtr->hasContent ()
<< endl;
#endif
@@ -245,8 +245,8 @@ void kpTransformCrop_ImageSelection (kpMainWindow *mainWindow,
macroCmd->addCommand (resizeDocCommand);
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tis pixmap sel";
- kDebug () << "\tcreating SetImage cmd";
+ qCDebug(kpLogImagelib) << "\tis pixmap sel";
+ qCDebug(kpLogImagelib) << "\tcreating SetImage cmd";
#endif
macroCmd->addCommand (new SetDocumentToSelectionImageCommand (environ));
diff --git a/imagelib/transforms/kpTransformCrop_TextSelection.cpp b/imagelib/transforms/kpTransformCrop_TextSelection.cpp
index 73162ad..b9c03ea 100644
--- a/imagelib/transforms/kpTransformCrop_TextSelection.cpp
+++ b/imagelib/transforms/kpTransformCrop_TextSelection.cpp
@@ -48,8 +48,8 @@ void kpTransformCrop_TextSelection (kpMainWindow *mainWindow,
macroCmd->addCommand (resizeDocCommand);
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tisText";
- kDebug () << "\tclearing doc with trans cmd";
+ qCDebug(kpLogImagelib) << "\tisText";
+ qCDebug(kpLogImagelib) << "\tclearing doc with trans cmd";
#endif
macroCmd->addCommand (
new kpEffectClearCommand (
@@ -58,7 +58,7 @@ void kpTransformCrop_TextSelection (kpMainWindow *mainWindow,
environ));
#if DEBUG_KP_TOOL_CROP
- kDebug () << "\tmoving sel to (0,0) cmd";
+ qCDebug(kpLogImagelib) << "\tmoving sel to (0,0) cmd";
#endif
kpToolSelectionMoveCommand *moveCmd =
new kpToolSelectionMoveCommand (
diff --git a/kpLogCategories.cpp b/kpLogCategories.cpp
new file mode 100644
index 0000000..c6a6fe2
--- /dev/null
+++ b/kpLogCategories.cpp
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 2016 Martin Sandsmark <martin.sandsmark@kde.org>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "kpLogCategories.h"
+
+Q_LOGGING_CATEGORY(kpLogMisc, "kp.misc")
+Q_LOGGING_CATEGORY(kpLogDialogs, "kp.dialogs")
+Q_LOGGING_CATEGORY(kpLogCommands, "kp.commands")
+Q_LOGGING_CATEGORY(kpLogDocument, "kp.document")
+Q_LOGGING_CATEGORY(kpLogTools, "kp.tools")
+Q_LOGGING_CATEGORY(kpLogViews, "kp.views")
+Q_LOGGING_CATEGORY(kpLogEnvironments, "kp.environments")
+Q_LOGGING_CATEGORY(kpLogPixmapfx, "kp.pixmapfx")
+Q_LOGGING_CATEGORY(kpLogWidgets, "kp.widgets")
+Q_LOGGING_CATEGORY(kpLogMainWindow, "kp.mainwindow")
+Q_LOGGING_CATEGORY(kpLogLayers, "kp.layers")
+Q_LOGGING_CATEGORY(kpLogImagelib, "kp.imagelib")
+
diff --git a/kpLogCategories.h b/kpLogCategories.h
new file mode 100644
index 0000000..74d9e34
--- /dev/null
+++ b/kpLogCategories.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (c) 2016 Martin Sandsmark <martin.sandsmark@kde.org>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef KPLOGCATEGORIES_H
+#define KPLOGCATEGORIES_H
+
+#include <QLoggingCategory>
+
+Q_DECLARE_LOGGING_CATEGORY(kpLogMisc)
+Q_DECLARE_LOGGING_CATEGORY(kpLogDialogs)
+Q_DECLARE_LOGGING_CATEGORY(kpLogCommands)
+Q_DECLARE_LOGGING_CATEGORY(kpLogDocument)
+Q_DECLARE_LOGGING_CATEGORY(kpLogTools)
+Q_DECLARE_LOGGING_CATEGORY(kpLogViews)
+Q_DECLARE_LOGGING_CATEGORY(kpLogEnvironments)
+Q_DECLARE_LOGGING_CATEGORY(kpLogPixmapfx)
+Q_DECLARE_LOGGING_CATEGORY(kpLogWidgets)
+Q_DECLARE_LOGGING_CATEGORY(kpLogMainWindow)
+Q_DECLARE_LOGGING_CATEGORY(kpLogLayers)
+Q_DECLARE_LOGGING_CATEGORY(kpLogImagelib)
+
+#endif
+
diff --git a/kpThumbnail.cpp b/kpThumbnail.cpp
index abcde02..1a08c98 100644
--- a/kpThumbnail.cpp
+++ b/kpThumbnail.cpp
@@ -37,7 +37,7 @@
#include "views/kpThumbnailView.h"
#include "tools/kpTool.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <QAction>
@@ -84,7 +84,7 @@ kpThumbnailView *kpThumbnail::view () const
void kpThumbnail::setView (kpThumbnailView *view)
{
#if DEBUG_KP_THUMBNAIL
- kDebug () << "kpThumbnail::setView(" << view << ")";
+ qCDebug(kpLogMisc) << "kpThumbnail::setView(" << view << ")";
#endif
if (d->view == view)
@@ -131,7 +131,7 @@ void kpThumbnail::updateCaption ()
void kpThumbnail::slotViewDestroyed ()
{
#if DEBUG_KP_THUMBNAIL
- kDebug () << "kpThumbnail::slotViewDestroyed()";
+ qCDebug(kpLogMisc) << "kpThumbnail::slotViewDestroyed()";
#endif
d->view = 0;
@@ -143,7 +143,7 @@ void kpThumbnail::slotViewDestroyed ()
void kpThumbnail::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_THUMBNAIL
- kDebug () << "kpThumbnail::resizeEvent(" << width ()
+ qCDebug(kpLogMisc) << "kpThumbnail::resizeEvent(" << width ()
<< "," << height () << ")" << endl;
#endif
diff --git a/kpViewScrollableContainer.cpp b/kpViewScrollableContainer.cpp
index 4f9f0da..0478983 100644
--- a/kpViewScrollableContainer.cpp
+++ b/kpViewScrollableContainer.cpp
@@ -38,7 +38,7 @@
#include <qtimer.h>
#include <QScrollBar>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "kpDefs.h"
@@ -187,7 +187,7 @@ void kpGrip::setUserMessage (const QString &message)
void kpGrip::cancel ()
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpGrip::cancel()";
+ qCDebug(kpLogMisc) << "kpGrip::cancel()";
#endif
if (m_currentPoint == KP_INVALID_POINT)
return;
@@ -276,7 +276,7 @@ void kpGrip::mouseMovedTo (const QPoint &point, bool dueToDragScroll)
void kpGrip::mouseMoveEvent (QMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpGrip::mouseMoveEvent() m_startPoint=" << m_startPoint
+ qCDebug(kpLogMisc) << "kpGrip::mouseMoveEvent() m_startPoint=" << m_startPoint
<< " stateAfter: buttons=" << (int *) (int) e->buttons ()
<< endl;
#endif
@@ -297,7 +297,7 @@ void kpGrip::mouseMoveEvent (QMouseEvent *e)
void kpGrip::mouseReleaseEvent (QMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpGrip::mouseReleaseEvent() m_startPoint=" << m_startPoint
+ qCDebug(kpLogMisc) << "kpGrip::mouseReleaseEvent() m_startPoint=" << m_startPoint
<< " stateAfter: buttons=" << (int *) (int) e->buttons ()
<< endl;
#endif
@@ -332,7 +332,7 @@ void kpGrip::mouseReleaseEvent (QMouseEvent *e)
void kpGrip::enterEvent (QEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpGrip::enterEvent()"
+ qCDebug(kpLogMisc) << "kpGrip::enterEvent()"
<< " m_startPoint=" << m_startPoint
<< " shouldReleaseMouseButtons="
<< m_shouldReleaseMouseButtons << endl;
@@ -342,7 +342,7 @@ void kpGrip::enterEvent (QEvent * /*e*/)
!m_shouldReleaseMouseButtons)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "\tsending message";
+ qCDebug(kpLogMisc) << "\tsending message";
#endif
setUserMessage (haventBegunDrawUserMessage ());
}
@@ -354,7 +354,7 @@ void kpGrip::enterEvent (QEvent * /*e*/)
void kpGrip::leaveEvent (QEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpGrip::leaveEvent()"
+ qCDebug(kpLogMisc) << "kpGrip::leaveEvent()"
<< " m_startPoint=" << m_startPoint
<< " shouldReleaseMouseButtons="
<< m_shouldReleaseMouseButtons << endl;
@@ -468,7 +468,7 @@ QString kpViewScrollableContainer::statusMessage () const
void kpViewScrollableContainer::clearStatusMessage ()
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1
- kDebug () << "kpViewScrollableContainer::clearStatusMessage()";
+ qCDebug(kpLogMisc) << "kpViewScrollableContainer::clearStatusMessage()";
#endif
m_bottomRightGrip->setUserMessage(QString());
m_bottomGrip->setUserMessage(QString());
@@ -664,7 +664,7 @@ void kpViewScrollableContainer::updateResizeLines (int viewX, int viewY,
int viewDX, int viewDY)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0
- kDebug () << "kpViewScrollableContainer::updateResizeLines("
+ qCDebug(kpLogMisc) << "kpViewScrollableContainer::updateResizeLines("
<< viewX << "," << viewY << ")"
<< " oldViewX=" << m_resizeRoundedLastViewX
<< " oldViewY=" << m_resizeRoundedLastViewY
@@ -727,7 +727,7 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD
viewDY = inViewDY;
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpViewScrollableContainer::slotGripContinuedDraw("
+ qCDebug(kpLogMisc) << "kpViewScrollableContainer::slotGripContinuedDraw("
<< viewDX << "," << viewDY << ") size="
<< newDocSize (viewDX, viewDY)
<< " dueToDragScroll=" << dueToDragScroll
@@ -744,7 +744,7 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD
viewDX = newViewDeltaPoint.x ();
viewDY = newViewDeltaPoint.y ();
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "\tdrag scrolled - new view delta point="
+ qCDebug(kpLogMisc) << "\tdrag scrolled - new view delta point="
<< newViewDeltaPoint
<< endl;
#endif
@@ -783,7 +783,7 @@ void kpViewScrollableContainer::slotGripCancelledDraw ()
void kpViewScrollableContainer::slotGripEndedDraw (int viewDX, int viewDY)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpViewScrollableContainer::slotGripEndedDraw("
+ qCDebug(kpLogMisc) << "kpViewScrollableContainer::slotGripEndedDraw("
<< viewDX << "," << viewDY << ") size="
<< newDocSize (viewDX, viewDY)
<< endl;
@@ -826,8 +826,8 @@ void kpViewScrollableContainer::slotGripStatusMessageChanged (const QString &str
void kpViewScrollableContainer::recalculateStatusMessage ()
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
- kDebug () << "kpViewScrollabelContainer::recalculateStatusMessage()";
- kDebug () << "\tQCursor::pos=" << QCursor::pos ()
+ qCDebug(kpLogMisc) << "kpViewScrollabelContainer::recalculateStatusMessage()";
+ qCDebug(kpLogMisc) << "\tQCursor::pos=" << QCursor::pos ()
<< " global visibleRect="
<< kpWidgetMapper::toGlobal (this,
QRect(0, 0, viewport->width(), viewport->height()))
diff --git a/layers/selections/image/kpAbstractImageSelection.cpp b/layers/selections/image/kpAbstractImageSelection.cpp
index 1c25503..f4b71aa 100644
--- a/layers/selections/image/kpAbstractImageSelection.cpp
+++ b/layers/selections/image/kpAbstractImageSelection.cpp
@@ -34,7 +34,7 @@
#include <QBitmap>
#include <QPainter>
-#include <KDebug>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
@@ -141,7 +141,7 @@ bool kpAbstractImageSelection::readFromStream (QDataStream &stream)
QImage qimage;
stream >> qimage;
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\timage: w=" << qimage.width () << " h=" << qimage.height ()
+ qCDebug(kpLogLayers) << "\timage: w=" << qimage.width () << " h=" << qimage.height ()
<< " depth=" << qimage.depth () << endl;
#endif
@@ -181,14 +181,14 @@ void kpAbstractImageSelection::writeToStream (QDataStream &stream) const
{
const QImage image = d->baseImage;
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\twrote image rect=" << image.rect ();
+ qCDebug(kpLogLayers) << "\twrote image rect=" << image.rect ();
#endif
stream << image;
}
else
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\twrote no image because no pixmap";
+ qCDebug(kpLogLayers) << "\twrote no image because no pixmap";
#endif
stream << QImage ();
}
@@ -271,7 +271,7 @@ QBitmap kpAbstractImageSelection::shapeBitmap (bool nullForRectangular) const
kpImage kpAbstractImageSelection::givenImageMaskedByShape (const kpImage &image) const
{
#if DEBUG_KP_SELECTION
- kDebug () << "kpAbstractImageSelection::givenImageMaskedByShape() boundingRect="
+ qCDebug(kpLogLayers) << "kpAbstractImageSelection::givenImageMaskedByShape() boundingRect="
<< boundingRect () << endl;
#endif
Q_ASSERT (image.width () == width () && image.height () == height ());
@@ -282,7 +282,7 @@ kpImage kpAbstractImageSelection::givenImageMaskedByShape (const kpImage &image)
const QRegion mRegion = shapeRegion ().translated (-topLeft ());
#if DEBUG_KP_SELECTION
- kDebug () << "\tshapeRegion=" << shapeRegion ()
+ qCDebug(kpLogLayers) << "\tshapeRegion=" << shapeRegion ()
<< " [rect=" << shapeRegion ().boundingRect () << "]"
<< " calculatePoints=" << calculatePoints ()
<< " [rect=" << calculatePoints ().boundingRect () << "]"
@@ -374,7 +374,7 @@ bool kpAbstractImageSelection::setTransparency (
if (d->transparencyMaskCache.isNull ())
{
#if DEBUG_KP_SELECTION
- kDebug () << "\tboth old and new pixmaps are null - nothing changed";
+ qCDebug(kpLogLayers) << "\tboth old and new pixmaps are null - nothing changed";
#endif
haveChanged = false;
}
@@ -392,7 +392,7 @@ bool kpAbstractImageSelection::setTransparency (
kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y))
{
#if DEBUG_KP_SELECTION
- kDebug () << "\tdiffer at " << QPoint (x, y)
+ qCDebug(kpLogLayers) << "\tdiffer at " << QPoint (x, y)
<< " old=" << kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toQRgb ()
<< " new=" << kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toQRgb ()
<< endl;
@@ -421,13 +421,13 @@ bool kpAbstractImageSelection::setTransparency (
void kpAbstractImageSelection::recalculateTransparencyMaskCache ()
{
#if DEBUG_KP_SELECTION
- kDebug () << "kpAbstractImageSelection::recalculateTransparencyMaskCache()";
+ qCDebug(kpLogLayers) << "kpAbstractImageSelection::recalculateTransparencyMaskCache()";
#endif
if (d->baseImage.isNull ())
{
#if DEBUG_KP_SELECTION
- kDebug () << "\tno image - no need for transparency mask";
+ qCDebug(kpLogLayers) << "\tno image - no need for transparency mask";
#endif
d->transparencyMaskCache = QBitmap ();
return;
@@ -436,7 +436,7 @@ void kpAbstractImageSelection::recalculateTransparencyMaskCache ()
if (d->transparency.isOpaque ())
{
#if DEBUG_KP_SELECTION
- kDebug () << "\topaque - no need for transparency mask";
+ qCDebug(kpLogLayers) << "\topaque - no need for transparency mask";
#endif
d->transparencyMaskCache = QBitmap ();
return;
@@ -473,7 +473,7 @@ void kpAbstractImageSelection::recalculateTransparencyMaskCache ()
if (!hasTransparent)
{
#if DEBUG_KP_SELECTION
- kDebug () << "\tcolour useless - completely opaque";
+ qCDebug(kpLogLayers) << "\tcolour useless - completely opaque";
#endif
d->transparencyMaskCache = QBitmap ();
return;
@@ -522,14 +522,14 @@ void kpAbstractImageSelection::fill (const kpColor &color)
void kpAbstractImageSelection::flip (bool horiz, bool vert)
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractImageSelection::flip(horiz=" << horiz
+ qCDebug(kpLogLayers) << "kpAbstractImageSelection::flip(horiz=" << horiz
<< ",vert=" << vert << ")" << endl;
#endif
if (!d->baseImage.isNull ())
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\thave pixmap - flipping that";
+ qCDebug(kpLogLayers) << "\thave pixmap - flipping that";
#endif
d->baseImage = d->baseImage.mirrored(horiz, vert);
}
@@ -537,7 +537,7 @@ void kpAbstractImageSelection::flip (bool horiz, bool vert)
if (!d->transparencyMaskCache.isNull ())
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\thave transparency mask - flipping that";
+ qCDebug(kpLogLayers) << "\thave transparency mask - flipping that";
#endif
QImage image = d->transparencyMaskCache.toImage().mirrored(horiz, vert);
d->transparencyMaskCache = QBitmap::fromImage(image);
diff --git a/layers/selections/image/kpFreeFormImageSelection.cpp b/layers/selections/image/kpFreeFormImageSelection.cpp
index 9c26982..ad3fdff 100644
--- a/layers/selections/image/kpFreeFormImageSelection.cpp
+++ b/layers/selections/image/kpFreeFormImageSelection.cpp
@@ -31,7 +31,7 @@
#include "layers/selections/image/kpFreeFormImageSelection.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include "imagelib/kpPainter.h"
@@ -176,9 +176,9 @@ QPolygon kpFreeFormImageSelection::originalPoints () const
static QPolygon RecalculateCardinallyAdjacentPoints (const QPolygon &points)
{
#if DEBUG_KP_SELECTION
- kDebug () << "kpFreeFormImageSelection.cpp:RecalculateCardinallyAdjacentPoints()"
+ qCDebug(kpLogLayers) << "kpFreeFormImageSelection.cpp:RecalculateCardinallyAdjacentPoints()"
<< endl;
- kDebug () << "\tpoints=" << points;
+ qCDebug(kpLogLayers) << "\tpoints=" << points;
#endif
// Filter out duplicates.
@@ -191,7 +191,7 @@ static QPolygon RecalculateCardinallyAdjacentPoints (const QPolygon &points)
noDups.append (p);
}
#if DEBUG_KP_SELECTION
- kDebug () << "\twithout dups=" << noDups;
+ qCDebug(kpLogLayers) << "\twithout dups=" << noDups;
#endif
// Interpolate to ensure cardinal adjacency.
@@ -223,7 +223,7 @@ static QPolygon RecalculateCardinallyAdjacentPoints (const QPolygon &points)
cardPoints.append (p);
}
#if DEBUG_KP_SELECTION
- kDebug () << "\tcardinally adjacent=" << cardPoints;
+ qCDebug(kpLogLayers) << "\tcardinally adjacent=" << cardPoints;
#endif
return cardPoints;
diff --git a/layers/selections/image/kpImageSelectionTransparency.cpp b/layers/selections/image/kpImageSelectionTransparency.cpp
index 8f2db2d..c4ee26b 100644
--- a/layers/selections/image/kpImageSelectionTransparency.cpp
+++ b/layers/selections/image/kpImageSelectionTransparency.cpp
@@ -31,7 +31,7 @@
#include "layers/selections/image/kpImageSelectionTransparency.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "imagelib/kpColor.h"
#include "widgets/colorSimilarity/kpColorSimilarityHolder.h"
@@ -69,13 +69,13 @@ kpImageSelectionTransparency::kpImageSelectionTransparency (bool isOpaque, const
bool kpImageSelectionTransparency::operator== (const kpImageSelectionTransparency &rhs) const
{
#if DEBUG_KP_SELECTION_TRANSPARENCY && 0
- kDebug () << "kpImageSelectionTransparency::operator==()";
+ qCDebug(kpLogLayers) << "kpImageSelectionTransparency::operator==()";
#endif
if (m_isOpaque != rhs.m_isOpaque)
{
#if DEBUG_KP_SELECTION_TRANSPARENCY && 0
- kDebug () << "\tdifferent opacity: lhs=" << m_isOpaque
+ qCDebug(kpLogLayers) << "\tdifferent opacity: lhs=" << m_isOpaque
<< " rhs=" << rhs.m_isOpaque
<< endl;
#endif
@@ -85,16 +85,16 @@ bool kpImageSelectionTransparency::operator== (const kpImageSelectionTransparenc
if (m_isOpaque)
{
#if DEBUG_KP_SELECTION_TRANSPARENCY && 0
- kDebug () << "\tboth opaque - eq";
+ qCDebug(kpLogLayers) << "\tboth opaque - eq";
#endif
return true;
}
#if DEBUG_KP_SELECTION_TRANSPARENCY && 0
- kDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toQRgb ()
+ qCDebug(kpLogLayers) << "\tcolours: lhs=" << (int *) m_transparentColor.toQRgb ()
<< " rhs=" << (int *) rhs.m_transparentColor.toQRgb ()
<< endl;
- kDebug () << "\tcolour similarity: lhs=" << m_colorSimilarity
+ qCDebug(kpLogLayers) << "\tcolour similarity: lhs=" << m_colorSimilarity
<< " rhs=" << rhs.m_colorSimilarity
<< endl;
#endif
@@ -156,8 +156,8 @@ kpColor kpImageSelectionTransparency::transparentColor () const
{
if (m_isOpaque)
{
- // There are legitimate uses for this so no kError()
- kDebug () << "kpImageSelectionTransparency::transparentColor() "
+ // There are legitimate uses for this so no qCCritical(kpLogLayers)
+ qCDebug(kpLogLayers) << "kpImageSelectionTransparency::transparentColor() "
"getting transparent color even though opaque" << endl;
}
@@ -181,7 +181,7 @@ double kpImageSelectionTransparency::colorSimilarity () const
if (m_colorSimilarity < 0 ||
m_colorSimilarity > kpColorSimilarityHolder::MaxColorSimilarity)
{
- kError () << "kpImageSelectionTransparency::colorSimilarity() invalid colorSimilarity" << endl;
+ qCCritical(kpLogLayers) << "kpImageSelectionTransparency::colorSimilarity() invalid colorSimilarity" << endl;
return 0;
}
diff --git a/layers/selections/kpAbstractSelection.cpp b/layers/selections/kpAbstractSelection.cpp
index 54e11a7..2e58c1c 100644
--- a/layers/selections/kpAbstractSelection.cpp
+++ b/layers/selections/kpAbstractSelection.cpp
@@ -34,7 +34,7 @@
#include <QPolygon>
#include <QRect>
-#include <kdebug.h>
+#include "kpLogCategories.h"
struct kpAbstractSelectionPrivate
{
@@ -94,7 +94,7 @@ void kpAbstractSelection::writeToStream (QDataStream &stream) const
QDataStream &operator<< (QDataStream &stream, const kpAbstractSelection &selection)
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractSelection::operator<<(sel: rect=" <<
+ qCDebug(kpLogLayers) << "kpAbstractSelection::operator<<(sel: rect=" <<
selection.boundingRect () << endl;
#endif
stream << selection.serialID ();
@@ -192,7 +192,7 @@ bool kpAbstractSelection::contains (int x, int y) const
void kpAbstractSelection::moveBy (int dx, int dy)
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractSelection::moveBy(" << dx << "," << dy << ")";
+ qCDebug(kpLogLayers) << "kpAbstractSelection::moveBy(" << dx << "," << dy << ")";
#endif
if (dx == 0 && dy == 0)
@@ -201,12 +201,12 @@ void kpAbstractSelection::moveBy (int dx, int dy)
QRect oldRect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\toldRect=" << oldRect;
+ qCDebug(kpLogLayers) << "\toldRect=" << oldRect;
#endif
d->rect.translate (dx, dy);
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\tnewRect=" << d->rect;
+ qCDebug(kpLogLayers) << "\tnewRect=" << d->rect;
#endif
emit changed (oldRect);
@@ -223,11 +223,11 @@ void kpAbstractSelection::moveTo (int dx, int dy)
void kpAbstractSelection::moveTo (const QPoint &topLeftPoint)
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractSelection::moveTo(" << topLeftPoint << ")";
+ qCDebug(kpLogLayers) << "kpAbstractSelection::moveTo(" << topLeftPoint << ")";
#endif
QRect oldBoundingRect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\toldBoundingRect=" << oldBoundingRect;
+ qCDebug(kpLogLayers) << "\toldBoundingRect=" << oldBoundingRect;
#endif
if (topLeftPoint == oldBoundingRect.topLeft ())
return;
@@ -246,13 +246,13 @@ void kpAbstractSelection::paintRectangularBorder (QImage *destPixmap,
(void) selectionFinished;
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractSelection::paintRectangularBorder() boundingRect="
+ qCDebug(kpLogLayers) << "kpAbstractSelection::paintRectangularBorder() boundingRect="
<< boundingRect () << endl;
#endif
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\tselection border = rectangle";
- kDebug () << "\t\tx=" << boundingRect ().x () - docRect.x ()
+ qCDebug(kpLogLayers) << "\tselection border = rectangle";
+ qCDebug(kpLogLayers) << "\t\tx=" << boundingRect ().x () - docRect.x ()
<< " y=" << boundingRect ().y () - docRect.y ()
<< " w=" << boundingRect ().width ()
<< " h=" << boundingRect ().height ()
@@ -277,7 +277,7 @@ void kpAbstractSelection::paintPolygonalBorder (const QPolygon &points,
bool selectionFinished) const
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpAbstractSelection::paintPolygonalBorder() boundingRect="
+ qCDebug(kpLogLayers) << "kpAbstractSelection::paintPolygonalBorder() boundingRect="
<< boundingRect () << endl;
#endif
diff --git a/layers/selections/kpSelectionDrag.cpp b/layers/selections/kpSelectionDrag.cpp
index 540be1b..f8aa5e7 100644
--- a/layers/selections/kpSelectionDrag.cpp
+++ b/layers/selections/kpSelectionDrag.cpp
@@ -34,7 +34,7 @@
#include <qdatastream.h>
#include <QImage>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpSelectionFactory.h"
#include "layers/selections/image/kpAbstractImageSelection.h"
@@ -51,7 +51,7 @@ const char * const kpSelectionDrag::SelectionMimeType =
kpSelectionDrag::kpSelectionDrag (const kpAbstractImageSelection &sel)
{
#if DEBUG_KP_SELECTION_DRAG && 1
- kDebug () << "kpSelectionDrag() w=" << sel.width ()
+ qCDebug(kpLogLayers) << "kpSelectionDrag() w=" << sel.width ()
<< " h=" << sel.height ()
<< endl;
#endif
@@ -70,14 +70,14 @@ kpSelectionDrag::kpSelectionDrag (const kpAbstractImageSelection &sel)
// OPT: an awful waste of memory storing image in both selection and QImage
const QImage image = sel.baseImage ();
#if DEBUG_KP_SELECTION_DRAG && 1
- kDebug () << "\timage: w=" << image.width ()
+ qCDebug(kpLogLayers) << "\timage: w=" << image.width ()
<< " h=" << image.height ()
<< endl;
#endif
if (image.isNull ())
{
// TODO: proper error handling.
- kError () << "kpSelectionDrag::setSelection() could not convert to image"
+ qCCritical(kpLogLayers) << "kpSelectionDrag::setSelection() could not convert to image"
<< endl;
}
else
@@ -92,7 +92,7 @@ bool kpSelectionDrag::canDecode(const QMimeData *mimeData)
Q_ASSERT(mimeData);
#if DEBUG_KP_SELECTION_DRAG
- kDebug() << "kpSelectionDrag::canDecode()"
+ qCDebug(kpLogLayers) << "kpSelectionDrag::canDecode()"
<< "hasSel=" << mimeData->hasFormat(kpSelectionDrag::SelectionMimeType)
<< "hasImage=" << mimeData->hasImage();
#endif
@@ -108,14 +108,14 @@ bool kpSelectionDrag::canDecode(const QMimeData *mimeData)
kpAbstractImageSelection *kpSelectionDrag::decode(const QMimeData *mimeData)
{
#if DEBUG_KP_SELECTION_DRAG
- kDebug () << "kpSelectionDrag::decode(kpAbstractSelection)";
+ qCDebug(kpLogLayers) << "kpSelectionDrag::decode(kpAbstractSelection)";
#endif
Q_ASSERT (mimeData);
if (mimeData->hasFormat (kpSelectionDrag::SelectionMimeType))
{
#if DEBUG_KP_SELECTION_DRAG
- kDebug () << "\tmimeSource hasFormat selection - just return it in QByteArray";
+ qCDebug(kpLogLayers) << "\tmimeSource hasFormat selection - just return it in QByteArray";
#endif
QByteArray data = mimeData->data (kpSelectionDrag::SelectionMimeType);
QDataStream stream (&data, QIODevice::ReadOnly);
@@ -125,14 +125,14 @@ kpAbstractImageSelection *kpSelectionDrag::decode(const QMimeData *mimeData)
else
{
#if DEBUG_KP_SELECTION_DRAG
- kDebug () << "\tmimeSource doesn't provide selection - try image";
+ qCDebug(kpLogLayers) << "\tmimeSource doesn't provide selection - try image";
#endif
QImage image = qvariant_cast <QImage> (mimeData->imageData ());
if (!image.isNull ())
{
#if DEBUG_KP_SELECTION_DRAG
- kDebug () << "\tok w=" << image.width () << " h=" << image.height ();
+ qCDebug(kpLogLayers) << "\tok w=" << image.width () << " h=" << image.height ();
#endif
return new kpRectangularImageSelection (
@@ -141,7 +141,7 @@ kpAbstractImageSelection *kpSelectionDrag::decode(const QMimeData *mimeData)
else
{
#if DEBUG_KP_SELECTION_DRAG
- kDebug () << "kpSelectionDrag::decode(kpAbstractSelection) mimeSource had no sel "
+ qCDebug(kpLogLayers) << "kpSelectionDrag::decode(kpAbstractSelection) mimeSource had no sel "
"and could not decode to image" << endl;
#endif
return 0;
diff --git a/layers/selections/kpSelectionFactory.cpp b/layers/selections/kpSelectionFactory.cpp
index 45e2c3b..b28a33a 100644
--- a/layers/selections/kpSelectionFactory.cpp
+++ b/layers/selections/kpSelectionFactory.cpp
@@ -45,13 +45,13 @@
kpAbstractImageSelection *kpSelectionFactory::FromStream (QDataStream &stream)
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpSelectionFactory::FromStream()";
+ qCDebug(kpLogLayers) << "kpSelectionFactory::FromStream()";
#endif
int serialID;
stream >> serialID;
#if DEBUG_KP_SELECTION && 1
- kDebug () << "\tserialID=" << serialID;
+ qCDebug(kpLogLayers) << "\tserialID=" << serialID;
#endif
// Only image selections are marshalled.
diff --git a/layers/selections/text/kpTextSelection.cpp b/layers/selections/text/kpTextSelection.cpp
index f6df6dd..c92b6d7 100644
--- a/layers/selections/text/kpTextSelection.cpp
+++ b/layers/selections/text/kpTextSelection.cpp
@@ -36,7 +36,7 @@
#include "kpDefs.h"
#include "kpTextStyle.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include <QFontMetrics>
#include <QList>
diff --git a/layers/selections/text/kpTextSelection_Cursor.cpp b/layers/selections/text/kpTextSelection_Cursor.cpp
index f0311a7..853a53f 100644
--- a/layers/selections/text/kpTextSelection_Cursor.cpp
+++ b/layers/selections/text/kpTextSelection_Cursor.cpp
@@ -37,7 +37,7 @@
#include "kpTextStyle.h"
#include "kpPreeditText.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include <QFontMetrics>
#include <QList>
@@ -98,7 +98,7 @@ QPoint kpTextSelection::pointForTextRowCol (int row, int col) const
(row >= (int) d->textLines.size () || col > (int) d->textLines [row].length ())))
{
#if DEBUG_KP_SELECTION && 1
- kDebug () << "kpTextSelection::pointForTextRowCol("
+ qCDebug(kpLogLayers) << "kpTextSelection::pointForTextRowCol("
<< row << ","
<< col << ") out of range"
<< " textLines='"
diff --git a/layers/selections/text/kpTextSelection_Paint.cpp b/layers/selections/text/kpTextSelection_Paint.cpp
index d82dfda..b0d1a6c 100644
--- a/layers/selections/text/kpTextSelection_Paint.cpp
+++ b/layers/selections/text/kpTextSelection_Paint.cpp
@@ -39,7 +39,7 @@
#include "kpPreeditText.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include <QBitmap>
#include <QFont>
@@ -115,7 +115,7 @@ void kpTextSelection::drawPreeditString(QPainter &painter, int &x, int y, const
void kpTextSelection::paint(QImage *destPixmap, const QRect &docRect) const
{
#if DEBUG_KP_SELECTION
- kDebug () << "kpTextSelection::paint() textStyle: fcol="
+ qCDebug(kpLogLayers) << "kpTextSelection::paint() textStyle: fcol="
<< (int *) d->textStyle.foregroundColor ().toQRgb ()
<< " bcol="
<< (int *) d->textStyle.backgroundColor ().toQRgb ()
@@ -149,8 +149,8 @@ void kpTextSelection::paint(QImage *destPixmap, const QRect &docRect) const
const QFontMetrics fontMetrics (theTextStyle.font ());
#if DEBUG_KP_SELECTION
- kDebug () << "kpTextSelection_Paint.cpp:DrawTextHelper";
- kDebug () << "\theight=" << fontMetrics.height ()
+ qCDebug(kpLogLayers) << "kpTextSelection_Paint.cpp:DrawTextHelper";
+ qCDebug(kpLogLayers) << "\theight=" << fontMetrics.height ()
<< " leading=" << fontMetrics.leading ()
<< " ascent=" << fontMetrics.ascent ()
<< " descent=" << fontMetrics.descent ()
diff --git a/lgpl/generic/kpColorCollection.cpp b/lgpl/generic/kpColorCollection.cpp
index e21952b..30e674c 100644
--- a/lgpl/generic/kpColorCollection.cpp
+++ b/lgpl/generic/kpColorCollection.cpp
@@ -33,9 +33,9 @@
#include <kio/netaccess.h>
#include <KLocalizedString>
#include <KMessageBox>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kstringhandler.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <QDir>
#include <QFile>
@@ -127,7 +127,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
if (url.isEmpty () || !KIO::NetAccess::download (url, tempPaletteFilePath, parent))
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\tcould not download";
+ qCDebug(kpLogMisc) << "\tcould not download";
#endif
::CouldNotOpenDialog (url, parent);
return false;
@@ -140,7 +140,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
!paletteFile.open(QIODevice::ReadOnly))
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\tcould not open qfile";
+ qCDebug(kpLogMisc) << "\tcould not open qfile";
#endif
KIO::NetAccess::removeTempFile (tempPaletteFilePath);
::CouldNotOpenDialog (url, parent);
@@ -212,13 +212,13 @@ bool
kpColorCollection::openKDE(const QString &name, QWidget *parent)
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "name=" << name;
+ qCDebug(kpLogMisc) << "name=" << name;
#endif
if (name.isEmpty())
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "name.isEmpty";
+ qCDebug(kpLogMisc) << "name.isEmpty";
#endif
::CouldNotOpenKDEDialog (name, parent);
return false;
@@ -229,7 +229,7 @@ kpColorCollection::openKDE(const QString &name, QWidget *parent)
if (filename.isEmpty())
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "could not find file";
+ qCDebug(kpLogMisc) << "could not find file";
#endif
::CouldNotOpenKDEDialog (name, parent);
return false;
@@ -239,14 +239,14 @@ kpColorCollection::openKDE(const QString &name, QWidget *parent)
if (!open (QUrl::fromLocalFile (filename), parent))
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "could not open";
+ qCDebug(kpLogMisc) << "could not open";
#endif
return false;
}
d->name = name;
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "opened";
+ qCDebug(kpLogMisc) << "opened";
#endif
return true;
}
@@ -317,7 +317,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
atomicFileWriter.cancelWriting ();
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\treturning false because could not open QSaveFile"
+ qCDebug(kpLogMisc) << "\treturning false because could not open QSaveFile"
<< " error=" << atomicFileWriter.error () << endl;
#endif
::CouldNotSaveDialog (url, parent);
@@ -334,7 +334,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
atomicFileWriter.cancelWriting ();
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\tcould not close QSaveFile";
+ qCDebug(kpLogMisc) << "\tcould not close QSaveFile";
#endif
::CouldNotSaveDialog (url, parent);
return false;
@@ -350,7 +350,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
if (!tempFile.open ())
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\treturning false because could not open tempFile";
+ qCDebug(kpLogMisc) << "\treturning false because could not open tempFile";
#endif
::CouldNotSaveDialog (url, parent);
return false;
@@ -363,7 +363,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
// stops working after close() is called.
const QString tempFileName = tempFile.fileName ();
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\ttempFileName='" << tempFileName << "'";
+ qCDebug(kpLogMisc) << "\ttempFileName='" << tempFileName << "'";
#endif
Q_ASSERT (!tempFileName.isEmpty ());
@@ -371,7 +371,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
if (tempFile.error () != QFile::NoError)
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\treturning false because could not close";
+ qCDebug(kpLogMisc) << "\treturning false because could not close";
#endif
::CouldNotSaveDialog (url, parent);
return false;
@@ -384,7 +384,7 @@ kpColorCollection::saveAs(const QUrl &url, bool showOverwritePrompt,
if (!KIO::NetAccess::upload (tempFileName, url, parent))
{
#if DEBUG_KP_COLOR_COLLECTION
- kDebug () << "\treturning false because could not upload";
+ qCDebug(kpLogMisc) << "\treturning false because could not upload";
#endif
::CouldNotSaveDialog (url, parent);
return false;
diff --git a/lgpl/generic/widgets/kpColorCellsBase.cpp b/lgpl/generic/widgets/kpColorCellsBase.cpp
index 9364c40..e7cb0bb 100644
--- a/lgpl/generic/widgets/kpColorCellsBase.cpp
+++ b/lgpl/generic/widgets/kpColorCellsBase.cpp
@@ -35,7 +35,7 @@
#include <QMouseEvent>
#include <QPainter>
#include <QImage>
-#include <QDebug>
+#include "kpLogCategories.h"
#include <KColorMimeData>
@@ -135,7 +135,7 @@ void kpColorCellsBase::setRowColumnCounts (int rows, int columns)
const int oldRows = rowCount (), oldCols = columnCount ();
const int newRows = rows, newCols = columns;
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "oldRows=" << oldRows << "oldCols=" << oldCols
+ qCDebug(kpLogMisc) << "oldRows=" << oldRows << "oldCols=" << oldCols
<< "newRows=" << newRows << "newCols=" << newCols;
#endif
@@ -381,7 +381,7 @@ int kpColorCellsBase::positionToCell(const QPoint &pos, bool ignoreBorders,
const int r = indexAt (pos).row (), c = indexAt (pos).column ();
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "r=" << r << "c=" << c;
+ qCDebug(kpLogMisc) << "r=" << r << "c=" << c;
#endif
if (r == -1 || c == -1)
@@ -419,14 +419,14 @@ void kpColorCellsBase::mouseMoveEvent( QMouseEvent *e )
if (cell != -1)
{
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "beginning drag from cell=" << cell
+ qCDebug(kpLogMisc) << "beginning drag from cell=" << cell
<< "color: isValid=" << d->colors [cell].isValid ()
<< " rgba=" << (int *) d->colors [cell].rgba();
#endif
Q_ASSERT (d->colors[cell].isValid());
KColorMimeData::createDrag(d->colors[cell], this)->start(Qt::CopyAction | Qt::MoveAction);
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "finished drag";
+ qCDebug(kpLogMisc) << "finished drag";
#endif
}
}
@@ -457,7 +457,7 @@ static void SetDropAction (QWidget *self, QDropEvent *event)
void kpColorCellsBase::dragEnterEvent( QDragEnterEvent *event)
{
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "kpColorCellsBase::dragEnterEvent() acceptDrags="
+ qCDebug(kpLogMisc) << "kpColorCellsBase::dragEnterEvent() acceptDrags="
<< d->acceptDrags
<< " canDecode=" << KColorMimeData::canDecode(event->mimeData())
<< endl;
@@ -471,7 +471,7 @@ void kpColorCellsBase::dragEnterEvent( QDragEnterEvent *event)
void kpColorCellsBase::dragMoveEvent (QDragMoveEvent *event)
{
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "kpColorCellsBase::dragMoveEvent() acceptDrags="
+ qCDebug(kpLogMisc) << "kpColorCellsBase::dragMoveEvent() acceptDrags="
<< d->acceptDrags
<< " canDecode=" << KColorMimeData::canDecode(event->mimeData())
<< endl;
@@ -490,7 +490,7 @@ void kpColorCellsBase::dropEvent( QDropEvent *event)
positionToCell (d->mousePos, true) :
-1;
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "kpColorCellsBase::dropEvent()"
+ qCDebug(kpLogMisc) << "kpColorCellsBase::dropEvent()"
<< "color: rgba=" << (const int *) c.rgba () << "isValid=" << c.isValid()
<< "source=" << event->source () << "dragSourceCell=" << dragSourceCell;
#endif
@@ -499,7 +499,7 @@ void kpColorCellsBase::dropEvent( QDropEvent *event)
int cell = positionToCell(event->pos(), true, true/*allow empty cell*/);
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "\tcell=" << cell;
+ qCDebug(kpLogMisc) << "\tcell=" << cell;
#endif
// TODO: I believe kdelibs forgets to do this.
if (cell == -1)
@@ -513,7 +513,7 @@ void kpColorCellsBase::dropEvent( QDropEvent *event)
setColor(cell,c);
#if DEBUG_KP_COLOR_CELLS_BASE
- qDebug () << "\tdropAction=" << event->dropAction ()
+ qCDebug(kpLogMisc) << "\tdropAction=" << event->dropAction ()
<< "destOldColor.rgba=" << (const int *) destOldColor.rgba ();
#endif
if (event->dropAction () == Qt::MoveAction && dragSourceCell != -1) {
diff --git a/mainWindow/kpMainWindow.cpp b/mainWindow/kpMainWindow.cpp
index 19b4b55..673b48a 100644
--- a/mainWindow/kpMainWindow.cpp
+++ b/mainWindow/kpMainWindow.cpp
@@ -49,7 +49,7 @@
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <krecentfilesaction.h>
@@ -104,7 +104,7 @@ kpMainWindow::kpMainWindow (kpDocument *newDoc)
void kpMainWindow::readGeneralSettings ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tkpMainWindow(" << objectName () << ")::readGeneralSettings()";
+ qCDebug(kpLogMainWindow) << "\tkpMainWindow(" << objectName () << ")::readGeneralSettings()";
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
@@ -122,7 +122,7 @@ void kpMainWindow::readGeneralSettings ()
{
d->configOpenImagesInSameWindow = false;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tconfigOpenImagesInSameWindow: first time"
+ qCDebug(kpLogMainWindow) << "\tconfigOpenImagesInSameWindow: first time"
<< " - writing default: " << d->configOpenImagesInSameWindow
<< endl;
#endif
@@ -137,7 +137,7 @@ void kpMainWindow::readGeneralSettings ()
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tGeneral Settings: firstTime=" << d->configFirstTime
+ qCDebug(kpLogMainWindow) << "\t\tGeneral Settings: firstTime=" << d->configFirstTime
<< " showGrid=" << d->configShowGrid
<< " showPath=" << d->configShowPath
<< " moreEffectsDialogLastEffect=" << d->moreEffectsDialogLastEffect
@@ -152,7 +152,7 @@ void kpMainWindow::readGeneralSettings ()
void kpMainWindow::readThumbnailSettings ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tkpMainWindow(" << objectName () << ")::readThumbnailSettings()";
+ qCDebug(kpLogMainWindow) << "\tkpMainWindow(" << objectName () << ")::readThumbnailSettings()";
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
@@ -163,7 +163,7 @@ void kpMainWindow::readThumbnailSettings ()
d->configThumbnailShowRectangle = cfg.readEntry (kpSettingThumbnailShowRectangle, true);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tThumbnail Settings: shown=" << d->configThumbnailShown
+ qCDebug(kpLogMainWindow) << "\t\tThumbnail Settings: shown=" << d->configThumbnailShown
<< " geometry=" << d->configThumbnailGeometry
<< " zoomed=" << d->configZoomedThumbnail
<< " showRectangle=" << d->configThumbnailShowRectangle
@@ -192,7 +192,7 @@ void kpMainWindow::finalizeGUI(KXMLGUIClient *client)
void kpMainWindow::init ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow(" << objectName () << ")::init()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow(" << objectName () << ")::init()";
QTime totalTime; totalTime.start ();
#endif
@@ -278,7 +278,7 @@ void kpMainWindow::init ()
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tall done in " << totalTime.elapsed () << "msec";
+ qCDebug(kpLogMainWindow) << "\tall done in " << totalTime.elapsed () << "msec";
#endif
}
@@ -288,14 +288,14 @@ void kpMainWindow::init ()
void kpMainWindow::readProperties (const KConfigGroup &configGroup)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow<" << this << ">::readProperties()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow<" << this << ">::readProperties()";
#endif
// No document at all?
if (!configGroup.hasKey (kpSessionSettingDocumentUrl))
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tno url - no document";
+ qCDebug(kpLogMainWindow) << "\tno url - no document";
#endif
setDocument (0);
}
@@ -305,7 +305,7 @@ void kpMainWindow::readProperties (const KConfigGroup &configGroup)
const QUrl url = QUrl (configGroup.readEntry (kpSessionSettingDocumentUrl,
QString ()));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\turl=" << url;
+ qCDebug(kpLogMainWindow) << "\turl=" << url;
#endif
const QSize notFromURLDocSize =
@@ -324,7 +324,7 @@ void kpMainWindow::readProperties (const KConfigGroup &configGroup)
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tnot from url; doc size=" << notFromURLDocSize;
+ qCDebug(kpLogMainWindow) << "\tnot from url; doc size=" << notFromURLDocSize;
#endif
// Either we have an empty URL or we have a "kolourpaint doesnotexist.png"
// URL. Regarding the latter case, if a file now actually exists at that
@@ -346,14 +346,14 @@ void kpMainWindow::readProperties (const KConfigGroup &configGroup)
void kpMainWindow::saveProperties (KConfigGroup &configGroup)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow<" << this << ">::saveProperties()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow<" << this << ">::saveProperties()";
#endif
// No document at all?
if (!d->document)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tno url - no document";
+ qCDebug(kpLogMainWindow) << "\tno url - no document";
#endif
}
// Have a document.
@@ -368,7 +368,7 @@ void kpMainWindow::saveProperties (KConfigGroup &configGroup)
const QUrl url = d->document->url ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\turl=" << url;
+ qCDebug(kpLogMainWindow) << "\turl=" << url;
#endif
configGroup.writeEntry (kpSessionSettingDocumentUrl, url.url ());
@@ -393,7 +393,7 @@ void kpMainWindow::saveProperties (KConfigGroup &configGroup)
const QSize docSize (d->document->constructorWidth (),
d->document->constructorHeight ());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tnot from url; doc size=" << docSize;
+ qCDebug(kpLogMainWindow) << "\tnot from url; doc size=" << docSize;
#endif
configGroup.writeEntry (kpSessionSettingNotFromUrlDocumentSize, docSize);
}
@@ -578,13 +578,13 @@ void kpMainWindow::enableDocumentActions (bool enable)
// private
void kpMainWindow::setDocument (kpDocument *newDoc)
{
- //kDebug () << newDoc;
+ //qCDebug(kpLogMainWindow) << newDoc;
// is it a close operation?
if (!newDoc)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdisabling actions";
+ qCDebug(kpLogMainWindow) << "\tdisabling actions";
#endif
// sync with the bit marked "sync" below
@@ -626,8 +626,8 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
delete d->viewManager; d->viewManager = 0;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdestroying document";
- kDebug () << "\t\td->document=" << d->document;
+ qCDebug(kpLogMainWindow) << "\tdestroying document";
+ qCDebug(kpLogMainWindow) << "\t\td->document=" << d->document;
#endif
// destroy current document
delete d->document;
@@ -656,7 +656,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
if (d->document)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\treparenting doc that may have been created into a"
+ qCDebug(kpLogMainWindow) << "\treparenting doc that may have been created into a"
<< " different mainWindiow" << endl;
#endif
d->document->setEnviron (documentEnvironment ());
@@ -674,7 +674,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
d->mainView->show ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\thooking up document signals";
+ qCDebug(kpLogMainWindow) << "\thooking up document signals";
#endif
// Copy/Cut/Deselect/Delete
@@ -738,7 +738,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
d->viewManager, SLOT (adjustViewsToEnvironment ()));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tenabling actions";
+ qCDebug(kpLogMainWindow) << "\tenabling actions";
#endif
// sync with the bit marked "sync" above
@@ -763,7 +763,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
if (isShown ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcreating thumbnail immediately";
+ qCDebug(kpLogMainWindow) << "\tcreating thumbnail immediately";
#endif
slotCreateThumbnail ();
}
@@ -771,7 +771,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcreating thumbnail LATER";
+ qCDebug(kpLogMainWindow) << "\tcreating thumbnail LATER";
#endif
QTimer::singleShot (0, this, SLOT (slotCreateThumbnail ()));
}
@@ -780,7 +780,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tupdating mainWindow elements";
+ qCDebug(kpLogMainWindow) << "\tupdating mainWindow elements";
#endif
slotImageMenuUpdateDueToSelection ();
@@ -793,7 +793,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
d->commandHistory->clear ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdocument and views ready to go!";
+ qCDebug(kpLogMainWindow) << "\tdocument and views ready to go!";
#endif
}
@@ -815,7 +815,7 @@ void kpMainWindow::dragEnterEvent (QDragEnterEvent *e)
void kpMainWindow::dropEvent (QDropEvent *e)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::dropEvent" << e->pos ();
+ qCDebug(kpLogMainWindow) << "kpMainWindow::dropEvent" << e->pos ();
#endif
QList<QUrl> urls;
@@ -847,7 +847,7 @@ void kpMainWindow::dropEvent (QDropEvent *e)
QPoint selTopLeft = KP_INVALID_POINT;
const QPoint globalPos = QWidget::mapToGlobal (e->pos ());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tpos toGlobal=" << globalPos;
+ qCDebug(kpLogMainWindow) << "\tpos toGlobal=" << globalPos;
#endif
kpView *view = 0;
@@ -856,18 +856,18 @@ void kpMainWindow::dropEvent (QDropEvent *e)
{
view = d->viewManager->viewUnderCursor ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tviewUnderCursor=" << view;
+ qCDebug(kpLogMainWindow) << "\t\tviewUnderCursor=" << view;
#endif
if (!view)
{
// HACK: see kpViewManager::setViewUnderCursor() to see why
// it's not reliable
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tattempting to discover view";
+ qCDebug(kpLogMainWindow) << "\t\tattempting to discover view";
if (d->mainView && d->scrollView)
{
- kDebug () << "\t\t\tmainView->globalRect="
+ qCDebug(kpLogMainWindow) << "\t\t\tmainView->globalRect="
<< kpWidgetMapper::toGlobal (d->mainView, d->mainView->rect ())
<< " scrollView->globalRect="
<< kpWidgetMapper::toGlobal (d->scrollView,
diff --git a/mainWindow/kpMainWindow_Colors.cpp b/mainWindow/kpMainWindow_Colors.cpp
index 485dfcf..e0c97c4 100644
--- a/mainWindow/kpMainWindow_Colors.cpp
+++ b/mainWindow/kpMainWindow_Colors.cpp
@@ -37,7 +37,7 @@
#include <KMessageBox>
#include <KSelectAction>
#include <KStandardGuiItem>
-#include <KDebug>
+#include "kpLogCategories.h"
#include <QFileDialog>
#include <QAction>
@@ -181,7 +181,7 @@ void kpMainWindow::deselectActionColorsKDE ()
bool kpMainWindow::queryCloseColors ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::queryCloseColors() colorCells.modified="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::queryCloseColors() colorCells.modified="
<< colorCells ()->isModified ();
#endif
@@ -267,14 +267,14 @@ void kpMainWindow::slotColorsDefault ()
bool kpMainWindow::openKDEColors (const QString &name)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::openKDEColors(" << name << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::openKDEColors(" << name << ")";
#endif
kpColorCollection colorCol;
if (colorCol.openKDE (name, this))
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "opened";
+ qCDebug(kpLogMainWindow) << "opened";
#endif
colorCells ()->setColorCollection (colorCol);
return true;
@@ -282,7 +282,7 @@ bool kpMainWindow::openKDEColors (const QString &name)
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "failed to open";
+ qCDebug(kpLogMainWindow) << "failed to open";
#endif
return false;
}
@@ -398,7 +398,7 @@ void kpMainWindow::slotColorsReload ()
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "result=" << result
+ qCDebug(kpLogMainWindow) << "result=" << result
<< "vs KMessageBox::Continue" << KMessageBox::Continue;
#endif
if (result != KMessageBox::Continue)
diff --git a/mainWindow/kpMainWindow_Edit.cpp b/mainWindow/kpMainWindow_Edit.cpp
index e358b47..c648558 100644
--- a/mainWindow/kpMainWindow_Edit.cpp
+++ b/mainWindow/kpMainWindow_Edit.cpp
@@ -40,7 +40,7 @@
#include <QDesktopWidget>
#include <QScrollBar>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kmessagebox.h>
#include <kstandardaction.h>
@@ -168,7 +168,7 @@ QMenu *kpMainWindow::selectionToolRMBMenu ()
void kpMainWindow::slotCut ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotCut() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotCut() CALLED";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
@@ -196,7 +196,7 @@ static QMimeData *NewTextMimeData (const QString &text)
void kpMainWindow::slotCopy ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotCopy() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotCopy() CALLED";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
@@ -289,7 +289,7 @@ void kpMainWindow::slotEnablePaste ()
QRect kpMainWindow::calcUsefulPasteRect (int imageWidth, int imageHeight)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::calcUsefulPasteRect("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::calcUsefulPasteRect("
<< imageWidth << "," << imageHeight
<< ")"
<< endl;
@@ -324,7 +324,7 @@ QRect kpMainWindow::calcUsefulPasteRect (int imageWidth, int imageHeight)
void kpMainWindow::paste(const kpAbstractSelection &sel, bool forceTopLeft)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::paste(forceTopLeft=" << forceTopLeft << ")"
+ qCDebug(kpLogMainWindow) << "kpMainWindow::paste(forceTopLeft=" << forceTopLeft << ")"
<< endl;
#endif
@@ -371,7 +371,7 @@ void kpMainWindow::paste(const kpAbstractSelection &sel, bool forceTopLeft)
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "sel.size=" << QSize (sel.width (), sel.height ())
+ qCDebug(kpLogMainWindow) << "sel.size=" << QSize (sel.width (), sel.height ())
<< " document.size="
<< QSize (d->document->width (), d->document->height ())
<< endl;
@@ -404,7 +404,7 @@ void kpMainWindow::pasteText (const QString &text,
const QPoint &newTextSelectionTopLeft)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::pasteText(" << text
+ qCDebug(kpLogMainWindow) << "kpMainWindow::pasteText(" << text
<< ",forceNewTextSelection=" << forceNewTextSelection
<< ",newTextSelectionTopLeft=" << newTextSelectionTopLeft
<< ")" << endl;
@@ -424,7 +424,7 @@ void kpMainWindow::pasteText (const QString &text,
d->commandHistory && d->viewManager)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\treusing existing Text Selection";
+ qCDebug(kpLogMainWindow) << "\treusing existing Text Selection";
#endif
d->viewManager->setQueueUpdates();
@@ -433,7 +433,7 @@ void kpMainWindow::pasteText (const QString &text,
if (!textSel->hasContent ())
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\t\tneeds content";
+ qCDebug(kpLogMainWindow) << "\t\tneeds content";
#endif
commandHistory ()->addCreateSelectionCommand (
new kpToolSelectionCreateCommand (
@@ -486,7 +486,7 @@ void kpMainWindow::pasteText (const QString &text,
else
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tcreating Text Selection";
+ qCDebug(kpLogMainWindow) << "\tcreating Text Selection";
#endif
const kpTextStyle ts = textStyle ();
@@ -537,7 +537,7 @@ void kpMainWindow::pasteTextAt (const QString &text, const QPoint &point,
bool allowNewTextSelectionPointShift)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::pasteTextAt(" << text
+ qCDebug(kpLogMainWindow) << "kpMainWindow::pasteTextAt(" << text
<< ",point=" << point
<< ",allowNewTextSelectionPointShift="
<< allowNewTextSelectionPointShift
@@ -626,7 +626,7 @@ void kpMainWindow::slotPaste()
void kpMainWindow::slotPasteInNewWindow ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotPasteInNewWindow() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotPasteInNewWindow() CALLED";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
@@ -650,7 +650,7 @@ void kpMainWindow::slotPasteInNewWindow ()
if (transparency.isTransparent ())
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tchanging image selection transparency to opaque";
+ qCDebug(kpLogMainWindow) << "\tchanging image selection transparency to opaque";
#endif
transparency.setOpaque ();
// Since we are setting selection transparency programmatically
@@ -679,12 +679,12 @@ void kpMainWindow::slotPasteInNewWindow ()
void kpMainWindow::slotDelete ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotDelete() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDelete() CALLED";
#endif
if (!d->actionDelete->isEnabled ())
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\taction not enabled - was probably called from kpTool::keyPressEvent()";
+ qCDebug(kpLogMainWindow) << "\taction not enabled - was probably called from kpTool::keyPressEvent()";
#endif
return;
}
@@ -707,7 +707,7 @@ void kpMainWindow::slotDelete ()
void kpMainWindow::slotSelectAll ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotSelectAll() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotSelectAll() CALLED";
#endif
Q_ASSERT (d->document);
@@ -731,7 +731,7 @@ void kpMainWindow::slotSelectAll ()
void kpMainWindow::addDeselectFirstCommand (kpCommand *cmd)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::addDeselectFirstCommand("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::addDeselectFirstCommand("
<< cmd
<< ")"
<< endl;
@@ -741,7 +741,7 @@ void kpMainWindow::addDeselectFirstCommand (kpCommand *cmd)
kpAbstractSelection *sel = d->document->selection ();
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tsel=" << sel;
+ qCDebug(kpLogMainWindow) << "\tsel=" << sel;
#endif
if (sel)
@@ -751,7 +751,7 @@ void kpMainWindow::addDeselectFirstCommand (kpCommand *cmd)
if (!sel->hasContent ())
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tjust a fresh border - was nop - delete";
+ qCDebug(kpLogMainWindow) << "\tjust a fresh border - was nop - delete";
#endif
d->document->selectionDelete ();
if (tool ())
@@ -763,7 +763,7 @@ void kpMainWindow::addDeselectFirstCommand (kpCommand *cmd)
else
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\treal selection with image - push onto doc cmd";
+ qCDebug(kpLogMainWindow) << "\treal selection with image - push onto doc cmd";
#endif
kpCommand *deselectCommand = new kpToolSelectionDestroyCommand (
dynamic_cast <kpTextSelection *> (sel) ?
@@ -797,7 +797,7 @@ void kpMainWindow::addDeselectFirstCommand (kpCommand *cmd)
void kpMainWindow::slotDeselect ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::slotDeselect() CALLED";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDeselect() CALLED";
#endif
Q_ASSERT (d->document && d->document->selection ());
@@ -812,7 +812,7 @@ void kpMainWindow::slotDeselect ()
void kpMainWindow::slotCopyToFile ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotCopyToFile()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotCopyToFile()";
#endif
toolEndShape ();
@@ -889,7 +889,7 @@ void kpMainWindow::slotCopyToFile ()
void kpMainWindow::slotPasteFromFile ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotPasteFromFile()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotPasteFromFile()";
#endif
toolEndShape ();
diff --git a/mainWindow/kpMainWindow_File.cpp b/mainWindow/kpMainWindow_File.cpp
index c13266d..be75cc9 100644
--- a/mainWindow/kpMainWindow_File.cpp
+++ b/mainWindow/kpMainWindow_File.cpp
@@ -54,7 +54,7 @@
#include <kactioncollection.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <KPluralHandlingSpinBox>
#include <kfiledialog.h>
#include <kiconloader.h>
@@ -88,7 +88,7 @@
void kpMainWindow::setupFileMenuActions ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::setupFileMenuActions()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setupFileMenuActions()";
#endif
KActionCollection *ac = actionCollection ();
@@ -98,7 +98,7 @@ void kpMainWindow::setupFileMenuActions ()
d->actionOpenRecent = KStandardAction::openRecent (this, SLOT (slotOpenRecent (const QUrl &)), ac);
d->actionOpenRecent->loadEntries (KSharedConfig::openConfig ()->group (kpSettingsGroupRecentFiles));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\trecent URLs=" << d->actionOpenRecent->items ();
+ qCDebug(kpLogMainWindow) << "\trecent URLs=" << d->actionOpenRecent->items ();
#endif
d->actionSave = KStandardAction::save (this, SLOT (slotSave ()), ac);
@@ -196,7 +196,7 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
const QUrl url = url_;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::addRecentURL(" << url << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::addRecentURL(" << url << ")";
#endif
if (url.isEmpty ())
return;
@@ -209,13 +209,13 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
cfg->reparseConfiguration ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\trecent URLs=" << d->actionOpenRecent->items ();
+ qCDebug(kpLogMainWindow) << "\trecent URLs=" << d->actionOpenRecent->items ();
#endif
// HACK: Something might have changed interprocess.
// If we could PROPAGATE: interprocess, then this wouldn't be required.
d->actionOpenRecent->loadEntries (cfg->group (kpSettingsGroupRecentFiles));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tafter loading config=" << d->actionOpenRecent->items ();
+ qCDebug(kpLogMainWindow) << "\tafter loading config=" << d->actionOpenRecent->items ();
#endif
d->actionOpenRecent->addUrl (url);
@@ -224,7 +224,7 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
cfg->sync ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tnew recent URLs=" << d->actionOpenRecent->items ();
+ qCDebug(kpLogMainWindow) << "\tnew recent URLs=" << d->actionOpenRecent->items ();
#endif
@@ -238,7 +238,7 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
kpMainWindow *mw = static_cast <kpMainWindow *> (kmw);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tmw=" << mw;
+ qCDebug(kpLogMainWindow) << "\t\tmw=" << mw;
#endif
if (mw != this)
@@ -253,7 +253,7 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
mw->d->actionOpenRecent->loadEntries (cfg->group (kpSettingsGroupRecentFiles));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\t\tcheck recent URLs="
+ qCDebug(kpLogMainWindow) << "\t\t\tcheck recent URLs="
<< mw->d->actionOpenRecent->items () << endl;
#endif
}
@@ -320,7 +320,7 @@ QSize kpMainWindow::defaultDocSize () const
void kpMainWindow::saveDefaultDocSize (const QSize &size)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tCONFIG: saving Last Doc Size = " << size;
+ qCDebug(kpLogMainWindow) << "\tCONFIG: saving Last Doc Size = " << size;
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
@@ -337,13 +337,13 @@ bool kpMainWindow::shouldOpen ()
if (d->configOpenImagesInSameWindow)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\topenImagesInSameWindow";
+ qCDebug(kpLogMainWindow) << "\topenImagesInSameWindow";
#endif
// (this brings up a dialog and might save the current doc)
if (!queryCloseDocument ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tqueryCloseDocument() aborts open";
+ qCDebug(kpLogMainWindow) << "\t\tqueryCloseDocument() aborts open";
#endif
return false;
}
@@ -391,14 +391,14 @@ kpDocument *kpMainWindow::openInternal (const QUrl &url,
if (!newDoc->open (url, newDocSameNameIfNotExist))
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\topen failed";
+ qCDebug(kpLogMainWindow) << "\topen failed";
#endif
delete newDoc;
return 0;
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\topen OK";
+ qCDebug(kpLogMainWindow) << "\topen OK";
#endif
// Send document to current or new window.
setDocumentChoosingWindow (newDoc);
@@ -412,7 +412,7 @@ kpDocument *kpMainWindow::openInternal (const QUrl &url,
bool kpMainWindow::open (const QUrl &url, bool newDocSameNameIfNotExist)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::open(" << url
+ qCDebug(kpLogMainWindow) << "kpMainWindow::open(" << url
<< ",newDocSameNameIfNotExist=" << newDocSameNameIfNotExist
<< ")" << endl;
#endif
@@ -499,8 +499,8 @@ void kpMainWindow::slotOpen ()
void kpMainWindow::slotOpenRecent (const QUrl &url)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotOpenRecent(" << url << ")";
- kDebug () << "\titems=" << d->actionOpenRecent->items ();
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotOpenRecent(" << url << ")";
+ qCDebug(kpLogMainWindow) << "\titems=" << d->actionOpenRecent->items ();
#endif
toolEndShape ();
@@ -527,7 +527,7 @@ void kpMainWindow::slotOpenRecent (const QUrl &url)
void kpMainWindow::slotScan ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotScan() scanDialog=" << d->scanDialog;
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotScan() scanDialog=" << d->scanDialog;
#endif
toolEndShape ();
@@ -547,7 +547,7 @@ void kpMainWindow::slotScan ()
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcreated scanDialog=" << d->scanDialog;
+ qCDebug(kpLogMainWindow) << "\tcreated scanDialog=" << d->scanDialog;
#endif
connect (d->scanDialog, SIGNAL (finalImage (const QImage &, int)),
SLOT (slotScanned (const QImage &, int)));
@@ -573,7 +573,7 @@ void kpMainWindow::slotScan ()
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcalling setup";
+ qCDebug(kpLogMainWindow) << "\tcalling setup";
#endif
// Bring up dialog to select scan device.
// If there is no scanner, we find that this does not bring up a dialog
@@ -581,7 +581,7 @@ void kpMainWindow::slotScan ()
if (d->scanDialog->setup ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tOK - showing dialog";
+ qCDebug(kpLogMainWindow) << "\t\tOK - showing dialog";
#endif
// Called only if scanner configured/available.
//
@@ -596,7 +596,7 @@ void kpMainWindow::slotScan ()
{
// Have never seen this code path execute even if "Cancel" is pressed.
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tFAIL";
+ qCDebug(kpLogMainWindow) << "\t\tFAIL";
#endif
}
}
@@ -607,11 +607,11 @@ void kpMainWindow::slotScan ()
void kpMainWindow::slotScanned (const QImage &image, int)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotScanned() image.rect=" << image.rect ();
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotScanned() image.rect=" << image.rect ();
#endif
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\thiding dialog";
+ qCDebug(kpLogMainWindow) << "\thiding dialog";
#endif
// (KScanDialog does not close itself after a scan is made)
//
@@ -780,7 +780,7 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
bool *allowLossyPrompt)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::askForURL() startURL=" << startURL;
+ qCDebug(kpLogMainWindow) << "kpMainWindow::askForURL() startURL=" << startURL;
startSaveOptions.printDebug ("\tstartSaveOptions");
#endif
@@ -817,12 +817,12 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
#if DEBUG_KP_MAIN_WINDOW
QStringList sortedMimeTypes = mimeTypes;
sortedMimeTypes.sort ();
- kDebug () << "\tmimeTypes=" << mimeTypes
+ qCDebug(kpLogMainWindow) << "\tmimeTypes=" << mimeTypes
<< "\tsortedMimeTypes=" << sortedMimeTypes << endl;
#endif
if (mimeTypes.isEmpty ())
{
- kError () << "No output mimetypes!" << endl;
+ qCCritical(kpLogMainWindow) << "No output mimetypes!" << endl;
return QUrl ();
}
@@ -831,7 +831,7 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
if (!MIME_TYPE_IS_VALID ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tmimeType=" << fdSaveOptions.mimeType ()
+ qCDebug(kpLogMainWindow) << "\tmimeType=" << fdSaveOptions.mimeType ()
<< " not valid, get default" << endl;
#endif
@@ -843,7 +843,7 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
if (!MIME_TYPE_IS_VALID ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tmimeType=" << fdSaveOptions.mimeType ()
+ qCDebug(kpLogMainWindow) << "\tmimeType=" << fdSaveOptions.mimeType ()
<< " not valid, get hardcoded" << endl;
#endif
if (mimeTypes.contains ("image/png"))
@@ -918,7 +918,7 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
{
*allowOverwritePrompt = shouldAllowOverwritePrompt;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tallowOverwritePrompt=" << *allowOverwritePrompt;
+ qCDebug(kpLogMainWindow) << "\tallowOverwritePrompt=" << *allowOverwritePrompt;
#endif
}
@@ -934,13 +934,13 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
newSaveOptions.colorDepth () != startSaveOptions.colorDepth () ||
newSaveOptions.dither () != startSaveOptions.dither ());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tallowLossyPrompt=" << *allowLossyPrompt;
+ qCDebug(kpLogMainWindow) << "\tallowLossyPrompt=" << *allowLossyPrompt;
#endif
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tselectedUrl=" << fd.selectedUrl ();
+ qCDebug(kpLogMainWindow) << "\tselectedUrl=" << fd.selectedUrl ();
#endif
return fd.selectedUrl ();
}
@@ -1100,7 +1100,7 @@ bool kpMainWindow::slotReload ()
(!oldURL.isEmpty () && KIO::NetAccess::exists (oldURL, KIO::NetAccess::SourceSide/*open*/, this)))
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotReload() reloading from disk!";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotReload() reloading from disk!";
#endif
doc = new kpDocument (1, 1, documentEnvironment ());
@@ -1115,7 +1115,7 @@ bool kpMainWindow::slotReload ()
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotReload() create doc";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotReload() create doc";
#endif
doc = new kpDocument (d->document->constructorWidth (),
@@ -1147,7 +1147,7 @@ void kpMainWindow::sendDocumentNameToPrinter (QPrinter *printer)
fileName.truncate (dot);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::sendDocumentNameToPrinter() fileName="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::sendDocumentNameToPrinter() fileName="
<< fileName
<< " dir="
<< url.directory ()
@@ -1172,7 +1172,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
double imageDotsPerMeterY =
double (d->document->metaInfo ()->dotsPerMeterY ());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::sendImageToPrinter() image:"
+ qCDebug(kpLogMainWindow) << "kpMainWindow::sendImageToPrinter() image:"
<< " width=" << image.width ()
<< " height=" << image.height ()
<< " dotsPerMeterX=" << imageDotsPerMeterX
@@ -1210,7 +1210,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
const int dpiX = screenDevice->logicalDpiX (),
dpiY = screenDevice->logicalDpiY ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tusing screen dpi: x=" << dpiX << " y=" << dpiY;
+ qCDebug(kpLogMainWindow) << "\tusing screen dpi: x=" << dpiX << " y=" << dpiY;
#endif
imageDotsPerMeterX = dpiX * KP_INCHES_PER_METER;
@@ -1228,7 +1228,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
const int printerWidthMM = printer->widthMM ();
const int printerHeightMM = printer->heightMM ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tprinter: widthMM=" << printerWidthMM
+ qCDebug(kpLogMainWindow) << "\tprinter: widthMM=" << printerWidthMM
<< " heightMM=" << printerHeightMM
<< endl;
#endif
@@ -1237,7 +1237,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
double dpiX = imageDotsPerMeterX / KP_INCHES_PER_METER;
double dpiY = imageDotsPerMeterY / KP_INCHES_PER_METER;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\timage: dpiX=" << dpiX << " dpiY=" << dpiY;
+ qCDebug(kpLogMainWindow) << "\timage: dpiX=" << dpiX << " dpiY=" << dpiY;
#endif
@@ -1253,7 +1253,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
/ dpiY;
const double scaleDpi = qMax (scaleDpiX, scaleDpiY);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tscaleDpi: x=" << scaleDpiX << " y=" << scaleDpiY
+ qCDebug(kpLogMainWindow) << "\t\tscaleDpi: x=" << scaleDpiX << " y=" << scaleDpiY
<< " --> scale at " << scaleDpi << " to fit?"
<< endl;
#endif
@@ -1264,7 +1264,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
dpiX *= scaleDpi;
dpiY *= scaleDpi;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\t\tto fit page, scaled to:"
+ qCDebug(kpLogMainWindow) << "\t\t\tto fit page, scaled to:"
<< " dpiX=" << dpiX << " dpiY=" << dpiY << endl;
#endif
}
@@ -1278,7 +1278,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
if (dpiX > dpiY)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdpiX > dpiY; stretching image height to equalise DPIs to dpiX="
+ qCDebug(kpLogMainWindow) << "\tdpiX > dpiY; stretching image height to equalise DPIs to dpiX="
<< dpiX << endl;
#endif
kpPixmapFX::scale (&image,
@@ -1291,7 +1291,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
else if (dpiY > dpiX)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdpiY > dpiX; stretching image width to equalise DPIs to dpiY="
+ qCDebug(kpLogMainWindow) << "\tdpiY > dpiX; stretching image width to equalise DPIs to dpiY="
<< dpiY << endl;
#endif
kpPixmapFX::scale (&image,
@@ -1467,7 +1467,7 @@ bool kpMainWindow::queryCloseDocument ()
bool kpMainWindow::queryClose ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::queryClose()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::queryClose()";
#endif
toolEndShape ();
diff --git a/mainWindow/kpMainWindow_Image.cpp b/mainWindow/kpMainWindow_Image.cpp
index db50dd0..b6d5cfd 100644
--- a/mainWindow/kpMainWindow_Image.cpp
+++ b/mainWindow/kpMainWindow_Image.cpp
@@ -61,7 +61,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <KToggleAction>
#include <kiconloader.h>
@@ -287,7 +287,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd,
bool addSelContentCmdIfSelAvail)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::addImageOrSelectionCommand()"
+ qCDebug(kpLogMainWindow) << "kpMainWindow::addImageOrSelectionCommand()"
<< " addSelCreateCmdIfSelAvail=" << addSelCreateCmdIfSelAvail
<< " addSelContentCmdIfSelAvail=" << addSelContentCmdIfSelAvail
<< endl;
@@ -302,7 +302,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd,
kpAbstractSelection *sel = d->document->selection ();
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\timage sel=" << sel
+ qCDebug(kpLogMainWindow) << "\timage sel=" << sel
<< " sel->hasContent=" << (sel ? sel->hasContent () : 0)
<< endl;
#endif
diff --git a/mainWindow/kpMainWindow_Settings.cpp b/mainWindow/kpMainWindow_Settings.cpp
index 0a03d47..1732ae1 100644
--- a/mainWindow/kpMainWindow_Settings.cpp
+++ b/mainWindow/kpMainWindow_Settings.cpp
@@ -32,7 +32,7 @@
#include <kactioncollection.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kshortcutsdialog.h>
#include <kstandardaction.h>
@@ -97,7 +97,7 @@ void kpMainWindow::slotFullScreen ()
void kpMainWindow::slotEnableSettingsShowPath ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotEnableSettingsShowPath()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotEnableSettingsShowPath()";
#endif
const bool enable = (d->document && !d->document->url ().isEmpty ());
@@ -112,7 +112,7 @@ void kpMainWindow::slotEnableSettingsShowPath ()
void kpMainWindow::slotShowPathToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotShowPathToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotShowPathToggled()";
#endif
d->configShowPath = d->actionShowPath->isChecked ();
diff --git a/mainWindow/kpMainWindow_StatusBar.cpp b/mainWindow/kpMainWindow_StatusBar.cpp
index 6e2e532..79f1e0a 100644
--- a/mainWindow/kpMainWindow_StatusBar.cpp
+++ b/mainWindow/kpMainWindow_StatusBar.cpp
@@ -35,7 +35,7 @@
#include <qstatusbar.h>
#include <qstring.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <KSqueezedTextLabel>
@@ -108,7 +108,7 @@ void kpMainWindow::createStatusBar ()
void kpMainWindow::setStatusBarMessage (const QString &message)
{
#if DEBUG_STATUS_BAR && 1
- kDebug () << "kpMainWindow::setStatusBarMessage("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarMessage("
<< message
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -127,7 +127,7 @@ void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
const QPoint &endPoint)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::setStatusBarShapePoints("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarShapePoints("
<< startPoint << "," << endPoint
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -141,7 +141,7 @@ void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
endPoint == d->statusBarShapeLastEndPoint)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "\tNOP";
+ qCDebug(kpLogMainWindow) << "\tNOP";
#endif
return;
}
@@ -177,7 +177,7 @@ void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
void kpMainWindow::setStatusBarShapeSize (const QSize &size)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::setStatusBarShapeSize("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarShapeSize("
<< size
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -190,7 +190,7 @@ void kpMainWindow::setStatusBarShapeSize (const QSize &size)
size == d->statusBarShapeLastSize)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "\tNOP";
+ qCDebug(kpLogMainWindow) << "\tNOP";
#endif
return;
}
@@ -217,7 +217,7 @@ void kpMainWindow::setStatusBarShapeSize (const QSize &size)
void kpMainWindow::setStatusBarDocSize (const QSize &size)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::setStatusBarDocSize("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarDocSize("
<< size
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -245,7 +245,7 @@ void kpMainWindow::setStatusBarDocSize (const QSize &size)
void kpMainWindow::setStatusBarDocDepth (int depth)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::setStatusBarDocDepth("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarDocDepth("
<< depth
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -271,7 +271,7 @@ void kpMainWindow::setStatusBarDocDepth (int depth)
void kpMainWindow::setStatusBarZoom (int zoom)
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::setStatusBarZoom("
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setStatusBarZoom("
<< zoom
<< ") ok=" << d->statusBarCreated
<< endl;
@@ -296,14 +296,14 @@ void kpMainWindow::setStatusBarZoom (int zoom)
void kpMainWindow::recalculateStatusBarMessage ()
{
#if DEBUG_STATUS_BAR && 1
- kDebug () << "kpMainWindow::recalculateStatusBarMessage()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::recalculateStatusBarMessage()";
#endif
QString scrollViewMessage = d->scrollView->statusMessage ();
#if DEBUG_STATUS_BAR && 1
- kDebug () << "\tscrollViewMessage=" << scrollViewMessage;
- kDebug () << "\tresizing doc? " << !d->scrollView->newDocSize ().isEmpty ()
+ qCDebug(kpLogMainWindow) << "\tscrollViewMessage=" << scrollViewMessage;
+ qCDebug(kpLogMainWindow) << "\tresizing doc? " << !d->scrollView->newDocSize ().isEmpty ()
<< endl;
- kDebug () << "\tviewUnderCursor? "
+ qCDebug(kpLogMainWindow) << "\tviewUnderCursor? "
<< (d->viewManager && d->viewManager->viewUnderCursor ())
<< endl;
#endif
@@ -316,7 +316,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
d->viewManager && d->viewManager->viewUnderCursor ())
{
#if DEBUG_STATUS_BAR && 1
- kDebug () << "\t\tnot resizing & viewUnderCursor - message is wrong - clearing"
+ qCDebug(kpLogMainWindow) << "\t\tnot resizing & viewUnderCursor - message is wrong - clearing"
<< endl;
#endif
d->scrollView->blockSignals (true);
@@ -325,7 +325,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
scrollViewMessage.clear ();
#if DEBUG_STATUS_BAR && 1
- kDebug () << "\t\t\tdone";
+ qCDebug(kpLogMainWindow) << "\t\t\tdone";
#endif
}
@@ -353,18 +353,18 @@ void kpMainWindow::recalculateStatusBarMessage ()
void kpMainWindow::recalculateStatusBarShape ()
{
#if DEBUG_STATUS_BAR && 0
- kDebug () << "kpMainWindow::recalculateStatusBarShape()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::recalculateStatusBarShape()";
#endif
QSize docResizeTo = d->scrollView->newDocSize ();
#if DEBUG_STATUS_BAR && 0
- kDebug () << "\tdocResizeTo=" << docResizeTo;
+ qCDebug(kpLogMainWindow) << "\tdocResizeTo=" << docResizeTo;
#endif
if (docResizeTo.isValid ())
{
const QPoint startPoint (d->document->width (), d->document->height ());
#if DEBUG_STATUS_BAR && 0
- kDebug () << "\thavedMovedFromOrgSize="
+ qCDebug(kpLogMainWindow) << "\thavedMovedFromOrgSize="
<< d->scrollView->haveMovedFromOriginalDocSize () << endl;
#endif
if (!d->scrollView->haveMovedFromOriginalDocSize ())
@@ -386,7 +386,7 @@ void kpMainWindow::recalculateStatusBarShape ()
{
const kpTool *t = tool ();
#if DEBUG_STATUS_BAR && 0
- kDebug () << "\ttool=" << t;
+ qCDebug(kpLogMainWindow) << "\ttool=" << t;
#endif
if (t)
{
@@ -408,7 +408,7 @@ void kpMainWindow::recalculateStatusBarShape ()
void kpMainWindow::recalculateStatusBar ()
{
#if DEBUG_STATUS_BAR && 1
- kDebug () << "kpMainWindow::recalculateStatusBar() ok="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::recalculateStatusBar() ok="
<< d->statusBarCreated
<< endl;
#endif
diff --git a/mainWindow/kpMainWindow_Text.cpp b/mainWindow/kpMainWindow_Text.cpp
index 965a4a5..c49fb6d 100644
--- a/mainWindow/kpMainWindow_Text.cpp
+++ b/mainWindow/kpMainWindow_Text.cpp
@@ -32,7 +32,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kfontaction.h>
#include <kfontsizeaction.h>
#include <klocale.h>
@@ -103,7 +103,7 @@ void kpMainWindow::readAndApplyTextSettings ()
const QString font (cfg.readEntry (kpSettingFontFamily, QString::fromLatin1 ("Times")));
d->actionTextFontFamily->setFont (font);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "asked setFont to set to=" << font
+ qCDebug(kpLogMainWindow) << "asked setFont to set to=" << font
<< "- got back=" << d->actionTextFontFamily->font ();
#endif
d->actionTextFontSize->setFontSize (cfg.readEntry (kpSettingFontSize, 14));
@@ -121,7 +121,7 @@ void kpMainWindow::readAndApplyTextSettings ()
void kpMainWindow::enableTextToolBarActions (bool enable)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::enableTextToolBarActions(" << enable << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::enableTextToolBarActions(" << enable << ")";
#endif
d->actionTextFontFamily->setEnabled (enable);
@@ -134,7 +134,7 @@ void kpMainWindow::enableTextToolBarActions (bool enable)
if (textToolBar ())
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\thave toolbar - setShown";
+ qCDebug(kpLogMainWindow) << "\thave toolbar - setShown";
#endif
// COMPAT: KDE4 does not place the Text Tool Bar in a new row, underneath
// the Main Tool Bar, if there isn't enough room. This makes
@@ -148,7 +148,7 @@ void kpMainWindow::enableTextToolBarActions (bool enable)
void kpMainWindow::slotTextFontFamilyChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextFontFamilyChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextFontFamilyChanged() alive="
<< d->isFullyConstructed
<< "fontFamily="
<< d->actionTextFontFamily->font ()
@@ -183,7 +183,7 @@ void kpMainWindow::slotTextFontFamilyChanged ()
void kpMainWindow::slotTextFontSizeChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextFontSizeChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextFontSizeChanged() alive="
<< d->isFullyConstructed
<< " fontSize="
<< d->actionTextFontSize->fontSize ()
@@ -216,7 +216,7 @@ void kpMainWindow::slotTextFontSizeChanged ()
void kpMainWindow::slotTextBoldChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextFontBoldChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextFontBoldChanged() alive="
<< d->isFullyConstructed
<< " bold="
<< d->actionTextBold->isChecked ()
@@ -241,7 +241,7 @@ void kpMainWindow::slotTextBoldChanged ()
void kpMainWindow::slotTextItalicChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextFontItalicChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextFontItalicChanged() alive="
<< d->isFullyConstructed
<< " bold="
<< d->actionTextItalic->isChecked ()
@@ -266,7 +266,7 @@ void kpMainWindow::slotTextItalicChanged ()
void kpMainWindow::slotTextUnderlineChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextFontUnderlineChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextFontUnderlineChanged() alive="
<< d->isFullyConstructed
<< " underline="
<< d->actionTextUnderline->isChecked ()
@@ -291,7 +291,7 @@ void kpMainWindow::slotTextUnderlineChanged ()
void kpMainWindow::slotTextStrikeThruChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotTextStrikeThruChanged() alive="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotTextStrikeThruChanged() alive="
<< d->isFullyConstructed
<< " strikeThru="
<< d->actionTextStrikeThru->isChecked ()
@@ -353,7 +353,7 @@ kpTextStyle kpMainWindow::textStyle () const
void kpMainWindow::setTextStyle (const kpTextStyle &textStyle_)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::setTextStyle()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setTextStyle()";
#endif
d->settingTextStyle++;
diff --git a/mainWindow/kpMainWindow_Tools.cpp b/mainWindow/kpMainWindow_Tools.cpp
index aca3005..e8356cd 100644
--- a/mainWindow/kpMainWindow_Tools.cpp
+++ b/mainWindow/kpMainWindow_Tools.cpp
@@ -36,7 +36,7 @@
#include <kactioncollection.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "widgets/toolbars/kpColorToolBar.h"
@@ -203,7 +203,7 @@ void kpMainWindow::createToolBox ()
void kpMainWindow::enableToolsDocumentActions (bool enable)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::enableToolsDocumentsAction(" << enable << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::enableToolsDocumentsAction(" << enable << ")";
#endif
d->toolActionsEnabled = enable;
@@ -277,13 +277,13 @@ void kpMainWindow::updateToolOptionPrevNextActionsEnabled ()
void kpMainWindow::updateActionDrawOpaqueChecked ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::updateActionDrawOpaqueChecked()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::updateActionDrawOpaqueChecked()";
#endif
const bool drawOpaque =
(d->toolToolBar->toolWidgetOpaqueOrTransparent ()->selectedRow () == 0);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdrawOpaque=" << drawOpaque;
+ qCDebug(kpLogMainWindow) << "\tdrawOpaque=" << drawOpaque;
#endif
d->actionDrawOpaque->setChecked (drawOpaque);
@@ -295,13 +295,13 @@ void kpMainWindow::updateActionDrawOpaqueChecked ()
void kpMainWindow::updateActionDrawOpaqueEnabled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::updateActionDrawOpaqueEnabled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::updateActionDrawOpaqueEnabled()";
#endif
const bool enable = d->toolActionsEnabled;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tenable=" << enable
+ qCDebug(kpLogMainWindow) << "\tenable=" << enable
<< " tool=" << (tool () ? tool ()->objectName () : 0)
<< " (is selection=" << toolIsASelectionTool () << ")"
<< endl;
@@ -386,7 +386,7 @@ kpImageSelectionTransparency kpMainWindow::imageSelectionTransparency () const
void kpMainWindow::setImageSelectionTransparency (const kpImageSelectionTransparency &transparency, bool forceColorChange)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::setImageSelectionTransparency() isOpaque=" << transparency.isOpaque ()
+ qCDebug(kpLogMainWindow) << "kpMainWindow::setImageSelectionTransparency() isOpaque=" << transparency.isOpaque ()
<< " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toQRgb () : 0)
<< " forceColorChange=" << forceColorChange
<< endl;
@@ -421,7 +421,7 @@ int kpMainWindow::settingImageSelectionTransparency () const
void kpMainWindow::slotToolSelected (kpTool *tool)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotToolSelected (" << tool << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotToolSelected (" << tool << ")";
#endif
kpTool *previousTool = d->toolToolBar ? d->toolToolBar->previousTool () : 0;
@@ -552,7 +552,7 @@ bool kpMainWindow::slotDragScroll (const QPoint &docPoint,
Q_UNUSED(docLastPoint)
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotDragScroll() maybeDragScrolling="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDragScroll() maybeDragScrolling="
<< maybeDragScrollingMainView ()
<< endl;
#endif
@@ -673,7 +673,7 @@ void kpMainWindow::slotEndedDocResize (const QSize &size)
void kpMainWindow::slotDocResizeMessageChanged (const QString &string)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotDocResizeMessageChanged(" << string
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDocResizeMessageChanged(" << string
<< ") docResizeToBeCompleted=" << d->docResizeToBeCompleted
<< endl;
#else
@@ -754,7 +754,7 @@ void kpMainWindow::slotActionNextToolOptionGroup2 ()
void kpMainWindow::slotActionDrawOpaqueToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotActionDrawOpaqueToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotActionDrawOpaqueToggled()";
#endif
toolEndShape ();
@@ -775,7 +775,7 @@ void kpMainWindow::slotActionDrawOpaqueToggled ()
void kpMainWindow::slotActionDrawColorSimilarity ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotActionDrawColorSimilarity()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotActionDrawColorSimilarity()";
#endif
toolEndShape ();
diff --git a/mainWindow/kpMainWindow_View.cpp b/mainWindow/kpMainWindow_View.cpp
index b89a240..2800654 100644
--- a/mainWindow/kpMainWindow_View.cpp
+++ b/mainWindow/kpMainWindow_View.cpp
@@ -36,7 +36,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kselectaction.h>
#include <kstandardaction.h>
@@ -111,7 +111,7 @@ void kpMainWindow::enableViewMenuDocumentActions (bool enable)
void kpMainWindow::actionShowGridUpdate ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::actionShowGridUpdate()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::actionShowGridUpdate()";
#endif
const bool enable = (viewMenuDocumentActionsEnabled () &&
d->mainView && d->mainView->canShowGrid ());
@@ -126,7 +126,7 @@ void kpMainWindow::actionShowGridUpdate ()
void kpMainWindow::slotShowGridToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotActionShowGridToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotActionShowGridToggled()";
#endif
updateMainViewGrid ();
@@ -143,7 +143,7 @@ void kpMainWindow::slotShowGridToggled ()
void kpMainWindow::updateMainViewGrid ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::updateMainViewGrid ()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::updateMainViewGrid ()";
#endif
if (d->mainView)
diff --git a/mainWindow/kpMainWindow_View_Thumbnail.cpp b/mainWindow/kpMainWindow_View_Thumbnail.cpp
index d8d04a1..5aa097f 100644
--- a/mainWindow/kpMainWindow_View_Thumbnail.cpp
+++ b/mainWindow/kpMainWindow_View_Thumbnail.cpp
@@ -36,7 +36,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kselectaction.h>
#include <kstandardaction.h>
@@ -102,7 +102,7 @@ void kpMainWindow::enableViewMenuThumbnailDocumentActions (bool enable)
void kpMainWindow::slotDestroyThumbnail ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotDestroyThumbnail()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDestroyThumbnail()";
#endif
d->actionShowThumbnail->setChecked (false);
@@ -114,7 +114,7 @@ void kpMainWindow::slotDestroyThumbnail ()
void kpMainWindow::slotDestroyThumbnailInitatedByUser ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotDestroyThumbnailInitiatedByUser()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotDestroyThumbnailInitiatedByUser()";
#endif
d->actionShowThumbnail->setChecked (false);
@@ -125,7 +125,7 @@ void kpMainWindow::slotDestroyThumbnailInitatedByUser ()
void kpMainWindow::slotCreateThumbnail ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotCreateThumbnail()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotCreateThumbnail()";
#endif
d->actionShowThumbnail->setChecked (true);
@@ -137,7 +137,7 @@ void kpMainWindow::slotCreateThumbnail ()
void kpMainWindow::notifyThumbnailGeometryChanged ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::notifyThumbnailGeometryChanged()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::notifyThumbnailGeometryChanged()";
#endif
if (!d->thumbnailSaveConfigTimer)
@@ -156,7 +156,7 @@ void kpMainWindow::notifyThumbnailGeometryChanged ()
void kpMainWindow::slotSaveThumbnailGeometry ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::saveThumbnailGeometry()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::saveThumbnailGeometry()";
#endif
if (!d->thumbnail)
@@ -165,13 +165,13 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
QRect rect (d->thumbnail->x (), d->thumbnail->y (),
d->thumbnail->width (), d->thumbnail->height ());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tthumbnail relative geometry=" << rect;
+ qCDebug(kpLogMainWindow) << "\tthumbnail relative geometry=" << rect;
#endif
d->configThumbnailGeometry = mapFromGlobal (rect);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tCONFIG: saving thumbnail geometry "
+ qCDebug(kpLogMainWindow) << "\tCONFIG: saving thumbnail geometry "
<< d->configThumbnailGeometry
<< endl;
#endif
@@ -186,7 +186,7 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
void kpMainWindow::slotShowThumbnailToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotShowThumbnailToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotShowThumbnailToggled()";
#endif
d->configThumbnailShown = d->actionShowThumbnail->isChecked ();
@@ -205,7 +205,7 @@ void kpMainWindow::slotShowThumbnailToggled ()
void kpMainWindow::updateThumbnailZoomed ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::updateThumbnailZoomed() zoomed="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::updateThumbnailZoomed() zoomed="
<< d->actionZoomedThumbnail->isChecked () << endl;
#endif
@@ -220,7 +220,7 @@ void kpMainWindow::updateThumbnailZoomed ()
void kpMainWindow::slotZoomedThumbnailToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotZoomedThumbnailToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotZoomedThumbnailToggled()";
#endif
d->configZoomedThumbnail = d->actionZoomedThumbnail->isChecked ();
@@ -238,7 +238,7 @@ void kpMainWindow::slotZoomedThumbnailToggled ()
void kpMainWindow::slotThumbnailShowRectangleToggled ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotThumbnailShowRectangleToggled()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotThumbnailShowRectangleToggled()";
#endif
d->configThumbnailShowRectangle = d->actionShowThumbnailRectangle->isChecked ();
@@ -260,7 +260,7 @@ void kpMainWindow::slotThumbnailShowRectangleToggled ()
void kpMainWindow::enableViewZoomedThumbnail (bool enable)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::enableSettingsViewZoomedThumbnail()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::enableSettingsViewZoomedThumbnail()";
#endif
d->actionZoomedThumbnail->setEnabled (enable &&
@@ -275,7 +275,7 @@ void kpMainWindow::enableViewZoomedThumbnail (bool enable)
void kpMainWindow::enableViewShowThumbnailRectangle (bool enable)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::enableViewShowThumbnailRectangle()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::enableViewShowThumbnailRectangle()";
#endif
d->actionShowThumbnailRectangle->setEnabled (enable &&
@@ -299,12 +299,12 @@ void kpMainWindow::enableThumbnailOptionActions (bool enable)
void kpMainWindow::createThumbnailView ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tcreating new kpView:";
+ qCDebug(kpLogMainWindow) << "\t\tcreating new kpView:";
#endif
if (d->thumbnailView)
{
- kDebug () << "kpMainWindow::createThumbnailView() had to destroy view";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::createThumbnailView() had to destroy view";
destroyThumbnailView ();
}
@@ -332,15 +332,15 @@ void kpMainWindow::createThumbnailView ()
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tgive kpThumbnail the kpView:";
+ qCDebug(kpLogMainWindow) << "\t\tgive kpThumbnail the kpView:";
#endif
if (d->thumbnail)
d->thumbnail->setView (d->thumbnailView);
else
- kError () << "kpMainWindow::createThumbnailView() no thumbnail" << endl;
+ qCCritical(kpLogMainWindow) << "kpMainWindow::createThumbnailView() no thumbnail" << endl;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tregistering the kpView:";
+ qCDebug(kpLogMainWindow) << "\t\tregistering the kpView:";
#endif
if (d->viewManager)
d->viewManager->registerView (d->thumbnailView);
@@ -366,12 +366,12 @@ void kpMainWindow::destroyThumbnailView ()
void kpMainWindow::updateThumbnail ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::updateThumbnail()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::updateThumbnail()";
#endif
bool enable = d->actionShowThumbnail->isChecked ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tthumbnail="
+ qCDebug(kpLogMainWindow) << "\tthumbnail="
<< bool (d->thumbnail)
<< " action_isChecked="
<< enable
@@ -384,14 +384,14 @@ void kpMainWindow::updateThumbnail ()
if (!d->thumbnail)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcreating thumbnail";
+ qCDebug(kpLogMainWindow) << "\tcreating thumbnail";
#endif
// Read last saved geometry before creating thumbnail & friends
// in case they call notifyThumbnailGeometryChanged()
QRect thumbnailGeometry = d->configThumbnailGeometry;
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tlast used geometry=" << thumbnailGeometry;
+ qCDebug(kpLogMainWindow) << "\t\tlast used geometry=" << thumbnailGeometry;
#endif
d->thumbnail = new kpThumbnail (this);
@@ -399,7 +399,7 @@ void kpMainWindow::updateThumbnail ()
createThumbnailView ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tmoving thumbnail to right place";
+ qCDebug(kpLogMainWindow) << "\t\tmoving thumbnail to right place";
#endif
if (!thumbnailGeometry.isEmpty () &&
QRect (0, 0, width (), height ()).intersects (thumbnailGeometry))
@@ -421,12 +421,12 @@ void kpMainWindow::updateThumbnail ()
initialHeight);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tcreating geometry=" << geometryRect;
+ qCDebug(kpLogMainWindow) << "\t\tcreating geometry=" << geometryRect;
#endif
geometryRect = mapToGlobal (geometryRect);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tmap to global=" << geometryRect;
+ qCDebug(kpLogMainWindow) << "\t\tmap to global=" << geometryRect;
#endif
d->thumbnail->resize (geometryRect.size ());
d->thumbnail->move (geometryRect.topLeft ());
@@ -434,23 +434,23 @@ void kpMainWindow::updateThumbnail ()
}
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tshowing thumbnail";
+ qCDebug(kpLogMainWindow) << "\t\tshowing thumbnail";
#endif
d->thumbnail->show ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tconnecting signal thumbnail::windowClosed to destroy slot";
+ qCDebug(kpLogMainWindow) << "\t\tconnecting signal thumbnail::windowClosed to destroy slot";
#endif
connect (d->thumbnail, SIGNAL (windowClosed ()),
this, SLOT (slotDestroyThumbnailInitatedByUser ()));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tDONE";
+ qCDebug(kpLogMainWindow) << "\t\tDONE";
#endif
}
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tdestroying thumbnail d->thumbnail="
+ qCDebug(kpLogMainWindow) << "\tdestroying thumbnail d->thumbnail="
<< d->thumbnail << endl;
#endif
diff --git a/mainWindow/kpMainWindow_View_Zoom.cpp b/mainWindow/kpMainWindow_View_Zoom.cpp
index 3ccfdb7..fd03884 100644
--- a/mainWindow/kpMainWindow_View_Zoom.cpp
+++ b/mainWindow/kpMainWindow_View_Zoom.cpp
@@ -36,7 +36,7 @@
#include <QScrollBar>
#include <kapplication.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kselectaction.h>
#include <kstandardaction.h>
@@ -58,7 +58,7 @@
static int ZoomLevelFromString (const QString &stringIn)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow_View.cpp:ZoomLevelFromString(" << stringIn << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow_View.cpp:ZoomLevelFromString(" << stringIn << ")";
#endif
// Remove any non-digits kdelibs sometimes adds behind our back :( e.g.:
@@ -68,14 +68,14 @@ static int ZoomLevelFromString (const QString &stringIn)
QString string = stringIn;
string.remove (QRegExp ("[^0-9]"));
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\twithout non-digits='" << string << "'";
+ qCDebug(kpLogMainWindow) << "\twithout non-digits='" << string << "'";
#endif
// Convert zoom level to number.
bool ok = false;
int zoomLevel = string.toInt (&ok);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tzoomLevel=" << zoomLevel;
+ qCDebug(kpLogMainWindow) << "\tzoomLevel=" << zoomLevel;
#endif
if (!ok || zoomLevel < kpView::MinZoomLevel || zoomLevel > kpView::MaxZoomLevel)
@@ -181,7 +181,7 @@ void kpMainWindow::zoomToPre (int zoomLevel)
// not be a document or a view so we have a lot of "if (ptr)" guards.
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::zoomToPre(" << zoomLevel << ")";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToPre(" << zoomLevel << ")";
#endif
zoomLevel = qBound (kpView::MinZoomLevel, zoomLevel, kpView::MaxZoomLevel);
@@ -217,11 +217,11 @@ void kpMainWindow::zoomToPre (int zoomLevel)
sendZoomListToActionZoom ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tsetCurrentItem(" << index << ")";
+ qCDebug(kpLogMainWindow) << "\tsetCurrentItem(" << index << ")";
#endif
d->actionZoom->setCurrentItem (index);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcurrentItem="
+ qCDebug(kpLogMainWindow) << "\tcurrentItem="
<< d->actionZoom->currentItem ()
<< " action="
<< d->actionZoom->action (d->actionZoom->currentItem ())
@@ -256,7 +256,7 @@ void kpMainWindow::zoomToPre (int zoomLevel)
void kpMainWindow::zoomToPost ()
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::zoomToPost()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToPost()";
#endif
if (d->mainView)
@@ -290,7 +290,7 @@ void kpMainWindow::zoomToPost ()
setStatusBarZoom (d->mainView ? d->mainView->zoomLevelX () : 0);
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "kpMainWindow::zoomToPost() done";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToPost() done";
#endif
}
@@ -305,7 +305,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
if (d->scrollView && d->mainView)
{
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tscrollView contentsX=" << d->scrollView->horizontalScrollBar()->value ()
+ qCDebug(kpLogMainWindow) << "\tscrollView contentsX=" << d->scrollView->horizontalScrollBar()->value ()
<< " contentsY=" << d->scrollView->verticalScrollBar()->value ()
<< " contentsWidth=" << d->scrollView->widget()->width ()
<< " contentsHeight=" << d->scrollView->widget()->height ()
@@ -368,10 +368,10 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
d->mainView->setZoomLevel (zoomLevel, zoomLevel);
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\tvisibleWidth=" << d->scrollView->viewport()->width ()
+ qCDebug(kpLogMainWindow) << "\tvisibleWidth=" << d->scrollView->viewport()->width ()
<< " visibleHeight=" << d->scrollView->viewport()->height ()
<< endl;
- kDebug () << "\tnewCenterX=" << newCenterX
+ qCDebug(kpLogMainWindow) << "\tnewCenterX=" << newCenterX
<< " newCenterY=" << newCenterY << endl;
#endif
@@ -388,7 +388,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
kpView *const vuc = d->viewManager->viewUnderCursor ();
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tcenterUnderCursor: reposition cursor; viewUnderCursor="
+ qCDebug(kpLogMainWindow) << "\tcenterUnderCursor: reposition cursor; viewUnderCursor="
<< vuc->objectName () << endl;
#endif
@@ -398,7 +398,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
// TODO: do everything in terms of tool doc points in type "double".
const QPoint viewPoint ((int) viewX, (int) viewY);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tdoc: (" << targetDocX << "," << targetDocY << ")"
+ qCDebug(kpLogMainWindow) << "\t\tdoc: (" << targetDocX << "," << targetDocY << ")"
<< " viewUnderCursor: (" << viewX << "," << viewY << ")"
<< endl;
#endif
@@ -408,7 +408,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
const QPoint globalPoint =
kpWidgetMapper::toGlobal (vuc, viewPoint);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\tglobalPoint=" << globalPoint;
+ qCDebug(kpLogMainWindow) << "\t\tglobalPoint=" << globalPoint;
#endif
// TODO: Determine some sane cursor flashing indication -
@@ -436,7 +436,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
else
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\t\twon't move cursor - would get outside view"
+ qCDebug(kpLogMainWindow) << "\t\twon't move cursor - would get outside view"
<< endl;
#endif
@@ -446,7 +446,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
}
#if DEBUG_KP_MAIN_WINDOW && 1
- kDebug () << "\t\tcheck (contentsX=" << d->scrollView->horizontalScrollBar()->value ()
+ qCDebug(kpLogMainWindow) << "\t\tcheck (contentsX=" << d->scrollView->horizontalScrollBar()->value ()
<< ",contentsY=" << d->scrollView->verticalScrollBar()->value ()
<< ")" << endl;
#endif
@@ -464,7 +464,7 @@ void kpMainWindow::zoomToRect (const QRect &normalizedDocRect,
bool careAboutWidth, bool careAboutHeight)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::zoomToRect(normalizedDocRect="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToRect(normalizedDocRect="
<< normalizedDocRect
<< ",accountForGrips=" << accountForGrips
<< ",careAboutWidth=" << careAboutWidth
@@ -480,7 +480,7 @@ void kpMainWindow::zoomToRect (const QRect &normalizedDocRect,
d->scrollView->maximumViewportSize().height() - d->scrollView->horizontalScrollBar()->sizeHint().height());
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "size=" << d->scrollView->maximumViewportSize()
+ qCDebug(kpLogMainWindow) << "size=" << d->scrollView->maximumViewportSize()
<< "scrollbar w=" << d->scrollView->verticalScrollBar()->sizeHint().width()
<< "usableSize=" << usableScrollArea;
#endif
@@ -522,7 +522,7 @@ void kpMainWindow::zoomToRect (const QRect &normalizedDocRect,
const int zoomLevel = qMin (zoomX, zoomY);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tzoomX=" << zoomX
+ qCDebug(kpLogMainWindow) << "\tzoomX=" << zoomX
<< " zoomY=" << zoomY
<< " -> zoomLevel=" << zoomLevel << endl;
#endif
@@ -606,7 +606,7 @@ void kpMainWindow::slotFitToHeight ()
void kpMainWindow::zoomIn (bool centerUnderCursor)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::zoomIn(centerUnderCursor="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomIn(centerUnderCursor="
<< centerUnderCursor << ") currentItem="
<< d->actionZoom->currentItem ()
<< endl;
@@ -619,7 +619,7 @@ void kpMainWindow::zoomIn (bool centerUnderCursor)
d->actionZoom->setCurrentItem (targetItem);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tnew currentItem=" << d->actionZoom->currentItem ();
+ qCDebug(kpLogMainWindow) << "\tnew currentItem=" << d->actionZoom->currentItem ();
#endif
zoomAccordingToZoomAction (centerUnderCursor);
@@ -631,7 +631,7 @@ void kpMainWindow::zoomIn (bool centerUnderCursor)
void kpMainWindow::zoomOut (bool centerUnderCursor)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::zoomOut(centerUnderCursor="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomOut(centerUnderCursor="
<< centerUnderCursor << ") currentItem="
<< d->actionZoom->currentItem ()
<< endl;
@@ -644,7 +644,7 @@ void kpMainWindow::zoomOut (bool centerUnderCursor)
d->actionZoom->setCurrentItem (targetItem);
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "\tnew currentItem=" << d->actionZoom->currentItem ();
+ qCDebug(kpLogMainWindow) << "\tnew currentItem=" << d->actionZoom->currentItem ();
#endif
zoomAccordingToZoomAction (centerUnderCursor);
@@ -656,7 +656,7 @@ void kpMainWindow::zoomOut (bool centerUnderCursor)
void kpMainWindow::slotZoomIn ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotZoomIn ()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotZoomIn ()";
#endif
zoomIn (false/*don't center under cursor*/);
@@ -668,7 +668,7 @@ void kpMainWindow::slotZoomIn ()
void kpMainWindow::slotZoomOut ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotZoomOut ()";
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotZoomOut ()";
#endif
zoomOut (false/*don't center under cursor*/);
@@ -680,7 +680,7 @@ void kpMainWindow::slotZoomOut ()
void kpMainWindow::zoomAccordingToZoomAction (bool centerUnderCursor)
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::zoomAccordingToZoomAction(centerUnderCursor="
+ qCDebug(kpLogMainWindow) << "kpMainWindow::zoomAccordingToZoomAction(centerUnderCursor="
<< centerUnderCursor
<< ") currentItem=" << d->actionZoom->currentItem ()
<< " currentText=" << d->actionZoom->currentText ()
@@ -698,7 +698,7 @@ void kpMainWindow::zoomAccordingToZoomAction (bool centerUnderCursor)
void kpMainWindow::slotZoom ()
{
#if DEBUG_KP_MAIN_WINDOW
- kDebug () << "kpMainWindow::slotZoom () index=" << d->actionZoom->currentItem ()
+ qCDebug(kpLogMainWindow) << "kpMainWindow::slotZoom () index=" << d->actionZoom->currentItem ()
<< " text='" << d->actionZoom->currentText () << "'" << endl;
#endif
diff --git a/pixmapfx/kpPixmapFX_DrawShapes.cpp b/pixmapfx/kpPixmapFX_DrawShapes.cpp
index ccaf580..f5a31e9 100644
--- a/pixmapfx/kpPixmapFX_DrawShapes.cpp
+++ b/pixmapfx/kpPixmapFX_DrawShapes.cpp
@@ -39,7 +39,7 @@
#include <qpoint.h>
#include <qpolygon.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "layers/selections/kpAbstractSelection.h"
#include "imagelib/kpColor.h"
@@ -163,7 +163,7 @@ void kpPixmapFX::drawPolyline (QImage *image,
if (Only1PixelInPointArray(points))
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\tinvoking single point hack";
+ qCDebug(kpLogPixmapfx) << "\tinvoking single point hack";
#endif
painter.drawPoint(points[0]);
return;
@@ -219,7 +219,7 @@ void kpPixmapFX::drawPolygon (QImage *image,
if (Only1PixelInPointArray (points))
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\tinvoking single point hack";
+ qCDebug(kpLogPixmapfx) << "\tinvoking single point hack";
#endif
p.drawPoint(points [0]);
return;
@@ -258,7 +258,7 @@ void kpPixmapFX::drawCurve (QImage *image,
controlPointQ == endPoint)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\tinvoking single point hack";
+ qCDebug(kpLogPixmapfx) << "\tinvoking single point hack";
#endif
p.drawPoint (startPoint);
return;
@@ -323,7 +323,7 @@ static void DrawGenericRect (QImage *image,
bool isEllipseLike)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "kppixmapfx.cpp:DrawGenericRect(" << x << "," << y << ","
+ qCDebug(kpLogPixmapfx) << "kppixmapfx.cpp:DrawGenericRect(" << x << "," << y << ","
<< width << "," << height << ",func=" << func << ")"
<< " pen.color=" << (int *) fcolor.toQRgb ()
<< " penWidth=" << penWidth
@@ -349,7 +349,7 @@ static void DrawGenericRect (QImage *image,
if (width == 1 || height == 1)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\twidth=1 or height=1 - draw line";
+ qCDebug(kpLogPixmapfx) << "\twidth=1 or height=1 - draw line";
#endif
kpPixmapFX::drawLine (image,
@@ -364,7 +364,7 @@ static void DrawGenericRect (QImage *image,
if (penWidth * 2 >= width || penWidth * 2 >= height)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\toutline dominates fill - fill with outline";
+ qCDebug(kpLogPixmapfx) << "\toutline dominates fill - fill with outline";
#endif
// Fill with outline.
diff --git a/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp b/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp
index 94574c0..90fb694 100644
--- a/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp
+++ b/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp
@@ -38,7 +38,7 @@
#include <qpoint.h>
#include <qrect.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "imagelib/kpColor.h"
@@ -57,7 +57,7 @@ void kpPixmapFX::setPixmapAt(QImage *destPtr, const QRect &destRect,
const QImage &src)
{
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "kpPixmapFX::setPixmapAt(destPixmap->rect="
+ qCDebug(kpLogPixmapfx) << "kpPixmapFX::setPixmapAt(destPixmap->rect="
<< destPtr->rect ()
<< ",destRect="
<< destRect
diff --git a/pixmapfx/kpPixmapFX_Transforms.cpp b/pixmapfx/kpPixmapFX_Transforms.cpp
index b0fdb3f..b85bb6b 100644
--- a/pixmapfx/kpPixmapFX_Transforms.cpp
+++ b/pixmapfx/kpPixmapFX_Transforms.cpp
@@ -38,7 +38,7 @@
#include <qpoint.h>
#include <qrect.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "layers/selections/kpAbstractSelection.h"
#include "imagelib/kpColor.h"
@@ -51,7 +51,7 @@ void kpPixmapFX::resize (QImage *destPtr, int w, int h,
const kpColor &backgroundColor)
{
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "kpPixmapFX::resize()";
+ qCDebug(kpLogPixmapfx) << "kpPixmapFX::resize()";
#endif
if (!destPtr)
@@ -107,7 +107,7 @@ void kpPixmapFX::scale (QImage *destPtr, int w, int h, bool pretty)
QImage kpPixmapFX::scale (const QImage &image, int w, int h, bool pretty)
{
#if DEBUG_KP_PIXMAP_FX && 0
- kDebug () << "kpPixmapFX::scale(oldRect=" << image.rect ()
+ qCDebug(kpLogPixmapfx) << "kpPixmapFX::scale(oldRect=" << image.rect ()
<< ",w=" << w
<< ",h=" << h
<< ",pretty=" << pretty
@@ -136,7 +136,7 @@ static void MatrixDebug (const QString matrixName, const QMatrix &matrix,
#if DEBUG_KP_PIXMAP_FX
const int w = srcPixmapWidth, h = srcPixmapHeight;
- kDebug () << matrixName << "=" << matrix;
+ qCDebug(kpLogPixmapfx) << matrixName << "=" << matrix;
// Sometimes this precision lets us see unexpected rounding errors.
fprintf (stderr, "m11=%.24f m12=%.24f m21=%.24f m22=%.24f dx=%.24f dy=%.24f\n",
matrix.m11 (), matrix.m12 (),
@@ -144,21 +144,21 @@ static void MatrixDebug (const QString matrixName, const QMatrix &matrix,
matrix.dx (), matrix.dy ());
if (w > 0 && h > 0)
{
- kDebug () << "(0,0) ->" << matrix.map (QPoint (0, 0));
- kDebug () << "(w-1,0) ->" << matrix.map (QPoint (w - 1, 0));
- kDebug () << "(0,h-1) ->" << matrix.map (QPoint (0, h - 1));
- kDebug () << "(w-1,h-1) ->" << matrix.map (QPoint (w - 1, h - 1));
+ qCDebug(kpLogPixmapfx) << "(0,0) ->" << matrix.map (QPoint (0, 0));
+ qCDebug(kpLogPixmapfx) << "(w-1,0) ->" << matrix.map (QPoint (w - 1, 0));
+ qCDebug(kpLogPixmapfx) << "(0,h-1) ->" << matrix.map (QPoint (0, h - 1));
+ qCDebug(kpLogPixmapfx) << "(w-1,h-1) ->" << matrix.map (QPoint (w - 1, h - 1));
}
#if 0
QMatrix trueMatrix = QPixmap::trueMatrix (matrix, w, h);
- kDebug () << matrixName << "trueMatrix=" << trueMatrix;
+ qCDebug(kpLogPixmapfx) << matrixName << "trueMatrix=" << trueMatrix;
if (w > 0 && h > 0)
{
- kDebug () << "(0,0) ->" << trueMatrix.map (QPoint (0, 0));
- kDebug () << "(w-1,0) ->" << trueMatrix.map (QPoint (w - 1, 0));
- kDebug () << "(0,h-1) ->" << trueMatrix.map (QPoint (0, h - 1));
- kDebug () << "(w-1,h-1) ->" << trueMatrix.map (QPoint (w - 1, h - 1));
+ qCDebug(kpLogPixmapfx) << "(0,0) ->" << trueMatrix.map (QPoint (0, 0));
+ qCDebug(kpLogPixmapfx) << "(w-1,0) ->" << trueMatrix.map (QPoint (w - 1, 0));
+ qCDebug(kpLogPixmapfx) << "(0,h-1) ->" << trueMatrix.map (QPoint (0, h - 1));
+ qCDebug(kpLogPixmapfx) << "(w-1,h-1) ->" << trueMatrix.map (QPoint (w - 1, h - 1));
}
#endif
@@ -191,8 +191,8 @@ static void MatrixDebug (const QString matrixName, const QMatrix &matrix,
static QMatrix MatrixWithZeroOrigin (const QMatrix &matrix, int width, int height)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "matrixWithZeroOrigin(w=" << width << ",h=" << height << ")";
- kDebug () << "\tmatrix: m11=" << matrix.m11 ()
+ qCDebug(kpLogPixmapfx) << "matrixWithZeroOrigin(w=" << width << ",h=" << height << ")";
+ qCDebug(kpLogPixmapfx) << "\tmatrix: m11=" << matrix.m11 ()
<< "m12=" << matrix.m12 ()
<< "m21=" << matrix.m21 ()
<< "m22=" << matrix.m22 ()
@@ -202,7 +202,7 @@ static QMatrix MatrixWithZeroOrigin (const QMatrix &matrix, int width, int heigh
QRect mappedRect = matrix.mapRect (QRect (0, 0, width, height));
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\tmappedRect=" << mappedRect;
+ qCDebug(kpLogPixmapfx) << "\tmappedRect=" << mappedRect;
#endif
QMatrix translatedMatrix (
@@ -211,11 +211,11 @@ static QMatrix MatrixWithZeroOrigin (const QMatrix &matrix, int width, int heigh
matrix.dx () - mappedRect.left (), matrix.dy () - mappedRect.top ());
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "\treturning" << translatedMatrix;
- kDebug () << "(0,0) ->" << translatedMatrix.map (QPoint (0, 0));
- kDebug () << "(w-1,0) ->" << translatedMatrix.map (QPoint (width - 1, 0));
- kDebug () << "(0,h-1) ->" << translatedMatrix.map (QPoint (0, height - 1));
- kDebug () << "(w-1,h-1) ->" << translatedMatrix.map (QPoint (width - 1, height - 1));
+ qCDebug(kpLogPixmapfx) << "\treturning" << translatedMatrix;
+ qCDebug(kpLogPixmapfx) << "(0,0) ->" << translatedMatrix.map (QPoint (0, 0));
+ qCDebug(kpLogPixmapfx) << "(w-1,0) ->" << translatedMatrix.map (QPoint (width - 1, 0));
+ qCDebug(kpLogPixmapfx) << "(0,h-1) ->" << translatedMatrix.map (QPoint (0, height - 1));
+ qCDebug(kpLogPixmapfx) << "(w-1,h-1) ->" << translatedMatrix.map (QPoint (width - 1, height - 1));
#endif
return translatedMatrix;
@@ -282,7 +282,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
QMatrix transformMatrix = transformMatrix_;
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "kppixmapfx.cpp: TransformPixmap(pm.size=" << pm.size ()
+ qCDebug(kpLogPixmapfx) << "kppixmapfx.cpp: TransformPixmap(pm.size=" << pm.size ()
<< ",targetWidth=" << targetWidth
<< ",targetHeight=" << targetHeight
<< ")"
@@ -291,7 +291,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
QRect newRect = transformMatrix.mapRect (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "\tmappedRect=" << newRect;
+ qCDebug(kpLogPixmapfx) << "\tmappedRect=" << newRect;
#endif
@@ -299,7 +299,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
if (targetWidth > 0 && targetWidth != newRect.width ())
{
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "\tadjusting for targetWidth";
+ qCDebug(kpLogPixmapfx) << "\tadjusting for targetWidth";
#endif
scaleMatrix.scale (double (targetWidth) / double (newRect.width ()), 1);
}
@@ -307,7 +307,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
if (targetHeight > 0 && targetHeight != newRect.height ())
{
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "\tadjusting for targetHeight";
+ qCDebug(kpLogPixmapfx) << "\tadjusting for targetHeight";
#endif
scaleMatrix.scale (1, double (targetHeight) / double (newRect.height ()));
}
@@ -327,7 +327,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
(targetHeight > 0 && targetHeight != newRect.height ()) ? double (targetHeight) / double (newRect.height ()) : 1);
QMatrix correctMatrix = scaleMatrix * transformMatrix;
- kDebug () << "\tsupposedlyWrongMatrix: m11=" << wrongMatrix.m11 () // <<<---- this is the correct matrix???
+ qCDebug(kpLogPixmapfx) << "\tsupposedlyWrongMatrix: m11=" << wrongMatrix.m11 () // <<<---- this is the correct matrix???
<< " m12=" << wrongMatrix.m12 ()
<< " m21=" << wrongMatrix.m21 ()
<< " m22=" << wrongMatrix.m22 ()
@@ -365,7 +365,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
newRect = transformMatrix.mapRect (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "\tnewRect after targetWidth,targetHeight adjust=" << newRect;
+ qCDebug(kpLogPixmapfx) << "\tnewRect after targetWidth,targetHeight adjust=" << newRect;
#endif
}
@@ -399,7 +399,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
pm.width (), pm.height ());
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "trueMatrix changed matrix?" << (oldMatrix == transformMatrix);
+ qCDebug(kpLogPixmapfx) << "trueMatrix changed matrix?" << (oldMatrix == transformMatrix);
#endif
::MatrixDebug ("TransformPixmap(): after trueMatrix", transformMatrix,
pm.width (), pm.height ());
@@ -413,7 +413,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
(targetHeight > 0 && targetHeight != newRect.height ()))
{
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "kppixmapfx.cpp: TransformPixmap(pm.size=" << pm.size ()
+ qCDebug(kpLogPixmapfx) << "kppixmapfx.cpp: TransformPixmap(pm.size=" << pm.size ()
<< ",targetWidth=" << targetWidth
<< ",targetHeight=" << targetHeight
<< ") newRect=" << newRect
@@ -424,8 +424,8 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
#if DEBUG_KP_PIXMAP_FX && 0
- kDebug () << "\ttranslate top=" << painter.xForm (QPoint (0, 0));
- kDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 ()
+ qCDebug(kpLogPixmapfx) << "\ttranslate top=" << painter.xForm (QPoint (0, 0));
+ qCDebug(kpLogPixmapfx) << "\tmatrix: m11=" << painter.worldMatrix ().m11 ()
<< " m12=" << painter.worldMatrix ().m12 ()
<< " m21=" << painter.worldMatrix ().m21 ()
<< " m22=" << painter.worldMatrix ().m22 ()
@@ -459,7 +459,7 @@ static QImage TransformPixmap (const QImage &pm, const QMatrix &transformMatrix_
p.end ();
#if DEBUG_KP_PIXMAP_FX && 1
- kDebug () << "Done" << endl << endl;
+ qCDebug(kpLogPixmapfx) << "Done" << endl << endl;
#endif
return newQImage;
@@ -546,7 +546,7 @@ QImage kpPixmapFX::skew (const QImage &pm, double hangle, double vangle,
int targetWidth, int targetHeight)
{
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "kpPixmapFX::skew() pm.width=" << pm.width ()
+ qCDebug(kpLogPixmapfx) << "kpPixmapFX::skew() pm.width=" << pm.width ()
<< " pm.height=" << pm.height ()
<< " hangle=" << hangle
<< " vangle=" << vangle
@@ -565,7 +565,7 @@ QImage kpPixmapFX::skew (const QImage &pm, double hangle, double vangle,
if (fabs (hangle) > 90 - kpPixmapFX::AngleInDegreesEpsilon ||
fabs (vangle) > 90 - kpPixmapFX::AngleInDegreesEpsilon)
{
- kError () << "kpPixmapFX::skew() passed hangle and/or vangle out of range (-90 < x < 90)" << endl;
+ qCCritical(kpLogPixmapfx) << "kpPixmapFX::skew() passed hangle and/or vangle out of range (-90 < x < 90)" << endl;
return pm;
}
@@ -619,7 +619,7 @@ bool kpPixmapFX::isLosslessRotation (double angle)
// "Impossible" situation?
if (angle < 0 || angle > 90)
{
- kError () << "kpPixmapFX::isLosslessRotation(" << angleIn
+ qCCritical(kpLogPixmapfx) << "kpPixmapFX::isLosslessRotation(" << angleIn
<< ") result=" << angle
<< endl;
return false; // better safe than sorry
@@ -628,7 +628,7 @@ bool kpPixmapFX::isLosslessRotation (double angle)
const bool ret = (angle < kpPixmapFX::AngleInDegreesEpsilon ||
90 - angle < kpPixmapFX::AngleInDegreesEpsilon);
#if DEBUG_KP_PIXMAP_FX
- kDebug () << "kpPixmapFX::isLosslessRotation(" << angleIn << ")"
+ qCDebug(kpLogPixmapfx) << "kpPixmapFX::isLosslessRotation(" << angleIn << ")"
<< " residual angle=" << angle
<< " returning " << ret
<< endl;
diff --git a/scan/sanedialog.cpp b/scan/sanedialog.cpp
index ef82565..036f0c9 100644
--- a/scan/sanedialog.cpp
+++ b/scan/sanedialog.cpp
@@ -26,7 +26,7 @@
#include "sanedialog.h"
#include <KLocale>
-#include <KDebug>
+#include "kpLogCategories.h"
#include <KMessageBox>
#include <KSharedConfig>
#include <KWindowConfig>
diff --git a/tools/flow/kpToolColorEraser.cpp b/tools/flow/kpToolColorEraser.cpp
index 52003dd..264c505 100644
--- a/tools/flow/kpToolColorEraser.cpp
+++ b/tools/flow/kpToolColorEraser.cpp
@@ -31,7 +31,7 @@
#include "kpToolColorEraser.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpColor.h"
@@ -66,7 +66,7 @@ kpToolColorEraser::~kpToolColorEraser ()
void kpToolColorEraser::globalDraw ()
{
#if DEBUG_KP_TOOL_COLOR_ERASER
- kDebug () << "kpToolColorEraser::globalDraw()";
+ qCDebug(kpLogTools) << "kpToolColorEraser::globalDraw()";
#endif
if (!drawShouldProceed (QPoint ()/*unused*/, QPoint ()/*unused*/, QRect ()/*unused*/))
return;
@@ -100,7 +100,7 @@ void kpToolColorEraser::globalDraw ()
else
{
#if DEBUG_KP_TOOL_COLOR_ERASER
- kDebug () << "\tisNOP";
+ qCDebug(kpLogTools) << "\tisNOP";
#endif
delete cmd;
cmd = 0;
@@ -136,7 +136,7 @@ bool kpToolColorEraser::drawShouldProceed (const QPoint & /*thisPoint*/,
QRect kpToolColorEraser::drawLine (const QPoint &thisPoint, const QPoint &lastPoint)
{
#if DEBUG_KP_TOOL_COLOR_ERASER
- kDebug () << "kpToolColorEraser::drawLine(thisPoint=" << thisPoint
+ qCDebug(kpLogTools) << "kpToolColorEraser::drawLine(thisPoint=" << thisPoint
<< ",lastPoint=" << lastPoint << ")" << endl;
#endif
@@ -151,7 +151,7 @@ QRect kpToolColorEraser::drawLine (const QPoint &thisPoint, const QPoint &lastPo
processedColorSimilarity ());
#if DEBUG_KP_TOOL_COLOR_ERASER
- kDebug () << "\tdirtyRect=" << dirtyRect;
+ qCDebug(kpLogTools) << "\tdirtyRect=" << dirtyRect;
#endif
if (!dirtyRect.isEmpty ())
diff --git a/tools/flow/kpToolEraser.cpp b/tools/flow/kpToolEraser.cpp
index fc53b6a..b85a33a 100644
--- a/tools/flow/kpToolEraser.cpp
+++ b/tools/flow/kpToolEraser.cpp
@@ -52,7 +52,7 @@ kpToolEraser::kpToolEraser (kpToolEnvironment *environ, QObject *parent)
void kpToolEraser::globalDraw ()
{
#if DEBUG_KP_TOOL_ERASER
- kDebug () << "kpToolEraser::globalDraw()";
+ qCDebug(kpLogTools) << "kpToolEraser::globalDraw()";
#endif
commandHistory ()->addCommand (
diff --git a/tools/flow/kpToolFlowBase.cpp b/tools/flow/kpToolFlowBase.cpp
index e46863e..fa444c7 100644
--- a/tools/flow/kpToolFlowBase.cpp
+++ b/tools/flow/kpToolFlowBase.cpp
@@ -35,7 +35,7 @@
#include <qimage.h>
#include <qpainter.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpColor.h"
@@ -222,7 +222,7 @@ void kpToolFlowBase::beginDraw ()
void kpToolFlowBase::hover (const QPoint &point)
{
#if DEBUG_KP_TOOL_FLOW_BASE && 0
- kDebug () << "kpToolFlowBase::hover(" << point << ")"
+ qCDebug(kpLogTools) << "kpToolFlowBase::hover(" << point << ")"
<< " hasBegun=" << hasBegun ()
<< " hasBegunDraw=" << hasBegunDraw ()
<< " cursorPixmap.isNull=" << m_cursorPixmap.isNull ()
@@ -332,7 +332,7 @@ void kpToolFlowBase::endDraw (const QPoint &, const QRect &)
kpColor kpToolFlowBase::color (int which)
{
#if DEBUG_KP_TOOL_FLOW_BASE && 0
- kDebug () << "kpToolFlowBase::color (" << which << ")";
+ qCDebug(kpLogTools) << "kpToolFlowBase::color (" << which << ")";
#endif
// Pen & Brush
@@ -391,7 +391,7 @@ kpToolFlowCommand *kpToolFlowBase::currentCommand () const
void kpToolFlowBase::updateBrushAndCursor ()
{
#if DEBUG_KP_TOOL_FLOW_BASE && 1
- kDebug () << "kpToolFlowBase::updateBrushAndCursor()";
+ qCDebug(kpLogTools) << "kpToolFlowBase::updateBrushAndCursor()";
#endif
if (haveSquareBrushes ())
@@ -439,7 +439,7 @@ void kpToolFlowBase::updateBrushAndCursor ()
void kpToolFlowBase::slotForegroundColorChanged (const kpColor & /*col*/)
{
#if DEBUG_KP_TOOL_FLOW_BASE
- kDebug () << "kpToolFlowBase::slotForegroundColorChanged()";
+ qCDebug(kpLogTools) << "kpToolFlowBase::slotForegroundColorChanged()";
#endif
updateBrushAndCursor ();
@@ -451,7 +451,7 @@ void kpToolFlowBase::slotForegroundColorChanged (const kpColor & /*col*/)
void kpToolFlowBase::slotBackgroundColorChanged (const kpColor & /*col*/)
{
#if DEBUG_KP_TOOL_FLOW_BASE
- kDebug () << "kpToolFlowBase::slotBackgroundColorChanged()";
+ qCDebug(kpLogTools) << "kpToolFlowBase::slotBackgroundColorChanged()";
#endif
updateBrushAndCursor ();
diff --git a/tools/flow/kpToolSpraycan.cpp b/tools/flow/kpToolSpraycan.cpp
index 28cb869..0decac1 100644
--- a/tools/flow/kpToolSpraycan.cpp
+++ b/tools/flow/kpToolSpraycan.cpp
@@ -43,7 +43,7 @@
#include <cstdlib>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qbitmap.h>
@@ -107,7 +107,7 @@ void kpToolSpraycan::end ()
void kpToolSpraycan::beginDraw ()
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "kpToolSpraycan::beginDraw()";
+ qCDebug(kpLogTools) << "kpToolSpraycan::beginDraw()";
#endif
kpToolFlowBase::beginDraw ();
@@ -124,7 +124,7 @@ QRect kpToolSpraycan::drawLineWithProbability (const QPoint &thisPoint,
double probability)
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "CALL(thisPoint=" << thisPoint
+ qCDebug(kpLogTools) << "CALL(thisPoint=" << thisPoint
<< ",lastPoint=" << lastPoint
<< ")" << endl;
#endif
@@ -133,7 +133,7 @@ QRect kpToolSpraycan::drawLineWithProbability (const QPoint &thisPoint,
false/*no need for cardinally adjacency points*/,
probability);
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "\tdocPoints=" << docPoints;
+ qCDebug(kpLogTools) << "\tdocPoints=" << docPoints;
#endif
@@ -176,7 +176,7 @@ QRect kpToolSpraycan::drawLineWithProbability (const QPoint &thisPoint,
QRect kpToolSpraycan::drawPoint (const QPoint &point)
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "kpToolSpraycan::drawPoint" << point
+ qCDebug(kpLogTools) << "kpToolSpraycan::drawPoint" << point
<< " lastPoint=" << lastPoint ()
<< endl;
#endif
@@ -197,7 +197,7 @@ QRect kpToolSpraycan::drawPoint (const QPoint &point)
QRect kpToolSpraycan::drawLine (const QPoint &thisPoint, const QPoint &lastPoint)
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "CALL(thisPoint=" << thisPoint << ",lastPoint=" << lastPoint;
+ qCDebug(kpLogTools) << "CALL(thisPoint=" << thisPoint << ",lastPoint=" << lastPoint;
#endif
// Draw only every so often in response to movement.
@@ -209,7 +209,7 @@ QRect kpToolSpraycan::drawLine (const QPoint &thisPoint, const QPoint &lastPoint
void kpToolSpraycan::timeoutDraw ()
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "kpToolSpraycan::timeoutDraw()";
+ qCDebug(kpLogTools) << "kpToolSpraycan::timeoutDraw()";
#endif
// Draw at this single point without delay.
@@ -226,7 +226,7 @@ void kpToolSpraycan::timeoutDraw ()
void kpToolSpraycan::cancelShape ()
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "kpToolSpraycan::cancelShape()";
+ qCDebug(kpLogTools) << "kpToolSpraycan::cancelShape()";
#endif
m_timer->stop ();
@@ -238,7 +238,7 @@ void kpToolSpraycan::endDraw (const QPoint &thisPoint,
const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_SPRAYCAN
- kDebug () << "kpToolSpraycan::endDraw(thisPoint=" << thisPoint
+ qCDebug(kpLogTools) << "kpToolSpraycan::endDraw(thisPoint=" << thisPoint
<< ")" << endl;
#endif
diff --git a/tools/kpTool.cpp b/tools/kpTool.cpp
index 2015409..95e4672 100644
--- a/tools/kpTool.cpp
+++ b/tools/kpTool.cpp
@@ -37,7 +37,7 @@
#include <kactioncollection.h>
#include <kapplication.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpColor.h"
diff --git a/tools/kpToolColorPicker.cpp b/tools/kpToolColorPicker.cpp
index fd1728d..8a08003 100644
--- a/tools/kpToolColorPicker.cpp
+++ b/tools/kpToolColorPicker.cpp
@@ -31,7 +31,7 @@
#include "kpToolColorPicker.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "widgets/toolbars/kpColorToolBar.h"
@@ -59,7 +59,7 @@ kpToolColorPicker::~kpToolColorPicker ()
kpColor kpToolColorPicker::colorAtPixel (const QPoint &p)
{
#if DEBUG_KP_TOOL_COLOR_PICKER && 0
- kDebug () << "kpToolColorPicker::colorAtPixel" << p;
+ qCDebug(kpLogTools) << "kpToolColorPicker::colorAtPixel" << p;
#endif
return kpPixmapFX::getColorAtPixel (document ()->image (), p);
diff --git a/tools/kpToolFloodFill.cpp b/tools/kpToolFloodFill.cpp
index 5fd11d0..834c62c 100644
--- a/tools/kpToolFloodFill.cpp
+++ b/tools/kpToolFloodFill.cpp
@@ -37,7 +37,7 @@
#include "environments/tools/kpToolEnvironment.h"
#include "commands/tools/kpToolFloodFillCommand.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qapplication.h>
@@ -89,7 +89,7 @@ void kpToolFloodFill::begin ()
void kpToolFloodFill::beginDraw ()
{
#if DEBUG_KP_TOOL_FLOOD_FILL && 1
- kDebug () << "kpToolFloodFill::beginDraw()";
+ qCDebug(kpLogTools) << "kpToolFloodFill::beginDraw()";
#endif
QApplication::setOverrideCursor (Qt::WaitCursor);
@@ -104,7 +104,7 @@ void kpToolFloodFill::beginDraw ()
environ ()->commandEnvironment ());
#if DEBUG_KP_TOOL_FLOOD_FILL && 1
- kDebug () << "\tperforming new-doc-corner-case check";
+ qCDebug(kpLogTools) << "\tperforming new-doc-corner-case check";
#endif
if (document ()->url ().isEmpty () && !document ()->isModified ())
diff --git a/tools/kpToolZoom.cpp b/tools/kpToolZoom.cpp
index cbfa6f7..0c7775e 100644
--- a/tools/kpToolZoom.cpp
+++ b/tools/kpToolZoom.cpp
@@ -39,7 +39,7 @@
#include "tools/kpToolAction.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kiconloader.h>
@@ -140,7 +140,7 @@ void kpToolZoom::end ()
void kpToolZoom::globalDraw ()
{
#if DEBUG_KP_TOOL_ZOOM
- kDebug () << "CALL";
+ qCDebug(kpLogTools) << "CALL";
#endif
environ ()->fitToPage ();
}
@@ -159,7 +159,7 @@ void kpToolZoom::beginDraw ()
void kpToolZoom::draw (const QPoint &thisPoint, const QPoint &, const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_ZOOM
- kDebug () << "kpToomZoom::draw() currentPoint=" << currentPoint ()
+ qCDebug(kpLogTools) << "kpToomZoom::draw() currentPoint=" << currentPoint ()
<< " lastPoint=" << lastPoint ()
<< endl;
#endif
@@ -217,7 +217,7 @@ void kpToolZoom::releasedAllButtons ()
void kpToolZoom::endDraw (const QPoint &, const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_ZOOM
- kDebug () << "kpToolZoom::endDraw(rect=" << normalizedRect << ")"
+ qCDebug(kpLogTools) << "kpToolZoom::endDraw(rect=" << normalizedRect << ")"
<< " dragHasBegun=" << d->dragHasBegun << endl;
#endif
diff --git a/tools/kpTool_Drawing.cpp b/tools/kpTool_Drawing.cpp
index e75a522..8c89d48 100644
--- a/tools/kpTool_Drawing.cpp
+++ b/tools/kpTool_Drawing.cpp
@@ -38,7 +38,7 @@
#include <qapplication.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "environments/tools/kpToolEnvironment.h"
#include "views/kpView.h"
@@ -142,7 +142,7 @@ kpView *kpTool::viewUnderCursor () const
void kpTool::beginInternal ()
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::beginInternal()";
+ qCDebug(kpLogTools) << "kpTool::beginInternal()";
#endif
if (!d->began)
@@ -212,7 +212,7 @@ void kpTool::endInternal ()
void kpTool::begin ()
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::begin() base implementation";
+ qCDebug(kpLogTools) << "kpTool::begin() base implementation";
#endif
}
@@ -222,7 +222,7 @@ void kpTool::begin ()
void kpTool::end ()
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::end() base implementation";
+ qCDebug(kpLogTools) << "kpTool::end() base implementation";
#endif
}
@@ -267,7 +267,7 @@ void kpTool::beginDraw ()
void kpTool::hover (const QPoint &point)
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::hover" << point
+ qCDebug(kpLogTools) << "kpTool::hover" << point
<< " base implementation"
<< endl;
#endif
@@ -288,7 +288,7 @@ void kpTool::globalDraw ()
void kpTool::reselect ()
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::reselect() base implementation";
+ qCDebug(kpLogTools) << "kpTool::reselect() base implementation";
#endif
}
@@ -343,7 +343,7 @@ void kpTool::cancelShapeInternal ()
// virtual
void kpTool::cancelShape ()
{
- kWarning () << "Tool cannot cancel operation!" ;
+ qCWarning(kpLogTools) << "Tool cannot cancel operation!" ;
}
//---------------------------------------------------------------------
@@ -358,7 +358,7 @@ void kpTool::endDrawInternal (const QPoint &thisPoint, const QRect &normalizedRe
bool wantEndShape)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::endDrawInternal() wantEndShape=" << wantEndShape;
+ qCDebug(kpLogTools) << "kpTool::endDrawInternal() wantEndShape=" << wantEndShape;
#endif
if (wantEndShape && !hasBegunShape ())
@@ -371,14 +371,14 @@ void kpTool::endDrawInternal (const QPoint &thisPoint, const QRect &normalizedRe
if (wantEndShape)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tcalling endShape()";
+ qCDebug(kpLogTools) << "\tcalling endShape()";
#endif
endShape (thisPoint, normalizedRect);
}
else
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tcalling endDraw()";
+ qCDebug(kpLogTools) << "\tcalling endDraw()";
#endif
endDraw (thisPoint, normalizedRect);
}
diff --git a/tools/kpTool_KeyboardEvents.cpp b/tools/kpTool_KeyboardEvents.cpp
index bce5eea..2e64f9c 100644
--- a/tools/kpTool_KeyboardEvents.cpp
+++ b/tools/kpTool_KeyboardEvents.cpp
@@ -44,7 +44,7 @@
#include <qevent.h>
#include <kactioncollection.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpColor.h"
@@ -66,7 +66,7 @@ void kpTool::seeIfAndHandleModifierKey (QKeyEvent *e)
case 0:
case Qt::Key_unknown:
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::seeIfAndHandleModifierKey() picked up unknown key!";
+ qCDebug(kpLogTools) << "kpTool::seeIfAndHandleModifierKey() picked up unknown key!";
#endif
// HACK: around Qt bug: if you hold a modifier before you start the
// program and then release it over the view,
@@ -78,7 +78,7 @@ void kpTool::seeIfAndHandleModifierKey (QKeyEvent *e)
case Qt::Key_Shift:
case Qt::Key_Control:
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::setIfAndHandleModifierKey() accepting";
+ qCDebug(kpLogTools) << "kpTool::setIfAndHandleModifierKey() accepting";
#endif
keyUpdateModifierState (e);
@@ -133,7 +133,7 @@ void kpTool::seeIfAndHandleArrowKeyPress (QKeyEvent *e)
const QPoint oldPoint = view->mapFromGlobal (QCursor::pos ());
#if DEBUG_KP_TOOL && 0
- kDebug () << "\toldPoint=" << oldPoint
+ qCDebug(kpLogTools) << "\toldPoint=" << oldPoint
<< " dx=" << dx << " dy=" << dy << endl;
#endif
@@ -146,7 +146,7 @@ void kpTool::seeIfAndHandleArrowKeyPress (QKeyEvent *e)
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tnewPoint=" << QPoint (newViewX, newViewY);
+ qCDebug(kpLogTools) << "\tnewPoint=" << QPoint (newViewX, newViewY);
#endif
// Make sure we really moved at least one doc point (needed due to
@@ -158,7 +158,7 @@ void kpTool::seeIfAndHandleArrowKeyPress (QKeyEvent *e)
newViewX += viewIncX, newViewY += viewIncY;
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tneed adjust for doc - newPoint="
+ qCDebug(kpLogTools) << "\tneed adjust for doc - newPoint="
<< QPoint (newViewX, newViewY) << endl;
#endif
}
@@ -195,7 +195,7 @@ void kpTool::seeIfAndHandleBeginDrawKeyPress (QKeyEvent *e)
return;
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::seeIfAndHandleBeginDrawKeyPress() accept";
+ qCDebug(kpLogTools) << "kpTool::seeIfAndHandleBeginDrawKeyPress() accept";
#endif
@@ -218,7 +218,7 @@ void kpTool::seeIfAndHandleBeginDrawKeyPress (QKeyEvent *e)
void kpTool::seeIfAndHandleEndDrawKeyPress (QKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::setIfAndHandleEndDrawKeyPress() key=" << e->key ()
+ qCDebug(kpLogTools) << "kpTool::setIfAndHandleEndDrawKeyPress() key=" << e->key ()
<< " isAutoRepeat=" << e->isAutoRepeat ()
<< " isDrawKey=" << isDrawKey (e->key ())
<< " view=" << viewUnderCursor ()
@@ -232,7 +232,7 @@ void kpTool::seeIfAndHandleEndDrawKeyPress (QKeyEvent *e)
return;
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::seeIfAndHandleEndDrawKeyPress() accept";
+ qCDebug(kpLogTools) << "kpTool::seeIfAndHandleEndDrawKeyPress() accept";
#endif
@@ -257,7 +257,7 @@ void kpTool::seeIfAndHandleEndDrawKeyPress (QKeyEvent *e)
void kpTool::keyPressEvent (QKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::keyPressEvent() key=" << (int *) e->key ()
+ qCDebug(kpLogTools) << "kpTool::keyPressEvent() key=" << (int *) e->key ()
<< " stateAfter: modifiers=" << (int *) (int) e->modifiers ()
<< " isAutoRep=" << e->isAutoRepeat ()
<< endl;
@@ -301,7 +301,7 @@ void kpTool::keyPressEvent (QKeyEvent *e)
void kpTool::keyReleaseEvent (QKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::keyReleaseEvent() key=" << (int *) e->key ()
+ qCDebug(kpLogTools) << "kpTool::keyReleaseEvent() key=" << (int *) e->key ()
<< " stateAfter: modifiers=" << (int *) (int) e->modifiers ()
<< " isAutoRep=" << e->isAutoRepeat ()
<< endl;
@@ -324,8 +324,8 @@ void kpTool::keyReleaseEvent (QKeyEvent *e)
void kpTool::keyUpdateModifierState (QKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::keyUpdateModifierState() e->key=" << (int *) e->key ();
- kDebug () << "\tshift="
+ qCDebug(kpLogTools) << "kpTool::keyUpdateModifierState() e->key=" << (int *) e->key ();
+ qCDebug(kpLogTools) << "\tshift="
<< (e->modifiers () & Qt::ShiftModifier)
<< " control="
<< (e->modifiers () & Qt::ControlModifier)
@@ -336,7 +336,7 @@ void kpTool::keyUpdateModifierState (QKeyEvent *e)
if (e->key () & (Qt::Key_Alt | Qt::Key_Shift | Qt::Key_Control))
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "\t\tmodifier changed - use e's claims";
+ qCDebug(kpLogTools) << "\t\tmodifier changed - use e's claims";
#endif
setShiftPressed (e->modifiers () & Qt::ShiftModifier);
setControlPressed (e->modifiers () & Qt::ControlModifier);
@@ -346,7 +346,7 @@ void kpTool::keyUpdateModifierState (QKeyEvent *e)
else
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "\t\tmodifiers not changed - figure out the truth";
+ qCDebug(kpLogTools) << "\t\tmodifiers not changed - figure out the truth";
#endif
const Qt::KeyboardModifiers keyState = QApplication::keyboardModifiers ();
diff --git a/tools/kpTool_MouseEvents.cpp b/tools/kpTool_MouseEvents.cpp
index 8bfb1d3..32342e2 100644
--- a/tools/kpTool_MouseEvents.cpp
+++ b/tools/kpTool_MouseEvents.cpp
@@ -34,7 +34,7 @@
#include "tools/kpTool.h"
#include "kpToolPrivate.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "environments/tools/kpToolEnvironment.h"
#include "views/kpView.h"
@@ -60,7 +60,7 @@
void kpTool::mousePressEvent (QMouseEvent *e)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::mousePressEvent pos=" << e->pos ()
+ qCDebug(kpLogTools) << "kpTool::mousePressEvent pos=" << e->pos ()
<< " button=" << (int) e->button ()
<< " stateAfter: buttons=" << (int *) (int) e->buttons ()
<< " modifiers=" << (int *) (int) e->modifiers ()
@@ -71,14 +71,14 @@ void kpTool::mousePressEvent (QMouseEvent *e)
{
const QString text = QApplication::clipboard ()->text (QClipboard::Selection);
#if DEBUG_KP_TOOL && 1
- kDebug () << "\tMMB pasteText='" << text << "'";
+ qCDebug(kpLogTools) << "\tMMB pasteText='" << text << "'";
#endif
if (!text.isEmpty ())
{
if (hasBegunShape ())
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "\t\thasBegunShape - end";
+ qCDebug(kpLogTools) << "\t\thasBegunShape - end";
#endif
endShapeInternal (d->currentPoint, normalizedRect ());
}
@@ -97,7 +97,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
int mb = mouseButton (e->buttons ());
#if DEBUG_KP_TOOL && 1
- kDebug () << "\tmb=" << mb << " d->beganDraw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "\tmb=" << mb << " d->beganDraw=" << d->beganDraw;
#endif
if (mb == -1 && !d->beganDraw)
@@ -111,7 +111,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
if (mb == -1 || mb != d->mouseButton)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "\tCancelling operation as " << mb << " == -1 or != " << d->mouseButton;
+ qCDebug(kpLogTools) << "\tCancelling operation as " << mb << " == -1 or != " << d->mouseButton;
#endif
kpView *view = viewUnderStartPoint ();
@@ -132,7 +132,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
#if DEBUG_KP_TOOL && 1
if (view)
- kDebug () << "\tview=" << view->objectName ();
+ qCDebug(kpLogTools) << "\tview=" << view->objectName ();
#endif
@@ -147,7 +147,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
d->lastPoint = QPoint (-1, -1);
#if DEBUG_KP_TOOL && 1
- kDebug () << "\tBeginning draw @ " << d->currentPoint;
+ qCDebug(kpLogTools) << "\tBeginning draw @ " << d->currentPoint;
#endif
beginDrawInternal ();
@@ -170,17 +170,17 @@ void kpTool::mousePressEvent (QMouseEvent *e)
void kpTool::mouseMoveEvent (QMouseEvent *e)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::mouseMoveEvent pos=" << e->pos ()
+ qCDebug(kpLogTools) << "kpTool::mouseMoveEvent pos=" << e->pos ()
<< " stateAfter: buttons=" << (int *) (int) e->buttons ()
<< " modifiers=" << (int *) (int) e->modifiers ();
kpView *v0 = viewUnderCursor (),
*v1 = viewManager ()->viewUnderCursor (true/*use Qt*/),
*v2 = viewUnderStartPoint ();
- kDebug () << "\tviewUnderCursor=" << (v0 ? v0->objectName () : "(none)")
+ qCDebug(kpLogTools) << "\tviewUnderCursor=" << (v0 ? v0->objectName () : "(none)")
<< " viewUnderCursorQt=" << (v1 ? v1->objectName () : "(none)")
<< " viewUnderStartPoint=" << (v2 ? v2->objectName () : "(none)");
- kDebug () << "\tfocusWidget=" << kapp->focusWidget ();
- kDebug () << "\tbeganDraw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "\tfocusWidget=" << kapp->focusWidget ();
+ qCDebug(kpLogTools) << "\tbeganDraw=" << d->beganDraw;
#endif
d->shiftPressed = (e->modifiers () & Qt::ShiftModifier);
@@ -196,7 +196,7 @@ void kpTool::mouseMoveEvent (QMouseEvent *e)
d->currentViewPoint = e->pos ();
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tDraw!";
+ qCDebug(kpLogTools) << "\tDraw!";
#endif
bool dragScrolled = false;
@@ -244,7 +244,7 @@ void kpTool::mouseMoveEvent (QMouseEvent *e)
void kpTool::mouseReleaseEvent (QMouseEvent *e)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::mouseReleaseEvent pos=" << e->pos ()
+ qCDebug(kpLogTools) << "kpTool::mouseReleaseEvent pos=" << e->pos ()
<< " button=" << (int) e->button ()
<< " stateAfter: buttons=" << (int *) (int) e->buttons ()
<< " modifiers=" << (int *) (int) e->modifiers ()
@@ -278,7 +278,7 @@ void kpTool::mouseReleaseEvent (QMouseEvent *e)
void kpTool::wheelEvent (QWheelEvent *e)
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::wheelEvent() modifiers=" << (int *) (int) e->modifiers ()
+ qCDebug(kpLogTools) << "kpTool::wheelEvent() modifiers=" << (int *) (int) e->modifiers ()
<< " hasBegunDraw=" << hasBegunDraw ()
<< " delta=" << e->delta ()
<< endl;
@@ -290,7 +290,7 @@ void kpTool::wheelEvent (QWheelEvent *e)
if ((e->modifiers () & Qt::ControlModifier) == 0)
{
#if DEBUG_KP_TOOL
- kDebug () << "\tno CTRL -> bye";
+ qCDebug(kpLogTools) << "\tno CTRL -> bye";
#endif
return;
}
@@ -299,7 +299,7 @@ void kpTool::wheelEvent (QWheelEvent *e)
if (hasBegunDraw ())
{
#if DEBUG_KP_TOOL
- kDebug () << "\thasBegunDraw() -> bye";
+ qCDebug(kpLogTools) << "\thasBegunDraw() -> bye";
#endif
return;
}
@@ -311,7 +311,7 @@ void kpTool::wheelEvent (QWheelEvent *e)
if (e->delta () > 0)
{
#if DEBUG_KP_TOOL
- kDebug () << "\tzoom in";
+ qCDebug(kpLogTools) << "\tzoom in";
#endif
d->environ->zoomIn (true/*center under cursor*/);
e->accept ();
@@ -320,7 +320,7 @@ void kpTool::wheelEvent (QWheelEvent *e)
else if (e->delta () < 0)
{
#if DEBUG_KP_TOOL
- kDebug () << "\tzoom out";
+ qCDebug(kpLogTools) << "\tzoom out";
#endif
#if 1
d->environ->zoomOut (true/*center under cursor - make zoom in/out
diff --git a/tools/kpTool_OtherEvents.cpp b/tools/kpTool_OtherEvents.cpp
index ab98135..fe0100a 100644
--- a/tools/kpTool_OtherEvents.cpp
+++ b/tools/kpTool_OtherEvents.cpp
@@ -39,7 +39,7 @@
#include "tools/kpTool.h"
#include "kpToolPrivate.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "imagelib/kpColor.h"
@@ -52,7 +52,7 @@
bool kpTool::viewEvent (QEvent *e)
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool<" << objectName ()
+ qCDebug(kpLogTools) << "kpTool<" << objectName ()
<< "," << this << ">::viewEvent(type=" << e->type ()
<< ") returning false" << endl;
#else
@@ -74,7 +74,7 @@ void kpTool::focusInEvent (QFocusEvent *)
void kpTool::focusOutEvent (QFocusEvent *)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::focusOutEvent() beganDraw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "kpTool::focusOutEvent() beganDraw=" << d->beganDraw;
#endif
if (d->beganDraw)
@@ -86,7 +86,7 @@ void kpTool::focusOutEvent (QFocusEvent *)
void kpTool::enterEvent (QEvent *)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::enterEvent() beganDraw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "kpTool::enterEvent() beganDraw=" << d->beganDraw;
#endif
}
@@ -95,7 +95,7 @@ void kpTool::enterEvent (QEvent *)
void kpTool::leaveEvent (QEvent *)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::leaveEvent() beganDraw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "kpTool::leaveEvent() beganDraw=" << d->beganDraw;
#endif
// if we haven't started drawing (e.g. dragging a rectangle)...
@@ -131,7 +131,7 @@ void kpTool::slotForegroundColorChangedInternal (const kpColor &color)
if (d->ignoreColorSignals > 0)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::slotForegroundColorChangedInternal() ignoreColorSignals=" << d->ignoreColorSignals;
+ qCDebug(kpLogTools) << "kpTool::slotForegroundColorChangedInternal() ignoreColorSignals=" << d->ignoreColorSignals;
#endif
d->ignoreColorSignals--;
return;
@@ -147,7 +147,7 @@ void kpTool::slotBackgroundColorChangedInternal (const kpColor &color)
if (d->ignoreColorSignals > 0)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::slotBackgroundColorChangedInternal() ignoreColorSignals=" << d->ignoreColorSignals;
+ qCDebug(kpLogTools) << "kpTool::slotBackgroundColorChangedInternal() ignoreColorSignals=" << d->ignoreColorSignals;
#endif
d->ignoreColorSignals--;
return;
diff --git a/tools/kpTool_Utilities.cpp b/tools/kpTool_Utilities.cpp
index eaea895..c463e2f 100644
--- a/tools/kpTool_Utilities.cpp
+++ b/tools/kpTool_Utilities.cpp
@@ -39,7 +39,7 @@
#include <qcursor.h>
#include <qpixmap.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kmessagebox.h>
#include "commands/kpCommandSize.h"
@@ -86,8 +86,8 @@ bool kpTool::hasCurrentPoint () const
QPoint kpTool::calculateCurrentPoint (bool zoomToDoc) const
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "kpTool::currentPoint(zoomToDoc=" << zoomToDoc << ")";
- kDebug () << "\tviewUnderStartPoint="
+ qCDebug(kpLogTools) << "kpTool::currentPoint(zoomToDoc=" << zoomToDoc << ")";
+ qCDebug(kpLogTools) << "\tviewUnderStartPoint="
<< (viewUnderStartPoint () ? viewUnderStartPoint ()->objectName () : "(none)")
<< " viewUnderCursor="
<< (viewUnderCursor () ? viewUnderCursor ()->objectName () : "(none)")
@@ -101,7 +101,7 @@ QPoint kpTool::calculateCurrentPoint (bool zoomToDoc) const
if (!v)
{
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tno view - returning sentinel";
+ qCDebug(kpLogTools) << "\tno view - returning sentinel";
#endif
return KP_INVALID_POINT;
}
@@ -111,7 +111,7 @@ QPoint kpTool::calculateCurrentPoint (bool zoomToDoc) const
const QPoint globalPos = QCursor::pos ();
const QPoint viewPos = v->mapFromGlobal (globalPos);
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tglobalPos=" << globalPos
+ qCDebug(kpLogTools) << "\tglobalPos=" << globalPos
<< " viewPos=" << viewPos
<< endl;
#endif
@@ -121,7 +121,7 @@ QPoint kpTool::calculateCurrentPoint (bool zoomToDoc) const
const QPoint docPos = v->transformViewToDoc (viewPos);
#if DEBUG_KP_TOOL && 0
- kDebug () << "\tdocPos=" << docPos;
+ qCDebug(kpLogTools) << "\tdocPos=" << docPos;
#endif
return docPos;
}
@@ -143,17 +143,17 @@ void kpTool::somethingBelowTheCursorChanged (const QPoint &currentPoint_,
const QPoint &currentViewPoint_)
{
#if DEBUG_KP_TOOL && 1
- kDebug () << "kpTool::somethingBelowTheCursorChanged(docPoint="
+ qCDebug(kpLogTools) << "kpTool::somethingBelowTheCursorChanged(docPoint="
<< currentPoint_
<< " viewPoint="
<< currentViewPoint_
<< ")" << endl;
- kDebug () << "\tviewUnderStartPoint="
+ qCDebug(kpLogTools) << "\tviewUnderStartPoint="
<< (viewUnderStartPoint () ? viewUnderStartPoint ()->objectName () : "(none)")
<< " viewUnderCursor="
<< (viewUnderCursor () ? viewUnderCursor ()->objectName () : "(none)")
<< endl;
- kDebug () << "\tbegan draw=" << d->beganDraw;
+ qCDebug(kpLogTools) << "\tbegan draw=" << d->beganDraw;
#endif
d->currentPoint = currentPoint_;
@@ -246,7 +246,7 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
QWidget *parent)
{
#if DEBUG_KP_TOOL
- kDebug () << "kpTool::warnIfBigImageSize()"
+ qCDebug(kpLogTools) << "kpTool::warnIfBigImageSize()"
<< " old: w=" << oldWidth << " h=" << oldWidth
<< " new: w=" << newWidth << " h=" << newHeight
<< " pixmapSize="
diff --git a/tools/polygonal/kpToolCurve.cpp b/tools/polygonal/kpToolCurve.cpp
index c3e102a..c23c5d7 100644
--- a/tools/polygonal/kpToolCurve.cpp
+++ b/tools/polygonal/kpToolCurve.cpp
@@ -31,7 +31,7 @@
#include "kpToolCurve.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpPainter.h"
@@ -117,7 +117,7 @@ bool kpToolCurve::drawingALine () const
void kpToolCurve::endDraw (const QPoint &, const QRect &)
{
#if DEBUG_KP_TOOL_CURVE
- kDebug () << "kpToolCurve::endDraw() points="
+ qCDebug(kpLogTools) << "kpToolCurve::endDraw() points="
<< points ()->toList () << endl;
#endif
@@ -167,7 +167,7 @@ void kpToolCurve::endDraw (const QPoint &, const QRect &)
// Have initial line and both control points?
case 4:
#if DEBUG_KP_TOOL_CURVE
- kDebug () << "\tending shape";
+ qCDebug(kpLogTools) << "\tending shape";
#endif
endShape ();
break;
diff --git a/tools/polygonal/kpToolLine.cpp b/tools/polygonal/kpToolLine.cpp
index b40f9eb..afbc6c9 100644
--- a/tools/polygonal/kpToolLine.cpp
+++ b/tools/polygonal/kpToolLine.cpp
@@ -33,7 +33,7 @@
#include "kpToolPolyline.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
@@ -80,7 +80,7 @@ QString kpToolLine::haventBegunShapeUserMessage () const
void kpToolLine::endDraw (const QPoint &, const QRect &)
{
#if DEBUG_KP_TOOL_LINE
- kDebug () << "kpToolLine::endDraw() points="
+ qCDebug(kpLogTools) << "kpToolLine::endDraw() points="
<< points ()->toList () << endl;
#endif
diff --git a/tools/polygonal/kpToolPolygon.cpp b/tools/polygonal/kpToolPolygon.cpp
index bfee371..d7d3729 100644
--- a/tools/polygonal/kpToolPolygon.cpp
+++ b/tools/polygonal/kpToolPolygon.cpp
@@ -128,7 +128,7 @@ kpColor kpToolPolygon::drawingBackgroundColor () const
void kpToolPolygon::endDraw (const QPoint &, const QRect &)
{
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygon::endDraw() points="
+ qCDebug(kpLogTools) << "kpToolPolygon::endDraw() points="
<< points ()->toList () << endl;
#endif
@@ -142,7 +142,7 @@ void kpToolPolygon::endDraw (const QPoint &, const QRect &)
if (points ()->count () >= kpToolPolygonalBase::MaxPoints)
{
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "\tending shape";
+ qCDebug(kpLogTools) << "\tending shape";
#endif
endShape ();
return;
diff --git a/tools/polygonal/kpToolPolygonalBase.cpp b/tools/polygonal/kpToolPolygonalBase.cpp
index e2f26d8..f2f1c38 100644
--- a/tools/polygonal/kpToolPolygonalBase.cpp
+++ b/tools/polygonal/kpToolPolygonalBase.cpp
@@ -44,7 +44,7 @@
#include <qpushbutton.h>
#include <qrect.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -114,7 +114,7 @@ void kpToolPolygonalBase::begin ()
Q_ASSERT (tb);
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygonalBase::begin() tb=" << tb;
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::begin() tb=" << tb;
#endif
d->toolWidgetLineWidth = tb->toolWidgetLineWidth ();
@@ -150,7 +150,7 @@ void kpToolPolygonalBase::end ()
void kpToolPolygonalBase::beginDraw ()
{
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygonalBase::beginDraw() d->points=" << d->points.toList ()
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::beginDraw() d->points=" << d->points.toList ()
<< ", startPoint=" << startPoint () << endl;
#endif
@@ -186,7 +186,7 @@ void kpToolPolygonalBase::beginDraw ()
}
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "\tafterwards, d->points=" << d->points.toList ();
+ qCDebug(kpLogTools) << "\tafterwards, d->points=" << d->points.toList ();
#endif
if (!endedShape)
@@ -206,7 +206,7 @@ void kpToolPolygonalBase::applyModifiers ()
QPoint &lineEndPoint = d->points [count - 1];
#if DEBUG_KP_TOOL_POLYGON && 1
- kDebug () << "kpToolPolygonalBase::applyModifiers() #pts=" << count
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::applyModifiers() #pts=" << count
<< " line: startPt=" << lineStartPoint
<< " endPt=" << lineEndPoint
<< " modifiers: shift=" << shiftPressed ()
@@ -227,7 +227,7 @@ void kpToolPolygonalBase::applyModifiers ()
else
ratio = fabs (double (diffy) / double (diffx));
#if DEBUG_KP_TOOL_POLYGON && 1
- kDebug () << "\tdiffx=" << diffx << " diffy=" << diffy
+ qCDebug(kpLogTools) << "\tdiffx=" << diffx << " diffy=" << diffy
<< " ratio=" << ratio
<< endl;
#endif
@@ -288,7 +288,7 @@ void kpToolPolygonalBase::applyModifiers ()
lineStartPoint.y () + newdy);
#if DEBUG_KP_TOOL_POLYGON && 1
- kDebug () << "\t\tdiagonal line: dist=" << dist
+ qCDebug(kpLogTools) << "\t\tdiagonal line: dist=" << dist
<< " angle=" << (angle * 180 / KP_PI)
<< " endPoint=" << lineEndPoint
<< endl;
@@ -337,7 +337,7 @@ void kpToolPolygonalBase::draw (const QPoint &, const QPoint &, const QRect &)
return;
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygonalBase::draw() d->points=" << d->points.toList ()
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::draw() d->points=" << d->points.toList ()
<< ", endPoint=" << currentPoint () << endl;
#endif
@@ -346,7 +346,7 @@ void kpToolPolygonalBase::draw (const QPoint &, const QPoint &, const QRect &)
d->points [count - 1] = currentPoint ();
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "\tafterwards, d->points=" << d->points.toList ();
+ qCDebug(kpLogTools) << "\tafterwards, d->points=" << d->points.toList ();
#endif
// Are we drawing a line?
@@ -400,7 +400,7 @@ void kpToolPolygonalBase::updateShape ()
d->toolWidgetLineWidth->lineWidth ());
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygonalBase::updateShape() boundingRect="
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::updateShape() boundingRect="
<< boundingRect
<< " lineWidth="
<< d->toolWidgetLineWidth->lineWidth ()
@@ -451,7 +451,7 @@ void kpToolPolygonalBase::releasedAllButtons ()
void kpToolPolygonalBase::endShape (const QPoint &, const QRect &)
{
#if DEBUG_KP_TOOL_POLYGON
- kDebug () << "kpToolPolygonalBase::endShape() d->points="
+ qCDebug(kpLogTools) << "kpToolPolygonalBase::endShape() d->points="
<< d->points.toList () << endl;
#endif
diff --git a/tools/polygonal/kpToolPolyline.cpp b/tools/polygonal/kpToolPolyline.cpp
index 4da787c..1369e97 100644
--- a/tools/polygonal/kpToolPolyline.cpp
+++ b/tools/polygonal/kpToolPolyline.cpp
@@ -31,7 +31,7 @@
#include "kpToolPolyline.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpPainter.h"
@@ -80,7 +80,7 @@ void kpToolPolyline::DrawShape (kpImage *image,
void kpToolPolyline::endDraw (const QPoint &, const QRect &)
{
#if DEBUG_KP_TOOL_POLYLINE
- kDebug () << "kpToolPolyline::endDraw() points="
+ qCDebug(kpLogTools) << "kpToolPolyline::endDraw() points="
<< points ()->toList () << endl;
#endif
@@ -94,7 +94,7 @@ void kpToolPolyline::endDraw (const QPoint &, const QRect &)
if (points ()->count () >= kpToolPolygonalBase::MaxPoints)
{
#if DEBUG_KP_TOOL_POLYLINE
- kDebug () << "\tending shape";
+ qCDebug(kpLogTools) << "\tending shape";
#endif
endShape ();
return;
diff --git a/tools/rectangular/kpToolRectangularBase.cpp b/tools/rectangular/kpToolRectangularBase.cpp
index cc899bb..9686549 100644
--- a/tools/rectangular/kpToolRectangularBase.cpp
+++ b/tools/rectangular/kpToolRectangularBase.cpp
@@ -37,7 +37,7 @@
#include <qpainter.h>
#include <qpixmap.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/kpColor.h"
@@ -126,14 +126,14 @@ QString kpToolRectangularBase::haventBegunDrawUserMessage () const
void kpToolRectangularBase::begin ()
{
#if DEBUG_KP_TOOL_RECTANGULAR_BASE
- kDebug () << "kpToolRectangularBase::begin ()";
+ qCDebug(kpLogTools) << "kpToolRectangularBase::begin ()";
#endif
kpToolToolBar *tb = toolToolBar ();
Q_ASSERT (tb);
#if DEBUG_KP_TOOL_RECTANGULAR_BASE
- kDebug () << "\ttoolToolBar=" << tb;
+ qCDebug(kpLogTools) << "\ttoolToolBar=" << tb;
#endif
d->toolWidgetLineWidth = tb->toolWidgetLineWidth ();
@@ -161,7 +161,7 @@ void kpToolRectangularBase::begin ()
void kpToolRectangularBase::end ()
{
#if DEBUG_KP_TOOL_RECTANGULAR_BASE
- kDebug () << "kpToolRectangularBase::end ()";
+ qCDebug(kpLogTools) << "kpToolRectangularBase::end ()";
#endif
if (d->toolWidgetLineWidth)
@@ -192,7 +192,7 @@ void kpToolRectangularBase::applyModifiers ()
QRect rect = normalizedRect ();
#if DEBUG_KP_TOOL_RECTANGULAR_BASE
- kDebug () << "kpToolRectangularBase::applyModifiers(" << rect
+ qCDebug(kpLogTools) << "kpToolRectangularBase::applyModifiers(" << rect
<< ") shift=" << shiftPressed ()
<< " ctrl=" << controlPressed ()
<< endl;
diff --git a/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp b/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp
index 2d54f11..c2dd16d 100644
--- a/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp
+++ b/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp
@@ -51,7 +51,7 @@
#include "views/kpView.h"
#include "views/manager/kpViewManager.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
// LOREFACTOR: Remove unneeded #include
@@ -72,7 +72,7 @@ bool kpAbstractImageSelectionTool::shouldChangeImageSelectionTransparency () con
if (environ ()->settingImageSelectionTransparency ())
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\trecursion - abort setting selection transparency: "
+ qCDebug(kpLogTools) << "\trecursion - abort setting selection transparency: "
<< environ ()->settingImageSelectionTransparency () << endl;
#endif
return false;
@@ -95,7 +95,7 @@ void kpAbstractImageSelectionTool::changeImageSelectionTransparency (
const kpImageSelectionTransparency &oldTrans)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "CALL(" << name << ")";
+ qCDebug(kpLogTools) << "CALL(" << name << ")";
#endif
kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor);
@@ -153,7 +153,7 @@ void kpAbstractImageSelectionTool::changeImageSelectionTransparency (
void kpAbstractImageSelectionTool::slotIsOpaqueChanged (bool /*isOpaque*/)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractImageSelectionTool::slotIsOpaqueChanged()";
+ qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotIsOpaqueChanged()";
#endif
if (!shouldChangeImageSelectionTransparency ())
@@ -175,7 +175,7 @@ void kpAbstractImageSelectionTool::slotIsOpaqueChanged (bool /*isOpaque*/)
void kpAbstractImageSelectionTool::slotBackgroundColorChanged (const kpColor &)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractImageSelectionTool::slotBackgroundColorChanged()";
+ qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotBackgroundColorChanged()";
#endif
if (!shouldChangeImageSelectionTransparency ())
@@ -195,7 +195,7 @@ void kpAbstractImageSelectionTool::slotBackgroundColorChanged (const kpColor &)
void kpAbstractImageSelectionTool::slotColorSimilarityChanged (double, int)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractImageSelectionTool::slotColorSimilarityChanged()";
+ qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotColorSimilarityChanged()";
#endif
if (!shouldChangeImageSelectionTransparency ())
diff --git a/tools/selection/image/kpToolEllipticalSelection.cpp b/tools/selection/image/kpToolEllipticalSelection.cpp
index a9a6a2e..0405319 100644
--- a/tools/selection/image/kpToolEllipticalSelection.cpp
+++ b/tools/selection/image/kpToolEllipticalSelection.cpp
@@ -31,7 +31,7 @@
#include "kpToolEllipticalSelection.h"
#include <klocale.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "layers/selections/image/kpEllipticalImageSelection.h"
@@ -63,7 +63,7 @@ bool kpToolEllipticalSelection::drawCreateMoreSelectionAndUpdateStatusBar (
if (!dragAccepted && accidentalDragAdjustedPoint == startPoint ())
{
#if DEBUG_KP_TOOL_ELLIPTICAL_SELECTION && 1
- kDebug () << "\tnon-text NOP - return";
+ qCDebug(kpLogTools) << "\tnon-text NOP - return";
#endif
setUserShapePoints (accidentalDragAdjustedPoint);
return false;
diff --git a/tools/selection/image/kpToolFreeFormSelection.cpp b/tools/selection/image/kpToolFreeFormSelection.cpp
index 86aabfe..057a9ad 100644
--- a/tools/selection/image/kpToolFreeFormSelection.cpp
+++ b/tools/selection/image/kpToolFreeFormSelection.cpp
@@ -31,7 +31,7 @@
#include "kpToolFreeFormSelection.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include <KLocalizedString>
#include "document/kpDocument.h"
@@ -65,7 +65,7 @@ bool kpToolFreeFormSelection::drawCreateMoreSelectionAndUpdateStatusBar (
const QRect &/*normalizedRect*/)
{
#if DEBUG_KP_TOOL_FREE_FROM_SELECTION
- kDebug () << "kpToolFreeFormSelection::createMoreSelectionAndUpdateStatusBar("
+ qCDebug(kpLogTools) << "kpToolFreeFormSelection::createMoreSelectionAndUpdateStatusBar("
<< "dragAccepted=" << dragAccepted
<< ",accidentalDragAdjustedPoint=" << accidentalDragAdjustedPoint
<< ")" << endl;
@@ -75,7 +75,7 @@ bool kpToolFreeFormSelection::drawCreateMoreSelectionAndUpdateStatusBar (
if (!dragAccepted && accidentalDragAdjustedPoint == startPoint ())
{
#if DEBUG_KP_TOOL_FREE_FROM_SELECTION && 1
- kDebug () << "\tnon-text NOP - return";
+ qCDebug(kpLogTools) << "\tnon-text NOP - return";
#endif
setUserShapePoints (accidentalDragAdjustedPoint);
return false;
@@ -112,7 +112,7 @@ bool kpToolFreeFormSelection::drawCreateMoreSelectionAndUpdateStatusBar (
#if DEBUG_KP_TOOL_FREE_FROM_SELECTION
- kDebug () << "\tlast old point=" << points.last ();
+ qCDebug(kpLogTools) << "\tlast old point=" << points.last ();
#endif
// TODO: There should be an upper limit on this before drawing the
@@ -128,7 +128,7 @@ bool kpToolFreeFormSelection::drawCreateMoreSelectionAndUpdateStatusBar (
oldPointsSel = 0;
#if DEBUG_KP_TOOL_FREE_FROM_SELECTION && 1
- kDebug () << "\t\tfreeform; #points="
+ qCDebug(kpLogTools) << "\t\tfreeform; #points="
<< document ()->selection ()->calculatePoints ().count ()
<< endl;
#endif
diff --git a/tools/selection/image/kpToolRectSelection.cpp b/tools/selection/image/kpToolRectSelection.cpp
index 41ef554..273c198 100644
--- a/tools/selection/image/kpToolRectSelection.cpp
+++ b/tools/selection/image/kpToolRectSelection.cpp
@@ -30,7 +30,7 @@
#include "kpToolRectSelection.h"
#include <klocale.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "layers/selections/image/kpRectangularImageSelection.h"
@@ -63,7 +63,7 @@ bool kpToolRectSelection::drawCreateMoreSelectionAndUpdateStatusBar (
if (!dragAccepted && accidentalDragAdjustedPoint == startPoint ())
{
#if DEBUG_KP_TOOL_RECT_SELECTION && 1
- kDebug () << "\tnon-text NOP - return";
+ qCDebug(kpLogTools) << "\tnon-text NOP - return";
#endif
setUserShapePoints (accidentalDragAdjustedPoint);
return false;
diff --git a/tools/selection/kpAbstractSelectionTool.cpp b/tools/selection/kpAbstractSelectionTool.cpp
index f9aa0f1..0bae997 100644
--- a/tools/selection/kpAbstractSelectionTool.cpp
+++ b/tools/selection/kpAbstractSelectionTool.cpp
@@ -36,7 +36,7 @@
#include <qmenu.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/kpAbstractSelection.h"
@@ -159,7 +159,7 @@ bool kpAbstractSelectionTool::controlOrShiftPressed () const
void kpAbstractSelectionTool::pushOntoDocument ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpAbstractSelectionTool::pushOntoDocument() selection="
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::pushOntoDocument() selection="
<< document ()->selection () << endl;
#endif
Q_ASSERT (document ()->selection ());
@@ -197,7 +197,7 @@ void kpAbstractSelectionTool::addNeedingContentCommand (kpCommand *cmd)
{
// Make the border creation a command.
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\thave currentSelContentCommand";
+ qCDebug(kpLogTools) << "\thave currentSelContentCommand";
#endif
commandHistory ()->addCreateSelectionCommand (
new kpToolSelectionCreateCommand (
@@ -250,7 +250,7 @@ void kpAbstractSelectionTool::setSelectionBorderForHaventBegunDraw ()
QString kpAbstractSelectionTool::haventBegunDrawUserMessage ()
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "kpAbstractSelectionTool::haventBegunDrawUserMessage()"
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::haventBegunDrawUserMessage()"
" cancelledShapeButStillHoldingButtons="
<< d->cancelledShapeButStillHoldingButtons
<< endl;
@@ -268,7 +268,7 @@ QString kpAbstractSelectionTool::haventBegunDrawUserMessage ()
void kpAbstractSelectionTool::begin ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool<" << objectName () << ">::begin()";
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool<" << objectName () << ">::begin()";
#endif
::AssertAllTimersInactive (d);
@@ -309,7 +309,7 @@ void kpAbstractSelectionTool::begin ()
void kpAbstractSelectionTool::end ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool<" << objectName () << ">::end()";
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool<" << objectName () << ">::end()";
#endif
if (document ()->selection ())
@@ -348,7 +348,7 @@ void kpAbstractSelectionTool::end ()
void kpAbstractSelectionTool::reselect ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool::reselect()";
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::reselect()";
#endif
if (document ()->selection ())
@@ -361,7 +361,7 @@ void kpAbstractSelectionTool::reselect ()
kpAbstractSelectionTool::DrawType kpAbstractSelectionTool::calculateDrawTypeInsideSelection () const
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\t\tis move";
+ qCDebug(kpLogTools) << "\t\tis move";
#endif
return kpAbstractSelectionTool::Move;
}
@@ -375,7 +375,7 @@ kpAbstractSelectionTool::DrawType kpAbstractSelectionTool::calculateDrawType ()
if (!sel)
return Create;
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\thas sel region rect=" << sel->boundingRect ();
+ qCDebug(kpLogTools) << "\thas sel region rect=" << sel->boundingRect ();
#endif
if (onSelectionResizeHandle () && !controlOrShiftPressed ())
@@ -392,7 +392,7 @@ kpAbstractSelectionTool::DrawType kpAbstractSelectionTool::calculateDrawType ()
void kpAbstractSelectionTool::beginDraw ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool::beginDraw() startPoint ()="
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::beginDraw() startPoint ()="
<< startPoint ()
<< " QCursor::pos() view startPoint="
<< viewUnderStartPoint ()->mapFromGlobal (QCursor::pos ())
@@ -430,7 +430,7 @@ void kpAbstractSelectionTool::beginDraw ()
void kpAbstractSelectionTool::hover (const QPoint &point)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpAbstractSelectionTool::hover" << point;
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::hover" << point;
#endif
operation (calculateDrawType (), SetCursor);
@@ -459,7 +459,7 @@ void kpAbstractSelectionTool::draw (const QPoint &thisPoint, const QPoint & /*la
const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpAbstractSelectionTool::draw (" << thisPoint
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::draw (" << thisPoint
<< ",startPoint=" << startPoint ()
<< ",normalizedRect=" << normalizedRect << ")" << endl;
#else
@@ -483,7 +483,7 @@ void kpAbstractSelectionTool::draw (const QPoint &thisPoint, const QPoint & /*la
void kpAbstractSelectionTool::cancelShape ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool::cancelShape() mouseButton="
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::cancelShape() mouseButton="
<< mouseButton () << endl;
#endif
@@ -501,7 +501,7 @@ void kpAbstractSelectionTool::cancelShape ()
if (d->currentSelContentCommand)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\t\tundo sel content";
+ qCDebug(kpLogTools) << "\t\tundo sel content";
#endif
d->currentSelContentCommand->unexecute ();
delete d->currentSelContentCommand;
@@ -536,7 +536,7 @@ void kpAbstractSelectionTool::releasedAllButtons ()
void kpAbstractSelectionTool::popupRMBMenu ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "CALL - exec'ing menu";
+ qCDebug(kpLogTools) << "CALL - exec'ing menu";
#endif
QMenu *pop = environ ()->selectionToolRMBMenu ();
@@ -546,7 +546,7 @@ void kpAbstractSelectionTool::popupRMBMenu ()
// WARNING: Enters event loop - may re-enter view/tool event handlers.
pop->exec (QCursor::pos ());
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "calling somethingBelowTheCursorChanged()";
+ qCDebug(kpLogTools) << "calling somethingBelowTheCursorChanged()";
#endif
// Cursor may have moved while the menu was up, triggering QMouseMoveEvents
@@ -554,7 +554,7 @@ void kpAbstractSelectionTool::popupRMBMenu ()
// Update cursor position now.
somethingBelowTheCursorChanged ();
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "DONE";
+ qCDebug(kpLogTools) << "DONE";
#endif
}
@@ -565,7 +565,7 @@ void kpAbstractSelectionTool::endDraw (const QPoint & /*thisPoint*/,
const QRect & /*normalizedRect*/)
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "kpAbstractSelectionTool::endDraw()";
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::endDraw()";
#endif
const DrawType oldDrawType = d->drawType;
diff --git a/tools/selection/kpAbstractSelectionTool_Create.cpp b/tools/selection/kpAbstractSelectionTool_Create.cpp
index 6fc0aeb..16ce00e 100644
--- a/tools/selection/kpAbstractSelectionTool_Create.cpp
+++ b/tools/selection/kpAbstractSelectionTool_Create.cpp
@@ -42,7 +42,7 @@
#include <qpolygon.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/image/kpAbstractImageSelection.h"
@@ -163,9 +163,9 @@ void kpAbstractSelectionTool::drawCreate (const QPoint &thisPoint,
const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\tnot moving - resizing rect to" << normalizedRect
+ qCDebug(kpLogTools) << "\tnot moving - resizing rect to" << normalizedRect
<< endl;
- kDebug () << "\t\tcreateNOPTimer->isActive()="
+ qCDebug(kpLogTools) << "\t\tcreateNOPTimer->isActive()="
<< d->createNOPTimer->isActive ()
<< " viewManhattanLength from startPoint="
<< viewUnderStartPoint ()->transformDocToViewX ((thisPoint - startPoint ()).manhattanLength ())
@@ -182,14 +182,14 @@ void kpAbstractSelectionTool::drawCreate (const QPoint &thisPoint,
(accidentalDragAdjustedPoint - startPoint ()).manhattanLength ()) <= 6)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tsuppress accidental movement";
+ qCDebug(kpLogTools) << "\t\tsuppress accidental movement";
#endif
accidentalDragAdjustedPoint = startPoint ();
}
else
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tit's a \"big\" intended move - stop timer";
+ qCDebug(kpLogTools) << "\t\tit's a \"big\" intended move - stop timer";
#endif
d->createNOPTimer->stop ();
}
@@ -208,7 +208,7 @@ void kpAbstractSelectionTool::drawCreate (const QPoint &thisPoint,
if (d->dragAccepted)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tdrawHasDoneSomething - kill create timer";
+ qCDebug(kpLogTools) << "\t\tdrawHasDoneSomething - kill create timer";
#endif
// No longer a NOP.
d->createNOPTimer->stop ();
@@ -223,7 +223,7 @@ void kpAbstractSelectionTool::drawCreate (const QPoint &thisPoint,
void kpAbstractSelectionTool::delayedDrawCreate ()
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "kpAbstractSelectionTool::delayedDrawCreate() hasBegunDraw="
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::delayedDrawCreate() hasBegunDraw="
<< hasBegunDraw ()
<< " currentPoint=" << currentPoint ()
<< " lastPoint=" << lastPoint ()
@@ -245,7 +245,7 @@ void kpAbstractSelectionTool::delayedDrawCreate ()
void kpAbstractSelectionTool::cancelCreate ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\twas creating sel - kill";
+ qCDebug(kpLogTools) << "\twas creating sel - kill";
#endif
d->createNOPTimer->stop ();
diff --git a/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp b/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp
index 347d913..feeff85 100644
--- a/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp
+++ b/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp
@@ -39,7 +39,7 @@
#include <qevent.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
@@ -47,7 +47,7 @@
void kpAbstractSelectionTool::keyPressEvent (QKeyEvent *e)
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "kpAbstractSelectionTool::keyPressEvent(e->text='"
+ qCDebug(kpLogTools) << "kpAbstractSelectionTool::keyPressEvent(e->text='"
<< e->text () << "')" << endl;
#endif
@@ -58,7 +58,7 @@ void kpAbstractSelectionTool::keyPressEvent (QKeyEvent *e)
e->key () == Qt::Key_Escape)
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "\tescape pressed with sel when not begun draw - deselecting"
+ qCDebug(kpLogTools) << "\tescape pressed with sel when not begun draw - deselecting"
<< endl;
#endif
@@ -68,7 +68,7 @@ void kpAbstractSelectionTool::keyPressEvent (QKeyEvent *e)
else
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "\tkey processing did not accept (text was '"
+ qCDebug(kpLogTools) << "\tkey processing did not accept (text was '"
<< e->text ()
<< "') - passing on event to kpTool"
<< endl;
diff --git a/tools/selection/kpAbstractSelectionTool_Move.cpp b/tools/selection/kpAbstractSelectionTool_Move.cpp
index c2372c4..9bc01b0 100644
--- a/tools/selection/kpAbstractSelectionTool_Move.cpp
+++ b/tools/selection/kpAbstractSelectionTool_Move.cpp
@@ -36,7 +36,7 @@
#include <qmenu.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/image/kpAbstractImageSelection.h"
@@ -184,7 +184,7 @@ void kpAbstractSelectionTool::slotRMBMoveUpdateGUI ()
void kpAbstractSelectionTool::drawMove (const QPoint &thisPoint, const QRect &/*normalizedRect*/)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\tmoving selection";
+ qCDebug(kpLogTools) << "\tmoving selection";
#endif
kpAbstractSelection *sel = document ()->selection ();
@@ -195,7 +195,7 @@ void kpAbstractSelectionTool::drawMove (const QPoint &thisPoint, const QRect &/*
sel->height ());
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tstartPoint=" << startPoint ()
+ qCDebug(kpLogTools) << "\t\tstartPoint=" << startPoint ()
<< " thisPoint=" << thisPoint
<< " startDragFromSel=" << d->startMoveDragFromSelectionTopLeft
<< " targetSelRect=" << targetSelRect
@@ -216,7 +216,7 @@ void kpAbstractSelectionTool::drawMove (const QPoint &thisPoint, const QRect &/*
targetSelRect.translate (0, document ()->height () - targetSelRect.top () - 1);
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\t\tafter ensure sel rect clickable=" << targetSelRect;
+ qCDebug(kpLogTools) << "\t\t\tafter ensure sel rect clickable=" << targetSelRect;
#endif
@@ -224,7 +224,7 @@ void kpAbstractSelectionTool::drawMove (const QPoint &thisPoint, const QRect &/*
targetSelRect.topLeft () + d->startMoveDragFromSelectionTopLeft == startPoint ())
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\t\t\tnop";
+ qCDebug(kpLogTools) << "\t\t\t\tnop";
#endif
@@ -293,7 +293,7 @@ void kpAbstractSelectionTool::drawMove (const QPoint &thisPoint, const QRect &/*
void kpAbstractSelectionTool::cancelMove ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\twas drag moving - undo drag and undo acquire";
+ qCDebug(kpLogTools) << "\twas drag moving - undo drag and undo acquire";
#endif
d->RMBMoveUpdateGUITimer->stop ();
@@ -303,7 +303,7 @@ void kpAbstractSelectionTool::cancelMove ()
return;
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\t\tundo currentMoveCommand";
+ qCDebug(kpLogTools) << "\t\tundo currentMoveCommand";
#endif
d->currentMoveCommand->finalize ();
d->currentMoveCommand->unexecute ();
@@ -334,7 +334,7 @@ void kpAbstractSelectionTool::endDrawMove ()
kpMacroCommand *renamedCmd = 0;
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\thave moveCommand";
+ qCDebug(kpLogTools) << "\thave moveCommand";
#endif
if (d->currentMoveCommandIsSmear)
{
diff --git a/tools/selection/kpAbstractSelectionTool_ResizeScale.cpp b/tools/selection/kpAbstractSelectionTool_ResizeScale.cpp
index 1fac0ac..656bd72 100644
--- a/tools/selection/kpAbstractSelectionTool_ResizeScale.cpp
+++ b/tools/selection/kpAbstractSelectionTool_ResizeScale.cpp
@@ -42,7 +42,7 @@
#include <qpolygon.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "layers/selections/image/kpAbstractImageSelection.h"
@@ -117,7 +117,7 @@ void kpAbstractSelectionTool::endResizeScale ()
void kpAbstractSelectionTool::setCursorResizeScale ()
{
#if DEBUG_KP_TOOL_SELECTION && 0
- kDebug () << "\tonSelectionResizeHandle="
+ qCDebug(kpLogTools) << "\tonSelectionResizeHandle="
<< onSelectionResizeHandle () << endl;
#endif
Qt::CursorShape shape = Qt::ArrowCursor;
@@ -291,7 +291,7 @@ void kpAbstractSelectionTool::drawResizeScaleCalculateNewSelectionPosSize (
}
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tnewX=" << *newX
+ qCDebug(kpLogTools) << "\t\tnewX=" << *newX
<< " newY=" << *newY
<< " newWidth=" << *newWidth
<< " newHeight=" << *newHeight
@@ -307,7 +307,7 @@ void kpAbstractSelectionTool::drawResizeScale (
const QRect &/*normalizedRect*/)
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\tresize/scale";
+ qCDebug(kpLogTools) << "\tresize/scale";
#endif
kpAbstractSelection *sel = document ()->selection ();
@@ -315,7 +315,7 @@ void kpAbstractSelectionTool::drawResizeScale (
if (!d->dragAccepted && thisPoint == startPoint ())
{
#if DEBUG_KP_TOOL_SELECTION && 1
- kDebug () << "\t\tnop";
+ qCDebug(kpLogTools) << "\t\tnop";
#endif
setUserShapePoints (QPoint (sel->width (), sel->height ()));
@@ -376,7 +376,7 @@ void kpAbstractSelectionTool::drawResizeScale (
void kpAbstractSelectionTool::cancelResizeScale ()
{
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\twas resize/scale sel - kill";
+ qCDebug(kpLogTools) << "\twas resize/scale sel - kill";
#endif
// NOP drag?
@@ -384,7 +384,7 @@ void kpAbstractSelectionTool::cancelResizeScale ()
return;
#if DEBUG_KP_TOOL_SELECTION
- kDebug () << "\t\tundo currentResizeScaleCommand";
+ qCDebug(kpLogTools) << "\t\tundo currentResizeScaleCommand";
#endif
d->currentResizeScaleCommand->finalize (); // (unneeded but let's be safe)
d->currentResizeScaleCommand->unexecute ();
diff --git a/tools/selection/text/kpToolText.cpp b/tools/selection/text/kpToolText.cpp
index 6a7116c..9776f1d 100644
--- a/tools/selection/text/kpToolText.cpp
+++ b/tools/selection/text/kpToolText.cpp
@@ -36,7 +36,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -74,7 +74,7 @@ kpAbstractSelectionContentCommand *kpToolText::newGiveContentCommand () const
{
kpTextSelection *textSel = document ()->textSelection ();
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::newGiveContentCommand()"
+ qCDebug(kpLogTools) << "kpToolText::newGiveContentCommand()"
<< " textSel=" << textSel
<< "; hasContent=" << textSel->hasContent () << endl;
#endif
@@ -110,7 +110,7 @@ void kpToolText::setSelectionBorderForHaventBegunDraw ()
void kpToolText::begin ()
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "kpToolText::begin()";
+ qCDebug(kpLogTools) << "kpToolText::begin()";
#endif
environ ()->enableTextToolBarActions (true);
@@ -130,7 +130,7 @@ void kpToolText::begin ()
void kpToolText::end ()
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "kpToolText::end()";
+ qCDebug(kpLogTools) << "kpToolText::end()";
#endif
kpAbstractSelectionTool::end ();
@@ -175,7 +175,7 @@ kpAbstractSelectionTool::DrawType kpToolText::calculateDrawTypeInsideSelection (
void kpToolText::cancelShape ()
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::cancelShape()";
+ qCDebug(kpLogTools) << "kpToolText::cancelShape()";
#endif
if (drawType () != None)
@@ -195,7 +195,7 @@ void kpToolText::cancelShape ()
void kpToolText::endShape (const QPoint &thisPoint, const QRect &normalizedRect)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::endShape()";
+ qCDebug(kpLogTools) << "kpToolText::endShape()";
#endif
if (drawType () != None)
diff --git a/tools/selection/text/kpToolText_Commands.cpp b/tools/selection/text/kpToolText_Commands.cpp
index d875838..a147dd0 100644
--- a/tools/selection/text/kpToolText_Commands.cpp
+++ b/tools/selection/text/kpToolText_Commands.cpp
@@ -31,7 +31,7 @@
#include "kpToolText.h"
#include "kpToolTextPrivate.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "environments/tools/selection/kpToolSelectionEnvironment.h"
diff --git a/tools/selection/text/kpToolText_Create.cpp b/tools/selection/text/kpToolText_Create.cpp
index 427c6d5..eebf148 100644
--- a/tools/selection/text/kpToolText_Create.cpp
+++ b/tools/selection/text/kpToolText_Create.cpp
@@ -34,7 +34,7 @@
#include <QList>
#include <KLocalizedString>
-#include <KDebug>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "layers/selections/text/kpTextSelection.h"
@@ -108,7 +108,7 @@ bool kpToolText::shouldCreate (bool dragAccepted,
bool *newDragAccepted)
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "CALL(dragAccepted=" << dragAccepted
+ qCDebug(kpLogTools) << "CALL(dragAccepted=" << dragAccepted
<< ",accidentalDragAdjustedPoint=" << accidentalDragAdjustedPoint
<< ")";
#endif
@@ -123,7 +123,7 @@ bool kpToolText::shouldCreate (bool dragAccepted,
if (hadSelectionBeforeDraw ())
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "\ttext box deselect - NOP - return";
+ qCDebug(kpLogTools) << "\ttext box deselect - NOP - return";
#endif
// We must be attempting to deselect the text box.
// This deselection has already been done by kpAbstractSelectionTool::beginDraw().
@@ -143,7 +143,7 @@ bool kpToolText::shouldCreate (bool dragAccepted,
// the size of the drag instead.
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "\tclick creating text box";
+ qCDebug(kpLogTools) << "\tclick creating text box";
#endif
// (Click creating text box with RMB would not be obvious
@@ -187,7 +187,7 @@ bool kpToolText::shouldCreate (bool dragAccepted,
else
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "\tdrag creating text box";
+ qCDebug(kpLogTools) << "\tdrag creating text box";
#endif
*minimumWidthOut = kpTextSelection::MinimumWidthForTextStyle (textStyle);
*minimumHeightOut = kpTextSelection::MinimumHeightForTextStyle (textStyle);
@@ -247,7 +247,7 @@ bool kpToolText::drawCreateMoreSelectionAndUpdateStatusBar (
}
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "\t\tnormalizedRect=" << normalizedRect
+ qCDebug(kpLogTools) << "\t\tnormalizedRect=" << normalizedRect
<< " kpTextSelection::preferredMinimumSize="
<< QSize (minimumWidth, minimumHeight)
<< endl;
diff --git a/tools/selection/text/kpToolText_CursorCalc.cpp b/tools/selection/text/kpToolText_CursorCalc.cpp
index a6d16b0..19908f0 100644
--- a/tools/selection/text/kpToolText_CursorCalc.cpp
+++ b/tools/selection/text/kpToolText_CursorCalc.cpp
@@ -33,7 +33,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "document/kpDocument.h"
diff --git a/tools/selection/text/kpToolText_InputMethodEvents.cpp b/tools/selection/text/kpToolText_InputMethodEvents.cpp
index 09bc698..c573e74 100644
--- a/tools/selection/text/kpToolText_InputMethodEvents.cpp
+++ b/tools/selection/text/kpToolText_InputMethodEvents.cpp
@@ -36,7 +36,7 @@
#include <qevent.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "layers/selections/text/kpTextSelection.h"
@@ -48,7 +48,7 @@
void kpToolText::inputMethodEvent (QInputMethodEvent *e)
{
#if DEBUG_KP_TOOL_TEXT && 1
- kDebug () << "kpToolText::inputMethodEvent() preeditString='" << e->preeditString ()
+ qCDebug(kpLogTools) << "kpToolText::inputMethodEvent() preeditString='" << e->preeditString ()
<< "commitString = " << e->commitString ()
<< " replacementStart=" << e->replacementStart ()
<< " replacementLength=" << e->replacementLength ()
diff --git a/tools/selection/text/kpToolText_KeyboardEvents.cpp b/tools/selection/text/kpToolText_KeyboardEvents.cpp
index 7a0a101..9eed177 100644
--- a/tools/selection/text/kpToolText_KeyboardEvents.cpp
+++ b/tools/selection/text/kpToolText_KeyboardEvents.cpp
@@ -34,7 +34,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -60,7 +60,7 @@ bool kpToolText::viewEvent (QEvent *e)
const bool haveTextSelection = document ()->textSelection ();
#if DEBUG_KP_TOOL_TEXT && 0
- kDebug () << "kpToolText::viewEvent() type=" << e->type ()
+ qCDebug(kpLogTools) << "kpToolText::viewEvent() type=" << e->type ()
<< " isShortcutOverrideEvent=" << isShortcutOverrideEvent
<< " haveTextSel=" << haveTextSelection
<< endl;
@@ -71,7 +71,7 @@ bool kpToolText::viewEvent (QEvent *e)
QKeyEvent *ke = static_cast <QKeyEvent *> (e);
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::viewEvent() key=" << ke->key ()
+ qCDebug(kpLogTools) << "kpToolText::viewEvent() key=" << ke->key ()
<< " modifiers=" << ke->modifiers ()
<< " QChar.isPrint()=" << QChar (ke->key ()).isPrint ()
<< endl;
@@ -81,7 +81,7 @@ bool kpToolText::viewEvent (QEvent *e)
if (ke->key () == 0 && ke->key () == Qt::Key_unknown)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tcan't be shortcut - safe to not react";
+ qCDebug(kpLogTools) << "\tcan't be shortcut - safe to not react";
#endif
}
// Normal letter (w/ or w/o shift, keypad button ok)?
@@ -91,7 +91,7 @@ bool kpToolText::viewEvent (QEvent *e)
!( ke->text ().isEmpty ()))
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tis text - grab";
+ qCDebug(kpLogTools) << "\tis text - grab";
#endif
e->accept ();
}
@@ -110,7 +110,7 @@ bool kpToolText::viewEvent (QEvent *e)
void kpToolText::keyPressEvent (QKeyEvent *e)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::keyPressEvent(e->text='" << e->text () << "')";
+ qCDebug(kpLogTools) << "kpToolText::keyPressEvent(e->text='" << e->text () << "')";
#endif
@@ -120,7 +120,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (hasBegunDraw ())
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\talready began draw with mouse - passing on event to kpTool";
+ qCDebug(kpLogTools) << "\talready began draw with mouse - passing on event to kpTool";
#endif
kpAbstractSelectionTool::keyPressEvent (e);
return;
@@ -132,7 +132,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (!textSel)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tno text sel - passing on event to kpTool";
+ qCDebug(kpLogTools) << "\tno text sel - passing on event to kpTool";
#endif
//if (hasBegunShape ())
// endShape (currentPoint (), normalizedRect ());
@@ -201,7 +201,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (!e->isAccepted ())
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tkey processing did not accept (text was '"
+ qCDebug(kpLogTools) << "\tkey processing did not accept (text was '"
<< e->text ()
<< "') - passing on event to kpAbstractSelectionTool"
<< endl;
diff --git a/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp b/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp
index 7982246..986e57c 100644
--- a/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp
+++ b/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp
@@ -34,7 +34,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -57,7 +57,7 @@ void kpToolText::handleUpKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tup pressed";
+ qCDebug(kpLogTools) << "\tup pressed";
#endif
if (hasBegunShape ())
@@ -78,7 +78,7 @@ void kpToolText::handleDownKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tdown pressed";
+ qCDebug(kpLogTools) << "\tdown pressed";
#endif
if (hasBegunShape ())
@@ -99,7 +99,7 @@ void kpToolText::handleLeftKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tleft pressed";
+ qCDebug(kpLogTools) << "\tleft pressed";
#endif
if (hasBegunShape ())
@@ -110,7 +110,7 @@ void kpToolText::handleLeftKeyPress (QKeyEvent *e,
if ((e->modifiers () & Qt::ControlModifier) == 0)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tmove single char";
+ qCDebug(kpLogTools) << "\tmove single char";
#endif
MoveCursorLeft (textLines, &cursorRow, &cursorCol);
@@ -119,7 +119,7 @@ void kpToolText::handleLeftKeyPress (QKeyEvent *e,
else
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tmove to start of word";
+ qCDebug(kpLogTools) << "\tmove to start of word";
#endif
MoveCursorToWordStart (textLines, &cursorRow, &cursorCol);
@@ -135,7 +135,7 @@ void kpToolText::handleRightKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tright pressed";
+ qCDebug(kpLogTools) << "\tright pressed";
#endif
if (hasBegunShape ())
@@ -146,7 +146,7 @@ void kpToolText::handleRightKeyPress (QKeyEvent *e,
if ((e->modifiers () & Qt::ControlModifier) == 0)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tmove single char";
+ qCDebug(kpLogTools) << "\tmove single char";
#endif
MoveCursorRight (textLines, &cursorRow, &cursorCol);
@@ -155,7 +155,7 @@ void kpToolText::handleRightKeyPress (QKeyEvent *e,
else
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tmove to start of next word";
+ qCDebug(kpLogTools) << "\tmove to start of next word";
#endif
MoveCursorToNextWordStart (textLines, &cursorRow, &cursorCol);
@@ -172,7 +172,7 @@ void kpToolText::handleHomeKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\thome pressed";
+ qCDebug(kpLogTools) << "\thome pressed";
#endif
if (hasBegunShape ())
@@ -196,7 +196,7 @@ void kpToolText::handleEndKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tend pressed";
+ qCDebug(kpLogTools) << "\tend pressed";
#endif
if (hasBegunShape ())
diff --git a/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp b/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp
index d47491b..9988e5d 100644
--- a/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp
+++ b/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp
@@ -34,7 +34,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -59,7 +59,7 @@ void kpToolText::handleBackspaceKeyPress (QKeyEvent *e,
const QList <QString> &textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tbackspace pressed";
+ qCDebug(kpLogTools) << "\tbackspace pressed";
#endif
if (!textLines.isEmpty ())
@@ -101,7 +101,7 @@ void kpToolText::handleDeleteKeyPress (QKeyEvent *e,
const QList <QString> & textLines, int cursorRow, int cursorCol)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tdelete pressed";
+ qCDebug(kpLogTools) << "\tdelete pressed";
#endif
if (!textLines.isEmpty ())
@@ -148,7 +148,7 @@ void kpToolText::handleEnterKeyPress (QKeyEvent *e,
const QList <QString> & /*textLines*/, int /*cursorRow*/, int /*cursorCol*/)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tenter pressed";
+ qCDebug(kpLogTools) << "\tenter pressed";
#endif
// It's OK for <textLines> to be empty.
@@ -168,7 +168,7 @@ void kpToolText::handleTextTyped (QKeyEvent *e,
const QList <QString> & /*textLines*/, int /*cursorRow*/, int /*cursorCol*/)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\ttext=" << e->text();
+ qCDebug(kpLogTools) << "\ttext=" << e->text();
#endif
QString usableText;
for (int i = 0; i < (int) e->text ().length (); i++)
@@ -177,7 +177,7 @@ void kpToolText::handleTextTyped (QKeyEvent *e,
usableText += e->text ().at (i);
}
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tusableText=" << usableText;
+ qCDebug(kpLogTools) << "\tusableText=" << usableText;
#endif
if (usableText.isEmpty ())
diff --git a/tools/selection/text/kpToolText_SelectText.cpp b/tools/selection/text/kpToolText_SelectText.cpp
index 397e723..7e081bc 100644
--- a/tools/selection/text/kpToolText_SelectText.cpp
+++ b/tools/selection/text/kpToolText_SelectText.cpp
@@ -31,7 +31,7 @@
#include "tools/selection/text/kpToolText.h"
#include "kpToolTextPrivate.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "layers/selections/text/kpTextSelection.h"
@@ -67,7 +67,7 @@ void kpToolText::setCursorSelectText ()
void kpToolText::beginDrawSelectText ()
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\t\tis select cursor pos";
+ qCDebug(kpLogTools) << "\t\tis select cursor pos";
#endif
kpTextSelection *textSel = document ()->textSelection ();
Q_ASSERT (textSel);
@@ -85,9 +85,9 @@ void kpToolText::beginDrawSelectText ()
}
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\t\t\told: row=" << viewManager ()->textCursorRow ()
+ qCDebug(kpLogTools) << "\t\t\told: row=" << viewManager ()->textCursorRow ()
<< "col=" << viewManager ()->textCursorCol ();
- kDebug () << "\t\t\tnew: row=" << newRow << "col=" << newCol;
+ qCDebug(kpLogTools) << "\t\t\tnew: row=" << newRow << "col=" << newCol;
#endif
viewManager ()->setTextCursorPosition (newRow, newCol);
}
diff --git a/tools/selection/text/kpToolText_TextStyle.cpp b/tools/selection/text/kpToolText_TextStyle.cpp
index 1e441e3..829939e 100644
--- a/tools/selection/text/kpToolText_TextStyle.cpp
+++ b/tools/selection/text/kpToolText_TextStyle.cpp
@@ -34,7 +34,7 @@
#include <qevent.h>
#include <qlist.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "commands/kpCommandHistory.h"
@@ -59,7 +59,7 @@ bool kpToolText::shouldChangeTextStyle () const
if (environ ()->settingTextStyle ())
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\trecursion - abort setting text style: "
+ qCDebug(kpLogTools) << "\trecursion - abort setting text style: "
<< environ ()->settingTextStyle ()
<< endl;
#endif
@@ -69,7 +69,7 @@ bool kpToolText::shouldChangeTextStyle () const
if (!document ()->textSelection ())
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "\tno text selection - abort setting text style";
+ qCDebug(kpLogTools) << "\tno text selection - abort setting text style";
#endif
return false;
}
@@ -83,7 +83,7 @@ void kpToolText::changeTextStyle (const QString &name,
const kpTextStyle &oldTextStyle)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::changeTextStyle(" << name << ")";
+ qCDebug(kpLogTools) << "kpToolText::changeTextStyle(" << name << ")";
#endif
if (hasBegunShape ())
@@ -102,7 +102,7 @@ void kpToolText::changeTextStyle (const QString &name,
void kpToolText::slotIsOpaqueChanged (bool isOpaque)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotIsOpaqueChanged()";
+ qCDebug(kpLogTools) << "kpToolText::slotIsOpaqueChanged()";
#endif
if (!shouldChangeTextStyle ())
@@ -125,7 +125,7 @@ void kpToolText::slotColorsSwapped (const kpColor &newForegroundColor,
const kpColor &newBackgroundColor)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotColorsSwapped()";
+ qCDebug(kpLogTools) << "kpToolText::slotColorsSwapped()";
#endif
if (!shouldChangeTextStyle ())
@@ -146,7 +146,7 @@ void kpToolText::slotColorsSwapped (const kpColor &newForegroundColor,
void kpToolText::slotForegroundColorChanged (const kpColor & /*color*/)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotForegroundColorChanged()";
+ qCDebug(kpLogTools) << "kpToolText::slotForegroundColorChanged()";
#endif
if (!shouldChangeTextStyle ())
@@ -166,7 +166,7 @@ void kpToolText::slotForegroundColorChanged (const kpColor & /*color*/)
void kpToolText::slotBackgroundColorChanged (const kpColor & /*color*/)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotBackgroundColorChanged()";
+ qCDebug(kpLogTools) << "kpToolText::slotBackgroundColorChanged()";
#endif
if (!shouldChangeTextStyle ())
@@ -195,7 +195,7 @@ void kpToolText::slotFontFamilyChanged (const QString &fontFamily,
const QString &oldFontFamily)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotFontFamilyChanged() new="
+ qCDebug(kpLogTools) << "kpToolText::slotFontFamilyChanged() new="
<< fontFamily
<< " old="
<< oldFontFamily
@@ -222,7 +222,7 @@ void kpToolText::slotFontFamilyChanged (const QString &fontFamily,
void kpToolText::slotFontSizeChanged (int fontSize, int oldFontSize)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotFontSizeChanged() new="
+ qCDebug(kpLogTools) << "kpToolText::slotFontSizeChanged() new="
<< fontSize
<< " old="
<< oldFontSize
@@ -250,7 +250,7 @@ void kpToolText::slotFontSizeChanged (int fontSize, int oldFontSize)
void kpToolText::slotBoldChanged (bool isBold)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotBoldChanged(" << isBold << ")";
+ qCDebug(kpLogTools) << "kpToolText::slotBoldChanged(" << isBold << ")";
#endif
if (!shouldChangeTextStyle ())
@@ -271,7 +271,7 @@ void kpToolText::slotBoldChanged (bool isBold)
void kpToolText::slotItalicChanged (bool isItalic)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotItalicChanged(" << isItalic << ")";
+ qCDebug(kpLogTools) << "kpToolText::slotItalicChanged(" << isItalic << ")";
#endif
if (!shouldChangeTextStyle ())
@@ -292,7 +292,7 @@ void kpToolText::slotItalicChanged (bool isItalic)
void kpToolText::slotUnderlineChanged (bool isUnderline)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotUnderlineChanged(" << isUnderline << ")";
+ qCDebug(kpLogTools) << "kpToolText::slotUnderlineChanged(" << isUnderline << ")";
#endif
if (!shouldChangeTextStyle ())
@@ -313,7 +313,7 @@ void kpToolText::slotUnderlineChanged (bool isUnderline)
void kpToolText::slotStrikeThruChanged (bool isStrikeThru)
{
#if DEBUG_KP_TOOL_TEXT
- kDebug () << "kpToolText::slotStrikeThruChanged(" << isStrikeThru << ")";
+ qCDebug(kpLogTools) << "kpToolText::slotStrikeThruChanged(" << isStrikeThru << ")";
#endif
if (!shouldChangeTextStyle ())
diff --git a/views/kpThumbnailView.cpp b/views/kpThumbnailView.cpp
index 9407851..03461f6 100644
--- a/views/kpThumbnailView.cpp
+++ b/views/kpThumbnailView.cpp
@@ -31,7 +31,7 @@
#include "views/kpThumbnailView.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
kpThumbnailView::kpThumbnailView (kpDocument *document,
@@ -57,7 +57,7 @@ kpThumbnailView::~kpThumbnailView ()
void kpThumbnailView::setMaskToCoverDocument ()
{
#if DEBUG_KP_THUMBNAIL_VIEW
- kDebug () << "kpThumbnailView::setMaskToCoverDocument()"
+ qCDebug(kpLogViews) << "kpThumbnailView::setMaskToCoverDocument()"
<< " origin=" << origin ()
<< " zoomedDoc: width=" << zoomedDocWidth ()
<< " height=" << zoomedDocHeight ()
@@ -73,7 +73,7 @@ void kpThumbnailView::setMaskToCoverDocument ()
void kpThumbnailView::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_THUMBNAIL_VIEW
- kDebug () << "kpThumbnailView(" << name () << ")::resizeEvent()"
+ qCDebug(kpLogViews) << "kpThumbnailView(" << name () << ")::resizeEvent()"
<< endl;
#endif
diff --git a/views/kpUnzoomedThumbnailView.cpp b/views/kpUnzoomedThumbnailView.cpp
index b574c94..0cb2fc4 100644
--- a/views/kpUnzoomedThumbnailView.cpp
+++ b/views/kpUnzoomedThumbnailView.cpp
@@ -31,7 +31,7 @@
#include "views/kpUnzoomedThumbnailView.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "document/kpDocument.h"
@@ -102,7 +102,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
buddyViewScrollableContainer ()->verticalScrollBar()->value();
#if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW
- kDebug () << "kpUnzoomedThumbnailView(" << name ()
+ qCDebug(kpLogViews) << "kpUnzoomedThumbnailView(" << name ()
<< ")::adjustToEnvironment("
<< scrollViewContentsX
<< ","
@@ -120,7 +120,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
x = (int) buddyView ()->transformViewToDocX (scrollViewContentsX);
const int rightMostAllowedX = qMax (0, document ()->width () - width ());
#if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW
- kDebug () << "\tdocX=" << x
+ qCDebug(kpLogViews) << "\tdocX=" << x
<< " docWidth=" << document ()->width ()
<< " rightMostAllowedX=" << rightMostAllowedX
<< endl;
@@ -143,7 +143,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
y = (int) buddyView ()->transformViewToDocY (scrollViewContentsY);
const int bottomMostAllowedY = qMax (0, document ()->height () - height ());
#if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW
- kDebug () << "\tdocY=" << y
+ qCDebug(kpLogViews) << "\tdocY=" << y
<< " docHeight=" << document ()->height ()
<< " bottomMostAllowedY=" << bottomMostAllowedY
<< endl;
@@ -173,7 +173,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
qMin (buddyView ()->height (), buddyViewScrollableContainer ()->viewport()->height ())));
x = docRect.x () - (width () - docRect.width ()) / 2;
- kDebug () << "\tnew suggest x=" << x;
+ qCDebug(kpLogViews) << "\tnew suggest x=" << x;
const int rightMostAllowedX = qMax (0, document ()->width () - width ());
if (x < 0)
x = 0;
@@ -181,7 +181,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
x = rightMostAllowedX;
y = docRect.y () - (height () - docRect.height ()) / 2;
- kDebug () << "\tnew suggest y=" << y;
+ qCDebug(kpLogViews) << "\tnew suggest y=" << y;
const int bottomMostAllowedY = qMax (0, document ()->height () - height ());
if (y < 0)
y = 0;
diff --git a/views/kpView.cpp b/views/kpView.cpp
index ad95ca4..9123e9e 100644
--- a/views/kpView.cpp
+++ b/views/kpView.cpp
@@ -44,7 +44,7 @@
#include <qregion.h>
#include <QScrollBar>
-#include <KDebug>
+#include "kpLogCategories.h"
#include "kpDefs.h"
#include "document/kpDocument.h"
@@ -205,13 +205,13 @@ QPoint kpView::origin () const
void kpView::setOrigin (const QPoint &origin)
{
#if DEBUG_KP_VIEW
- kDebug () << "kpView(" << objectName () << ")::setOrigin" << origin;
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::setOrigin" << origin;
#endif
if (origin == d->origin)
{
#if DEBUG_KP_VIEW
- kDebug () << "\tNOP";
+ qCDebug(kpLogViews) << "\tNOP";
#endif
return;
}
@@ -538,7 +538,7 @@ void kpView::setHasMouse (bool yes)
return;
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName ()
+ qCDebug(kpLogViews) << "kpView(" << objectName ()
<< ")::setHasMouse(" << yes
<< ") existing viewUnderCursor="
<< (vm->viewUnderCursor () ? vm->viewUnderCursor ()->objectName () : "(none)")
@@ -556,7 +556,7 @@ void kpView::setHasMouse (bool yes)
void kpView::addToQueuedArea (const QRegion &region)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName ()
+ qCDebug(kpLogViews) << "kpView(" << objectName ()
<< ")::addToQueuedArea() already=" << d->queuedUpdateArea
<< " - plus - " << region
<< endl;
@@ -570,7 +570,7 @@ void kpView::addToQueuedArea (const QRegion &region)
void kpView::addToQueuedArea (const QRect &rect)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName ()
+ qCDebug(kpLogViews) << "kpView(" << objectName ()
<< ")::addToQueuedArea() already=" << d->queuedUpdateArea
<< " - plus - " << rect
<< endl;
@@ -584,7 +584,7 @@ void kpView::addToQueuedArea (const QRect &rect)
void kpView::invalidateQueuedArea ()
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView::invalidateQueuedArea()";
+ qCDebug(kpLogViews) << "kpView::invalidateQueuedArea()";
#endif
d->queuedUpdateArea = QRegion ();
@@ -597,7 +597,7 @@ void kpView::updateQueuedArea ()
{
kpViewManager *vm = viewManager ();
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName ()
+ qCDebug(kpLogViews) << "kpView(" << objectName ()
<< ")::updateQueuedArea() vm=" << (bool) vm
<< " queueUpdates=" << (vm && vm->queueUpdates ())
<< " fastUpdates=" << (vm && vm->fastUpdates ())
@@ -638,7 +638,7 @@ QPoint kpView::mouseViewPoint (const QPoint &returnViewPoint) const
QVariant kpView::inputMethodQuery (Qt::InputMethodQuery query) const
{
#if DEBUG_KP_VIEW && 1
- kDebug () << "kpView(" << objectName () << ")::inputMethodQuery()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::inputMethodQuery()";
#endif
QVariant ret;
switch (query)
diff --git a/views/kpView_Events.cpp b/views/kpView_Events.cpp
index 9a9d2df..96caeb3 100644
--- a/views/kpView_Events.cpp
+++ b/views/kpView_Events.cpp
@@ -36,7 +36,7 @@
#include "kpViewPrivate.h"
#if DEBUG_KP_VIEW
-#include <KDebug>
+#include "kpLogCategories.h"
#endif
#include <QKeyEvent>
@@ -44,7 +44,7 @@
#include "tools/kpTool.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
@@ -52,7 +52,7 @@
void kpView::mouseMoveEvent (QMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::mouseMoveEvent ("
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::mouseMoveEvent ("
<< e->x () << "," << e->y () << ")"
<< endl;
#endif
@@ -72,7 +72,7 @@ void kpView::mouseMoveEvent (QMouseEvent *e)
void kpView::mousePressEvent (QMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::mousePressEvent ("
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::mousePressEvent ("
<< e->x () << "," << e->y () << ")"
<< endl;
#endif
@@ -91,7 +91,7 @@ void kpView::mousePressEvent (QMouseEvent *e)
void kpView::mouseReleaseEvent (QMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::mouseReleaseEvent ("
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::mouseReleaseEvent ("
<< e->x () << "," << e->y () << ")"
<< endl;
#endif
@@ -119,7 +119,7 @@ void kpView::wheelEvent (QWheelEvent *e)
void kpView::keyPressEvent (QKeyEvent *e)
{
#if DEBUG_KP_VIEW
- kDebug () << "kpView(" << objectName () << ")::keyPressEvent()" << e->text();
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::keyPressEvent()" << e->text();
#endif
if (tool ())
@@ -134,7 +134,7 @@ void kpView::keyPressEvent (QKeyEvent *e)
void kpView::keyReleaseEvent (QKeyEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::keyReleaseEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::keyReleaseEvent()";
#endif
if (tool ())
@@ -149,7 +149,7 @@ void kpView::keyReleaseEvent (QKeyEvent *e)
void kpView::inputMethodEvent (QInputMethodEvent *e)
{
#if DEBUG_KP_VIEW && 1
- kDebug () << "kpView(" << objectName () << ")::inputMethodEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::inputMethodEvent()";
#endif
if (tool ())
@@ -161,18 +161,18 @@ void kpView::inputMethodEvent (QInputMethodEvent *e)
bool kpView::event (QEvent *e)
{
#if DEBUG_KP_VIEW
- kDebug () << "kpView::event() invoking kpTool::event()";
+ qCDebug(kpLogViews) << "kpView::event() invoking kpTool::event()";
#endif
if (tool () && tool ()->viewEvent (e))
{
#if DEBUG_KP_VIEW
- kDebug () << "\tkpView::event() - tool said eat event, ret true";
+ qCDebug(kpLogViews) << "\tkpView::event() - tool said eat event, ret true";
#endif
return true;
}
#if DEBUG_KP_VIEW
- kDebug () << "\tkpView::event() - no tool or said false, call QWidget::event()";
+ qCDebug(kpLogViews) << "\tkpView::event() - no tool or said false, call QWidget::event()";
#endif
return QWidget::event (e);
}
@@ -182,7 +182,7 @@ bool kpView::event (QEvent *e)
void kpView::focusInEvent (QFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::focusInEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::focusInEvent()";
#endif
if (tool ())
tool ()->focusInEvent (e);
@@ -192,7 +192,7 @@ void kpView::focusInEvent (QFocusEvent *e)
void kpView::focusOutEvent (QFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::focusOutEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::focusOutEvent()";
#endif
if (tool ())
tool ()->focusOutEvent (e);
@@ -203,7 +203,7 @@ void kpView::focusOutEvent (QFocusEvent *e)
void kpView::enterEvent (QEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::enterEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::enterEvent()";
#endif
// Don't call setHasMouse(true) as it displays the brush cursor (if
@@ -225,7 +225,7 @@ void kpView::enterEvent (QEvent *e)
void kpView::leaveEvent (QEvent *e)
{
#if DEBUG_KP_VIEW && 0
- kDebug () << "kpView(" << objectName () << ")::leaveEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::leaveEvent()";
#endif
setHasMouse (false);
@@ -238,7 +238,7 @@ void kpView::leaveEvent (QEvent *e)
void kpView::dragEnterEvent (QDragEnterEvent *)
{
#if DEBUG_KP_VIEW && 1
- kDebug () << "kpView(" << objectName () << ")::dragEnterEvent()";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::dragEnterEvent()";
#endif
setHasMouse (true);
@@ -248,7 +248,7 @@ void kpView::dragEnterEvent (QDragEnterEvent *)
void kpView::dragLeaveEvent (QDragLeaveEvent *)
{
#if DEBUG_KP_VIEW && 1
- kDebug () << "kpView(" << objectName () << ")::dragLeaveEvent";
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::dragLeaveEvent";
#endif
setHasMouse (false);
@@ -259,7 +259,7 @@ void kpView::dragLeaveEvent (QDragLeaveEvent *)
void kpView::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_VIEW && 1
- kDebug () << "kpView(" << objectName () << ")::resizeEvent("
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::resizeEvent("
<< e->size ()
<< " vs actual=" << size ()
<< ") old=" << e->oldSize () << endl;
diff --git a/views/kpView_Paint.cpp b/views/kpView_Paint.cpp
index a5d4f4d..49db106 100644
--- a/views/kpView_Paint.cpp
+++ b/views/kpView_Paint.cpp
@@ -38,7 +38,7 @@
#include <QTime>
#include <QScrollBar>
-#include <KDebug>
+#include "kpLogCategories.h"
#include "layers/selections/kpAbstractSelection.h"
#include "imagelib/kpColor.h"
@@ -54,7 +54,7 @@
QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView::paintEventGetDocRect(" << viewRect << ")";
+ qCDebug(kpLogViews) << "kpView::paintEventGetDocRect(" << viewRect << ")";
#endif
QRect docRect;
@@ -80,14 +80,14 @@ QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
}
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tdocRect=" << docRect;
+ qCDebug(kpLogViews) << "\tdocRect=" << docRect;
#endif
kpDocument *doc = document ();
if (doc)
{
docRect = docRect.intersected (doc->rect ());
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tintersected with doc=" << docRect;
+ qCDebug(kpLogViews) << "\tintersected with doc=" << docRect;
#endif
}
@@ -103,7 +103,7 @@ void kpView::drawTransparentBackground (QPainter *painter,
bool isPreview)
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView::drawTransparentBackground() patternOrigin="
+ qCDebug(kpLogViews) << "kpView::drawTransparentBackground() patternOrigin="
<< patternOrigin
<< " viewRect=" << viewRect
<< " isPreview=" << isPreview
@@ -123,7 +123,7 @@ void kpView::drawTransparentBackground (QPainter *painter,
startx -= ((startx - patternOrigin.x ()) % cellSize);
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tstartXY=" << QPoint (startx, starty);
+ qCDebug(kpLogViews) << "\tstartXY=" << QPoint (startx, starty);
#endif
painter->save ();
@@ -162,7 +162,7 @@ void kpView::drawTransparentBackground (QPainter *painter,
void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRect)
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView(" << objectName ()
+ qCDebug(kpLogViews) << "kpView(" << objectName ()
<< ")::paintEventDrawCheckerBoard(viewRect=" << viewRect
<< ") origin=" << origin () << endl;
#endif
@@ -176,7 +176,7 @@ void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRec
if (scrollableContainer ())
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tscrollableContainer: contents[XY]="
+ qCDebug(kpLogViews) << "\tscrollableContainer: contents[XY]="
<< QPoint (scrollableContainer ()->horizontalScrollBar()->value (),
scrollableContainer ()->verticalScrollBar()->value ())
<< endl;
@@ -188,7 +188,7 @@ void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRec
patternOrigin = QPoint (scrollableContainer ()->horizontalScrollBar()->value(),
scrollableContainer ()->verticalScrollBar()->value());
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\t\tpatternOrigin=" << patternOrigin;
+ qCDebug(kpLogViews) << "\t\tpatternOrigin=" << patternOrigin;
#endif
}
@@ -204,14 +204,14 @@ void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRec
void kpView::paintEventDrawSelection (QImage *destPixmap, const QRect &docRect)
{
#if DEBUG_KP_VIEW_RENDERER && 1 || 0
- kDebug () << "kpView::paintEventDrawSelection() docRect=" << docRect;
+ qCDebug(kpLogViews) << "kpView::paintEventDrawSelection() docRect=" << docRect;
#endif
kpDocument *doc = document ();
if (!doc)
{
#if DEBUG_KP_VIEW_RENDERER && 1 || 0
- kDebug () << "\tno doc - abort";
+ qCDebug(kpLogViews) << "\tno doc - abort";
#endif
return;
}
@@ -220,7 +220,7 @@ void kpView::paintEventDrawSelection (QImage *destPixmap, const QRect &docRect)
if (!sel)
{
#if DEBUG_KP_VIEW_RENDERER && 1 || 0
- kDebug () << "\tno sel - abort";
+ qCDebug(kpLogViews) << "\tno sel - abort";
#endif
return;
}
@@ -230,7 +230,7 @@ void kpView::paintEventDrawSelection (QImage *destPixmap, const QRect &docRect)
// Draw selection pixmap (if there is one)
//
#if DEBUG_KP_VIEW_RENDERER && 1 || 0
- kDebug () << "\tdraw sel pixmap @ " << sel->topLeft ();
+ qCDebug(kpLogViews) << "\tdraw sel pixmap @ " << sel->topLeft ();
#endif
sel->paint (destPixmap, docRect);
@@ -241,7 +241,7 @@ void kpView::paintEventDrawSelection (QImage *destPixmap, const QRect &docRect)
kpViewManager *vm = viewManager ();
#if DEBUG_KP_VIEW_RENDERER && 1 || 0
- kDebug () << "\tsel border visible="
+ qCDebug(kpLogViews) << "\tsel border visible="
<< vm->selectionBorderVisible ()
<< endl;
#endif
@@ -288,14 +288,14 @@ void kpView::paintEventDrawSelection (QImage *destPixmap, const QRect &docRect)
void kpView::paintEventDrawSelectionResizeHandles (const QRect &clipRect)
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView::paintEventDrawSelectionResizeHandles("
+ qCDebug(kpLogViews) << "kpView::paintEventDrawSelectionResizeHandles("
<< clipRect << ")" << endl;
#endif
if (!selectionLargeEnoughToHaveResizeHandles ())
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tsel not large enough to have resize handles";
+ qCDebug(kpLogViews) << "\tsel not large enough to have resize handles";
#endif
return;
}
@@ -304,7 +304,7 @@ void kpView::paintEventDrawSelectionResizeHandles (const QRect &clipRect)
if (!vm || !vm->selectionBorderVisible () || !vm->selectionBorderFinished ())
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tsel border not visible or not finished";
+ qCDebug(kpLogViews) << "\tsel border not visible or not finished";
#endif
return;
@@ -312,19 +312,19 @@ void kpView::paintEventDrawSelectionResizeHandles (const QRect &clipRect)
const QRect selViewRect = selectionViewRect ();
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tselViewRect=" << selViewRect;
+ qCDebug(kpLogViews) << "\tselViewRect=" << selViewRect;
#endif
if (!selViewRect.intersects (clipRect))
{
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tdoesn't intersect viewRect";
+ qCDebug(kpLogViews) << "\tdoesn't intersect viewRect";
#endif
return;
}
QRegion selResizeHandlesRegion = selectionResizeHandlesViewRegion (true/*for renderer*/);
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tsel resize handles view region="
+ qCDebug(kpLogViews) << "\tsel resize handles view region="
<< selResizeHandlesRegion << endl;
#endif
@@ -347,7 +347,7 @@ void kpView::paintEventDrawTempImage (QImage *destPixmap, const QRect &docRect)
const kpTempImage *tpi = vm->tempImage ();
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView::paintEventDrawTempImage() tempImage="
+ qCDebug(kpLogViews) << "kpView::paintEventDrawTempImage() tempImage="
<< tpi
<< " isVisible="
<< (tpi ? tpi->isVisible (vm) : false)
@@ -423,7 +423,7 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
#if DEBUG_KP_VIEW_RENDERER
QTime timer;
timer.start ();
- kDebug () << "\tviewRect=" << viewRect;
+ qCDebug(kpLogViews) << "\tviewRect=" << viewRect;
#endif
kpViewManager *vm = viewManager ();
@@ -438,7 +438,7 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
QRect docRect = paintEventGetDocRect (viewRect);
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tdocRect=" << docRect;
+ qCDebug(kpLogViews) << "\tdocRect=" << docRect;
#endif
QPainter painter (this);
@@ -453,7 +453,7 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
docPixmap = doc->getImageAt (docRect);
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tdocPixmap.hasAlphaChannel()="
+ qCDebug(kpLogViews) << "\tdocPixmap.hasAlphaChannel()="
<< docPixmap.hasAlphaChannel () << endl;
#endif
@@ -464,7 +464,7 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
docRect.intersects (vm->tempImage ()->rect ()));
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\ttempImageWillBeRendered=" << tempImageWillBeRendered
+ qCDebug(kpLogViews) << "\ttempImageWillBeRendered=" << tempImageWillBeRendered
<< " (sel=" << doc->selection ()
<< " tempImage=" << vm->tempImage ()
<< " tempImage.isVisible=" << (vm->tempImage () ? vm->tempImage ()->isVisible (vm) : false)
@@ -501,7 +501,7 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
}
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\torigin=" << origin ();
+ qCDebug(kpLogViews) << "\torigin=" << origin ();
#endif
// Blit scaled version of docPixmap + tempImage.
#if DEBUG_KP_VIEW_RENDERER && 1
@@ -514,13 +514,13 @@ void kpView::paintEventDrawDoc_Unclipped (const QRect &viewRect)
painter.drawImage (docRect, docPixmap);
//painter.resetMatrix (); // back to 1-1 scaling
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tscale time=" << scaleTimer.elapsed ();
+ qCDebug(kpLogViews) << "\tscale time=" << scaleTimer.elapsed ();
#endif
} // if (!docRect.isEmpty ()) {
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tdrawDocRect done in: " << timer.restart () << "ms";
+ qCDebug(kpLogViews) << "\tdrawDocRect done in: " << timer.restart () << "ms";
#endif
}
@@ -541,7 +541,7 @@ void kpView::paintEvent (QPaintEvent *e)
kpViewManager *vm = viewManager ();
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "kpView(" << objectName () << ")::paintEvent() vm=" << (bool) vm
+ qCDebug(kpLogViews) << "kpView(" << objectName () << ")::paintEvent() vm=" << (bool) vm
<< " queueUpdates=" << (vm && vm->queueUpdates ())
<< " fastUpdates=" << (vm && vm->fastUpdates ())
<< " viewRect=" << e->rect ()
@@ -571,7 +571,7 @@ void kpView::paintEvent (QPaintEvent *e)
QRegion viewRegion = e->region ();
QVector <QRect> rects = viewRegion.rects ();
#if DEBUG_KP_VIEW_RENDERER
- kDebug () << "\t#rects = " << rects.count ();
+ qCDebug(kpLogViews) << "\t#rects = " << rects.count ();
#endif
// Draw all of the requested regions of the document _before_ drawing
@@ -621,7 +621,7 @@ void kpView::paintEvent (QPaintEvent *e)
}
#if DEBUG_KP_VIEW_RENDERER && 1
- kDebug () << "\tall done in: " << timer.restart () << "ms";
+ qCDebug(kpLogViews) << "\tall done in: " << timer.restart () << "ms";
#endif
}
diff --git a/views/kpView_Selections.cpp b/views/kpView_Selections.cpp
index f12ceeb..4b01575 100644
--- a/views/kpView_Selections.cpp
+++ b/views/kpView_Selections.cpp
@@ -238,14 +238,14 @@ QRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
{
#if DEBUG_KP_VIEW
- kDebug () << "kpView::mouseOnSelectionResizeHandle(viewPoint="
+ qCDebug(kpLogViews) << "kpView::mouseOnSelectionResizeHandle(viewPoint="
<< viewPoint << ")" << endl;
#endif
if (!mouseOnSelection (viewPoint))
{
#if DEBUG_KP_VIEW
- kDebug () << "\tmouse not on sel";
+ qCDebug(kpLogViews) << "\tmouse not on sel";
#endif
return 0;
}
@@ -253,19 +253,19 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
const QRect selViewRect = selectionViewRect ();
#if DEBUG_KP_VIEW
- kDebug () << "\tselViewRect=" << selViewRect;
+ qCDebug(kpLogViews) << "\tselViewRect=" << selViewRect;
#endif
const int atomicLength = selectionResizeHandleAtomicSize ();
#if DEBUG_KP_VIEW
- kDebug () << "\tatomicLength=" << atomicLength;
+ qCDebug(kpLogViews) << "\tatomicLength=" << atomicLength;
#endif
if (atomicLength <= 0)
{
#if DEBUG_KP_VIEW
- kDebug () << "\tsel not large enough to have resize handles";
+ qCDebug(kpLogViews) << "\tsel not large enough to have resize handles";
#endif
// Want to make it possible to move a small selection
return 0;
@@ -274,7 +274,7 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
const QPoint viewPointRelSel = mouseViewPointRelativeToSelection (viewPoint);
#if DEBUG_KP_VIEW
- kDebug () << "\tviewPointRelSel=" << viewPointRelSel;
+ qCDebug(kpLogViews) << "\tviewPointRelSel=" << viewPointRelSel;
#endif
@@ -320,7 +320,7 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
else
{
#if DEBUG_KP_VIEW
- kDebug () << "\tnot on sel resize handle";
+ qCDebug(kpLogViews) << "\tnot on sel resize handle";
#endif
return 0;
}
@@ -331,14 +331,14 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
bool kpView::mouseOnSelectionToSelectText (const QPoint &viewPoint) const
{
#if DEBUG_KP_VIEW
- kDebug () << "kpView::mouseOnSelectionToSelectText(viewPoint="
+ qCDebug(kpLogViews) << "kpView::mouseOnSelectionToSelectText(viewPoint="
<< viewPoint << ")" << endl;
#endif
if (!mouseOnSelection (viewPoint))
{
#if DEBUG_KP_VIEW
- kDebug () << "\tmouse non on sel";
+ qCDebug(kpLogViews) << "\tmouse non on sel";
#endif
return false;
}
@@ -346,13 +346,13 @@ bool kpView::mouseOnSelectionToSelectText (const QPoint &viewPoint) const
if (!textSelection ())
{
#if DEBUG_KP_VIEW
- kDebug () << "\tsel not text";
+ qCDebug(kpLogViews) << "\tsel not text";
#endif
return false;
}
#if DEBUG_KP_VIEW
- kDebug () << "\tmouse on sel: to move=" << mouseOnSelectionToMove ()
+ qCDebug(kpLogViews) << "\tmouse on sel: to move=" << mouseOnSelectionToMove ()
<< " to resize=" << mouseOnSelectionResizeHandle ()
<< endl;
#endif
diff --git a/views/kpZoomedThumbnailView.cpp b/views/kpZoomedThumbnailView.cpp
index e98518d..9e4fad3 100644
--- a/views/kpZoomedThumbnailView.cpp
+++ b/views/kpZoomedThumbnailView.cpp
@@ -31,7 +31,7 @@
#include "views/kpZoomedThumbnailView.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "document/kpDocument.h"
@@ -71,7 +71,7 @@ QString kpZoomedThumbnailView::caption () const
void kpZoomedThumbnailView::adjustToEnvironment ()
{
#if DEBUG_KP_ZOOMED_THUMBNAIL_VIEW
- kDebug () << "kpZoomedThumbnailView(" << name ()
+ qCDebug(kpLogViews) << "kpZoomedThumbnailView(" << name ()
<< ")::adjustToEnvironment()"
<< " width=" << width ()
<< " height=" << height ()
@@ -82,14 +82,14 @@ void kpZoomedThumbnailView::adjustToEnvironment ()
return;
#if DEBUG_KP_ZOOMED_THUMBNAIL_VIEW
- kDebug () << "\tdoc: width=" << document ()->width ()
+ qCDebug(kpLogViews) << "\tdoc: width=" << document ()->width ()
<< " height=" << document ()->height ()
<< endl;
#endif
if (document ()->width () <= 0 || document ()->height () <= 0)
{
- kError () << "kpZoomedThumbnailView::adjustToEnvironment() doc:"
+ qCCritical(kpLogViews) << "kpZoomedThumbnailView::adjustToEnvironment() doc:"
<< " width=" << document ()->width ()
<< " height=" << document ()->height ()
<< endl;
@@ -107,12 +107,12 @@ void kpZoomedThumbnailView::adjustToEnvironment ()
hzoom = vzoom;
#if DEBUG_KP_ZOOMED_THUMBNAIL_VIEW && 1
- kDebug () << "\tproposed zoom=" << hzoom;
+ qCDebug(kpLogViews) << "\tproposed zoom=" << hzoom;
#endif
if (hzoom > 100 || vzoom > 100)
{
#if DEBUG_KP_ZOOMED_THUMBNAIL_VIEW && 1
- kDebug () << "\twon't magnify - setting zoom to 100%";
+ qCDebug(kpLogViews) << "\twon't magnify - setting zoom to 100%";
#endif
hzoom = 100, vzoom = 100;
}
diff --git a/views/kpZoomedView.cpp b/views/kpZoomedView.cpp
index 8a5cf5d..c41422c 100644
--- a/views/kpZoomedView.cpp
+++ b/views/kpZoomedView.cpp
@@ -31,7 +31,7 @@
#include "views/kpZoomedView.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "document/kpDocument.h"
#include "views/kpView.h"
@@ -63,7 +63,7 @@ kpZoomedView::~kpZoomedView ()
void kpZoomedView::setZoomLevel (int hzoom, int vzoom)
{
#if DEBUG_KP_ZOOMED_VIEW
- kDebug () << "kpZoomedView(" << name () << ")::setZoomLevel("
+ qCDebug(kpLogViews) << "kpZoomedView(" << name () << ")::setZoomLevel("
<< hzoom << "," << vzoom << ")" << endl;
#endif
@@ -85,7 +85,7 @@ void kpZoomedView::setZoomLevel (int hzoom, int vzoom)
void kpZoomedView::adjustToEnvironment ()
{
#if DEBUG_KP_ZOOMED_VIEW
- kDebug () << "kpZoomedView(" << name () << ")::adjustToEnvironment()"
+ qCDebug(kpLogViews) << "kpZoomedView(" << name () << ")::adjustToEnvironment()"
<< " doc: width=" << document ()->width ()
<< " height=" << document ()->height ()
<< endl;
diff --git a/views/manager/kpViewManager.cpp b/views/manager/kpViewManager.cpp
index 7671b1f..cff1a5e 100644
--- a/views/manager/kpViewManager.cpp
+++ b/views/manager/kpViewManager.cpp
@@ -36,7 +36,7 @@
#include <qlist.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpDefs.h"
#include "document/kpDocument.h"
@@ -103,13 +103,13 @@ kpDocument *kpViewManager::document () const
void kpViewManager::registerView (kpView *view)
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::registerView (" << view << ")";
+ qCDebug(kpLogViews) << "kpViewManager::registerView (" << view << ")";
#endif
Q_ASSERT (view);
Q_ASSERT (!d->views.contains (view));
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "\tadded view";
+ qCDebug(kpLogViews) << "\tadded view";
#endif
view->setCursor (d->cursor);
d->views.append (view);
@@ -168,7 +168,7 @@ kpView *kpViewManager::viewUnderCursor (bool usingQt) const
void kpViewManager::setViewUnderCursor (kpView *view)
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::setViewUnderCursor ("
+ qCDebug(kpLogViews) << "kpViewManager::setViewUnderCursor ("
<< (view ? view->objectName () : "(none)") << ")"
<< " old=" << (d->viewUnderCursor ? d->viewUnderCursor->objectName () : "(none)")
<< endl;
@@ -187,7 +187,7 @@ void kpViewManager::setViewUnderCursor (kpView *view)
if (d->tempImage && d->tempImage->isBrush ())
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "\thiding brush pixmap since cursor left view";
+ qCDebug(kpLogViews) << "\thiding brush pixmap since cursor left view";
#endif
updateViews (d->tempImage->rect ());
}
@@ -197,7 +197,7 @@ void kpViewManager::setViewUnderCursor (kpView *view)
if (d->mainWindow->tool ())
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "\tnotify tool that something changed below cursor";
+ qCDebug(kpLogViews) << "\tnotify tool that something changed below cursor";
#endif
d->mainWindow->tool ()->somethingBelowTheCursorChanged ();
}
@@ -264,7 +264,7 @@ const kpTempImage *kpViewManager::tempImage () const
void kpViewManager::setTempImage (const kpTempImage &tempImage)
{
#if DEBUG_KP_VIEW_MANAGER
- kDebug () << "kpViewManager::setTempImage(isBrush="
+ qCDebug(kpLogViews) << "kpViewManager::setTempImage(isBrush="
<< tempImage.isBrush ()
<< ",topLeft=" << tempImage.topLeft ()
<< ",image.rect=" << tempImage.image ().rect ()
diff --git a/views/manager/kpViewManager_TextCursor.cpp b/views/manager/kpViewManager_TextCursor.cpp
index ffd8f28..a079d12 100644
--- a/views/manager/kpViewManager_TextCursor.cpp
+++ b/views/manager/kpViewManager_TextCursor.cpp
@@ -55,7 +55,7 @@
#include <qtimer.h>
//#include <QInputContext>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpDefs.h"
#include "document/kpDocument.h"
@@ -76,7 +76,7 @@ bool kpViewManager::textCursorEnabled () const
void kpViewManager::setTextCursorEnabled (bool yes)
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::setTextCursorEnabled(" << yes << ")";
+ qCDebug(kpLogViews) << "kpViewManager::setTextCursorEnabled(" << yes << ")";
#endif
if (yes == textCursorEnabled ())
@@ -203,7 +203,7 @@ QRect kpViewManager::textCursorRect () const
void kpViewManager::updateTextCursor ()
{
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "kpViewManager::updateTextCursor()";
+ qCDebug(kpLogViews) << "kpViewManager::updateTextCursor()";
#endif
const QRect r = textCursorRect ();
@@ -222,7 +222,7 @@ void kpViewManager::updateTextCursor ()
void kpViewManager::slotTextCursorBlink ()
{
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "kpViewManager::slotTextCursorBlink() cursorBlinkState="
+ qCDebug(kpLogViews) << "kpViewManager::slotTextCursorBlink() cursorBlinkState="
<< d->textCursorBlinkState << endl;
#endif
diff --git a/views/manager/kpViewManager_ViewUpdates.cpp b/views/manager/kpViewManager_ViewUpdates.cpp
index c572bef..a21e253 100644
--- a/views/manager/kpViewManager_ViewUpdates.cpp
+++ b/views/manager/kpViewManager_ViewUpdates.cpp
@@ -36,7 +36,7 @@
#include <qlist.h>
#include <qtimer.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpDefs.h"
#include "document/kpDocument.h"
@@ -58,7 +58,7 @@ void kpViewManager::setQueueUpdates ()
{
d->queueUpdatesCounter++;
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::setQueueUpdates() counter="
+ qCDebug(kpLogViews) << "kpViewManager::setQueueUpdates() counter="
<< d->queueUpdatesCounter << endl;
#endif
}
@@ -68,7 +68,7 @@ void kpViewManager::restoreQueueUpdates ()
{
d->queueUpdatesCounter--;
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::restoreQueueUpdates() counter="
+ qCDebug(kpLogViews) << "kpViewManager::restoreQueueUpdates() counter="
<< d->queueUpdatesCounter << endl;
#endif
Q_ASSERT (d->queueUpdatesCounter >= 0);
@@ -96,7 +96,7 @@ void kpViewManager::setFastUpdates ()
{
d->fastUpdatesCounter++;
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "kpViewManager::setFastUpdates() counter="
+ qCDebug(kpLogViews) << "kpViewManager::setFastUpdates() counter="
<< d->fastUpdatesCounter << endl;
#endif
}
@@ -106,7 +106,7 @@ void kpViewManager::restoreFastUpdates ()
{
d->fastUpdatesCounter--;
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "kpViewManager::restoreFastUpdates() counter="
+ qCDebug(kpLogViews) << "kpViewManager::restoreFastUpdates() counter="
<< d->fastUpdatesCounter << endl;
#endif
Q_ASSERT (d->fastUpdatesCounter >= 0);
@@ -199,7 +199,7 @@ void kpViewManager::updateViews ()
void kpViewManager::updateViews (const QRect &docRect)
{
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "kpViewManager::updateViews (" << docRect << ")";
+ qCDebug(kpLogViews) << "kpViewManager::updateViews (" << docRect << ")";
#endif
for (QLinkedList <kpView *>::const_iterator it = d->views.begin ();
@@ -209,12 +209,12 @@ void kpViewManager::updateViews (const QRect &docRect)
kpView *view = *it;
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "\tupdating view " << view->name ();
+ qCDebug(kpLogViews) << "\tupdating view " << view->name ();
#endif
if (view->zoomLevelX () % 100 == 0 && view->zoomLevelY () % 100 == 0)
{
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "\t\tviewRect=" << view->transformDocToView (docRect);
+ qCDebug(kpLogViews) << "\t\tviewRect=" << view->transformDocToView (docRect);
#endif
updateView (view, view->transformDocToView (docRect));
}
@@ -231,7 +231,7 @@ void kpViewManager::updateViews (const QRect &docRect)
.intersected (QRect (0, 0, view->width (), view->height ()));
#if DEBUG_KP_VIEW_MANAGER && 0
- kDebug () << "\t\tviewRect (+compensate)=" << newRect;
+ qCDebug(kpLogViews) << "\t\tviewRect (+compensate)=" << newRect;
#endif
updateView (view, newRect);
}
@@ -249,7 +249,7 @@ void kpViewManager::updateViews (int x, int y, int w, int h)
void kpViewManager::adjustViewsToEnvironment ()
{
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "kpViewManager::adjustViewsToEnvironment()"
+ qCDebug(kpLogViews) << "kpViewManager::adjustViewsToEnvironment()"
<< " numViews=" << d->views.count ()
<< endl;
#endif
@@ -260,7 +260,7 @@ void kpViewManager::adjustViewsToEnvironment ()
kpView *view = *it;
#if DEBUG_KP_VIEW_MANAGER && 1
- kDebug () << "\tview: " << view->name ()
+ qCDebug(kpLogViews) << "\tview: " << view->name ()
<< endl;
#endif
view->adjustToEnvironment ();
diff --git a/widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp b/widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp
index ca80199..908fec1 100644
--- a/widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp
+++ b/widgets/colorSimilarity/kpColorSimilarityCubeRenderer.cpp
@@ -36,7 +36,7 @@
#include <QPainter>
#include <QPolygonF>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "widgets/colorSimilarity/kpColorSimilarityHolder.h"
#include "kpDefs.h"
@@ -108,7 +108,7 @@ static void DrawFace (QPaintDevice *target,
int highlight)
{
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
- kDebug () << "kpColorSimilarityCubeRenderer.cpp:DrawFace(RorGorB=" << redOrGreenOrBlue
+ qCDebug(kpLogWidgets) << "kpColorSimilarityCubeRenderer.cpp:DrawFace(RorGorB=" << redOrGreenOrBlue
<< ",tl=" << tl
<< ",tr=" << tr
<< ",bl=" << bl
@@ -144,7 +144,7 @@ static void DrawFace (QPaintDevice *target,
};
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
- kDebug () << "\tmaxColorSimilarity=" << kpColorSimilarityHolder::MaxColorSimilarity
+ qCDebug(kpLogWidgets) << "\tmaxColorSimilarity=" << kpColorSimilarityHolder::MaxColorSimilarity
<< " colorCubeDiagDist=" << kpColorSimilarityHolder::ColorCubeDiagonalDistance
<< endl
<< "\tbaseBrightness=" << baseBrightness
diff --git a/widgets/colorSimilarity/kpColorSimilarityFrame.cpp b/widgets/colorSimilarity/kpColorSimilarityFrame.cpp
index 3d341f0..d03a87c 100644
--- a/widgets/colorSimilarity/kpColorSimilarityFrame.cpp
+++ b/widgets/colorSimilarity/kpColorSimilarityFrame.cpp
@@ -33,7 +33,7 @@
#include "kpColorSimilarityCubeRenderer.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
//---------------------------------------------------------------------
diff --git a/widgets/colorSimilarity/kpColorSimilarityHolder.cpp b/widgets/colorSimilarity/kpColorSimilarityHolder.cpp
index 01f1b1a..e250a9c 100644
--- a/widgets/colorSimilarity/kpColorSimilarityHolder.cpp
+++ b/widgets/colorSimilarity/kpColorSimilarityHolder.cpp
@@ -41,7 +41,7 @@
#include <qpixmap.h>
#include <qpolygon.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
@@ -174,7 +174,7 @@ double kpColorSimilarityHolder::colorSimilarity () const
void kpColorSimilarityHolder::setColorSimilarity (double similarity)
{
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
- kDebug () << "kpColorSimilarityHolder::setColorSimilarity(" << similarity << ")";
+ qCDebug(kpLogWidgets) << "kpColorSimilarityHolder::setColorSimilarity(" << similarity << ")";
#endif
if (m_colorSimilarity == similarity)
diff --git a/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp b/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
index 65692f2..4d4f649 100644
--- a/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
+++ b/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
@@ -86,7 +86,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarityInternal (double similarity
bool writeConfig)
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::setColorSimilarityInternal("
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::setColorSimilarityInternal("
<< "similarity=" << similarity << ",writeConfig=" << writeConfig
<< ")" << endl;
#endif
@@ -145,7 +145,7 @@ void kpColorSimilarityToolBarItem::openDialog ()
void kpColorSimilarityToolBarItem::slotFlashTimerTimeout ()
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::slotFlashTimerTimeout()"
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::slotFlashTimerTimeout()"
<< " highlight=" << m_flashHighlight << endl;
#endif
int newHigh = m_flashHighlight - 20;
@@ -166,7 +166,7 @@ void kpColorSimilarityToolBarItem::slotFlashTimerTimeout ()
void kpColorSimilarityToolBarItem::flash ()
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::flash()";
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::flash()";
#endif
if (isSuppressingFlash ())
return;
@@ -174,7 +174,7 @@ void kpColorSimilarityToolBarItem::flash ()
if (m_flashHighlight == 255)
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "\tNOP";
+ qCDebug(kpLogWidgets) << "\tNOP";
#endif
}
else
@@ -218,7 +218,7 @@ void kpColorSimilarityToolBarItem::unsupressFlash ()
void kpColorSimilarityToolBarItem::updateToolTip ()
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::updateToolTip()";
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::updateToolTip()";
#endif
if (colorSimilarity () > 0)
@@ -249,7 +249,7 @@ void kpColorSimilarityToolBarItem::updateIcon ()
{
const int side = width () * 6 / 8;
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::updateIcon() width=" << width ()
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::updateIcon() width=" << width ()
<< " side=" << side << endl;
#endif
@@ -270,7 +270,7 @@ void kpColorSimilarityToolBarItem::updateIcon ()
void kpColorSimilarityToolBarItem::resizeEvent (QResizeEvent *e)
{
#if DEBUG_KP_COLOR_SIMILARITY_TOOL_BAR_ITEM
- kDebug () << "kpColorSimilarityToolBarItem::resizeEvent() size=" << size ()
+ qCDebug(kpLogWidgets) << "kpColorSimilarityToolBarItem::resizeEvent() size=" << size ()
<< " oldSize=" << e->oldSize () << endl;
#endif
QToolButton::resizeEvent (e);
diff --git a/widgets/imagelib/effects/kpEffectBalanceWidget.cpp b/widgets/imagelib/effects/kpEffectBalanceWidget.cpp
index c724a5f..9531188 100644
--- a/widgets/imagelib/effects/kpEffectBalanceWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectBalanceWidget.cpp
@@ -34,7 +34,7 @@
#include "commands/imagelib/effects/kpEffectBalanceCommand.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <knuminput.h>
diff --git a/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp b/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
index 46e7955..45f1081 100644
--- a/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectBlurSharpenWidget.cpp
@@ -33,7 +33,7 @@
#include "commands/imagelib/effects/kpEffectBlurSharpenCommand.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <knuminput.h>
@@ -67,7 +67,7 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
int h = m_typeLabel->sizeHint ().height ();
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "initial size hint height=" << h;
+ qCDebug(kpLogWidgets) << "initial size hint height=" << h;
#endif
m_typeLabel->setText (
@@ -85,7 +85,7 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
h = qMax (h, m_typeLabel->sizeHint ().height ());
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "maximum size hint height" << h;
+ qCDebug(kpLogWidgets) << "maximum size hint height" << h;
#endif
m_typeLabel->setFixedHeight (h);
m_typeLabel->setAlignment (Qt::AlignCenter);
@@ -150,14 +150,14 @@ void kpEffectBlurSharpenWidget::slotUpdateTypeLabel ()
QString text = kpEffectBlurSharpenCommand::nameForType (type ());
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
- kDebug () << "kpEffectBlurSharpenWidget::slotUpdateTypeLabel() text="
+ qCDebug(kpLogWidgets) << "kpEffectBlurSharpenWidget::slotUpdateTypeLabel() text="
<< text << endl;
#endif
const int h = m_typeLabel->height ();
m_typeLabel->setText (text);
if (m_typeLabel->height () != h)
{
- kError () << "Label changed height despite the hack in ctor:"
+ qCCritical(kpLogWidgets) << "Label changed height despite the hack in ctor:"
<< "was=" << h
<< "now=" << m_typeLabel->height ();
}
diff --git a/widgets/imagelib/effects/kpEffectEmbossWidget.cpp b/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
index de69c9d..e19c516 100644
--- a/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectEmbossWidget.cpp
@@ -34,7 +34,7 @@
#include <qcheckbox.h>
#include <qgridlayout.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "imagelib/effects/kpEffectEmboss.h"
diff --git a/widgets/imagelib/effects/kpEffectFlattenWidget.cpp b/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
index 0a76645..6b38fea 100644
--- a/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
@@ -38,7 +38,7 @@
#include <kcolorbutton.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qcheckbox.h>
@@ -141,7 +141,7 @@ bool kpEffectFlattenWidget::isNoOp () const
kpImage kpEffectFlattenWidget::applyEffect (const kpImage &image)
{
#if DEBUG_KP_EFFECT_FLATTEN
- kDebug () << "kpEffectFlattenWidget::applyEffect() nop="
+ qCDebug(kpLogWidgets) << "kpEffectFlattenWidget::applyEffect() nop="
<< isNoOp () << endl;
#endif
@@ -166,7 +166,7 @@ kpEffectCommandBase *kpEffectFlattenWidget::createCommand (
void kpEffectFlattenWidget::slotEnableChanged (bool enable)
{
#if DEBUG_KP_EFFECT_FLATTEN
- kDebug () << "kpEffectFlattenWidget::slotEnableChanged(" << enable
+ qCDebug(kpLogWidgets) << "kpEffectFlattenWidget::slotEnableChanged(" << enable
<< ") enableButton=" << m_enableCheckBox->isChecked ()
<< endl;
#endif
diff --git a/widgets/imagelib/effects/kpEffectHSVWidget.cpp b/widgets/imagelib/effects/kpEffectHSVWidget.cpp
index 025c514..4acb727 100644
--- a/widgets/imagelib/effects/kpEffectHSVWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectHSVWidget.cpp
@@ -31,7 +31,7 @@
#include <qgridlayout.h>
#include <qlabel.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <knuminput.h>
diff --git a/widgets/imagelib/effects/kpEffectInvertWidget.cpp b/widgets/imagelib/effects/kpEffectInvertWidget.cpp
index 67ee115..95b5779 100644
--- a/widgets/imagelib/effects/kpEffectInvertWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectInvertWidget.cpp
@@ -35,7 +35,7 @@
#include "commands/imagelib/effects/kpEffectInvertCommand.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qcheckbox.h>
@@ -106,7 +106,7 @@ kpEffectInvertWidget::~kpEffectInvertWidget ()
int kpEffectInvertWidget::channels () const
{
#if DEBUG_KP_EFFECT_INVERT
- kDebug () << "kpEffectInvertWidget::channels()"
+ qCDebug(kpLogWidgets) << "kpEffectInvertWidget::channels()"
<< " isChecked: r=" << m_redCheckBox->isChecked ()
<< " g=" << m_greenCheckBox->isChecked ()
<< " b=" << m_blueCheckBox->isChecked ()
@@ -127,7 +127,7 @@ int kpEffectInvertWidget::channels () const
#if DEBUG_KP_EFFECT_INVERT
- kDebug () << "\treturning channels=" << (int *) channels;
+ qCDebug(kpLogWidgets) << "\treturning channels=" << (int *) channels;
#endif
return channels;
}
diff --git a/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp b/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp
index 03da522..652e066 100644
--- a/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectReduceColorsWidget.cpp
@@ -35,7 +35,7 @@
#include "commands/imagelib/effects/kpEffectReduceColorsCommand.h"
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qbitmap.h>
diff --git a/widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp b/widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp
index bbd163c..c7a32b8 100644
--- a/widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectToneEnhanceWidget.cpp
@@ -36,7 +36,7 @@
#include <QGridLayout>
#include <QLabel>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <knuminput.h>
diff --git a/widgets/kpColorCells.cpp b/widgets/kpColorCells.cpp
index 9e8d54f..9bb6613 100644
--- a/widgets/kpColorCells.cpp
+++ b/widgets/kpColorCells.cpp
@@ -35,7 +35,7 @@
#include "lgpl/generic/kpColorCollection.h"
#include "widgets/kpDefaultColorCollection.h"
-#include <KDebug>
+#include "kpLogCategories.h"
#include <KLocalizedString>
#include <QColorDialog>
@@ -262,9 +262,9 @@ void kpColorCells::makeCellsMatchColorCollection ()
}
#if DEBUG_KP_COLOR_CELLS
- kDebug () << "kpColorCells::makeCellsMatchColorCollection():"
+ qCDebug(kpLogWidgets) << "kpColorCells::makeCellsMatchColorCollection():"
<< "r=" << r << "c=" << c;
- kDebug () << "verticalScrollBar=" << verticalScrollBar ()
+ qCDebug(kpLogWidgets) << "verticalScrollBar=" << verticalScrollBar ()
<< " sizeHint="
<< (verticalScrollBar () ?
verticalScrollBar ()->sizeHint () :
@@ -316,9 +316,9 @@ void kpColorCells::makeCellsMatchColorCollection ()
pos = y * c + x;
}
#if DEBUG_KP_COLOR_CELLS && 0
- kDebug () << "\tSetting cell " << i << ": y=" << y << " x=" << x
+ qCDebug(kpLogWidgets) << "\tSetting cell " << i << ": y=" << y << " x=" << x
<< " pos=" << pos << endl;
- kDebug () << "\t\tcolor=" << (int *) d->colorCol.color (i).rgba()
+ qCDebug(kpLogWidgets) << "\t\tcolor=" << (int *) d->colorCol.color (i).rgba()
<< "isValid=" << d->colorCol.color (i).isValid ();
#endif
@@ -342,7 +342,7 @@ bool kpColorCells::isModified () const
void kpColorCells::setModified (bool yes)
{
#if DEBUG_KP_COLOR_CELLS
- kDebug () << "kpColorCells::setModified(" << yes << ")";
+ qCDebug(kpLogWidgets) << "kpColorCells::setModified(" << yes << ")";
#endif
if (yes == d->isModified)
@@ -525,7 +525,7 @@ void kpColorCells::slotColorSelected (int cell, const QColor &color,
Qt::MouseButton button)
{
#if DEBUG_KP_COLOR_CELLS
- kDebug () << "kpColorCells::slotColorSelected(cell=" << cell
+ qCDebug(kpLogWidgets) << "kpColorCells::slotColorSelected(cell=" << cell
<< ") mouseButton = " << button
<< " rgb=" << (int *) color.rgba()
<< endl;
@@ -574,7 +574,7 @@ void kpColorCells::slotColorDoubleClicked (int cell, const QColor &)
void kpColorCells::slotColorChanged (int cell, const QColor &color)
{
#if DEBUG_KP_COLOR_CELLS
- kDebug () << "cell=" << cell << "color=" << (const int *) color.rgba()
+ qCDebug(kpLogWidgets) << "cell=" << cell << "color=" << (const int *) color.rgba()
<< "d->colorCol.count()=" << d->colorCol.count ();
#endif
diff --git a/widgets/kpDocumentSaveOptionsWidget.cpp b/widgets/kpDocumentSaveOptionsWidget.cpp
index ec1f1b3..32649aa 100644
--- a/widgets/kpDocumentSaveOptionsWidget.cpp
+++ b/widgets/kpDocumentSaveOptionsWidget.cpp
@@ -39,7 +39,7 @@
#include "generic/kpWidgetMapper.h"
#include <kconfig.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <kconfiggroup.h>
#include <knuminput.h>
@@ -155,7 +155,7 @@ void kpDocumentSaveOptionsWidget::init ()
kpDocumentSaveOptionsWidget::~kpDocumentSaveOptionsWidget ()
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::<dtor>()";
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::<dtor>()";
#endif
hidePreview ();
@@ -167,7 +167,7 @@ kpDocumentSaveOptionsWidget::~kpDocumentSaveOptionsWidget ()
void kpDocumentSaveOptionsWidget::setVisualParent (QWidget *visualParent)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::setVisualParent("
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::setVisualParent("
<< visualParent << ")" << endl;
#endif
@@ -198,7 +198,7 @@ QString kpDocumentSaveOptionsWidget::mimeType () const
void kpDocumentSaveOptionsWidget::setMimeType (const QString &string)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::setMimeType(" << string
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::setMimeType(" << string
<< ") maxColorDepth="
<< kpDocumentSaveOptions::mimeTypeMaximumColorDepth (string)
<< endl;
@@ -208,7 +208,7 @@ void kpDocumentSaveOptionsWidget::setMimeType (const QString &string)
kpDocumentSaveOptions::mimeTypeMaximumColorDepth (string);
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\toldMimeType=" << mimeType ()
+ qCDebug(kpLogWidgets) << "\toldMimeType=" << mimeType ()
<< " maxColorDepth="
<< kpDocumentSaveOptions::mimeTypeMaximumColorDepth (
mimeType ())
@@ -239,7 +239,7 @@ void kpDocumentSaveOptionsWidget::setMimeType (const QString &string)
m_colorDepthComboLastSelectedItem < m_colorDepthCombo->count ())
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tsetting colorDepthCombo to "
+ qCDebug(kpLogWidgets) << "\tsetting colorDepthCombo to "
<< m_colorDepthComboLastSelectedItem << endl;
#endif
@@ -248,7 +248,7 @@ void kpDocumentSaveOptionsWidget::setMimeType (const QString &string)
else
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tsetting colorDepthCombo to max item since"
+ qCDebug(kpLogWidgets) << "\tsetting colorDepthCombo to max item since"
<< " m_colorDepthComboLastSelectedItem="
<< m_colorDepthComboLastSelectedItem
<< " out of range" << endl;
@@ -356,7 +356,7 @@ int kpDocumentSaveOptionsWidget::colorDepthComboItemFromColorDepthAndDither (
void kpDocumentSaveOptionsWidget::setColorDepthDither (int newDepth, bool newDither)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::setColorDepthDither("
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::setColorDepthDither("
<< "depth=" << newDepth
<< ",dither=" << newDither
<< ")" << endl;
@@ -396,7 +396,7 @@ void kpDocumentSaveOptionsWidget::slotColorDepthSelected ()
}
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::slotColorDepthSelected()"
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::slotColorDepthSelected()"
<< " mode&ColorDepth=" << (mode () & ColorDepth)
<< " colorDepthComboLastSelectedItem="
<< m_colorDepthComboLastSelectedItem
@@ -422,7 +422,7 @@ int kpDocumentSaveOptionsWidget::quality () const
void kpDocumentSaveOptionsWidget::setQuality (int newQuality)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::setQuality("
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::setQuality("
<< newQuality << ")" << endl;
#endif
@@ -517,7 +517,7 @@ void kpDocumentSaveOptionsWidget::repaintLabels ()
void kpDocumentSaveOptionsWidget::showPreview (bool yes)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::showPreview(" << yes << ")"
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::showPreview(" << yes << ")"
<< " m_previewDialog=" << bool (m_previewDialog)
<< endl;
#endif
@@ -553,7 +553,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
if (m_updatePreviewDelay < 0)
m_updatePreviewDelay = 0;
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tread cfg preview dialog update delay="
+ qCDebug(kpLogWidgets) << "\tread cfg preview dialog update delay="
<< m_updatePreviewDelay
<< endl;
#endif
@@ -562,7 +562,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
if (m_previewDialogLastRelativeGeometry.isEmpty ())
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tread cfg preview dialog last rel geometry";
+ qCDebug(kpLogWidgets) << "\tread cfg preview dialog last rel geometry";
#endif
KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupPreviewSave);
@@ -571,7 +571,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
}
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tpreviewDialogLastRelativeGeometry="
+ qCDebug(kpLogWidgets) << "\tpreviewDialogLastRelativeGeometry="
<< m_previewDialogLastRelativeGeometry
<< " visualParent->rect()=" << m_visualParent->rect ()
<< endl;
@@ -582,14 +582,14 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
m_visualParent->rect ().intersects (m_previewDialogLastRelativeGeometry))
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tok";
+ qCDebug(kpLogWidgets) << "\tok";
#endif
relativeGeometry = m_previewDialogLastRelativeGeometry;
}
else
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\t\tinvalid";
+ qCDebug(kpLogWidgets) << "\t\tinvalid";
#endif
const int margin = 20;
@@ -607,7 +607,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
kpWidgetMapper::toGlobal (m_visualParent,
relativeGeometry);
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\trelativeGeometry=" << relativeGeometry
+ qCDebug(kpLogWidgets) << "\trelativeGeometry=" << relativeGeometry
<< " globalGeometry=" << globalGeometry
<< endl;
#endif
@@ -620,7 +620,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tgeometry after show="
+ qCDebug(kpLogWidgets) << "\tgeometry after show="
<< QRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ())
<< endl;
@@ -645,7 +645,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
cfg.sync ();
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tsaving preview geometry "
+ qCDebug(kpLogWidgets) << "\tsaving preview geometry "
<< m_previewDialogLastRelativeGeometry
<< " (Qt would have us believe "
<< kpWidgetMapper::fromGlobal (m_visualParent,
@@ -729,7 +729,7 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "kpDocumentSaveOptionsWidget::"
+ qCDebug(kpLogWidgets) << "kpDocumentSaveOptionsWidget::"
<< "updatePreviewDialogLastRelativeGeometry()"
<< endl;
#endif
@@ -741,7 +741,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
QRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ()));
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tcaching pos = "
+ qCDebug(kpLogWidgets) << "\tcaching pos = "
<< m_previewDialogLastRelativeGeometry
<< endl;
#endif
@@ -749,7 +749,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
else
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
- kDebug () << "\tnot visible - ignoring geometry";
+ qCDebug(kpLogWidgets) << "\tnot visible - ignoring geometry";
#endif
}
}
diff --git a/widgets/kpDualColorButton.cpp b/widgets/kpDualColorButton.cpp
index e6d6ee0..959a262 100644
--- a/widgets/kpDualColorButton.cpp
+++ b/widgets/kpDualColorButton.cpp
@@ -34,7 +34,7 @@
#include "views/kpView.h"
#include <KColorMimeData>
-#include <KDebug>
+#include "kpLogCategories.h"
#include <KIconLoader>
#include <QApplication>
@@ -200,7 +200,7 @@ QRect kpDualColorButton::backgroundRect () const
void kpDualColorButton::dragEnterEvent (QDragEnterEvent *e)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "kpDualColorButton::dragEnterEvent() canDecode="
+ qCDebug(kpLogWidgets) << "kpDualColorButton::dragEnterEvent() canDecode="
<< KColorMimeData::canDecode (e->mimeData ())
<< endl;
#endif
@@ -213,7 +213,7 @@ void kpDualColorButton::dragEnterEvent (QDragEnterEvent *e)
void kpDualColorButton::dragMoveEvent (QDragMoveEvent *e)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "kpDualColorButton::dragMoveEvent() canDecode="
+ qCDebug(kpLogWidgets) << "kpDualColorButton::dragMoveEvent() canDecode="
<< KColorMimeData::canDecode (e->mimeData ())
<< endl;
#endif
@@ -230,7 +230,7 @@ void kpDualColorButton::dropEvent (QDropEvent *e)
{
QColor col = KColorMimeData::fromMimeData (e->mimeData ());
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "kpDualColorButton::dropEvent() col="
+ qCDebug(kpLogWidgets) << "kpDualColorButton::dropEvent() col="
<< (int *) col.rgba()
<< " (with alpha=" << (int *) col.rgba () << ")" << endl;
#endif
@@ -251,7 +251,7 @@ void kpDualColorButton::dropEvent (QDropEvent *e)
void kpDualColorButton::mousePressEvent (QMouseEvent *e)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "kpDualColorButton::mousePressEvent() pos=" << e->pos ();
+ qCDebug(kpLogWidgets) << "kpDualColorButton::mousePressEvent() pos=" << e->pos ();
#endif
m_dragStartPoint = KP_INVALID_POINT;
@@ -265,7 +265,7 @@ void kpDualColorButton::mousePressEvent (QMouseEvent *e)
void kpDualColorButton::mouseMoveEvent (QMouseEvent *e)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "kpDualColorButton::mouseMoveEvent() pos=" << e->pos ()
+ qCDebug(kpLogWidgets) << "kpDualColorButton::mouseMoveEvent() pos=" << e->pos ()
<< " buttons=" << e->buttons ()
<< " dragStartPoint=" << m_dragStartPoint << endl;
#endif
@@ -286,7 +286,7 @@ void kpDualColorButton::mouseMoveEvent (QMouseEvent *e)
e->y () > m_dragStartPoint.y () + delay)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "\tstarting drag as long as it's in a rectangle";
+ qCDebug(kpLogWidgets) << "\tstarting drag as long as it's in a rectangle";
#endif
kpColor color;
@@ -301,7 +301,7 @@ void kpDualColorButton::mouseMoveEvent (QMouseEvent *e)
}
#if DEBUG_KP_DUAL_COLOR_BUTTON
- kDebug () << "\tcolor.isValid=" << color.isValid ()
+ qCDebug(kpLogWidgets) << "\tcolor.isValid=" << color.isValid ()
<< " rgb=" << (color.isValid () ? (int *) color.toQRgb () : 0)
<< endl;
#endif
@@ -327,7 +327,7 @@ void kpDualColorButton::mouseReleaseEvent (QMouseEvent *e)
m_color [0] != m_color [1])
{
#if DEBUG_KP_DUAL_COLOR_BUTTON && 1
- kDebug () << "kpDualColorButton::mouseReleaseEvent() swap colors:";
+ qCDebug(kpLogWidgets) << "kpDualColorButton::mouseReleaseEvent() swap colors:";
#endif
m_oldColor [0] = m_color [0];
m_oldColor [1] = m_color [1];
@@ -372,7 +372,7 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
void kpDualColorButton::paintEvent (QPaintEvent *e)
{
#if DEBUG_KP_DUAL_COLOR_BUTTON && 1
- kDebug () << "kpDualColorButton::draw() rect=" << rect ()
+ qCDebug(kpLogWidgets) << "kpDualColorButton::draw() rect=" << rect ()
<< " contentsRect=" << contentsRect ()
<< endl;
#endif
@@ -422,7 +422,7 @@ void kpDualColorButton::paintEvent (QPaintEvent *e)
if (isEnabled ())
{
#if DEBUG_KP_DUAL_COLOR_BUTTON && 1
- kDebug () << "\tbackgroundColor=" << (int *) m_color [1].toQRgb ()
+ qCDebug(kpLogWidgets) << "\tbackgroundColor=" << (int *) m_color [1].toQRgb ()
<< endl;
#endif
if (m_color [1].isTransparent ()) // only if fully transparent
@@ -445,7 +445,7 @@ void kpDualColorButton::paintEvent (QPaintEvent *e)
if (isEnabled ())
{
#if DEBUG_KP_DUAL_COLOR_BUTTON && 1
- kDebug () << "\tforegroundColor=" << (int *) m_color [0].toQRgb ()
+ qCDebug(kpLogWidgets) << "\tforegroundColor=" << (int *) m_color [0].toQRgb ()
<< endl;
#endif
if (m_color [0].isTransparent ()) // only if fully transparent
diff --git a/widgets/kpPrintDialogPage.cpp b/widgets/kpPrintDialogPage.cpp
index 2bd8699..b3fbd5a 100644
--- a/widgets/kpPrintDialogPage.cpp
+++ b/widgets/kpPrintDialogPage.cpp
@@ -36,7 +36,7 @@
#include <QVBoxLayout>
#include <QPrinter>
-#include <KDebug>
+#include "kpLogCategories.h"
#include <KLocalizedString>
#include "kpDefs.h"
@@ -52,7 +52,7 @@ kpPrintDialogPage::kpPrintDialogPage (QWidget *parent)
d (new kpPrintDialogPagePrivate ())
{
#if DEBUG_KP_PRINT_DIALOG_PAGE
- kDebug () << "kpPrintDialogPage::<ctor>()";
+ qCDebug(kpLogWidgets) << "kpPrintDialogPage::<ctor>()";
#endif
setWindowTitle (i18nc ("@title:tab", "I&mage Position"));
@@ -79,7 +79,7 @@ kpPrintDialogPage::~kpPrintDialogPage ()
bool kpPrintDialogPage::printImageCenteredOnPage ()
{
#if DEBUG_KP_PRINT_DIALOG_PAGE
- kDebug () << "kpPrintDialogPage::printImageCenteredOnPage()"
+ qCDebug(kpLogWidgets) << "kpPrintDialogPage::printImageCenteredOnPage()"
<< " returning " << d->printCenteredRadio->isChecked() << endl;
#endif
return d->printCenteredRadio->isChecked ();
@@ -89,7 +89,7 @@ bool kpPrintDialogPage::printImageCenteredOnPage ()
void kpPrintDialogPage::setPrintImageCenteredOnPage (bool printCentered)
{
#if DEBUG_KP_PRINT_DIALOG_PAGE
- kDebug () << "kpPrintDialogPage::setOptions(" << printCentered << ")";
+ qCDebug(kpLogWidgets) << "kpPrintDialogPage::setOptions(" << printCentered << ")";
#endif
if (printCentered)
d->printCenteredRadio->setChecked (true);
diff --git a/widgets/kpTransparentColorCell.cpp b/widgets/kpTransparentColorCell.cpp
index 7200dc7..99873a4 100644
--- a/widgets/kpTransparentColorCell.cpp
+++ b/widgets/kpTransparentColorCell.cpp
@@ -114,7 +114,7 @@ void kpTransparentColorCell::paintEvent (QPaintEvent *e)
if (isEnabled ())
{
#if DEBUG_KP_TRANSPARENT_COLOR_CELL
- kDebug () << "kpTransparentColorCell::paintEvent() contentsRect="
+ qCDebug(kpLogWidgets) << "kpTransparentColorCell::paintEvent() contentsRect="
<< contentsRect ()
<< endl;
#endif
diff --git a/widgets/toolbars/kpColorToolBar.cpp b/widgets/toolbars/kpColorToolBar.cpp
index 63717b4..df35f95 100644
--- a/widgets/toolbars/kpColorToolBar.cpp
+++ b/widgets/toolbars/kpColorToolBar.cpp
@@ -36,7 +36,7 @@
#include <QDragMoveEvent>
#include <KColorMimeData>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "widgets/kpColorCells.h"
@@ -111,7 +111,7 @@ kpColorToolBar::kpColorToolBar (const QString &label, QWidget *parent)
void kpColorToolBar::adjustToOrientation (Qt::Orientation o)
{
#if DEBUG_KP_COLOR_TOOL_BAR
- kDebug () << "kpColorToolBar::adjustToOrientation("
+ qCDebug(kpLogWidgets) << "kpColorToolBar::adjustToOrientation("
<< (o == Qt::Vertical ? "vertical" : "horizontal")
<< ") called!";
#endif
@@ -168,7 +168,7 @@ kpColor kpColorToolBar::foregroundColor () const
void kpColorToolBar::setForegroundColor (const kpColor &color)
{
#if DEBUG_KP_COLOR_TOOL_BAR
- kDebug () << "kpColorToolBar::setForegroundColor("
+ qCDebug(kpLogWidgets) << "kpColorToolBar::setForegroundColor("
<< (int *) color.toQRgb () << ")" << endl;
#endif
m_dualColorButton->setForegroundColor (color);
@@ -186,7 +186,7 @@ kpColor kpColorToolBar::backgroundColor () const
void kpColorToolBar::setBackgroundColor (const kpColor &color)
{
#if DEBUG_KP_COLOR_TOOL_BAR
- kDebug () << "kpColorToolBar::setBackgroundColor("
+ qCDebug(kpLogWidgets) << "kpColorToolBar::setBackgroundColor("
<< (int *) color.toQRgb () << ")" << endl;
#endif
m_dualColorButton->setBackgroundColor (color);
@@ -308,7 +308,7 @@ void kpColorToolBar::dragEnterEvent (QDragEnterEvent *e)
// handled by our parent, the main window.
e->setAccepted (KColorMimeData::canDecode (e->mimeData ()) == true);
#if DEBUG_KP_COLOR_TOOL_BAR
- kDebug () << "isAccepted=" << e->isAccepted ();
+ qCDebug(kpLogWidgets) << "isAccepted=" << e->isAccepted ();
#endif
}
@@ -320,7 +320,7 @@ void kpColorToolBar::dragMoveEvent (QDragMoveEvent *e)
// Stop the grabbed drag from being dropped.
e->setAccepted (KColorMimeData::canDecode (e->mimeData ()) == false);
#if DEBUG_KP_COLOR_TOOL_BAR
- kDebug () << "isAccepted=" << e->isAccepted ();
+ qCDebug(kpLogWidgets) << "isAccepted=" << e->isAccepted ();
#endif
}
diff --git a/widgets/toolbars/kpToolToolBar.cpp b/widgets/toolbars/kpToolToolBar.cpp
index cb15e7d..fbbab23 100644
--- a/widgets/toolbars/kpToolToolBar.cpp
+++ b/widgets/toolbars/kpToolToolBar.cpp
@@ -37,7 +37,7 @@
#include <qevent.h>
#include <qtoolbutton.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include "kpDefs.h"
#include "tools/kpTool.h"
@@ -194,7 +194,7 @@ kpTool *kpToolToolBar::tool () const
void kpToolToolBar::selectTool (const kpTool *tool, bool reselectIfSameTool)
{
#if DEBUG_KP_TOOL_TOOL_BAR
- kDebug () << "kpToolToolBar::selectTool (tool=" << tool
+ qCDebug(kpLogWidgets) << "kpToolToolBar::selectTool (tool=" << tool
<< ") currentTool=" << m_currentTool
<< endl;
#endif
@@ -283,7 +283,7 @@ void kpToolToolBar::slotToolButtonClicked ()
QAbstractButton *b = m_buttonGroup->checkedButton();
#if DEBUG_KP_TOOL_TOOL_BAR
- kDebug () << "kpToolToolBar::slotToolButtonClicked() button=" << b;
+ qCDebug(kpLogWidgets) << "kpToolToolBar::slotToolButtonClicked() button=" << b;
#endif
kpTool *tool = 0;
@@ -297,7 +297,7 @@ void kpToolToolBar::slotToolButtonClicked ()
}
#if DEBUG_KP_TOOL_TOOL_BAR
- kDebug () << "\ttool=" << tool
+ qCDebug(kpLogWidgets) << "\ttool=" << tool
<< " currentTool=" << m_currentTool
<< endl;
#endif
@@ -340,7 +340,7 @@ void kpToolToolBar::slotToolActionActivated ()
const kpTool *tool = dynamic_cast<const kpTool *>(sender());
#if DEBUG_KP_TOOL_TOOL_BAR
- kDebug () << "kpToolToolBar::slotToolActionActivated() tool="
+ qCDebug(kpLogWidgets) << "kpToolToolBar::slotToolActionActivated() tool="
<< (tool ? tool->objectName () : "null")
<< endl;
#endif
@@ -354,7 +354,7 @@ void kpToolToolBar::slotToolActionActivated ()
void kpToolToolBar::adjustToOrientation(Qt::Orientation o)
{
#if DEBUG_KP_TOOL_TOOL_BAR
- kDebug () << "kpToolToolBar::adjustToOrientation("
+ qCDebug(kpLogWidgets) << "kpToolToolBar::adjustToOrientation("
<< (o == Qt::Vertical ? "vertical" : "horizontal")
<< ") called!" << endl;
#endif
diff --git a/widgets/toolbars/options/kpToolWidgetBase.cpp b/widgets/toolbars/options/kpToolWidgetBase.cpp
index 40ac30e..fbe0f6f 100644
--- a/widgets/toolbars/options/kpToolWidgetBase.cpp
+++ b/widgets/toolbars/options/kpToolWidgetBase.cpp
@@ -36,7 +36,7 @@
#include <kapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <qbitmap.h>
#include <qcolor.h>
@@ -97,7 +97,7 @@ void kpToolWidgetBase::startNewOptionRow ()
void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase(" << objectName ()
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase(" << objectName ()
<< ")::kpToolWidgetBase(fallBack:row=" << fallBackRow
<< ",col=" << fallBackCol
<< ")"
@@ -124,7 +124,7 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
{
if (!setSelected (0, 0))
{
- kError () << "kpToolWidgetBase::finishConstruction() "
+ qCCritical(kpLogWidgets) << "kpToolWidgetBase::finishConstruction() "
"can't even fall back to setSelected(row=0,col=0)" << endl;
}
}
@@ -210,7 +210,7 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
}
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase(" << objectName ()
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase(" << objectName ()
<< ")::defaultSelectedRowAndCol() returning row=" << row
<< " col=" << col
<< endl;
@@ -241,7 +241,7 @@ int kpToolWidgetBase::defaultSelectedCol () const
void kpToolWidgetBase::saveSelectedAsDefault () const
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase(" << objectName ()
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase(" << objectName ()
<< ")::saveSelectedAsDefault() row=" << m_selectedRow
<< " col=" << m_selectedCol << endl;
#endif
@@ -262,13 +262,13 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
void kpToolWidgetBase::relayoutOptions ()
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase::relayoutOptions() size=" << size ();
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase::relayoutOptions() size=" << size ();
#endif
while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tkilling #" << m_pixmaps.count () - 1;
+ qCDebug(kpLogWidgets) << "\tkilling #" << m_pixmaps.count () - 1;
#endif
m_pixmaps.removeLast ();
m_pixmapRects.removeLast ();
@@ -279,8 +279,8 @@ void kpToolWidgetBase::relayoutOptions ()
return;
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tsurvived killing of empty rows";
- kDebug () << "\tfinding heights of rows:";
+ qCDebug(kpLogWidgets) << "\tsurvived killing of empty rows";
+ qCDebug(kpLogWidgets) << "\tfinding heights of rows:";
#endif
QList <int> maxHeightOfRow;
@@ -295,37 +295,37 @@ void kpToolWidgetBase::relayoutOptions ()
maxHeightOfRow [r] = m_pixmaps [r][c].height ();
}
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\t\t" << r << ": " << maxHeightOfRow [r];
+ qCDebug(kpLogWidgets) << "\t\t" << r << ": " << maxHeightOfRow [r];
#endif
}
QList <int> rowYOffset = spreadOutElements (maxHeightOfRow, height ());
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tspread out offsets of rows:";
+ qCDebug(kpLogWidgets) << "\tspread out offsets of rows:";
for (int r = 0; r < (int) rowYOffset.count (); r++)
- kDebug () << "\t\t" << r << ": " << rowYOffset [r];
+ qCDebug(kpLogWidgets) << "\t\t" << r << ": " << rowYOffset [r];
#endif
for (int r = 0; r < (int) m_pixmaps.count (); r++)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tlaying out row " << r << ":";
+ qCDebug(kpLogWidgets) << "\tlaying out row " << r << ":";
#endif
QList <int> widths;
for (int c = 0; c < (int) m_pixmaps [r].count (); c++)
widths.append (m_pixmaps [r][c].width ());
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\t\twidths of cols:";
+ qCDebug(kpLogWidgets) << "\t\twidths of cols:";
for (int c = 0; c < (int) m_pixmaps [r].count (); c++)
- kDebug () << "\t\t\t" << c << ": " << widths [c];
+ qCDebug(kpLogWidgets) << "\t\t\t" << c << ": " << widths [c];
#endif
QList <int> colXOffset = spreadOutElements (widths, width ());
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\t\tspread out offsets of cols:";
+ qCDebug(kpLogWidgets) << "\t\tspread out offsets of cols:";
for (int c = 0; c < (int) colXOffset.count (); c++)
- kDebug () << "\t\t\t" << c << ": " << colXOffset [c];
+ qCDebug(kpLogWidgets) << "\t\t\t" << c << ": " << colXOffset [c];
#endif
for (int c = 0; c < (int) colXOffset.count (); c++)
@@ -409,7 +409,7 @@ int kpToolWidgetBase::selected () const
bool kpToolWidgetBase::hasPreviousOption (int *row, int *col) const
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase(" << objectName ()
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase(" << objectName ()
<< ")::hasPreviousOption() current row=" << m_selectedRow
<< " col=" << m_selectedCol
<< endl;
@@ -453,7 +453,7 @@ bool kpToolWidgetBase::hasPreviousOption (int *row, int *col) const
bool kpToolWidgetBase::hasNextOption (int *row, int *col) const
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase(" << objectName ()
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase(" << objectName ()
<< ")::hasNextOption() current row=" << m_selectedRow
<< " col=" << m_selectedCol
<< endl;
@@ -499,7 +499,7 @@ bool kpToolWidgetBase::hasNextOption (int *row, int *col) const
bool kpToolWidgetBase::setSelected (int row, int col, bool saveAsDefault)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase::setSelected(row=" << row
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase::setSelected(row=" << row
<< ",col=" << col
<< ",saveAsDefault=" << saveAsDefault
<< ")"
@@ -510,7 +510,7 @@ bool kpToolWidgetBase::setSelected (int row, int col, bool saveAsDefault)
row >= (int) m_pixmapRects.count () || col >= (int) m_pixmapRects [row].count ())
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tout of range";
+ qCDebug(kpLogWidgets) << "\tout of range";
#endif
return false;
}
@@ -518,7 +518,7 @@ bool kpToolWidgetBase::setSelected (int row, int col, bool saveAsDefault)
if (row == m_selectedRow && col == m_selectedCol)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tNOP";
+ qCDebug(kpLogWidgets) << "\tNOP";
#endif
if (saveAsDefault)
@@ -542,7 +542,7 @@ bool kpToolWidgetBase::setSelected (int row, int col, bool saveAsDefault)
update (m_pixmapRects [row][col]);
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tOK";
+ qCDebug(kpLogWidgets) << "\tOK";
#endif
if (saveAsDefault)
@@ -599,7 +599,7 @@ bool kpToolWidgetBase::event (QEvent *e)
{
QHelpEvent *he = (QHelpEvent *) e;
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "kpToolWidgetBase::event() QHelpEvent pos=" << he->pos ();
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase::event() QHelpEvent pos=" << he->pos ();
#endif
bool showedText = false;
@@ -611,7 +611,7 @@ bool kpToolWidgetBase::event (QEvent *e)
{
const QString tip = m_toolTips [r][c];
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\tin option: r=" << r << "c=" << c
+ qCDebug(kpLogWidgets) << "\tin option: r=" << r << "c=" << c
<< "tip='" << tip << "'" << endl;
#endif
if (!tip.isEmpty ())
@@ -630,7 +630,7 @@ bool kpToolWidgetBase::event (QEvent *e)
if (!showedText)
{
#if DEBUG_KP_TOOL_WIDGET_BASE
- kDebug () << "\thiding text";
+ qCDebug(kpLogWidgets) << "\thiding text";
#endif
QToolTip::hideText ();
}
@@ -673,7 +673,7 @@ void kpToolWidgetBase::mousePressEvent (QMouseEvent *e)
void kpToolWidgetBase::paintEvent (QPaintEvent *e)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
- kDebug () << "kpToolWidgetBase::paintEvent(): rect=" << contentsRect ();
+ qCDebug(kpLogWidgets) << "kpToolWidgetBase::paintEvent(): rect=" << contentsRect ();
#endif
// Draw frame first.
@@ -684,7 +684,7 @@ void kpToolWidgetBase::paintEvent (QPaintEvent *e)
for (int i = 0; i < (int) m_pixmaps.count (); i++)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
- kDebug () << "\tRow: " << i;
+ qCDebug(kpLogWidgets) << "\tRow: " << i;
#endif
for (int j = 0; j < (int) m_pixmaps [i].count (); j++)
@@ -693,7 +693,7 @@ void kpToolWidgetBase::paintEvent (QPaintEvent *e)
QPixmap pixmap = m_pixmaps [i][j];
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
- kDebug () << "\t\tCol: " << j << " rect=" << rect;
+ qCDebug(kpLogWidgets) << "\t\tCol: " << j << " rect=" << rect;
#endif
if (i == m_selectedRow && j == m_selectedCol)
@@ -702,7 +702,7 @@ void kpToolWidgetBase::paintEvent (QPaintEvent *e)
}
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
- kDebug () << "\t\t\tdraw pixmap @ x="
+ qCDebug(kpLogWidgets) << "\t\t\tdraw pixmap @ x="
<< rect.x () + (rect.width () - pixmap.width ()) / 2
<< " y="
<< rect.y () + (rect.height () - pixmap.height ()) / 2
diff --git a/widgets/toolbars/options/kpToolWidgetBrush.cpp b/widgets/toolbars/options/kpToolWidgetBrush.cpp
index 5d49be7..e8e83a2 100644
--- a/widgets/toolbars/options/kpToolWidgetBrush.cpp
+++ b/widgets/toolbars/options/kpToolWidgetBrush.cpp
@@ -34,7 +34,7 @@
#include <qpainter.h>
#include <qpixmap.h>
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include "kpDefs.h"
@@ -63,14 +63,14 @@ static void Draw (kpImage *destImage, const QPoint &topLeft, void *userData)
static_cast <kpToolWidgetBrush::DrawPackage *> (userData);
#if DEBUG_KP_TOOL_WIDGET_BRUSH
- kDebug () << "kptoolwidgetbrush.cpp:Draw(destImage,topLeft="
+ qCDebug(kpLogWidgets) << "kptoolwidgetbrush.cpp:Draw(destImage,topLeft="
<< topLeft << " pack: row=" << pack->row << " col=" << pack->col
<< " color=" << (int *) pack->color.toQRgb ()
<< endl;
#endif
const int size = ::BrushSizes [pack->row][pack->col];
#if DEBUG_KP_TOOL_WIDGET_BRUSH
- kDebug () << "\tsize=" << size;
+ qCDebug(kpLogWidgets) << "\tsize=" << size;
#endif
QPainter painter(destImage);
diff --git a/widgets/toolbars/options/kpToolWidgetEraserSize.cpp b/widgets/toolbars/options/kpToolWidgetEraserSize.cpp
index 0e9e98b..8a11d82 100644
--- a/widgets/toolbars/options/kpToolWidgetEraserSize.cpp
+++ b/widgets/toolbars/options/kpToolWidgetEraserSize.cpp
@@ -36,7 +36,7 @@
#include "pixmapfx/kpPixmapFX.h"
#include "tools/kpTool.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <klocale.h>
#include <qbitmap.h>
diff --git a/widgets/toolbars/options/kpToolWidgetFillStyle.cpp b/widgets/toolbars/options/kpToolWidgetFillStyle.cpp
index 0c2f135..9004883 100644
--- a/widgets/toolbars/options/kpToolWidgetFillStyle.cpp
+++ b/widgets/toolbars/options/kpToolWidgetFillStyle.cpp
@@ -36,7 +36,7 @@
#include "pixmapfx/kpPixmapFX.h"
#include "tools/kpTool.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <qbrush.h>
#include <qpainter.h>
@@ -140,7 +140,7 @@ QString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
{
#if DEBUG_KP_TOOL_WIDGET_FILL_STYLE
- kDebug () << "kpToolWidgetFillStyle::fillStyle() selected="
+ qCDebug(kpLogWidgets) << "kpToolWidgetFillStyle::fillStyle() selected="
<< selectedRow ()
<< endl;
#endif
diff --git a/widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp b/widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp
index dd9220f..18e90e2 100644
--- a/widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp
+++ b/widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp
@@ -30,7 +30,7 @@
#include "widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kiconloader.h>
#include <klocale.h>
@@ -72,7 +72,7 @@ bool kpToolWidgetOpaqueOrTransparent::isTransparent () const
void kpToolWidgetOpaqueOrTransparent::setOpaque (bool yes)
{
#if DEBUG_KP_TOOL_WIDGET_OPAQUE_OR_TRANSPARENT && 1
- kDebug () << "kpToolWidgetOpaqueOrTransparent::setOpaque(" << yes << ")";
+ qCDebug(kpLogWidgets) << "kpToolWidgetOpaqueOrTransparent::setOpaque(" << yes << ")";
#endif
setSelected (yes ? 0 : 1, 0, false/*don't save*/);
}
@@ -81,7 +81,7 @@ void kpToolWidgetOpaqueOrTransparent::setOpaque (bool yes)
void kpToolWidgetOpaqueOrTransparent::setTransparent (bool yes)
{
#if DEBUG_KP_TOOL_WIDGET_OPAQUE_OR_TRANSPARENT && 1
- kDebug () << "kpToolWidgetOpaqueOrTransparent::setTransparent(" << yes << ")";
+ qCDebug(kpLogWidgets) << "kpToolWidgetOpaqueOrTransparent::setTransparent(" << yes << ")";
#endif
setSelected (yes ? 1 : 0, 0, false/*don't save*/);
}
@@ -91,7 +91,7 @@ void kpToolWidgetOpaqueOrTransparent::setTransparent (bool yes)
bool kpToolWidgetOpaqueOrTransparent::setSelected (int row, int col, bool saveAsDefault)
{
#if DEBUG_KP_TOOL_WIDGET_OPAQUE_OR_TRANSPARENT && 1
- kDebug () << "kpToolWidgetOpaqueOrTransparent::setSelected("
+ qCDebug(kpLogWidgets) << "kpToolWidgetOpaqueOrTransparent::setSelected("
<< row << "," << col << ")" << endl;
#endif
const bool ret = kpToolWidgetBase::setSelected (row, col, saveAsDefault);
diff --git a/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp b/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp
index 1b7fd73..9091d92 100644
--- a/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp
+++ b/widgets/toolbars/options/kpToolWidgetSpraycanSize.cpp
@@ -33,7 +33,7 @@
#include "pixmapfx/kpPixmapFX.h"
-#include <kdebug.h>
+#include "kpLogCategories.h"
#include <kiconloader.h>
#include <klocale.h>
@@ -49,7 +49,7 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const QStri
: kpToolWidgetBase (parent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
- kDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!";
+ qCDebug(kpLogWidgets) << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!";
#endif
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
@@ -58,7 +58,7 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const QStri
QString iconName = QString ("tool_spraycan_%1x%2").arg (s).arg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
- kDebug () << "\ticonName=" << iconName;
+ qCDebug(kpLogWidgets) << "\ticonName=" << iconName;
#endif
QPixmap pixmap (s, s);