fixed possible crash when showing tooltips and switching between views

BUG: 161201
CCMAIL: ubuntu@martin-graesslin.com

svn path=/trunk/KDE/kdebase/apps/; revision=818325
This commit is contained in:
Peter Penz 2008-06-08 10:11:13 +00:00
parent b5c7a2ebb9
commit d9ec7ac7a3
2 changed files with 8 additions and 7 deletions

View file

@ -21,11 +21,15 @@
#include "dolphinmodel.h"
#include "dolphinsortfilterproxymodel.h"
#include "ktooltip.h"
#include "kicon.h"
#include <kformattedballoontipdelegate.h>
#include <kicon.h>
#include <ktooltip.h>
#include <QTimer>
K_GLOBAL_STATIC(KFormattedBalloonTipDelegate, g_delegate);
ToolTipManager::ToolTipManager(QAbstractItemView* parent,
DolphinSortFilterProxyModel* model) :
QObject(parent),
@ -34,10 +38,9 @@ ToolTipManager::ToolTipManager(QAbstractItemView* parent,
m_proxyModel(model),
m_timer(0),
m_item(),
m_pos(),
m_delegate()
m_pos()
{
KToolTip::setToolTipDelegate(&m_delegate);
KToolTip::setToolTipDelegate(g_delegate);
m_dolphinModel = static_cast<DolphinModel*>(m_proxyModel->sourceModel());
connect(parent, SIGNAL(entered(const QModelIndex&)),

View file

@ -24,7 +24,6 @@
#include <QPoint>
#include <kfileitem.h>
#include <kformattedballoontipdelegate.h>
class DolphinModel;
class DolphinSortFilterProxyModel;
@ -71,7 +70,6 @@ private:
QTimer* m_timer;
KFileItem m_item;
QPoint m_pos;
KFormattedBalloonTipDelegate m_delegate;
};
#endif