From 28bc452f0d4489e0f3076996dde128a5b2940209 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Fri, 22 Oct 2010 15:41:47 +0000 Subject: Add a second Dolphin unit test (for a regression in DolphinDetailsView which has been fixed recently). This commit also adds a new class TestHelper which provides some funtionality that most Dolphin unit tests will need. I hope that this makes implementing additional tests as easy as possible :-) svn path=/trunk/KDE/kdebase/apps/; revision=1188536 --- src/views/dolphindetailsview.h | 4 +++- src/views/dolphinview.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/dolphindetailsview.h b/src/views/dolphindetailsview.h index 67f7f2e3e..479683f66 100644 --- a/src/views/dolphindetailsview.h +++ b/src/views/dolphindetailsview.h @@ -62,6 +62,9 @@ public: */ QSet expandedUrls() const; +public: + virtual QRect visualRect(const QModelIndex& index) const; + protected: virtual bool event(QEvent* event); virtual QStyleOptionViewItem viewOptions() const; @@ -76,7 +79,6 @@ protected: virtual void wheelEvent(QWheelEvent* event); virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous); virtual bool eventFilter(QObject* watched, QEvent* event); - virtual QRect visualRect(const QModelIndex& index) const; virtual bool acceptsDrop(const QModelIndex& index) const; protected slots: diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 178e0ca6a..0c88d27ff 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -797,6 +797,9 @@ private: * slotDirListerCompleted(). */ QSet m_newFileNames; + + // For unit tests + friend class TestHelper; }; /// Allow using DolphinView::Mode in QVariant -- cgit v1.3