summaryrefslogtreecommitdiff
path: root/src/svg
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@nokia.com>2012-05-23 07:03:42 +0900
committerQt by Nokia <qt-info@nokia.com>2012-05-23 11:28:26 +0200
commit0d129f9b85503f23cc270f9cf7b310f44dd11ebe (patch)
treee4acb2520c1a8187d5a71208c963bad0cafba3a4 /src/svg
parent238d72b13fbddd1d7bc6466fca9188ce16044dec (diff)
downloadqtsvg-0d129f9b85503f23cc270f9cf7b310f44dd11ebe.tar.gz
Fix compilation for -no-widgets option
Disable QSvgWidget and QGraphicsSvgItem when -no-widgets is set. The module doesn't depend on widgets when QT_CONFIG contains no-widgets. QT_NO_SVG* (which is removed in Qt5) is replaced to QT_NO_WIDGETS. Change-Id: I11457a40e96d193269dcc37ac7fdb86f3f7c1958 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qgraphicssvgitem.cpp4
-rw-r--r--src/svg/qgraphicssvgitem.h9
-rw-r--r--src/svg/qsvghandler.cpp2
-rw-r--r--src/svg/qsvgwidget.cpp4
-rw-r--r--src/svg/qsvgwidget.h9
-rw-r--r--src/svg/svg.pro3
6 files changed, 18 insertions, 13 deletions
diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp
index 3b6ff1c..e56a652 100644
--- a/src/svg/qgraphicssvgitem.cpp
+++ b/src/svg/qgraphicssvgitem.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qgraphicssvgitem.h"
-#ifndef QT_NO_GRAPHICSSVGITEM
+#ifndef QT_NO_WIDGETS
#include "qpainter.h"
#include "qstyleoption.h"
@@ -388,4 +388,4 @@ QT_END_NAMESPACE
#include "moc_qgraphicssvgitem.cpp"
-#endif // QT_NO_GRAPHICSSVGITEM
+#endif // QT_NO_WIDGETS
diff --git a/src/svg/qgraphicssvgitem.h b/src/svg/qgraphicssvgitem.h
index 2ac7248..b8e8b9d 100644
--- a/src/svg/qgraphicssvgitem.h
+++ b/src/svg/qgraphicssvgitem.h
@@ -41,9 +41,11 @@
#ifndef QGRAPHICSSVGITEM_H
#define QGRAPHICSSVGITEM_H
-#include <QtWidgets/qgraphicsitem.h>
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_WIDGETS
-#ifndef QT_NO_GRAPHICSSVGITEM
+#include <QtWidgets/qgraphicsitem.h>
QT_BEGIN_HEADER
@@ -96,5 +98,6 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QT_NO_GRAPHICSSVGITEM
+#endif // QT_NO_WIDGETS
+
#endif // QGRAPHICSSVGITEM_H
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 9ba213d..18b3694 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -51,8 +51,6 @@
#include "qsvgnode_p.h"
#include "qsvgfont_p.h"
-#include "qapplication.h"
-#include "qwidget.h"
#include "qpen.h"
#include "qpainterpath.h"
#include "qbrush.h"
diff --git a/src/svg/qsvgwidget.cpp b/src/svg/qsvgwidget.cpp
index 7310d80..e7508ab 100644
--- a/src/svg/qsvgwidget.cpp
+++ b/src/svg/qsvgwidget.cpp
@@ -41,7 +41,7 @@
#include "qsvgwidget.h"
-#ifndef QT_NO_SVGWIDGET
+#ifndef QT_NO_WIDGETS
#include "qsvgrenderer.h"
@@ -170,4 +170,4 @@ void QSvgWidget::load(const QByteArray &contents)
QT_END_NAMESPACE
-#endif // QT_NO_SVGWIDGET
+#endif // QT_NO_WIDGETS
diff --git a/src/svg/qsvgwidget.h b/src/svg/qsvgwidget.h
index 24eefc5..4594a84 100644
--- a/src/svg/qsvgwidget.h
+++ b/src/svg/qsvgwidget.h
@@ -42,9 +42,11 @@
#ifndef QSVGWIDGET_H
#define QSVGWIDGET_H
-#include <QtWidgets/qwidget.h>
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_WIDGETS
-#ifndef QT_NO_SVGWIDGET
+#include <QtWidgets/qwidget.h>
QT_BEGIN_HEADER
@@ -80,5 +82,6 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QT_NO_SVGWIDGET
+#endif // QT_NO_WIDGETS
+
#endif // QSVGWIDGET_H
diff --git a/src/svg/svg.pro b/src/svg/svg.pro
index f8741da..c8c6797 100644
--- a/src/svg/svg.pro
+++ b/src/svg/svg.pro
@@ -2,7 +2,8 @@ load(qt_module)
TARGET = QtSvg
QPRO_PWD = $$PWD
-QT = core-private gui-private widgets widgets-private
+QT = core-private gui-private
+!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
CONFIG += module
MODULE_PRI = ../../modules/qt_svg.pri