Commit ff56c3c2 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Port flake to qcdebug

parent acc045fa
......@@ -203,6 +203,8 @@ set(flake_SRCS
svg/SvgClipPathHelper.cpp
svg/SvgLoadingContext.cpp
svg/SvgShapeFactory.cpp
FlakeDebug.cpp
)
ki18n_wrap_ui(flake_SRCS
......@@ -215,7 +217,7 @@ ki18n_wrap_ui(flake_SRCS
add_library(flake SHARED ${flake_SRCS})
# generate_export_header(flake BASE_NAME flake)
target_link_libraries(flake pigmentcms kowidgetutils koodf kundo2 Qt5::Svg KF5::KDELibs4Support)
target_link_libraries(flake pigmentcms kowidgetutils koodf kundo2 Qt5::Svg)
target_link_libraries(flake LINK_INTERFACE_LIBRARIES pigmentcms kowidgetutils koodf kundo2)
if(HAVE_OPENGL)
......
/*
* Copyright (c) 2015 Boudewijn Rempt <boud@valdyas.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "FlakeDebug.h"
const QLoggingCategory &FLAKE_LOG() \
{
static const QLoggingCategory category("calligra.lib.flake");
return category;
}
/*
* Copyright (c) 2015 Boudewijn Rempt <boud@valdyas.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef FLAKE_DEBUG_H_
#define FLAKE_DEBUG_H_
#include <QDebug>
#include <QLoggingCategory>
#include <flake_export.h>
extern const FLAKE_EXPORT QLoggingCategory &FLAKE_LOG();
#define debugFlake qCDebug(FLAKE_LOG)
#define warnFlake qCWarning(FLAKE_LOG)
#define errorFlake qCCritical(FLAKE_LOG)
#endif
......@@ -32,7 +32,7 @@
#include <QLine>
#include <QLineF>
#include <kdebug.h>
#include <FlakeDebug.h>
int compare(const QPair < QPointF, KoShape * > &a, const QPair < QPointF, KoShape * > &b)
{
......
......@@ -34,7 +34,7 @@
#include "KoCanvasSupervisor.h"
#include "KoToolManager_p.h"
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QMouseEvent>
#include <QPainter>
#include <QScrollBar>
......
......@@ -36,7 +36,7 @@
#include <KoProperties.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QPainter>
#include <QDragEnterEvent>
......@@ -132,7 +132,7 @@ void Viewport::handleDragEnterEvent(QDragEnterEvent *event)
// So, lets remove this again when Zagge adds his new class that does this kind of thing. (KoLoadSave)
KoShapeFactoryBase *factory = KoShapeRegistry::instance()->value(id);
if (! factory) {
kWarning(30006) << "Application requested a shape that is not registered '" <<
warnFlake << "Application requested a shape that is not registered '" <<
id << "', Ignoring";
event->ignore();
return;
......@@ -299,7 +299,7 @@ void Viewport::resetLayout()
int resizeW = viewW;
int resizeH = viewH;
// kDebug(30006) <<"viewH:" << viewH << endl
// debugFlake <<"viewH:" << viewH << endl
// << "docH: " << docH << endl
// << "viewW: " << viewW << endl
// << "docW: " << docW << endl;
......@@ -372,8 +372,8 @@ void Viewport::resetLayout()
emit sizeChanged();
#if 0
kDebug(30006) <<"View port geom:" << geometry();
debugFlake <<"View port geom:" << geometry();
if (m_canvas)
kDebug(30006) <<"Canvas widget geom:" << m_canvas->geometry();
debugFlake <<"Canvas widget geom:" << m_canvas->geometry();
#endif
}
......@@ -35,7 +35,7 @@
#include "KoCanvasSupervisor.h"
#include "KoToolManager_p.h"
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QMouseEvent>
#include <QPainter>
#include <QScrollBar>
......
......@@ -22,7 +22,7 @@
#include "KoCanvasResourceManager.h"
#include <QVariant>
#include <kdebug.h>
#include <FlakeDebug.h>
#include "KoShape.h"
#include "KoShapeStroke.h"
......
......@@ -35,7 +35,7 @@
#include <KoUnit.h>
#include <QPainter>
#include <kdebug.h>
#include <FlakeDebug.h>
KoConnectionShapePrivate::KoConnectionShapePrivate(KoConnectionShape *q)
: KoParameterShapePrivate(q),
......@@ -395,18 +395,18 @@ bool KoConnectionShape::loadOdf(const KoXmlElement & element, KoShapeLoadingCont
if (element.hasAttributeNS(KoXmlNS::draw, "start-shape")) {
d->connectionPointId1 = element.attributeNS(KoXmlNS::draw, "start-glue-point", QString()).toInt();
QString shapeId1 = element.attributeNS(KoXmlNS::draw, "start-shape", QString());
kDebug(30006) << "references start-shape" << shapeId1 << "at glue-point" << d->connectionPointId1;
debugFlake << "references start-shape" << shapeId1 << "at glue-point" << d->connectionPointId1;
d->shape1 = context.shapeById(shapeId1);
if (d->shape1) {
kDebug(30006) << "start-shape was already loaded";
debugFlake << "start-shape was already loaded";
d->shape1->addDependee(this);
if (d->shape1->hasConnectionPoint(d->connectionPointId1)) {
kDebug(30006) << "connecting to start-shape";
debugFlake << "connecting to start-shape";
d->handles[StartHandle] = d->shape1->absoluteTransformation(0).map(d->shape1->connectionPoint(d->connectionPointId1).position);
kDebug(30006) << "start handle position =" << d->handles[StartHandle];
debugFlake << "start handle position =" << d->handles[StartHandle];
}
} else {
kDebug(30006) << "start-shape not loaded yet, deferring connection";
debugFlake << "start-shape not loaded yet, deferring connection";
context.updateShape(shapeId1, new KoConnectionShapeLoadingUpdater(this, KoConnectionShapeLoadingUpdater::First));
}
} else {
......@@ -417,18 +417,18 @@ bool KoConnectionShape::loadOdf(const KoXmlElement & element, KoShapeLoadingCont
if (element.hasAttributeNS(KoXmlNS::draw, "end-shape")) {
d->connectionPointId2 = element.attributeNS(KoXmlNS::draw, "end-glue-point", "").toInt();
QString shapeId2 = element.attributeNS(KoXmlNS::draw, "end-shape", "");
kDebug(30006) << "references end-shape " << shapeId2 << "at glue-point" << d->connectionPointId2;
debugFlake << "references end-shape " << shapeId2 << "at glue-point" << d->connectionPointId2;
d->shape2 = context.shapeById(shapeId2);
if (d->shape2) {
kDebug(30006) << "end-shape was already loaded";
debugFlake << "end-shape was already loaded";
d->shape2->addDependee(this);
if (d->shape2->hasConnectionPoint(d->connectionPointId2)) {
kDebug(30006) << "connecting to end-shape";
debugFlake << "connecting to end-shape";
d->handles[EndHandle] = d->shape2->absoluteTransformation(0).map(d->shape2->connectionPoint(d->connectionPointId2).position);
kDebug(30006) << "end handle position =" << d->handles[EndHandle];
debugFlake << "end handle position =" << d->handles[EndHandle];
}
} else {
kDebug(30006) << "end-shape not loaded yet, deferring connection";
debugFlake << "end-shape not loaded yet, deferring connection";
context.updateShape(shapeId2, new KoConnectionShapeLoadingUpdater(this, KoConnectionShapeLoadingUpdater::Second));
}
} else {
......
......@@ -25,7 +25,7 @@
#include <KoToolProxy.h>
#include <KoToolSelection.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QAction>
// KoCopyControllerPrivate
......
......@@ -23,7 +23,7 @@
#include <QVariant>
#include <kundo2stack.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include "KoShape.h"
#include "KoShapeController.h"
......
......@@ -28,7 +28,7 @@
#include <QMimeData>
#include <QString>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <KoStore.h>
#include <KoGenStyles.h>
......@@ -102,14 +102,14 @@ bool KoDrag::setOdf(const char *mimeType, KoDragOdfSaveHelper &helper)
}
if (!context->saveDataCenter(store, manifestWriter)) {
kDebug(30006) << "save data centers failed";
debugFlake << "save data centers failed";
return false;
}
// Save embedded objects
KoDocumentBase::SavingContext documentContext(odfStore, embeddedSaver);
if (!embeddedSaver.saveEmbeddedDocuments(documentContext)) {
kDebug(30006) << "save embedded documents failed";
debugFlake << "save embedded documents failed";
return false;
}
......
......@@ -22,7 +22,7 @@
#include <QHash>
#include <QGlobalStatic>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <KoXmlReader.h>
#include <KoXmlNS.h>
......@@ -134,19 +134,19 @@ QSet<KoEventAction*> KoEventActionRegistry::createEventActionsFromOdf(const KoXm
}
}
} else {
kWarning(30006) << "presentation:event-listerer action = " << action << "not supported";
warnFlake << "presentation:event-listerer action = " << action << "not supported";
}
} else if (element.namespaceURI() == KoXmlNS::script) {
// TODO
} else {
kWarning(30006) << "element" << e.namespaceURI() << e.tagName() << "not supported";
warnFlake << "element" << e.namespaceURI() << e.tagName() << "not supported";
}
} else {
kWarning(30006) << "element" << e.namespaceURI() << e.tagName() << "not supported";
warnFlake << "element" << e.namespaceURI() << e.tagName() << "not supported";
}
}
} else {
kWarning(30006) << "office:event-listeners not found got:" << e.namespaceURI() << e.tagName();
warnFlake << "office:event-listeners not found got:" << e.namespaceURI() << e.tagName();
}
return eventActions;
......
......@@ -24,7 +24,7 @@
#include "KoFilterEffect.h"
#include <KoPluginLoader.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <KoXmlReader.h>
Q_GLOBAL_STATIC(KoFilterEffectRegistry, s_instance)
......
......@@ -20,7 +20,7 @@
#include "KoFrameShape.h"
#include <KoXmlReader.h>
#include <kdebug.h>
#include <FlakeDebug.h>
class Q_DECL_HIDDEN KoFrameShape::Private
{
......@@ -47,7 +47,7 @@ bool KoFrameShape::loadOdfFrame(const KoXmlElement & element, KoShapeLoadingCont
{
const KoXmlElement & frameElement(KoXml::namedItemNS(element, d->ns, d->tag));
if (frameElement.isNull()) {
kError(30006) << "frame element" << d->tag << "not found";
errorFlake << "frame element" << d->tag << "not found";
return false;
}
......
......@@ -26,7 +26,7 @@
#include <KoOdfGraphicStyles.h>
#include <KoShapeSavingContext.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QSharedPointer>
#include <QBrush>
......
......@@ -31,7 +31,7 @@
#include <klocalizedstring.h>
#include <QPainter>
#include <QRectF>
#include <kdebug.h>
#include <FlakeDebug.h>
#define DEFAULT_GRID_SIZE_MM 5.0
......
......@@ -50,7 +50,7 @@ public:
} else if (text[pos] == 'V') {
//vertical element
str = text.mid(pos + 1, (newPos - pos));
//kDebug(30518)<<" vertical :"<< str;
//debugFlake<<" vertical :"<< str;
qreal posX = str.toDouble() / 100.0;
vertGuideLines.append(MM_TO_POINT(posX));
......
......@@ -29,7 +29,7 @@
#include <KoXmlNS.h>
#include <KoUnit.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QColor>
#include <QString>
......@@ -177,11 +177,11 @@ bool KoHatchBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &sh
QString fillStyle = styleStack.property(KoXmlNS::draw, "fill");
if (fillStyle == "hatch") {
QString style = styleStack.property(KoXmlNS::draw, "fill-hatch-name");
kDebug(30003) << " hatch style is :" << style;
debugFlake << " hatch style is :" << style;
KoXmlElement* draw = context.stylesReader().drawStyles("hatch")[style];
if (draw) {
kDebug(30003) << "Hatch style found for:" << style;
debugFlake << "Hatch style found for:" << style;
QString angle = draw->attributeNS(KoXmlNS::draw, "rotation", QString("0"));
if (angle.at(angle.size()-1).isLetter()) {
......@@ -192,7 +192,7 @@ bool KoHatchBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &sh
d->angle = int(angle.toInt() / 10);
}
kDebug(30003) << "angle :" << d->angle;
debugFlake << "angle :" << d->angle;
d->name = draw->attributeNS(KoXmlNS::draw, "display-name");
......
......@@ -27,7 +27,7 @@
#include <KoXmlWriter.h>
#include <QMap>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QMimeDatabase>
#include <QMimeType>
......@@ -74,7 +74,7 @@ bool KoImageCollection::completeSaving(KoStore *store, KoXmlWriter *manifestWrit
while (imagesToSaveIter != imagesToSave.end()) {
if (knownImagesIter == d->images.end()) {
// this should not happen
kWarning(30006) << "image not found";
warnFlake << "image not found";
Q_ASSERT(0);
break;
}
......@@ -94,10 +94,10 @@ bool KoImageCollection::completeSaving(KoStore *store, KoXmlWriter *manifestWrit
const QString mimetype(db.mimeTypeForFile(imagesToSaveIter.value(), QMimeDatabase::MatchExtension).name());
manifestWriter->addManifestEntry(imagesToSaveIter.value(), mimetype);
} else {
kWarning(30006) << "saving image" << imagesToSaveIter.value() << "failed";
warnFlake << "saving image" << imagesToSaveIter.value() << "failed";
}
} else {
kWarning(30006) << "saving image failed: open store failed";
warnFlake << "saving image failed: open store failed";
}
++knownImagesIter;
++imagesToSaveIter;
......@@ -105,7 +105,7 @@ bool KoImageCollection::completeSaving(KoStore *store, KoXmlWriter *manifestWrit
++knownImagesIter;
} else {
// this should not happen
kWarning(30006) << "image not found";
warnFlake << "image not found";
abort();
Q_ASSERT(0);
}
......
......@@ -29,7 +29,7 @@
#include <KoStore.h>
#include <KoStoreDevice.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QBuffer>
#include <QCryptographicHash>
......@@ -192,7 +192,7 @@ void KoImageData::setImage(const QImage &image, KoImageCollection *collection)
QBuffer buffer;
buffer.open(QIODevice::WriteOnly);
if (!image.save(&buffer, d->suffix.toLatin1())) {
kWarning(30006) << "Write temporary file failed";
warnFlake << "Write temporary file failed";
d->errorCode = StorageFailed;
delete d->temporaryFile;
d->temporaryFile = 0;
......@@ -291,13 +291,13 @@ void KoImageData::setImage(const QString &url, KoStore *store, KoImageCollection
}
}
if (!device.open(QIODevice::ReadOnly)) {
kWarning(30006) << "open file from store " << url << "failed";
warnFlake << "open file from store " << url << "failed";
d->errorCode = OpenFailed;
return;
}
d->copyToTemporary(device);
} else {
kWarning(30006) << "Find file in store " << url << "failed";
warnFlake << "Find file in store " << url << "failed";
d->errorCode = OpenFailed;
return;
}
......
......@@ -28,7 +28,7 @@
#include <QImageWriter>
#include <QCryptographicHash>
#include <QFileInfo>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QBuffer>
KoImageDataPrivate::KoImageDataPrivate(KoImageData *q)
......@@ -59,7 +59,7 @@ bool KoImageDataPrivate::saveData(QIODevice &device)
// also fixes the problem that gif images are empty after saving-
if (temporaryFile) {
if (!temporaryFile->open()) {
kWarning(30006) << "Read file from temporary store failed";
warnFlake << "Read file from temporary store failed";
return false;
}
char buf[4096];
......@@ -114,7 +114,7 @@ void KoImageDataPrivate::copyToTemporary(QIODevice &device)
delete temporaryFile;
temporaryFile = new QTemporaryFile(QDir::tempPath() + "/" + qAppName() + QLatin1String("_XXXXXX"));
if (!temporaryFile->open()) {
kWarning(30006) << "open temporary file for writing failed";
warnFlake << "open temporary file for writing failed";
errorCode = KoImageData::StorageFailed;
return;
}
......
......@@ -26,7 +26,7 @@
#include <KoOdfLoadingContext.h>
#include <KoOdfReadStore.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <FlakeDebug.h>
class Q_DECL_HIDDEN KoMarkerCollection::Private
{
......@@ -55,7 +55,7 @@ KoMarkerCollection::~KoMarkerCollection()
bool KoMarkerCollection::loadOdf(KoShapeLoadingContext &context)
{
kDebug(30006);
debugFlake;
QHash<QString, KoMarker*> lookupTable;
const QHash<QString, KoXmlElement*> markers = context.odfLoadingContext().stylesReader().drawStyles("marker");
......@@ -87,11 +87,11 @@ void KoMarkerCollection::loadDefaultMarkers()
loadOdfMarkers(defaultMarkers, shapeContext, lookupTable);
}
else {
kWarning(30006) << "reading of" << filePath << "failed:" << errorMessage;
warnFlake << "reading of" << filePath << "failed:" << errorMessage;
}
}
else {
kDebug(30006) << "markers.xml not found";
debugFlake << "markers.xml not found";
}
}
......@@ -103,7 +103,7 @@ void KoMarkerCollection::loadOdfMarkers(const QHash<QString, KoXmlElement*> &mar
if (marker->loadOdf(*(it.value()), context)) {
KoMarker *m = addMarker(marker);
lookupTable.insert(it.key(), m);
kDebug(30006) << "loaded marker" << it.key() << marker << m;
debugFlake << "loaded marker" << it.key() << marker << m;
if (m != marker) {
delete marker;
}
......@@ -130,7 +130,7 @@ KoMarker * KoMarkerCollection::addMarker(KoMarker *marker)
return marker;
}
if (m && *marker == *m) {
kDebug(30006) << "marker is the same as other";
debugFlake << "marker is the same as other";
return m.data();
}
}
......
......@@ -19,7 +19,7 @@
#include "KoMarkerData.h"
#include <kdebug.h>
#include <FlakeDebug.h>
#include <KoStyleStack.h>
#include <KoXmlNS.h>
#include <KoUnit.h>
......
......@@ -35,7 +35,7 @@
#include <QPen>
#include <QColor>
#include <kdebug.h>
#include <FlakeDebug.h>
static bool s_workaroundPresentationPlaceholderBug = false;
......@@ -43,7 +43,7 @@ void KoOdfWorkaround::fixPenWidth(QPen & pen, KoShapeLoadingContext &context)
{
if (context.odfLoadingContext().generatorType() == KoOdfLoadingContext::OpenOffice && pen.widthF() == 0.0) {
pen.setWidthF(0.5);
kDebug(30003) << "Work around OO bug with pen width 0";
debugFlake << "Work around OO bug with pen width 0";
}
}
......
......@@ -22,7 +22,7 @@
#include "KoParameterShape_p.h"
#include <QPainter>
#include <kdebug.h>
#include <FlakeDebug.h>
KoParameterShape::KoParameterShape()
: KoPathShape(*(new KoParameterShapePrivate(this)))
......@@ -42,7 +42,7 @@ void KoParameterShape::moveHandle(int handleId, const QPointF & point, Qt::Keybo
{
Q_D(KoParameterShape);
if (handleId >= d->handles.size()) {
kWarning(30006) << "handleId out of bounds";
warnFlake << "handleId out of bounds";
return;
}
......
......@@ -23,7 +23,7 @@
#include <KoCanvasBase.h>
#include <KoToolProxy.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QAction>
KoPasteController::KoPasteController(KoCanvasBase *canvas, QAction *pasteAction)
......
......@@ -24,7 +24,7 @@
#include <KoCanvasBase.h>
#include <KoToolProxy.h>
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QAction>
class Q_DECL_HIDDEN KoPasteController::Private
......@@ -34,7 +34,7 @@ public:
}
void paste() {
kDebug(30004) <<"Paste!";
debugFlake <<"Paste!";
canvas->toolProxy()->paste();
}
......
......@@ -22,7 +22,7 @@
#include "KoPathPoint.h"
#include "KoPathShape.h"
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QPainter>
#include <QPointF>
......
......@@ -19,7 +19,7 @@
#include "KoPathSegment.h"
#include "KoPathPoint.h"
#include <kdebug.h>
#include <FlakeDebug.h>
#include <QPainterPath>
#include <QTransform>
#include <math.h>
......@@ -254,7 +254,7 @@ public:
{
int index = 0;
foreach (const QPointF &p, points) {
kDebug(30006) << QString("P%1 ").arg(index++) << p;
debugFlake << QString("P%1 ").arg(index++) << p;
}
}
#endif
......@@ -513,7 +513,7 @@ qreal KoPathSegment::Private::chordLength() const
QList<QPointF> KoPathSegment::Private::linesIntersection(const KoPathSegment &segment) const
{
//kDebug(30006) << "intersecting two lines";
//debugFlake << "intersecting two lines";
/*
we have to line segments:
......@@ -770,16 +770,16 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
QRectF myBound = boundingRect();
QRectF otherBound = segment.boundingRect();
//kDebug(30006) << "my boundingRect =" << myBound;
//kDebug(30006) << "other boundingRect =" << otherBound;
//debugFlake << "my boundingRect =" << myBound;
//debugFlake << "other boundingRect =" << otherBound;
if (!myBound.intersects(otherBound)) {
//kDebug(30006) << "segments do not intersect";
//debugFlake << "segments do not intersect";
return isects;
}
// short circuit lines intersection
if (degree1 == 1 && degree2 == 1) {
//kDebug(30006) << "intersecting two lines";
//debugFlake << "intersecting two lines";
isects += d->linesIntersection(segment);
return isects;
}
......@@ -810,7 +810,7 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
}
}
//kDebug(30006) << "using fat line: dmax =" << dmax << " dmin =" << dmin;
//debugFlake << "using fat line: dmax =" << dmax << " dmin =" << dmin;
/*
the other segment is given as a bezier curve of the form:
......@@ -850,7 +850,7 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
QPointF p3(1.0, d->distanceFromChord(segment.second()->point()));
dt = KoPathSegment(p0, p1, p2, p3);
} else {
//kDebug(30006) << "invalid degree of segment -> exiting";
//debugFlake << "invalid degree of segment -> exiting";
return isects;
}
......@@ -867,7 +867,7 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
for (int i = 0; i < hullCount; ++i) {
QPointF p1 = hull[i];
QPointF p2 = hull[(i+1) % hullCount];
//kDebug(30006) << "intersecting hull edge (" << p1 << p2 << ")";
//debugFlake << "intersecting hull edge (" << p1 << p2 << ")";
// hull edge is completely above dmax
if (p1.y() > dmax && p2.y() > dmax)
continue;
......@@ -883,10 +883,10 @@ QList<QPointF> KoPathSegment::intersections(const KoPathSegment &segment) const
tmax = qMax(tmax, p1.x());
if (dmaxIntersection) {
intersectionsFoundMax = true;
//kDebug(30006) << "found intersection with dmax at " << p1.x() << "," << dmax;
//debugFlake << "found intersection with dmax at " << p1.x() << "," << dmax;
} else {
intersectionsFoundMin = true;
//kDebug(30006) << "found intersection with dmin at " << p1.x() << "," << dmin;
//debugFlake << "found intersection with dmin at " << p1.x() << "," << dmin;
}
}