Git commit 514b87617ad9e2e06c17bd5bfe9db7c868df32b4 by Boudewijn Rempt.
Committed on 24/03/2017 at 10:07.
Pushed by rempt into branch 'wolthera/T5411-modernise-calligraphy-tool'.
Make Krita build with KOXML_USE_QDOM defined
This "fixes" all the places where KoXml::asQDomElement was used,
which was broken. It looks like nobody built like this since, oh,
2010 or so... It's a first step towards not using the KoXmlReader
code at all anymore.
There is no visible performance regression, but I didn't do real
benchmarking. But at least, with the ifdef working, we can do
benchmarking again.
In the text shape, some parts are just rudely ifdeffed out, mostly
to do with RDF, which krita doesn't need anyway, or changetracking,
which krita also doesn't need.
The really tricky bit is that in several places we used KoXmlDocument
with stripSpaces set to true, and I'm not sure what not being able
to set that flag will have.
KOXML_USE_QDOM is defined now, so Wolthera can continue with
the calligraphy tool; before merging to master, we should undefine
it again. Maybe we should make it a cmake option, if we're not just
going to remove KoXmlReader altogether.
CCMAIL:kimages...@kde.org
CC'ing the calligra developers since this might be of interest for
Calligra, too: either calligra should remove KOXmlReaderForward.h,
or make the ifdef work again -- which is likely much tricker than
it was for krita.
CCMAIL:calligra-devel@kde.org
M +1-1libs/flake/KoFilterEffect.h
M +1-1libs/flake/KoFilterEffectRegistry.h
M +1-1libs/flake/KoFrameShape.h
M +2-1libs/flake/KoMarker.h
M +1-4libs/flake/KoMarkerCollection.cpp
M +1-1libs/flake/KoMarkerCollection.h
M +1-1libs/flake/KoOdfGradientBackground.h
M +2-2libs/flake/KoOdfWorkaround.h
M +1-1libs/flake/KoShapeAnchor.h
M +1-1libs/flake/KoTextShapeDataBase.h
M +7-6libs/flake/KoUnavailShape.cpp
M +1-1libs/flake/svg/SvgCssHelper.h
M +3-2libs/flake/svg/SvgParser.cpp
M +1-1libs/flake/svg/SvgShape.h
M +1-1libs/flake/svg/SvgStyleParser.h
M +1-1libs/flake/svg/SvgUtil.h
M +2-1libs/odf/KoColumns.h
M +1-5libs/odf/KoOdfReadStore.cpp
M +4-0libs/odf/tests/TestXmlReaderWithoutSpaces.cpp
M +8-10 libs/store/KoXmlReader.cpp
M +12 -10 libs/store/KoXmlReader.h
M +1-1libs/store/KoXmlReaderForward.h
M +1-3libs/ui/flake/kis_shape_layer.cc
M +1-1plugins/flake/artistictextshape/ArtisticTextLoadingContext.h
M +1-1plugins/flake/textshape/kotext/KoSection.h
M +3-1plugins/flake/textshape/kotext/changetracker/KoChangeTracker.cpp
M +6-1plugins/flake/textshape/kotext/opendocument/KoTextWriter_p.cpp
M +19 -19 plugins/flake/textshape/kotext/styles/KoTableCellStyle.cpp
M +8-0plugins/impex/kra/kra_converter.cpp
M +1-1plugins/impex/libkra/kis_kra_loader.cpp
https://commits.kde.org/krita/514b87617ad9e2e06c17bd5bfe9db7c868df32b4
diff --git a/libs/flake/KoFilterEffect.h b/libs/flake/KoFilterEffect.h
index f0173f79c51..2817f2861ce 100644
--- a/libs/flake/KoFilterEffect.h
+++ b/libs/flake/KoFilterEffect.h
@@ -27,7 +27,7 @@ class QRectF;
class KoXmlWriter;
class KoFilterEffectRenderContext;
class KoFilterEffectLoadingContext;
-class KoXmlElement;
+#include
#include "kritaflake_export.h"
#include
diff --git a/libs/flake/KoFilterEffectRegistry.h
b/libs/flake/KoFilterEffectRegistry.h
index c79213c7451..1176385d2fb 100644
--- a/libs/flake/KoFilterEffectRegistry.h
+++ b/libs/flake/KoFilterEffectRegistry.h
@@ -25,7 +25,7 @@
#include "kritaflake_export.h"
-class KoXmlElement;
+#include
class KoFilterEffectLoadingContext;
class KoFilterEffect;
diff --git a/libs/flake/KoFrameShape.h b/libs/flake/KoFrameShape.h
index 062bfd2ffda..466a85e1e45 100644
--- a/libs/flake/KoFrameShape.h
+++ b/libs/flake/KoFrameShape.h
@@ -23,7 +23,7 @@
#include "kritaflake_export.h"
class KoShapeLoadingContext;
-class KoXmlElement;
+#include
class QString;
/**
diff --git a/libs/flake/KoMarker.h b/libs/flake/KoMarker.h
index a50bc27b4fa..2413ced08b8 100644
--- a/libs/flake/KoMarker.h
+++ b/libs/flake/KoMarker.h
@@ -26,7 +26,8 @@
#include "kritaflake_export.h"
#include
-class KoXmlElement;
+#include
+
class KoShapeLoadingContext;
class KoShapeSavingContext;
class QString;
diff --git a/libs/flake/KoMarkerCollection.cpp
b/libs/flake/KoMarkerCollection.cpp
index 22c53dffca4..f723f34dee1 100644
--- a/libs/flake/KoMarkerCollection.cpp
+++ b/libs/flake/KoMarkerCollection.cpp
@@ -70,15 +70,12 @@ void KoMarkerCollection::loadMarkersFromFile(const QString
)
if (!file.open(QIODevice::ReadOnly)) return;
-QXmlStreamReader reader();
-reader.setNamespaceProcessing(false);
-
QString errorMsg;
int errorLine = 0;
int errorColumn;
KoXmlDocument doc;
-bool ok = doc.setContent(, , , );
+bool ok = doc.setContent(, false, , ,
);
if (!ok) {