diff options
| author | Peter Penz <[email protected]> | 2011-01-09 13:58:35 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-01-09 13:58:35 +0000 |
| commit | fae8ba471b0adb917f4edd1a99bca47fdaea0169 (patch) | |
| tree | f7aaa90e0d4414867adb82781088b48242a0b969 /src/tests/testbase.cpp | |
| parent | 58ea012256a752fb803a462c0ff025a4de4b5dbf (diff) | |
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
Diffstat (limited to 'src/tests/testbase.cpp')
| -rw-r--r-- | src/tests/testbase.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
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; } |
