diff --git a/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp b/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp --- a/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp +++ b/commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_BLUR_SHARPEN 0 - - #include "kpEffectBlurSharpenCommand.h" #include diff --git a/commands/imagelib/effects/kpEffectEmbossCommand.cpp b/commands/imagelib/effects/kpEffectEmbossCommand.cpp --- a/commands/imagelib/effects/kpEffectEmbossCommand.cpp +++ b/commands/imagelib/effects/kpEffectEmbossCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_EMBOSS 0 - - #include "kpEffectEmbossCommand.h" #include "imagelib/effects/kpEffectEmboss.h" diff --git a/commands/imagelib/effects/kpEffectFlattenCommand.cpp b/commands/imagelib/effects/kpEffectFlattenCommand.cpp --- a/commands/imagelib/effects/kpEffectFlattenCommand.cpp +++ b/commands/imagelib/effects/kpEffectFlattenCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_FLATTEN 0 - - #include "kpEffectFlattenCommand.h" #include "imagelib/effects/kpEffectFlatten.h" diff --git a/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp b/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp --- a/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp +++ b/commands/imagelib/effects/kpEffectReduceColorsCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_REDUCE_COLORS 0 - - #include "kpEffectReduceColorsCommand.h" #include "imagelib/effects/kpEffectReduceColors.h" diff --git a/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp b/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp --- a/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp +++ b/commands/imagelib/transforms/kpTransformResizeScaleCommand.cpp @@ -25,11 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_RESIZE_SCALE_COMMAND 0 -#define DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG 0 - - #include "kpTransformResizeScaleCommand.h" #include "layers/selections/image/kpAbstractImageSelection.h" @@ -188,10 +183,7 @@ // private void kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument () { -#if DEBUG_KP_TOOL_RESIZE_SCALE_COMMAND - qCDebug(kpLogCommands) << "kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument" - << endl; -#endif + qCDebug(kpLogCommands) << "kpTransformResizeScaleCommand::scaleSelectionRegionWithDocument"; Q_ASSERT (m_oldSelectionPtr); Q_ASSERT (!m_oldSelectionPtr->hasContent ()); diff --git a/commands/imagelib/transforms/kpTransformRotateCommand.cpp b/commands/imagelib/transforms/kpTransformRotateCommand.cpp --- a/commands/imagelib/transforms/kpTransformRotateCommand.cpp +++ b/commands/imagelib/transforms/kpTransformRotateCommand.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_ROTATE 0 - - #include "kpTransformRotateCommand.h" #include "layers/selections/image/kpAbstractImageSelection.h" @@ -158,14 +155,11 @@ // TODO: fix the latter "victim of" problem in kpAbstractImageSelection by // allowing the border width & height != pixmap width & height // Or maybe autocrop? - #if DEBUG_KP_TOOL_ROTATE qCDebug(kpLogCommands) << "kpTransformRotateCommand::execute() currentPoints.boundingRect=" << currentPoints.boundingRect () << " newPixmap: w=" << newImage.width () << " h=" << newImage.height () - << " (victim of rounding error and/or rotated-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be)" - << endl; - #endif + << " (victim of rounding error and/or rotated-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be)"; doc->setSelection ( kpRectangularImageSelection ( QRect (newTopLeft.x (), newTopLeft.y (), diff --git a/commands/imagelib/transforms/kpTransformSkewCommand.cpp b/commands/imagelib/transforms/kpTransformSkewCommand.cpp --- a/commands/imagelib/transforms/kpTransformSkewCommand.cpp +++ b/commands/imagelib/transforms/kpTransformSkewCommand.cpp @@ -25,11 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SKEW 0 -#define DEBUG_KP_TOOL_SKEW_DIALOG 0 - - #include "kpTransformSkewCommand.h" #include "layers/selections/image/kpAbstractImageSelection.h" @@ -145,14 +140,11 @@ // TODO: fix the latter "victim of" problem in kpAbstractImageSelection by // allowing the border width & height != pixmap width & height // Or maybe autocrop? - #if DEBUG_KP_TOOL_SKEW qCDebug(kpLogCommands) << "kpTransformSkewCommand::execute() currentPoints.boundingRect=" << currentPoints.boundingRect () << " newPixmap: w=" << newImage.width () << " h=" << newImage.height () - << " (victim of rounding error and/or skewed-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be))" - << endl; - #endif + << " (victim of rounding error and/or skewed-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be))"; doc->setSelection ( kpRectangularImageSelection ( QRect (currentPoints.boundingRect ().x (), diff --git a/commands/kpCommand.cpp b/commands/kpCommand.cpp --- a/commands/kpCommand.cpp +++ b/commands/kpCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COMMAND_HISTORY 0 - - #include "kpCommand.h" #include "environments/commands/kpCommandEnvironment.h" diff --git a/commands/kpCommandHistory.cpp b/commands/kpCommandHistory.cpp --- a/commands/kpCommandHistory.cpp +++ b/commands/kpCommandHistory.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COMMAND_HISTORY 0 - - #include "kpCommandHistory.h" #include "layers/selections/kpAbstractSelection.h" diff --git a/commands/kpCommandHistoryBase.cpp b/commands/kpCommandHistoryBase.cpp --- a/commands/kpCommandHistoryBase.cpp +++ b/commands/kpCommandHistoryBase.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COMMAND_HISTORY 0 - - #include "kpCommandHistoryBase.h" #include @@ -513,9 +509,7 @@ if (upto >= m_undoMaxLimit || sizeSoFar > m_undoMaxLimitSizeLimit) { - #if DEBUG_KP_COMMAND_HISTORY && 0 qCDebug(kpLogCommands) << "\t\t\tkill"; - #endif delete (*it); it = m_undoCommandList.erase (it); advanceIt = false; diff --git a/commands/kpCommandSize.cpp b/commands/kpCommandSize.cpp --- a/commands/kpCommandSize.cpp +++ b/commands/kpCommandSize.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COMMAND_SIZE 0 - - #include "commands/kpCommandSize.h" #include "layers/selections/kpAbstractSelection.h" #include "kpLogCategories.h" diff --git a/commands/kpMacroCommand.cpp b/commands/kpMacroCommand.cpp --- a/commands/kpMacroCommand.cpp +++ b/commands/kpMacroCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COMMAND_HISTORY 0 - - #include "commands/kpMacroCommand.h" #include "views/manager/kpViewManager.h" diff --git a/commands/tools/flow/kpToolFlowCommand.cpp b/commands/tools/flow/kpToolFlowCommand.cpp --- a/commands/tools/flow/kpToolFlowCommand.cpp +++ b/commands/tools/flow/kpToolFlowCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_FLOW_COMMAND 0 - - #include "kpToolFlowCommand.h" #include "document/kpDocument.h" @@ -40,7 +36,6 @@ #include - struct kpToolFlowCommandPrivate { kpImage image; diff --git a/commands/tools/kpToolColorPickerCommand.cpp b/commands/tools/kpToolColorPickerCommand.cpp --- a/commands/tools/kpToolColorPickerCommand.cpp +++ b/commands/tools/kpToolColorPickerCommand.cpp @@ -24,11 +24,6 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - - -#define DEBUG_KP_TOOL_COLOR_PICKER 0 - - #include "kpToolColorPickerCommand.h" #include "environments/commands/kpCommandEnvironment.h" diff --git a/commands/tools/kpToolFloodFillCommand.cpp b/commands/tools/kpToolFloodFillCommand.cpp --- a/commands/tools/kpToolFloodFillCommand.cpp +++ b/commands/tools/kpToolFloodFillCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_FLOOD_FILL 0 - - #include "kpToolFloodFillCommand.h" #include "imagelib/kpColor.h" diff --git a/commands/tools/polygonal/kpToolPolygonalCommand.cpp b/commands/tools/polygonal/kpToolPolygonalCommand.cpp --- a/commands/tools/polygonal/kpToolPolygonalCommand.cpp +++ b/commands/tools/polygonal/kpToolPolygonalCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_POLYGON 0 - - #include "kpToolPolygonalCommand.h" #include "document/kpDocument.h" diff --git a/commands/tools/rectangular/kpToolRectangularCommand.cpp b/commands/tools/rectangular/kpToolRectangularCommand.cpp --- a/commands/tools/rectangular/kpToolRectangularCommand.cpp +++ b/commands/tools/rectangular/kpToolRectangularCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_RECTANGULAR_COMMAND 0 - - #include "kpToolRectangularCommand.h" #include "imagelib/kpColor.h" diff --git a/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp b/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp --- a/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp +++ b/commands/tools/selection/kpToolImageSelectionTransparencyCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolImageSelectionTransparencyCommand.h" #include "environments/commands/kpCommandEnvironment.h" diff --git a/commands/tools/selection/kpToolSelectionCreateCommand.cpp b/commands/tools/selection/kpToolSelectionCreateCommand.cpp --- a/commands/tools/selection/kpToolSelectionCreateCommand.cpp +++ b/commands/tools/selection/kpToolSelectionCreateCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "commands/tools/selection/kpToolSelectionCreateCommand.h" #include "layers/selections/kpAbstractSelection.h" diff --git a/commands/tools/selection/kpToolSelectionDestroyCommand.cpp b/commands/tools/selection/kpToolSelectionDestroyCommand.cpp --- a/commands/tools/selection/kpToolSelectionDestroyCommand.cpp +++ b/commands/tools/selection/kpToolSelectionDestroyCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolSelectionDestroyCommand.h" #include "kpLogCategories.h" #include "layers/selections/kpAbstractSelection.h" diff --git a/commands/tools/selection/kpToolSelectionMoveCommand.cpp b/commands/tools/selection/kpToolSelectionMoveCommand.cpp --- a/commands/tools/selection/kpToolSelectionMoveCommand.cpp +++ b/commands/tools/selection/kpToolSelectionMoveCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolSelectionMoveCommand.h" #include "layers/selections/kpAbstractSelection.h" diff --git a/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp b/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp --- a/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp +++ b/commands/tools/selection/kpToolSelectionPullFromDocumentCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolSelectionPullFromDocumentCommand.h" #include "layers/selections/image/kpAbstractImageSelection.h" diff --git a/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp b/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp --- a/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp +++ b/commands/tools/selection/kpToolSelectionResizeScaleCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolSelectionResizeScaleCommand.h" #include "layers/selections/kpAbstractSelection.h" diff --git a/commands/tools/selection/text/kpToolTextBackspaceCommand.cpp b/commands/tools/selection/text/kpToolTextBackspaceCommand.cpp --- a/commands/tools/selection/text/kpToolTextBackspaceCommand.cpp +++ b/commands/tools/selection/text/kpToolTextBackspaceCommand.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolTextBackspaceCommand.h" #include "layers/selections/text/kpTextSelection.h" diff --git a/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp b/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp --- a/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp +++ b/commands/tools/selection/text/kpToolTextChangeStyleCommand.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolTextChangeStyleCommand.h" #include "environments/commands/kpCommandEnvironment.h" diff --git a/commands/tools/selection/text/kpToolTextDeleteCommand.cpp b/commands/tools/selection/text/kpToolTextDeleteCommand.cpp --- a/commands/tools/selection/text/kpToolTextDeleteCommand.cpp +++ b/commands/tools/selection/text/kpToolTextDeleteCommand.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolTextDeleteCommand.h" #include "layers/selections/text/kpTextSelection.h" diff --git a/commands/tools/selection/text/kpToolTextEnterCommand.cpp b/commands/tools/selection/text/kpToolTextEnterCommand.cpp --- a/commands/tools/selection/text/kpToolTextEnterCommand.cpp +++ b/commands/tools/selection/text/kpToolTextEnterCommand.cpp @@ -24,10 +24,6 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolTextEnterCommand.h" #include "layers/selections/text/kpTextSelection.h" diff --git a/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp b/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp --- a/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp +++ b/commands/tools/selection/text/kpToolTextGiveContentCommand.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpToolTextGiveContentCommand.h" #include "environments/commands/kpCommandEnvironment.h" diff --git a/commands/tools/selection/text/kpToolTextInsertCommand.cpp b/commands/tools/selection/text/kpToolTextInsertCommand.cpp --- a/commands/tools/selection/text/kpToolTextInsertCommand.cpp +++ b/commands/tools/selection/text/kpToolTextInsertCommand.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolTextInsertCommand.h" #include "layers/selections/text/kpTextSelection.h" diff --git a/cursors/kpCursorLightCross.cpp b/cursors/kpCursorLightCross.cpp --- a/cursors/kpCursorLightCross.cpp +++ b/cursors/kpCursorLightCross.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_CURSOR_LIGHT_CROSS 0 - - #include "kpCursorLightCross.h" #include "kpLogCategories.h" diff --git a/dialogs/imagelib/effects/kpEffectsDialog.cpp b/dialogs/imagelib/effects/kpEffectsDialog.cpp --- a/dialogs/imagelib/effects/kpEffectsDialog.cpp +++ b/dialogs/imagelib/effects/kpEffectsDialog.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECTS_DIALOG 0 - - #include "kpEffectsDialog.h" #include "kpDefs.h" @@ -203,9 +199,7 @@ // public slot void kpEffectsDialog::selectEffect (int which) { -#if DEBUG_KP_EFFECTS_DIALOG qCDebug(kpLogDialogs) << "kpEffectsDialog::selectEffect(" << which << ")"; -#endif if (which < 0 || which >= m_effectsComboBox->count ()) diff --git a/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp b/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp --- a/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp +++ b/dialogs/imagelib/kpDocumentMetaInfoDialog.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_DOCUMENT_META_INFO_DIALOG 0 - - #include "kpDocumentMetaInfoDialog.h" #include "kpDefs.h" diff --git a/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp b/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp --- a/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp +++ b/dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TRANSFORM_PREVIEW_DIALOG 0 - - #include "dialogs/imagelib/transforms/kpTransformPreviewDialog.h" #include diff --git a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp --- a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp +++ b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_RESIZE_SCALE_DIALOG 0 - - #include "kpTransformResizeScaleDialog.h" diff --git a/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp b/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp --- a/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp +++ b/dialogs/imagelib/transforms/kpTransformRotateDialog.cpp @@ -24,9 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_ROTATE 0 - - #include "kpTransformRotateDialog.h" #include "kpDefs.h" diff --git a/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp b/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp --- a/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp +++ b/dialogs/imagelib/transforms/kpTransformSkewDialog.cpp @@ -24,11 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SKEW 0 -#define DEBUG_KP_TOOL_SKEW_DIALOG 0 - - #include "dialogs/imagelib/transforms/kpTransformSkewDialog.h" #include diff --git a/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp b/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp --- a/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp +++ b/dialogs/kpDocumentSaveOptionsPreviewDialog.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET 0 - - #include "kpDocumentSaveOptionsPreviewDialog.h" #include diff --git a/document/kpDocument.cpp b/document/kpDocument.cpp --- a/document/kpDocument.cpp +++ b/document/kpDocument.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_DOCUMENT 0 - - #include "kpDocument.h" #include "kpDocumentPrivate.h" diff --git a/document/kpDocumentSaveOptions.cpp b/document/kpDocumentSaveOptions.cpp --- a/document/kpDocumentSaveOptions.cpp +++ b/document/kpDocumentSaveOptions.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_DOCUMENT_SAVE_OPTIONS 0 - - #include "kpDocumentSaveOptions.h" #include "kpDefs.h" diff --git a/document/kpDocument_Open.cpp b/document/kpDocument_Open.cpp --- a/document/kpDocument_Open.cpp +++ b/document/kpDocument_Open.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_DOCUMENT 0 - - #include "kpDocument.h" #include "kpDocumentPrivate.h" diff --git a/document/kpDocument_Save.cpp b/document/kpDocument_Save.cpp --- a/document/kpDocument_Save.cpp +++ b/document/kpDocument_Save.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_DOCUMENT 0 - - #include "kpDocument.h" #include "kpDocumentPrivate.h" diff --git a/document/kpDocument_Selection.cpp b/document/kpDocument_Selection.cpp --- a/document/kpDocument_Selection.cpp +++ b/document/kpDocument_Selection.cpp @@ -25,14 +25,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_DOCUMENT 0 - - #include "kpDocument.h" #include "kpDocumentPrivate.h" - #include #include #include diff --git a/imagelib/effects/kpEffectBalance.cpp b/imagelib/effects/kpEffectBalance.cpp --- a/imagelib/effects/kpEffectBalance.cpp +++ b/imagelib/effects/kpEffectBalance.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_BALANCE 0 - - #include "kpEffectBalance.h" #include #include diff --git a/imagelib/effects/kpEffectBlurSharpen.cpp b/imagelib/effects/kpEffectBlurSharpen.cpp --- a/imagelib/effects/kpEffectBlurSharpen.cpp +++ b/imagelib/effects/kpEffectBlurSharpen.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_BLUR_SHARPEN 0 - - #include "kpEffectBlurSharpen.h" #include "blitz.h" #include "kpLogCategories.h" diff --git a/imagelib/effects/kpEffectEmboss.cpp b/imagelib/effects/kpEffectEmboss.cpp --- a/imagelib/effects/kpEffectEmboss.cpp +++ b/imagelib/effects/kpEffectEmboss.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_EMBOSS 0 - - #include "kpEffectEmboss.h" #include "blitz.h" diff --git a/imagelib/effects/kpEffectGrayscale.cpp b/imagelib/effects/kpEffectGrayscale.cpp --- a/imagelib/effects/kpEffectGrayscale.cpp +++ b/imagelib/effects/kpEffectGrayscale.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_PIXMAP_FX 0 - - #include "kpEffectGrayscale.h" #include "pixmapfx/kpPixmapFX.h" diff --git a/imagelib/effects/kpEffectInvert.cpp b/imagelib/effects/kpEffectInvert.cpp --- a/imagelib/effects/kpEffectInvert.cpp +++ b/imagelib/effects/kpEffectInvert.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_INVERT 0 - - #include "kpEffectInvert.h" #include diff --git a/imagelib/effects/kpEffectReduceColors.cpp b/imagelib/effects/kpEffectReduceColors.cpp --- a/imagelib/effects/kpEffectReduceColors.cpp +++ b/imagelib/effects/kpEffectReduceColors.cpp @@ -26,10 +26,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_EFFECT_REDUCE_COLORS 0 - - #include "imagelib/effects/kpEffectReduceColors.h" #include "kpLogCategories.h" diff --git a/imagelib/kpColor.cpp b/imagelib/kpColor.cpp --- a/imagelib/kpColor.cpp +++ b/imagelib/kpColor.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COLOR 0 - - #include "kpColor.h" #include diff --git a/imagelib/kpColor_Constants.cpp b/imagelib/kpColor_Constants.cpp --- a/imagelib/kpColor_Constants.cpp +++ b/imagelib/kpColor_Constants.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_COLOR 0 - - #include "kpColor.h" diff --git a/imagelib/kpFloodFill.cpp b/imagelib/kpFloodFill.cpp --- a/imagelib/kpFloodFill.cpp +++ b/imagelib/kpFloodFill.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_FLOOD_FILL 0 - - #include "kpFloodFill.h" #include diff --git a/imagelib/transforms/kpTransformAutoCrop.cpp b/imagelib/transforms/kpTransformAutoCrop.cpp --- a/imagelib/transforms/kpTransformAutoCrop.cpp +++ b/imagelib/transforms/kpTransformAutoCrop.cpp @@ -538,21 +538,17 @@ if ((*b)->isSingleColor ()) { kpColor col = (*b)->referenceColor (); - #if DEBUG_KP_TOOL_AUTO_CROP && 1 qCDebug(kpLogImagelib) << "\tdrawing border " << (*b)->rect () - << " rgb=" << (int *) col.toQRgb () /* %X hack */ << endl; - #endif + << " rgb=" << (int *) col.toQRgb () /* %X hack */; const QRect r = (*b)->rect (); kpPainter::fillRect (&image, r.x (), r.y (), r.width (), r.height (), col); } else { - #if DEBUG_KP_TOOL_AUTO_CROP && 1 qCDebug(kpLogImagelib) << "\trestoring border image " << (*b)->rect (); - #endif if (*p) { // REFACTOR: Add equivalent method to kpPainter and use. @@ -669,13 +665,10 @@ topBorder.exists () + botBorder.exists ()) == 0)) { - #if DEBUG_KP_TOOL_AUTO_CROP qCDebug(kpLogImagelib) << "\tcan't find border; leftBorder.rect=" << leftBorder.rect () << " rightBorder.rect=" << rightBorder.rect () << " topBorder.rect=" << topBorder.rect () - << " botBorder.rect=" << botBorder.rect () - << endl; - #endif + << " botBorder.rect=" << botBorder.rect (); ::ShowNothingToAutocropMessage (mainWindow, static_cast (doc->selection ())); return false; } diff --git a/imagelib/transforms/kpTransformCrop.cpp b/imagelib/transforms/kpTransformCrop.cpp --- a/imagelib/transforms/kpTransformCrop.cpp +++ b/imagelib/transforms/kpTransformCrop.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_CROP 0 - - #include "kpTransformCrop.h" #include "kpTransformCropPrivate.h" diff --git a/imagelib/transforms/kpTransformCrop_TextSelection.cpp b/imagelib/transforms/kpTransformCrop_TextSelection.cpp --- a/imagelib/transforms/kpTransformCrop_TextSelection.cpp +++ b/imagelib/transforms/kpTransformCrop_TextSelection.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_CROP 0 - - #include "kpTransformCrop.h" #include "kpTransformCropPrivate.h" diff --git a/kpViewScrollableContainer.cpp b/kpViewScrollableContainer.cpp --- a/kpViewScrollableContainer.cpp +++ b/kpViewScrollableContainer.cpp @@ -25,8 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_VIEW_SCROLLABLE_CONTAINER 0 - #include "kpViewScrollableContainer.h" #include @@ -183,9 +181,7 @@ // protected void kpGrip::cancel () { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpGrip::cancel()"; -#endif if (m_currentPoint == KP_INVALID_POINT) return; @@ -272,11 +268,8 @@ // protected virtual [base QWidget] void kpGrip::mouseMoveEvent (QMouseEvent *e) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpGrip::mouseMoveEvent() m_startPoint=" << m_startPoint - << " stateAfter: buttons=" << (int *) (int) e->buttons () - << endl; -#endif + << " stateAfter: buttons=" << (int *) (int) e->buttons (); if (m_startPoint == KP_INVALID_POINT) { @@ -293,11 +286,8 @@ // protected virtual [base QWidget] void kpGrip::mouseReleaseEvent (QMouseEvent *e) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpGrip::mouseReleaseEvent() m_startPoint=" << m_startPoint - << " stateAfter: buttons=" << (int *) (int) e->buttons () - << endl; -#endif + << " stateAfter: buttons=" << (int *) (int) e->buttons (); if (m_startPoint != KP_INVALID_POINT) { @@ -328,19 +318,15 @@ // protected virtual [base QWidget] void kpGrip::enterEvent (QEvent * /*e*/) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpGrip::enterEvent()" << " m_startPoint=" << m_startPoint << " shouldReleaseMouseButtons=" - << m_shouldReleaseMouseButtons << endl; -#endif + << m_shouldReleaseMouseButtons; if (m_startPoint == KP_INVALID_POINT && !m_shouldReleaseMouseButtons) { - #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "\tsending message"; - #endif setUserMessage (haventBegunDrawUserMessage ()); } } @@ -350,12 +336,10 @@ // protected virtual [base QWidget] void kpGrip::leaveEvent (QEvent * /*e*/) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpGrip::leaveEvent()" << " m_startPoint=" << m_startPoint << " shouldReleaseMouseButtons=" - << m_shouldReleaseMouseButtons << endl; -#endif + << m_shouldReleaseMouseButtons; if (m_startPoint == KP_INVALID_POINT && !m_shouldReleaseMouseButtons) { @@ -466,9 +450,7 @@ // public void kpViewScrollableContainer::clearStatusMessage () { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1 qCDebug(kpLogMisc) << "kpViewScrollableContainer::clearStatusMessage()"; -#endif m_bottomRightGrip->setUserMessage(QString()); m_bottomGrip->setUserMessage(QString()); m_rightGrip->setUserMessage(QString()); @@ -662,16 +644,12 @@ void kpViewScrollableContainer::updateResizeLines (int viewX, int viewY, int viewDX, int viewDY) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0 qCDebug(kpLogMisc) << "kpViewScrollableContainer::updateResizeLines(" << viewX << "," << viewY << ")" << " oldViewX=" << m_resizeRoundedLastViewX << " oldViewY=" << m_resizeRoundedLastViewY << " viewDX=" << viewDX - << " viewDY=" << viewDY - << endl; -#endif - + << " viewDY=" << viewDY; if (viewX >= 0 && viewY >= 0) { @@ -728,13 +706,10 @@ int viewDX = inViewDX, viewDY = inViewDY; -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpViewScrollableContainer::slotGripContinuedDraw(" << viewDX << "," << viewDY << ") size=" << newDocSize (viewDX, viewDY) - << " dueToDragScroll=" << dueToDragScroll - << endl; -#endif + << " dueToDragScroll=" << dueToDragScroll; if (!m_view) return; @@ -745,11 +720,8 @@ const QPoint newViewDeltaPoint = docResizingGrip ()->viewDeltaPoint (); viewDX = newViewDeltaPoint.x (); viewDY = newViewDeltaPoint.y (); - #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "\tdrag scrolled - new view delta point=" - << newViewDeltaPoint - << endl; - #endif + << newViewDeltaPoint; } m_haveMovedFromOriginalDocSize = true; @@ -784,12 +756,9 @@ // protected slot void kpViewScrollableContainer::slotGripEndedDraw (int viewDX, int viewDY) { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpViewScrollableContainer::slotGripEndedDraw(" << viewDX << "," << viewDY << ") size=" - << newDocSize (viewDX, viewDY) - << endl; -#endif + << newDocSize (viewDX, viewDY); if (!m_view) return; @@ -827,14 +796,11 @@ // public slot void kpViewScrollableContainer::recalculateStatusMessage () { -#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER qCDebug(kpLogMisc) << "kpViewScrollabelContainer::recalculateStatusMessage()"; qCDebug(kpLogMisc) << "\tQCursor::pos=" << QCursor::pos () << " global visibleRect=" << kpWidgetMapper::toGlobal (this, - QRect(0, 0, viewport->width(), viewport->height())) - << endl; -#endif + QRect(0, 0, viewport()->width(), viewport()->height())); // HACK: After dragging to a new size, handles move so that they are now // under the mouse pointer but no mouseMoveEvent() is generated for diff --git a/layers/selections/image/kpAbstractImageSelection.cpp b/layers/selections/image/kpAbstractImageSelection.cpp --- a/layers/selections/image/kpAbstractImageSelection.cpp +++ b/layers/selections/image/kpAbstractImageSelection.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "layers/selections/image/kpAbstractImageSelection.h" #include diff --git a/layers/selections/image/kpEllipticalImageSelection.cpp b/layers/selections/image/kpEllipticalImageSelection.cpp --- a/layers/selections/image/kpEllipticalImageSelection.cpp +++ b/layers/selections/image/kpEllipticalImageSelection.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "layers/selections/image/kpEllipticalImageSelection.h" #include diff --git a/layers/selections/image/kpFreeFormImageSelection.cpp b/layers/selections/image/kpFreeFormImageSelection.cpp --- a/layers/selections/image/kpFreeFormImageSelection.cpp +++ b/layers/selections/image/kpFreeFormImageSelection.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "layers/selections/image/kpFreeFormImageSelection.h" #include "kpLogCategories.h" diff --git a/layers/selections/image/kpImageSelectionTransparency.cpp b/layers/selections/image/kpImageSelectionTransparency.cpp --- a/layers/selections/image/kpImageSelectionTransparency.cpp +++ b/layers/selections/image/kpImageSelectionTransparency.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION_TRANSPARENCY 0 - - #include "layers/selections/image/kpImageSelectionTransparency.h" #include "kpLogCategories.h" diff --git a/layers/selections/image/kpRectangularImageSelection.cpp b/layers/selections/image/kpRectangularImageSelection.cpp --- a/layers/selections/image/kpRectangularImageSelection.cpp +++ b/layers/selections/image/kpRectangularImageSelection.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "layers/selections/image/kpRectangularImageSelection.h" #include diff --git a/layers/selections/kpAbstractSelection.cpp b/layers/selections/kpAbstractSelection.cpp --- a/layers/selections/kpAbstractSelection.cpp +++ b/layers/selections/kpAbstractSelection.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "layers/selections/kpAbstractSelection.h" #include @@ -93,10 +89,8 @@ // friend QDataStream &operator<< (QDataStream &stream, const kpAbstractSelection &selection) { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpAbstractSelection::operator<<(sel: rect=" << - selection.boundingRect () << endl; -#endif + selection.boundingRect (); stream << selection.serialID (); selection.writeToStream (stream); return stream; @@ -191,23 +185,17 @@ // public virtual void kpAbstractSelection::moveBy (int dx, int dy) { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpAbstractSelection::moveBy(" << dx << "," << dy << ")"; -#endif if (dx == 0 && dy == 0) return; QRect oldRect = boundingRect (); -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "\toldRect=" << oldRect; -#endif d->rect.translate (dx, dy); -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "\tnewRect=" << d->rect; -#endif emit changed (oldRect); emit changed (boundingRect ()); @@ -222,13 +210,9 @@ // public void kpAbstractSelection::moveTo (const QPoint &topLeftPoint) { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpAbstractSelection::moveTo(" << topLeftPoint << ")"; -#endif QRect oldBoundingRect = boundingRect (); -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "\toldBoundingRect=" << oldBoundingRect; -#endif if (topLeftPoint == oldBoundingRect.topLeft ()) return; @@ -245,19 +229,14 @@ { (void) selectionFinished; -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpAbstractSelection::paintRectangularBorder() boundingRect=" - << boundingRect () << endl; -#endif + << boundingRect (); -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "\tselection border = rectangle"; qCDebug(kpLogLayers) << "\t\tx=" << boundingRect ().x () - docRect.x () << " y=" << boundingRect ().y () - docRect.y () << " w=" << boundingRect ().width () - << " h=" << boundingRect ().height () - << endl; -#endif + << " h=" << boundingRect ().height (); kpPixmapFX::drawStippleRect(destPixmap, boundingRect ().x () - docRect.x (), boundingRect ().y () - docRect.y (), @@ -275,10 +254,8 @@ const QRect &docRect, bool selectionFinished) const { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpAbstractSelection::paintPolygonalBorder() boundingRect=" - << boundingRect () << endl; -#endif + << boundingRect (); QPolygon pointsTranslated = points; pointsTranslated.translate (-docRect.x (), -docRect.y ()); diff --git a/layers/selections/kpSelectionDrag.cpp b/layers/selections/kpSelectionDrag.cpp --- a/layers/selections/kpSelectionDrag.cpp +++ b/layers/selections/kpSelectionDrag.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION_DRAG 0 - - #include "kpSelectionDrag.h" #include @@ -51,11 +47,8 @@ kpSelectionDrag::kpSelectionDrag (const kpAbstractImageSelection &sel) { -#if DEBUG_KP_SELECTION_DRAG && 1 qCDebug(kpLogLayers) << "kpSelectionDrag() w=" << sel.width () - << " h=" << sel.height () - << endl; -#endif + << " h=" << sel.height (); Q_ASSERT (sel.hasContent ()); @@ -70,11 +63,8 @@ // Store as image (so that QMimeData::hasImage()) works). // OPT: an awful waste of memory storing image in both selection and QImage const QImage image = sel.baseImage (); -#if DEBUG_KP_SELECTION_DRAG && 1 qCDebug(kpLogLayers) << "\timage: w=" << image.width () - << " h=" << image.height () - << endl; -#endif + << " h=" << image.height (); if (image.isNull ()) { // TODO: proper error handling. @@ -92,11 +82,9 @@ { Q_ASSERT(mimeData); -#if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "kpSelectionDrag::canDecode()" << "hasSel=" << mimeData->hasFormat(kpSelectionDrag::SelectionMimeType) << "hasImage=" << mimeData->hasImage(); -#endif // mimeData->hasImage() would not check if the data is a valid image return mimeData->hasFormat(kpSelectionDrag::SelectionMimeType) || @@ -108,33 +96,25 @@ kpAbstractImageSelection *kpSelectionDrag::decode(const QMimeData *mimeData) { -#if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "kpSelectionDrag::decode(kpAbstractSelection)"; -#endif Q_ASSERT (mimeData); if (mimeData->hasFormat (kpSelectionDrag::SelectionMimeType)) { - #if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "\tmimeSource hasFormat selection - just return it in QByteArray"; - #endif QByteArray data = mimeData->data (kpSelectionDrag::SelectionMimeType); QDataStream stream (&data, QIODevice::ReadOnly); return kpSelectionFactory::FromStream (stream); } else { - #if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "\tmimeSource doesn't provide selection - try image"; - #endif QImage image = qvariant_cast (mimeData->imageData ()); if (!image.isNull ()) { - #if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "\tok w=" << image.width () << " h=" << image.height (); - #endif return new kpRectangularImageSelection ( QRect (0, 0, image.width (), image.height ()), image); @@ -155,10 +135,8 @@ } } - #if DEBUG_KP_SELECTION_DRAG qCDebug(kpLogLayers) << "kpSelectionDrag::decode(kpAbstractSelection) mimeSource had no sel " - "and could not decode to image" << endl; - #endif + "and could not decode to image"; return nullptr; } } diff --git a/layers/selections/kpSelectionFactory.cpp b/layers/selections/kpSelectionFactory.cpp --- a/layers/selections/kpSelectionFactory.cpp +++ b/layers/selections/kpSelectionFactory.cpp @@ -25,34 +25,28 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "kpSelectionFactory.h" #include #include "layers/selections/image/kpRectangularImageSelection.h" #include "layers/selections/image/kpEllipticalImageSelection.h" #include "layers/selections/image/kpFreeFormImageSelection.h" +#include "kpLogCategories.h" + //--------------------------------------------------------------------- // public static // TODO: KolourPaint has not been tested against invalid or malicious // clipboard data [Bug #28]. kpAbstractImageSelection *kpSelectionFactory::FromStream (QDataStream &stream) { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpSelectionFactory::FromStream()"; -#endif int serialID; stream >> serialID; -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "\tserialID=" << serialID; -#endif // Only image selections are marshalled. // diff --git a/layers/selections/text/kpTextSelection.cpp b/layers/selections/text/kpTextSelection.cpp --- a/layers/selections/text/kpTextSelection.cpp +++ b/layers/selections/text/kpTextSelection.cpp @@ -26,10 +26,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "kpTextSelection.h" #include "kpTextSelectionPrivate.h" diff --git a/layers/selections/text/kpTextSelection_Cursor.cpp b/layers/selections/text/kpTextSelection_Cursor.cpp --- a/layers/selections/text/kpTextSelection_Cursor.cpp +++ b/layers/selections/text/kpTextSelection_Cursor.cpp @@ -26,10 +26,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "kpTextSelection.h" #include "kpTextSelectionPrivate.h" @@ -97,15 +93,12 @@ (preeditText.isEmpty () && (row >= static_cast (d->textLines.size ()) || col > static_cast (d->textLines [row].length ())))) { -#if DEBUG_KP_SELECTION && 1 qCDebug(kpLogLayers) << "kpTextSelection::pointForTextRowCol(" << row << "," << col << ") out of range" << " textLines='" << text () - << "'" - << endl; -#endif + << "'"; return KP_INVALID_POINT; } diff --git a/layers/selections/text/kpTextSelection_Paint.cpp b/layers/selections/text/kpTextSelection_Paint.cpp --- a/layers/selections/text/kpTextSelection_Paint.cpp +++ b/layers/selections/text/kpTextSelection_Paint.cpp @@ -28,10 +28,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_SELECTION 0 - - #include "kpTextSelection.h" #include "kpTextSelectionPrivate.h" diff --git a/lgpl/generic/kpColorCollection.cpp b/lgpl/generic/kpColorCollection.cpp --- a/lgpl/generic/kpColorCollection.cpp +++ b/lgpl/generic/kpColorCollection.cpp @@ -24,8 +24,6 @@ //----------------------------------------------------------------------------- // KDE color collection -#define DEBUG_KP_COLOR_COLLECTION 0 - #include "kpColorCollection.h" #include "kpUrlFormatter.h" diff --git a/lgpl/generic/widgets/kpColorCellsBase.cpp b/lgpl/generic/widgets/kpColorCellsBase.cpp --- a/lgpl/generic/widgets/kpColorCellsBase.cpp +++ b/lgpl/generic/widgets/kpColorCellsBase.cpp @@ -19,9 +19,6 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -//----------------------------------------------------------------------------- - -#define DEBUG_KP_COLOR_CELLS_BASE 0 #include "kpColorCellsBase.h" diff --git a/pixmapfx/kpPixmapFX_DrawShapes.cpp b/pixmapfx/kpPixmapFX_DrawShapes.cpp --- a/pixmapfx/kpPixmapFX_DrawShapes.cpp +++ b/pixmapfx/kpPixmapFX_DrawShapes.cpp @@ -25,13 +25,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_PIXMAP_FX 0 - - #include "kpPixmapFX.h" - #include #include #include diff --git a/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp b/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp --- a/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp +++ b/pixmapfx/kpPixmapFX_GetSetPixmapParts.cpp @@ -25,13 +25,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_PIXMAP_FX 0 - - #include "kpPixmapFX.h" - #include #include #include diff --git a/pixmapfx/kpPixmapFX_Transforms.cpp b/pixmapfx/kpPixmapFX_Transforms.cpp --- a/pixmapfx/kpPixmapFX_Transforms.cpp +++ b/pixmapfx/kpPixmapFX_Transforms.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_PIXMAP_FX 0 - - #include "kpPixmapFX.h" #include diff --git a/tools/flow/kpToolColorEraser.cpp b/tools/flow/kpToolColorEraser.cpp --- a/tools/flow/kpToolColorEraser.cpp +++ b/tools/flow/kpToolColorEraser.cpp @@ -24,9 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_COLOR_ERASER 0 - #include "kpToolColorEraser.h" #include diff --git a/tools/flow/kpToolEraser.cpp b/tools/flow/kpToolEraser.cpp --- a/tools/flow/kpToolEraser.cpp +++ b/tools/flow/kpToolEraser.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_ERASER 0 - #include "kpToolEraser.h" #include "commands/kpCommandHistory.h" diff --git a/tools/flow/kpToolFlowBase.cpp b/tools/flow/kpToolFlowBase.cpp --- a/tools/flow/kpToolFlowBase.cpp +++ b/tools/flow/kpToolFlowBase.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_FLOW_BASE 0 - #include "kpToolFlowBase.h" #include diff --git a/tools/flow/kpToolSpraycan.cpp b/tools/flow/kpToolSpraycan.cpp --- a/tools/flow/kpToolSpraycan.cpp +++ b/tools/flow/kpToolSpraycan.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SPRAYCAN 0 - #include "kpToolSpraycan.h" #include "kpDefs.h" diff --git a/tools/kpToolColorPicker.cpp b/tools/kpToolColorPicker.cpp --- a/tools/kpToolColorPicker.cpp +++ b/tools/kpToolColorPicker.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_COLOR_PICKER 0 - - #include "kpToolColorPicker.h" #include "kpLogCategories.h" #include "widgets/toolbars/kpColorToolBar.h" diff --git a/tools/kpToolFloodFill.cpp b/tools/kpToolFloodFill.cpp --- a/tools/kpToolFloodFill.cpp +++ b/tools/kpToolFloodFill.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_FLOOD_FILL 0 - - #include "kpToolFloodFill.h" #include "commands/kpCommandHistory.h" diff --git a/tools/kpToolZoom.cpp b/tools/kpToolZoom.cpp --- a/tools/kpToolZoom.cpp +++ b/tools/kpToolZoom.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_ZOOM 0 - - #include "kpToolZoom.h" #include "kpDefs.h" diff --git a/tools/kpTool_Drawing.cpp b/tools/kpTool_Drawing.cpp --- a/tools/kpTool_Drawing.cpp +++ b/tools/kpTool_Drawing.cpp @@ -29,10 +29,6 @@ // Tool methods for drawing shapes (subclasses reimplement most of these). // - -#define DEBUG_KP_TOOL 0 - - #include "tools/kpTool.h" #include "kpToolPrivate.h" diff --git a/tools/kpTool_KeyboardEvents.cpp b/tools/kpTool_KeyboardEvents.cpp --- a/tools/kpTool_KeyboardEvents.cpp +++ b/tools/kpTool_KeyboardEvents.cpp @@ -29,10 +29,6 @@ // Tool reaction to view keyboard input. // - -#define DEBUG_KP_TOOL 0 - - // TODO: reduce number of includes #include "tools/kpTool.h" #include "kpToolPrivate.h" diff --git a/tools/kpTool_MouseEvents.cpp b/tools/kpTool_MouseEvents.cpp --- a/tools/kpTool_MouseEvents.cpp +++ b/tools/kpTool_MouseEvents.cpp @@ -29,8 +29,6 @@ // Tool reaction to view mouse input. // -#define DEBUG_KP_TOOL 0 - #include "tools/kpTool.h" #include "kpToolPrivate.h" diff --git a/tools/kpTool_Utilities.cpp b/tools/kpTool_Utilities.cpp --- a/tools/kpTool_Utilities.cpp +++ b/tools/kpTool_Utilities.cpp @@ -29,10 +29,6 @@ // Tool utility methods - mainly for subclasses' convenience. // - -#define DEBUG_KP_TOOL 0 - - #include "tools/kpTool.h" #include "kpToolPrivate.h" diff --git a/tools/polygonal/kpToolCurve.cpp b/tools/polygonal/kpToolCurve.cpp --- a/tools/polygonal/kpToolCurve.cpp +++ b/tools/polygonal/kpToolCurve.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_CURVE 0 - - #include "kpToolCurve.h" #include "kpLogCategories.h" #include "environments/tools/kpToolEnvironment.h" diff --git a/tools/polygonal/kpToolLine.cpp b/tools/polygonal/kpToolLine.cpp --- a/tools/polygonal/kpToolLine.cpp +++ b/tools/polygonal/kpToolLine.cpp @@ -24,10 +24,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_LINE 0 - - #include "kpToolLine.h" #include "kpToolPolyline.h" #include "kpLogCategories.h" diff --git a/tools/polygonal/kpToolPolygonalBase.cpp b/tools/polygonal/kpToolPolygonalBase.cpp --- a/tools/polygonal/kpToolPolygonalBase.cpp +++ b/tools/polygonal/kpToolPolygonalBase.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_POLYGON 0 - - #include "kpToolPolygonalBase.h" #include diff --git a/tools/polygonal/kpToolPolyline.cpp b/tools/polygonal/kpToolPolyline.cpp --- a/tools/polygonal/kpToolPolyline.cpp +++ b/tools/polygonal/kpToolPolyline.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_POLYLINE 0 - - #include "kpToolPolyline.h" #include "kpLogCategories.h" #include "environments/tools/kpToolEnvironment.h" @@ -88,10 +84,8 @@ // public virtual [base kpTool] void kpToolPolyline::endDraw (const QPoint &, const QRect &) { -#if DEBUG_KP_TOOL_POLYLINE qCDebug(kpLogTools) << "kpToolPolyline::endDraw() points=" - << points ()->toList () << endl; -#endif + << points ()->toList (); // A click of the other mouse button (to finish shape, instead of adding // another control point) would have caused endShape() to have been @@ -102,9 +96,7 @@ if (points ()->count () >= kpToolPolygonalBase::MaxPoints) { - #if DEBUG_KP_TOOL_POLYLINE qCDebug(kpLogTools) << "\tending shape"; - #endif endShape (); return; } diff --git a/tools/rectangular/kpToolRectangularBase.cpp b/tools/rectangular/kpToolRectangularBase.cpp --- a/tools/rectangular/kpToolRectangularBase.cpp +++ b/tools/rectangular/kpToolRectangularBase.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_RECTANGULAR_BASE 0 - - #include "tools/rectangular/kpToolRectangularBase.h" #include diff --git a/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp b/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp --- a/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp +++ b/tools/selection/image/kpAbstractImageSelectionTool_Transparency.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpAbstractImageSelectionTool.h" #include "layers/selections/image/kpAbstractImageSelection.h" @@ -60,10 +56,8 @@ { if (environ ()->settingImageSelectionTransparency ()) { - #if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "\trecursion - abort setting selection transparency: " - << environ ()->settingImageSelectionTransparency () << endl; - #endif + << environ ()->settingImageSelectionTransparency (); return false; } @@ -83,9 +77,7 @@ const kpImageSelectionTransparency &newTrans, const kpImageSelectionTransparency &oldTrans) { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "CALL(" << name << ")"; -#endif kpSetOverrideCursorSaver cursorSaver (Qt::WaitCursor); @@ -141,9 +133,7 @@ // protected slot virtual [kpAbstractSelectionTool] void kpAbstractImageSelectionTool::slotIsOpaqueChanged (bool /*isOpaque*/) { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotIsOpaqueChanged()"; -#endif if (!shouldChangeImageSelectionTransparency ()) return; @@ -163,9 +153,7 @@ // protected slot virtual [base kpTool] void kpAbstractImageSelectionTool::slotBackgroundColorChanged (const kpColor &) { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotBackgroundColorChanged()"; -#endif if (!shouldChangeImageSelectionTransparency ()) return; @@ -183,9 +171,7 @@ // protected slot virtual [base kpTool] void kpAbstractImageSelectionTool::slotColorSimilarityChanged (double, int) { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractImageSelectionTool::slotColorSimilarityChanged()"; -#endif if (!shouldChangeImageSelectionTransparency ()) return; diff --git a/tools/selection/image/kpToolEllipticalSelection.cpp b/tools/selection/image/kpToolEllipticalSelection.cpp --- a/tools/selection/image/kpToolEllipticalSelection.cpp +++ b/tools/selection/image/kpToolEllipticalSelection.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_ELLIPTICAL_SELECTION 0 - - #include "kpToolEllipticalSelection.h" #include "kpLogCategories.h" @@ -61,9 +58,7 @@ // Prevent unintentional creation of 1-pixel selections. if (!dragAccepted && accidentalDragAdjustedPoint == startPoint ()) { - #if DEBUG_KP_TOOL_ELLIPTICAL_SELECTION && 1 qCDebug(kpLogTools) << "\tnon-text NOP - return"; - #endif setUserShapePoints (accidentalDragAdjustedPoint); return false; } diff --git a/tools/selection/image/kpToolRectSelection.cpp b/tools/selection/image/kpToolRectSelection.cpp --- a/tools/selection/image/kpToolRectSelection.cpp +++ b/tools/selection/image/kpToolRectSelection.cpp @@ -25,8 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_RECT_SELECTION 0 - #include "kpToolRectSelection.h" #include "kpLogCategories.h" #include "document/kpDocument.h" @@ -60,9 +58,7 @@ // REFACTOR: This line is duplicated code with other tools. if (!dragAccepted && accidentalDragAdjustedPoint == startPoint ()) { - #if DEBUG_KP_TOOL_RECT_SELECTION && 1 qCDebug(kpLogTools) << "\tnon-text NOP - return"; - #endif setUserShapePoints (accidentalDragAdjustedPoint); return false; } diff --git a/tools/selection/kpAbstractSelectionTool.cpp b/tools/selection/kpAbstractSelectionTool.cpp --- a/tools/selection/kpAbstractSelectionTool.cpp +++ b/tools/selection/kpAbstractSelectionTool.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpAbstractSelectionTool.h" #include "kpAbstractSelectionToolPrivate.h" @@ -158,10 +154,8 @@ // protected void kpAbstractSelectionTool::pushOntoDocument () { -#if DEBUG_KP_TOOL_SELECTION && 1 qCDebug(kpLogTools) << "kpAbstractSelectionTool::pushOntoDocument() selection=" - << document ()->selection () << endl; -#endif + << document ()->selection (); Q_ASSERT (document ()->selection ()); environ ()->deselectSelection (); } @@ -196,9 +190,7 @@ if (d->currentSelContentCommand) { // Make the border creation a command. - #if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "\thave currentSelContentCommand"; - #endif commandHistory ()->addCreateSelectionCommand ( new kpToolSelectionCreateCommand ( /*virtual*/nameOfCreateCommand (), @@ -249,12 +241,9 @@ // private QString kpAbstractSelectionTool::haventBegunDrawUserMessage () { -#if DEBUG_KP_TOOL_SELECTION && 0 qCDebug(kpLogTools) << "kpAbstractSelectionTool::haventBegunDrawUserMessage()" " cancelledShapeButStillHoldingButtons=" - << d->cancelledShapeButStillHoldingButtons - << endl; -#endif + << d->cancelledShapeButStillHoldingButtons; if (d->cancelledShapeButStillHoldingButtons) return i18n ("Let go of all the mouse buttons."); @@ -267,9 +256,7 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::begin () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool<" << objectName () << ">::begin()"; -#endif ::AssertAllTimersInactive (d); @@ -309,14 +296,11 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::end () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool<" << objectName () << ">::end()"; -#endif if (document ()->selection ()) pushOntoDocument (); - endCreate (); endMove (); endResizeScale (); @@ -349,9 +333,7 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::reselect () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool::reselect()"; -#endif if (document ()->selection ()) pushOntoDocument (); @@ -362,9 +344,7 @@ // protected virtual kpAbstractSelectionTool::DrawType kpAbstractSelectionTool::calculateDrawTypeInsideSelection () const { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "\t\tis move"; -#endif return kpAbstractSelectionTool::Move; } @@ -376,9 +356,7 @@ kpAbstractSelection *sel = document ()->selection (); if (!sel) return Create; -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "\thas sel region rect=" << sel->boundingRect (); -#endif if (onSelectionResizeHandle () && !controlOrShiftPressed ()) return ResizeScale; @@ -393,13 +371,10 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::beginDraw () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool::beginDraw() startPoint ()=" << startPoint () << " QCursor::pos() view startPoint=" - << viewUnderStartPoint ()->mapFromGlobal (QCursor::pos ()) - << endl; -#endif + << viewUnderStartPoint ()->mapFromGlobal (QCursor::pos ()); // endDraw() and cancelShape() should have taken care of these. ::AssertAllTimersInactive (d); @@ -431,9 +406,7 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::hover (const QPoint &point) { -#if DEBUG_KP_TOOL_SELECTION && 1 qCDebug(kpLogTools) << "kpAbstractSelectionTool::hover" << point; -#endif operation (calculateDrawType (), SetCursor); @@ -460,15 +433,9 @@ void kpAbstractSelectionTool::draw (const QPoint &thisPoint, const QPoint & /*lastPoint*/, const QRect &normalizedRect) { -#if DEBUG_KP_TOOL_SELECTION && 1 qCDebug(kpLogTools) << "kpAbstractSelectionTool::draw (" << thisPoint << ",startPoint=" << startPoint () - << ",normalizedRect=" << normalizedRect << ")" << endl; -#else - Q_UNUSED (thisPoint); - Q_UNUSED (normalizedRect); -#endif - + << ",normalizedRect=" << normalizedRect << ")"; // OPT: return when thisPoint == lastPoint () so that e.g. when creating // Points sel, press modifiers doesn't add multiple points in same @@ -484,10 +451,8 @@ // public virtual [base kpTool] void kpAbstractSelectionTool::cancelShape () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool::cancelShape() mouseButton=" - << mouseButton () << endl; -#endif + << mouseButton (); const DrawType oldDrawType = d->drawType; // kpTool::hasBegunDraw() returns false in this method so be consistent @@ -502,9 +467,7 @@ if (d->currentSelContentCommand) { - #if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "\t\tundo sel content"; - #endif d->currentSelContentCommand->unexecute (); delete d->currentSelContentCommand; d->currentSelContentCommand = nullptr; @@ -537,38 +500,30 @@ // protected void kpAbstractSelectionTool::popupRMBMenu () { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "CALL - exec'ing menu"; -#endif QMenu *pop = environ ()->selectionToolRMBMenu (); Q_ASSERT (pop); // Blocks until the menu closes. // WARNING: Enters event loop - may re-enter view/tool event handlers. pop->exec (QCursor::pos ()); -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "calling somethingBelowTheCursorChanged()"; -#endif // Cursor may have moved while the menu was up, triggering QMouseMoveEvents // for the menu -- but not the view -- so we may have missed cursor moves. // Update cursor position now. somethingBelowTheCursorChanged (); -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "DONE"; -#endif } //--------------------------------------------------------------------- // public virtual [base kpTool] void kpAbstractSelectionTool::endDraw (const QPoint & /*thisPoint*/, const QRect & /*normalizedRect*/) { -#if DEBUG_KP_TOOL_SELECTION qCDebug(kpLogTools) << "kpAbstractSelectionTool::endDraw()"; -#endif const DrawType oldDrawType = d->drawType; // kpTool::hasBegunDraw() returns false in this method so be consistent diff --git a/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp b/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp --- a/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp +++ b/tools/selection/kpAbstractSelectionTool_KeyboardEvents.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_TOOL_SELECTION 0 - - #include "kpAbstractSelectionTool.h" #include "kpAbstractSelectionToolPrivate.h" @@ -46,33 +42,24 @@ // protected virtual [base kpTool] void kpAbstractSelectionTool::keyPressEvent (QKeyEvent *e) { -#if DEBUG_KP_TOOL_SELECTION && 0 qCDebug(kpLogTools) << "kpAbstractSelectionTool::keyPressEvent(e->text='" - << e->text () << "')" << endl; -#endif + << e->text () << "')"; e->ignore (); if (document ()->selection () && !hasBegunDraw () && e->key () == Qt::Key_Escape) { - #if DEBUG_KP_TOOL_SELECTION && 0 - qCDebug(kpLogTools) << "\tescape pressed with sel when not begun draw - deselecting" - << endl; - #endif - + qCDebug(kpLogTools) << "\tescape pressed with sel when not begun draw - deselecting"; pushOntoDocument (); e->accept (); } else { - #if DEBUG_KP_TOOL_SELECTION && 0 qCDebug(kpLogTools) << "\tkey processing did not accept (text was '" << e->text () - << "') - passing on event to kpTool" - << endl; - #endif + << "') - passing on event to kpTool"; if ( document()->selection() && !hasBegunDraw() && ((e->key() == Qt::Key_Left) || diff --git a/tools/selection/text/kpToolText.cpp b/tools/selection/text/kpToolText.cpp --- a/tools/selection/text/kpToolText.cpp +++ b/tools/selection/text/kpToolText.cpp @@ -27,9 +27,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" #include "kpLogCategories.h" @@ -69,11 +66,9 @@ kpAbstractSelectionContentCommand *kpToolText::newGiveContentCommand () const { kpTextSelection *textSel = document ()->textSelection (); -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::newGiveContentCommand()" << " textSel=" << textSel - << "; hasContent=" << textSel->hasContent () << endl; -#endif + << "; hasContent=" << textSel->hasContent (); Q_ASSERT (textSel && !textSel->hasContent ()); return new kpToolTextGiveContentCommand ( @@ -105,9 +100,7 @@ // public virtual [base kpAbstractSelectionTool] void kpToolText::begin () { -#if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "kpToolText::begin()"; -#endif environ ()->enableTextToolBarActions (true); @@ -125,9 +118,7 @@ // public virtual [base kpAbstractSelectionTool] void kpToolText::end () { -#if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "kpToolText::end()"; -#endif kpAbstractSelectionTool::end (); @@ -170,9 +161,7 @@ // public virtual [base kpAbstractSelectionTool] void kpToolText::cancelShape () { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::cancelShape()"; -#endif if (drawType () != None) kpAbstractSelectionTool::cancelShape (); @@ -190,9 +179,7 @@ // public virtual [base kpTool] void kpToolText::endShape (const QPoint &thisPoint, const QRect &normalizedRect) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::endShape()"; -#endif if (drawType () != None) kpAbstractSelectionTool::endDraw (thisPoint, normalizedRect); diff --git a/tools/selection/text/kpToolText_Commands.cpp b/tools/selection/text/kpToolText_Commands.cpp --- a/tools/selection/text/kpToolText_Commands.cpp +++ b/tools/selection/text/kpToolText_Commands.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "kpToolText.h" #include "kpToolTextPrivate.h" #include "kpLogCategories.h" diff --git a/tools/selection/text/kpToolText_Create.cpp b/tools/selection/text/kpToolText_Create.cpp --- a/tools/selection/text/kpToolText_Create.cpp +++ b/tools/selection/text/kpToolText_Create.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" @@ -107,11 +104,9 @@ int *minimumWidthOut, int *minimumHeightOut, bool *newDragAccepted) { -#if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "CALL(dragAccepted=" << dragAccepted << ",accidentalDragAdjustedPoint=" << accidentalDragAdjustedPoint << ")"; -#endif *newDragAccepted = dragAccepted; // Is the drag so short that we're essentially just clicking? @@ -122,9 +117,7 @@ // We had an existing text box before the click? if (hadSelectionBeforeDraw ()) { - #if DEBUG_KP_TOOL_TEXT && 1 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(). // Therefore, we are not doing a drag. @@ -142,9 +135,7 @@ // branch [x] will execute and the size will be determined based on // the size of the drag instead. - #if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "\tclick creating text box"; - #endif // (Click creating text box with RMB would not be obvious // since RMB menu most likely hides text box immediately @@ -186,9 +177,7 @@ // The size will be determined based on the size of the drag. else { - #if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "\tdrag creating text box"; - #endif *minimumWidthOut = kpTextSelection::MinimumWidthForTextStyle (textStyle); *minimumHeightOut = kpTextSelection::MinimumHeightForTextStyle (textStyle); @@ -246,12 +235,9 @@ normalizedRect.setY (normalizedRect.bottom () - minimumHeight + 1); } -#if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "\t\tnormalizedRect=" << normalizedRect << " kpTextSelection::preferredMinimumSize=" - << QSize (minimumWidth, minimumHeight) - << endl; -#endif + << QSize (minimumWidth, minimumHeight); // diff --git a/tools/selection/text/kpToolText_CursorCalc.cpp b/tools/selection/text/kpToolText_CursorCalc.cpp --- a/tools/selection/text/kpToolText_CursorCalc.cpp +++ b/tools/selection/text/kpToolText_CursorCalc.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpLogCategories.h" #include "document/kpDocument.h" diff --git a/tools/selection/text/kpToolText_InputMethodEvents.cpp b/tools/selection/text/kpToolText_InputMethodEvents.cpp --- a/tools/selection/text/kpToolText_InputMethodEvents.cpp +++ b/tools/selection/text/kpToolText_InputMethodEvents.cpp @@ -27,9 +27,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" #include "commands/tools/selection/text/kpToolTextInsertCommand.h" @@ -47,13 +44,11 @@ void kpToolText::inputMethodEvent (QInputMethodEvent *e) { -#if DEBUG_KP_TOOL_TEXT && 1 qCDebug(kpLogTools) << "kpToolText::inputMethodEvent() preeditString='" << e->preeditString () << "commitString = " << e->commitString () << " replacementStart=" << e->replacementStart () - << " replacementLength=" << e->replacementLength () - << endl; -#endif + << " replacementLength=" << e->replacementLength (); + kpTextSelection *textSel = document ()->textSelection (); if (hasBegunDraw() || !textSel) { diff --git a/tools/selection/text/kpToolText_KeyboardEvents.cpp b/tools/selection/text/kpToolText_KeyboardEvents.cpp --- a/tools/selection/text/kpToolText_KeyboardEvents.cpp +++ b/tools/selection/text/kpToolText_KeyboardEvents.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" @@ -58,40 +55,30 @@ (e->type () == QEvent::ShortcutOverride); const bool haveTextSelection = document ()->textSelection (); -#if DEBUG_KP_TOOL_TEXT && 0 qCDebug(kpLogTools) << "kpToolText::viewEvent() type=" << e->type () << " isShortcutOverrideEvent=" << isShortcutOverrideEvent - << " haveTextSel=" << haveTextSelection - << endl; -#endif + << " haveTextSel=" << haveTextSelection; if (!isShortcutOverrideEvent || !haveTextSelection) return kpAbstractSelectionTool::viewEvent (e); QKeyEvent *ke = static_cast (e); -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::viewEvent() key=" << ke->key () << " modifiers=" << ke->modifiers () - << " QChar.isPrint()=" << QChar (ke->key ()).isPrint () - << endl; -#endif + << " QChar.isPrint()=" << QChar (ke->key ()).isPrint (); // Can't be shortcut? if (ke->key () == 0 && ke->key () == Qt::Key_unknown) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tcan't be shortcut - safe to not react"; - #endif } // Normal letter (w/ or w/o shift, keypad button ok)? // TODO: don't like this check else if ((ke->modifiers () & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier)) == 0 && !( ke->text ().isEmpty ())) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tis text - grab"; - #endif e->accept (); } else @@ -108,45 +95,31 @@ // protected virtual [base kpAbstractSelectionTool] void kpToolText::keyPressEvent (QKeyEvent *e) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::keyPressEvent(e->text='" << e->text () << "')"; -#endif - e->ignore (); - if (hasBegunDraw ()) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\talready began draw with mouse - passing on event to kpTool"; - #endif kpAbstractSelectionTool::keyPressEvent (e); return; } - kpTextSelection * const textSel = document ()->textSelection (); if (!textSel) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tno text sel - passing on event to kpTool"; - #endif - //if (hasBegunShape ()) - // endShape (currentPoint (), normalizedRect ()); - kpAbstractSelectionTool::keyPressEvent (e); return; } - // (All handle.+()'s require this info) const QList textLines = textSel->textLines (); const int cursorRow = viewManager ()->textCursorRow (); const int cursorCol = viewManager ()->textCursorCol (); - // TODO: KTextEdit::keyPressEvent() uses KStandardShortcut instead of hardcoding; same fix for kpTool? switch (e->key ()) { @@ -184,29 +157,21 @@ handleDeleteKeyPress (e, textLines, cursorRow, cursorCol); break; - case Qt::Key_Enter: case Qt::Key_Return: handleEnterKeyPress (e, textLines, cursorRow, cursorCol); break; - default: handleTextTyped (e, textLines, cursorRow, cursorCol); break; } - if (!e->isAccepted ()) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tkey processing did not accept (text was '" << e->text () - << "') - passing on event to kpAbstractSelectionTool" - << endl; - #endif - //if (hasBegunShape ()) - // endShape (currentPoint (), normalizedRect ()); + << "') - passing on event to kpAbstractSelectionTool"; kpAbstractSelectionTool::keyPressEvent (e); return; diff --git a/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp b/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp --- a/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp +++ b/tools/selection/text/kpToolText_KeyboardEvents_HandleArrowKeys.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" @@ -53,9 +50,7 @@ void kpToolText::handleUpKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tup pressed"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); @@ -74,9 +69,7 @@ void kpToolText::handleDownKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tdown pressed"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); @@ -95,30 +88,22 @@ void kpToolText::handleLeftKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tleft pressed"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); if (!textLines.isEmpty ()) { if ((e->modifiers () & Qt::ControlModifier) == 0) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tmove single char"; - #endif - MoveCursorLeft (textLines, &cursorRow, &cursorCol); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } else { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tmove to start of word"; - #endif - MoveCursorToWordStart (textLines, &cursorRow, &cursorCol); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } @@ -131,30 +116,22 @@ void kpToolText::handleRightKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tright pressed"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); if (!textLines.isEmpty ()) { if ((e->modifiers () & Qt::ControlModifier) == 0) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tmove single char"; - #endif - MoveCursorRight (textLines, &cursorRow, &cursorCol); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } else { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tmove to start of next word"; - #endif - MoveCursorToNextWordStart (textLines, &cursorRow, &cursorCol); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } @@ -168,9 +145,7 @@ void kpToolText::handleHomeKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\thome pressed"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); @@ -192,10 +167,7 @@ void kpToolText::handleEndKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tend pressed"; -#endif - if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); diff --git a/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp b/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp --- a/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp +++ b/tools/selection/text/kpToolText_KeyboardEvents_HandleTypingKeys.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" #include "kpLogCategories.h" @@ -53,9 +50,7 @@ void kpToolText::handleBackspaceKeyPress (QKeyEvent *e, const QList &textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tbackspace pressed"; -#endif if (!textLines.isEmpty ()) { @@ -95,9 +90,7 @@ void kpToolText::handleDeleteKeyPress (QKeyEvent *e, const QList & textLines, int cursorRow, int cursorCol) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tdelete pressed"; -#endif if (!textLines.isEmpty ()) { @@ -142,9 +135,7 @@ void kpToolText::handleEnterKeyPress (QKeyEvent *e, const QList & /*textLines*/, int /*cursorRow*/, int /*cursorCol*/) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tenter pressed"; -#endif // It's OK for to be empty. @@ -162,18 +153,14 @@ void kpToolText::handleTextTyped (QKeyEvent *e, const QList & /*textLines*/, int /*cursorRow*/, int /*cursorCol*/) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\ttext=" << e->text(); -#endif QString usableText; for (int i = 0; i < e->text ().length (); i++) { if (e->text ().at (i).isPrint ()) usableText += e->text ().at (i); } -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tusableText=" << usableText; -#endif if (usableText.isEmpty ()) { diff --git a/tools/selection/text/kpToolText_Move.cpp b/tools/selection/text/kpToolText_Move.cpp --- a/tools/selection/text/kpToolText_Move.cpp +++ b/tools/selection/text/kpToolText_Move.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" diff --git a/tools/selection/text/kpToolText_ResizeScale.cpp b/tools/selection/text/kpToolText_ResizeScale.cpp --- a/tools/selection/text/kpToolText_ResizeScale.cpp +++ b/tools/selection/text/kpToolText_ResizeScale.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" @@ -42,7 +39,6 @@ return i18n ("Left drag to resize text box."); } - // protected virtual [base kpAbstractSelectionTool] void kpToolText::setSelectionBorderForBeginDrawResizeScale () { diff --git a/tools/selection/text/kpToolText_SelectText.cpp b/tools/selection/text/kpToolText_SelectText.cpp --- a/tools/selection/text/kpToolText_SelectText.cpp +++ b/tools/selection/text/kpToolText_SelectText.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" @@ -66,9 +63,7 @@ // private void kpToolText::beginDrawSelectText () { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\t\tis select cursor pos"; -#endif kpTextSelection *textSel = document ()->textSelection (); Q_ASSERT (textSel); @@ -84,11 +79,9 @@ newRow = newCol = 0; } -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\t\t\told: row=" << viewManager ()->textCursorRow () << "col=" << viewManager ()->textCursorCol (); 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 --- a/tools/selection/text/kpToolText_TextStyle.cpp +++ b/tools/selection/text/kpToolText_TextStyle.cpp @@ -25,9 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_TOOL_TEXT 0 - - #include "tools/selection/text/kpToolText.h" #include "kpToolTextPrivate.h" #include "kpLogCategories.h" @@ -53,19 +50,14 @@ { if (environ ()->settingTextStyle ()) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\trecursion - abort setting text style: " - << environ ()->settingTextStyle () - << endl; - #endif + << environ ()->settingTextStyle (); return false; } if (!document ()->textSelection ()) { - #if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "\tno text selection - abort setting text style"; - #endif return false; } @@ -77,9 +69,7 @@ const kpTextStyle &newTextStyle, const kpTextStyle &oldTextStyle) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::changeTextStyle(" << name << ")"; -#endif if (hasBegunShape ()) endShape (currentPoint (), normalizedRect ()); @@ -96,9 +86,7 @@ // protected slot virtual [base kpAbstractSelectionTool] void kpToolText::slotIsOpaqueChanged (bool isOpaque) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotIsOpaqueChanged()"; -#endif if (!shouldChangeTextStyle ()) return; @@ -119,9 +107,7 @@ void kpToolText::slotColorsSwapped (const kpColor &newForegroundColor, const kpColor &newBackgroundColor) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotColorsSwapped()"; -#endif if (!shouldChangeTextStyle ()) return; @@ -140,9 +126,7 @@ // protected slot virtual [base kpTool] void kpToolText::slotForegroundColorChanged (const kpColor & /*color*/) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotForegroundColorChanged()"; -#endif if (!shouldChangeTextStyle ()) return; @@ -160,9 +144,7 @@ // protected slot virtual [base kpAbstractSelectionTool] void kpToolText::slotBackgroundColorChanged (const kpColor & /*color*/) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotBackgroundColorChanged()"; -#endif if (!shouldChangeTextStyle ()) return; @@ -189,15 +171,10 @@ void kpToolText::slotFontFamilyChanged (const QString &fontFamily, const QString &oldFontFamily) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotFontFamilyChanged() new=" << fontFamily << " old=" - << oldFontFamily - << endl; -#else - (void) fontFamily; -#endif + << oldFontFamily; if (!shouldChangeTextStyle ()) return; @@ -216,15 +193,10 @@ // public slot void kpToolText::slotFontSizeChanged (int fontSize, int oldFontSize) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotFontSizeChanged() new=" << fontSize << " old=" - << oldFontSize - << endl; -#else - (void) fontSize; -#endif + << oldFontSize; if (!shouldChangeTextStyle ()) return; @@ -244,9 +216,7 @@ // public slot void kpToolText::slotBoldChanged (bool isBold) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotBoldChanged(" << isBold << ")"; -#endif if (!shouldChangeTextStyle ()) return; @@ -265,9 +235,7 @@ // public slot void kpToolText::slotItalicChanged (bool isItalic) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotItalicChanged(" << isItalic << ")"; -#endif if (!shouldChangeTextStyle ()) return; @@ -286,9 +254,7 @@ // public slot void kpToolText::slotUnderlineChanged (bool isUnderline) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotUnderlineChanged(" << isUnderline << ")"; -#endif if (!shouldChangeTextStyle ()) return; @@ -307,9 +273,7 @@ // public slot void kpToolText::slotStrikeThruChanged (bool isStrikeThru) { -#if DEBUG_KP_TOOL_TEXT qCDebug(kpLogTools) << "kpToolText::slotStrikeThruChanged(" << isStrikeThru << ")"; -#endif if (!shouldChangeTextStyle ()) return; diff --git a/views/kpThumbnailView.cpp b/views/kpThumbnailView.cpp --- a/views/kpThumbnailView.cpp +++ b/views/kpThumbnailView.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_THUMBNAIL_VIEW 0 - - #include "views/kpThumbnailView.h" #include "kpLogCategories.h" diff --git a/views/kpUnzoomedThumbnailView.cpp b/views/kpUnzoomedThumbnailView.cpp --- a/views/kpUnzoomedThumbnailView.cpp +++ b/views/kpUnzoomedThumbnailView.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW 0 - - #include "views/kpUnzoomedThumbnailView.h" #include "kpLogCategories.h" diff --git a/views/kpView.cpp b/views/kpView.cpp --- a/views/kpView.cpp +++ b/views/kpView.cpp @@ -27,11 +27,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_VIEW 0 -#define DEBUG_KP_VIEW_RENDERER ((DEBUG_KP_VIEW && 1) || 0) - - #include "kpView.h" #include "kpViewPrivate.h" diff --git a/views/kpView_Paint.cpp b/views/kpView_Paint.cpp --- a/views/kpView_Paint.cpp +++ b/views/kpView_Paint.cpp @@ -25,11 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_VIEW 0 -#define DEBUG_KP_VIEW_RENDERER ((DEBUG_KP_VIEW && 1) || 0) - - #include "views/kpView.h" #include "kpViewPrivate.h" @@ -82,9 +77,7 @@ if (doc) { docRect = docRect.intersected (doc->rect ()); - #if DEBUG_KP_VIEW_RENDERER && 1 qCDebug(kpLogViews) << "\tintersected with doc=" << docRect; - #endif } return docRect; diff --git a/views/kpZoomedView.cpp b/views/kpZoomedView.cpp --- a/views/kpZoomedView.cpp +++ b/views/kpZoomedView.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_ZOOMED_VIEW 0 - - #include "views/kpZoomedView.h" #include "kpLogCategories.h" diff --git a/views/manager/kpViewManager.cpp b/views/manager/kpViewManager.cpp --- a/views/manager/kpViewManager.cpp +++ b/views/manager/kpViewManager.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_VIEW_MANAGER 0 - - #include "views/manager/kpViewManager.h" #include "kpViewManagerPrivate.h" diff --git a/views/manager/kpViewManager_TextCursor.cpp b/views/manager/kpViewManager_TextCursor.cpp --- a/views/manager/kpViewManager_TextCursor.cpp +++ b/views/manager/kpViewManager_TextCursor.cpp @@ -43,10 +43,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_VIEW_MANAGER 0 - - #include "kpViewManager.h" #include "kpViewManagerPrivate.h" diff --git a/views/manager/kpViewManager_ViewUpdates.cpp b/views/manager/kpViewManager_ViewUpdates.cpp --- a/views/manager/kpViewManager_ViewUpdates.cpp +++ b/views/manager/kpViewManager_ViewUpdates.cpp @@ -25,10 +25,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#define DEBUG_KP_VIEW_MANAGER 0 - - #include "views/manager/kpViewManager.h" #include "kpViewManagerPrivate.h"