OSDN Git Service

Fix color tooltip crash on mac.
authorLeandro Melo <leandro.melo@nokia.com>
Wed, 6 Oct 2010 11:06:54 +0000 (13:06 +0200)
committerLeandro Melo <leandro.melo@nokia.com>
Wed, 6 Oct 2010 11:45:18 +0000 (13:45 +0200)
Reviewed-by: hjk
Reviewed-by: dt
Task-number: QTCREATORBUG-2038

src/plugins/texteditor/tooltip/tips.cpp

index 26b1d8a..7673413 100644 (file)
@@ -109,6 +109,8 @@ bool ColorTip::handleContentReplacement(const TipContent &content) const
 
 void ColorTip::paintEvent(QPaintEvent *event)
 {
+    QTipLabel::paintEvent(event);
+
     const QColor &color = static_cast<const ColorContent &>(content()).color();
 
     QPen pen;
@@ -124,8 +126,6 @@ void ColorTip::paintEvent(QPaintEvent *event)
     QRect r(1, 1, rect().width() - 2, rect().height() - 2);
     painter.drawTiledPixmap(r, m_tilePixMap);
     painter.drawRect(r);
-
-    QLabel::paintEvent(event);
 }
 
 TextTip::TextTip(QWidget *parent) : QTipLabel(parent)