OSDN Git Service

remove unused QSvgHandler member and methods
authorIvailo Monev <xakepa10@gmail.com>
Fri, 7 Aug 2020 17:37:40 +0000 (20:37 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 7 Aug 2020 17:37:40 +0000 (20:37 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/styles/qwindowsstyle.cpp
src/svg/qsvghandler.cpp
src/svg/qsvghandler_p.h

index 8d55c64..6749c00 100644 (file)
@@ -663,7 +663,6 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
     case SH_ScrollBar_StopMouseOverSlider:
     case SH_MainWindow_SpaceBelowMenuBar:
         ret = 1;
-
         break;
     case SH_ItemView_ShowDecorationSelected:
 #ifndef QT_NO_LISTVIEW
index 602c42b..3915f6c 100644 (file)
@@ -784,7 +784,7 @@ static qreal parseLength(const QString &str, QSvgHandler::LengthType &type,
         numStr.chop(2);
         type = QSvgHandler::LT_IN;
     } else {
-        type = handler->defaultCoordinateSystem();
+        type = QSvgHandler::LT_PX;
         //type = QSvgHandler::LT_OTHER;
     }
     qreal len = toDouble(numStr, ok);
@@ -3034,7 +3034,7 @@ static QSvgNode *createSvgNode(QSvgNode *parent,
                                const QXmlStreamAttributes &attributes,
                                QSvgHandler *handler)
 {
-    Q_UNUSED(parent); Q_UNUSED(attributes);
+    Q_UNUSED(parent);
 
     QString baseProfile = attributes.value(QLatin1String("baseProfile")).toString();
 #if 0
@@ -3094,7 +3094,6 @@ static QSvgNode *createSvgNode(QSvgNode *parent,
         }
         node->setViewBox(QRectF(0, 0, width, height));
     }
-    handler->setDefaultCoordinateSystem(QSvgHandler::LT_PX);
 
     return node;
 }
@@ -3109,9 +3108,10 @@ static QSvgNode *createSwitchNode(QSvgNode *parent,
 }
 
 static bool parseTbreakNode(QSvgNode *parent,
-                            const QXmlStreamAttributes &,
+                            const QXmlStreamAttributes &attributes,
                             QSvgHandler *)
 {
+    Q_UNUSED(attributes);
     if (parent->type() != QSvgNode::TEXTAREA)
         return false;
     static_cast<QSvgText*>(parent)->addLineBreak();
@@ -3423,7 +3423,6 @@ void QSvgHandler::init()
     m_doc = 0;
     m_style = 0;
     m_animEnd = 0;
-    m_defaultCoords = LT_PX;
     m_defaultPen = QPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
     m_defaultPen.setMiterLimit(4);
 
@@ -3685,16 +3684,6 @@ QSvgTinyDocument * QSvgHandler::document() const
     return m_doc;
 }
 
-QSvgHandler::LengthType QSvgHandler::defaultCoordinateSystem() const
-{
-    return m_defaultCoords;
-}
-
-void QSvgHandler::setDefaultCoordinateSystem(LengthType type)
-{
-    m_defaultCoords = type;
-}
-
 void QSvgHandler::pushColor(const QColor &color)
 {
     m_colorStack.push(color);
index 5613a89..dc56338 100644 (file)
@@ -59,7 +59,6 @@ QT_BEGIN_NAMESPACE
 
 class QSvgNode;
 class QSvgTinyDocument;
-class QSvgHandler;
 class QColor;
 class QSvgStyleSelector;
 class QXmlStreamReader;
@@ -84,7 +83,6 @@ public:
         LT_OTHER
     };
 
-public:
     QSvgHandler(QIODevice *device);
     QSvgHandler(const QByteArray &data);
     QSvgHandler(QXmlStreamReader *const data);
@@ -99,9 +97,6 @@ public:
     inline QString errorString() const { return xml->errorString(); }
     inline int lineNumber() const { return xml->lineNumber(); }
 
-    void setDefaultCoordinateSystem(LengthType type);
-    LengthType defaultCoordinateSystem() const;
-
     void pushColor(const QColor &color);
     void pushColorCopy();
     void popColor();
@@ -120,7 +115,6 @@ public:
     inline QPen defaultPen() const
     { return m_defaultPen; }
 
-public:
     bool startElement(const QString &localName, const QXmlStreamAttributes &attributes);
     bool endElement(const QStringRef &localName);
     bool characters(const QStringRef &str);
@@ -148,8 +142,6 @@ private:
 
     QSvgRefCounter<QSvgStyleProperty> m_style;
 
-    LengthType m_defaultCoords;
-
     QStack<QColor> m_colorStack;
     QStack<int>    m_colorTagCount;