diff options
| author | David Faure <[email protected]> | 2009-03-17 13:40:20 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2009-03-17 13:40:20 +0000 |
| commit | 28f6a03682a345196bb66a7577293315bd7bb83c (patch) | |
| tree | eeea1af844a56cc6223c42c93ea6aa05763816ef /src/tooltips | |
| parent | af49caa18e3930dc7115f56c402f6d27e2c42ef4 (diff) | |
Fix infinite loop on startup due to r938051 (KToolTipManager ctor creating KTipLabel which calls KToolTipManager singleton which isn't set yet)
svn path=/trunk/KDE/kdebase/apps/; revision=940428
Diffstat (limited to 'src/tooltips')
| -rw-r--r-- | src/tooltips/ktooltip.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tooltips/ktooltip.cpp b/src/tooltips/ktooltip.cpp index d5aa0f7b7..bfd0c69ca 100644 --- a/src/tooltips/ktooltip.cpp +++ b/src/tooltips/ktooltip.cpp @@ -239,10 +239,10 @@ KToolTipDelegate *KAbstractToolTipLabel::delegate() const -class QWidgetLabel : public QWidget, public KAbstractToolTipLabel +class KTipLabel : public QWidget, public KAbstractToolTipLabel { public: - QWidgetLabel(); + KTipLabel(bool transparent); void showTip(const QPoint &pos, const KToolTipItem *item); void moveTip(const QPoint &pos); void hideTip(); @@ -255,32 +255,32 @@ private: const KToolTipItem *currentItem; }; -QWidgetLabel::QWidgetLabel() : QWidget(0, Qt::ToolTip) +KTipLabel::KTipLabel(bool transparent) : QWidget(0, Qt::ToolTip) { - if (KToolTipManager::instance()->haveAlphaChannel()) { + if (transparent) { setAttribute(Qt::WA_TranslucentBackground); } } -void QWidgetLabel::showTip(const QPoint &pos, const KToolTipItem *item) +void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item) { currentItem = item; move(pos); show(); } -void QWidgetLabel::hideTip() +void KTipLabel::hideTip() { hide(); currentItem = 0; } -void QWidgetLabel::moveTip(const QPoint &pos) +void KTipLabel::moveTip(const QPoint &pos) { move(pos); } -void QWidgetLabel::paintEvent(QPaintEvent*) +void KTipLabel::paintEvent(QPaintEvent*) { KStyleOptionToolTip option = styleOption(); option.rect = rect(); @@ -293,7 +293,7 @@ void QWidgetLabel::paintEvent(QPaintEvent*) delegate()->paint(&p, &option, currentItem); } -QSize QWidgetLabel::sizeHint() const +QSize KTipLabel::sizeHint() const { if (!currentItem) return QSize(); @@ -461,7 +461,7 @@ KToolTipManager::KToolTipManager() label = new ArgbLabel(visual, depth); else #endif - label = new QWidgetLabel(); + label = new KTipLabel(haveAlphaChannel()); } KToolTipManager::~KToolTipManager() |
