Rename QPaintDevice::init() to initPainter()
authorRichard Moore <rich@kde.org>
Wed, 5 Sep 2012 08:24:22 +0000 (09:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sun, 9 Sep 2012 22:27:33 +0000 (00:27 +0200)
The old name was too generic and was likely to cause warnings in user
code.

Change-Id: I7126d8fe89a394cd8388af5a030961af7b69c741
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/gui/painting/qpaintdevice.cpp
src/gui/painting/qpaintdevice.h
src/gui/painting/qpainter.cpp
src/widgets/kernel/qwidget.cpp
src/widgets/kernel/qwidget.h

index 47cc3fb..f8ee384 100644 (file)
@@ -60,7 +60,7 @@ QPaintDevice::~QPaintDevice()
 /*!
     \internal
 */
-void QPaintDevice::init(QPainter *) const
+void QPaintDevice::initPainter(QPainter *) const
 {
 }
 
index 6d3815c..a793a42 100644 (file)
@@ -90,7 +90,7 @@ public:
 protected:
     QPaintDevice();
     virtual int metric(PaintDeviceMetric metric) const;
-    virtual void init(QPainter *painter) const;
+    virtual void initPainter(QPainter *painter) const;
     virtual QPaintDevice *redirected(QPoint *offset) const;
     virtual QPainter *sharedPainter() const;
 
index 3b7bfcf..da50bd3 100644 (file)
@@ -1541,7 +1541,7 @@ void QPainter::initFrom(const QPaintDevice *device)
         return;
     }
 
-    device->init(this);
+    device->initPainter(this);
 
     if (d->extended) {
         d->extended->penChanged();
index c068f4e..c5f033c 100644 (file)
@@ -11227,7 +11227,7 @@ void QWidget::ungrabGesture(Qt::GestureType gesture)
     the given widget's. This function is called automatically when the
     painter is opened on a QWidget.
 */
-void QWidget::init(QPainter *painter) const
+void QWidget::initPainter(QPainter *painter) const
 {
     const QPalette &pal = palette();
     painter->d_func()->state->pen = QPen(pal.brush(foregroundRole()), 0);
index 67b5251..5baa3c3 100644 (file)
@@ -643,7 +643,7 @@ protected:
     virtual void changeEvent(QEvent *);
 
     int metric(PaintDeviceMetric) const;
-    void init(QPainter *painter) const;
+    void initPainter(QPainter *painter) const;
     QPaintDevice *redirected(QPoint *offset) const;
     QPainter *sharedPainter() const;