From fae8ba471b0adb917f4edd1a99bca47fdaea0169 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 9 Jan 2011 13:58:35 +0000 Subject: Encapsulate the creation and handling of the directory lister, the model and proxy model to DolphinView. By this it will be easier later to replace the traditional QAbstractItemViews by any kind of other implementation (e.g. based on QGraphicsView/QML). svn path=/trunk/KDE/kdebase/apps/; revision=1213189 --- src/tests/testbase.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/tests/testbase.cpp') diff --git a/src/tests/testbase.cpp b/src/tests/testbase.cpp index dbe4ee5de..db71fa48c 100644 --- a/src/tests/testbase.cpp +++ b/src/tests/testbase.cpp @@ -39,22 +39,12 @@ TestBase::TestBase() Q_ASSERT(m_tempDir->exists()); m_path = m_tempDir->name(); m_dir = new QDir(m_path); - m_dirLister = new DolphinDirLister(); - m_dirLister->setAutoUpdate(true); - m_dolphinModel = new DolphinModel(); - m_dolphinModel->setDirLister(m_dirLister); - m_proxyModel = new DolphinSortFilterProxyModel(0); - m_proxyModel->setSourceModel(m_dolphinModel); - m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - m_view = new DolphinView(0, KUrl(m_path), m_proxyModel); + m_view = new DolphinView(KUrl(m_path), 0); } TestBase::~TestBase() { delete m_view; - delete m_proxyModel; - // m_dolphinModel owns m_dirLister -> do not delete it here! - delete m_dolphinModel; delete m_dir; delete m_tempDir; } -- cgit v1.3