[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdebase/kicker/libkicker
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2005-08-18 22:03:02
Message-ID: 1124402582.025419.372.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 450717 by aseigo:
watch for the item we are tipping for getting deleted out from
underneath us
BUG:109760
M +25 -6 kickertip.cpp
M +1 -0 kickertip.h
--- branches/KDE/3.5/kdebase/kicker/libkicker/kickertip.cpp #450716:450717
@@ -300,15 +300,21 @@
}
}
-void KickerTip::internalUpdate()
+void KickerTip::tipFor(const QWidget* w)
{
- m_dirty = true;
- repaint(false);
-}
+ if (m_tippingFor)
+ {
+ disconnect(m_tippingFor, SIGNAL(destroyed(QObject*)),
+ this, SLOT(tipperDestroyed(QObject*)));
+ }
-void KickerTip::tipFor(const QWidget* w)
-{
m_tippingFor = w;
+
+ if (m_tippingFor)
+ {
+ connect(m_tippingFor, SIGNAL(destroyed(QObject*)),
+ this, SLOT(tipperDestroyed(QObject*)));
+ }
}
void KickerTip::untipFor(const QWidget* w)
@@ -326,6 +332,19 @@
return m_tippingFor == w;
}
+void KickerTip::tipperDestroyed(QObject* o)
+{
+ // we can't do a dynamic cast because we are in the process of dieing
+ // so static it is.
+ untipFor(static_cast<QWidget*>(o));
+}
+
+void KickerTip::internalUpdate()
+{
+ m_dirty = true;
+ repaint(false);
+}
+
void KickerTip::enableTipping(bool tip)
{
if (tip)
--- branches/KDE/3.5/kdebase/kicker/libkicker/kickertip.h #450716:450717
@@ -84,6 +84,7 @@
bool isTippingFor(const QWidget* w) const;
protected slots:
+ void tipperDestroyed(QObject* o);
void internalUpdate();
void display();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic