revert fix for bug 167044 - although the crash is fixed the autoscroll does not work as expected anymore...

CCBUG: 167044

svn path=/trunk/KDE/kdebase/apps/; revision=835179
This commit is contained in:
Peter Penz 2008-07-20 02:11:27 +00:00
parent 2b2c0941cc
commit f28ee3152a
3 changed files with 1 additions and 21 deletions

View file

@ -23,7 +23,6 @@
#include <KGlobalSettings>
#include <QEvent>
#include <QItemSelectionModel>
#include <QScrollBar>
#include <QTimer>
@ -38,15 +37,10 @@ KTreeView::KTreeViewPrivate::KTreeViewPrivate(KTreeView *parent) :
startScrollTimer = new QTimer(this);
startScrollTimer->setSingleShot(true);
startScrollTimer->setInterval(300);
timeLine = new QTimeLine(300, this);
}
void KTreeView::KTreeViewPrivate::connectScrollTimers()
{
connect(startScrollTimer, SIGNAL(timeout()),
this, SLOT(startScrolling()));
timeLine = new QTimeLine(300, this);
connect(timeLine, SIGNAL(frameChanged(int)),
this, SLOT(updateVerticalScrollBar(int)));
@ -175,13 +169,5 @@ void KTreeView::scrollTo(const QModelIndex& index, ScrollHint hint)
}
}
bool KTreeView::event(QEvent* event)
{
if (event->type() == QEvent::Polish) {
d->connectScrollTimers();
}
return QTreeView::event(event);
}
#include "ktreeview.moc"
#include "ktreeview_p.moc"

View file

@ -37,9 +37,6 @@ public:
virtual void setSelectionModel(QItemSelectionModel *selectionModel);
virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible);
protected:
virtual bool event(QEvent* event);
private:
class KTreeViewPrivate;
KTreeViewPrivate *d;

View file

@ -32,9 +32,6 @@ class KTreeView::KTreeViewPrivate : public QObject
{
Q_OBJECT
public:
void connectScrollTimers();
public Q_SLOTS:
void startScrolling();
void updateVerticalScrollBar(int value);