From 55704b419eb3ac864b2218cbeca2a8ae921ea1e1 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 30 Aug 2009 17:54:15 +0000 Subject: - The selection changed timer only needs to be created for a DolphinView instance. - Set the extensions mode inside the ViewExtensionsFactory. svn path=/trunk/KDE/kdebase/apps/; revision=1017461 --- src/dolphinview.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/dolphinview.cpp') diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 6db79452c..09b4f3e16 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -151,6 +151,12 @@ DolphinView::DolphinView(QWidget* parent, connect(&DolphinNewMenuObserver::instance(), SIGNAL(itemCreated(const KUrl&)), this, SLOT(observeCreatedItem(const KUrl&))); + m_selectionChangedTimer = new QTimer(this); + m_selectionChangedTimer->setSingleShot(true); + m_selectionChangedTimer->setInterval(300); + connect(m_selectionChangedTimer, SIGNAL(timeout()), + this, SLOT(emitSelectionChangedSignal())); + applyViewProperties(); m_topLayout->addWidget(m_viewAccessor.itemView()); } @@ -1324,12 +1330,6 @@ void DolphinView::createView() m_controller->setItemView(view); - m_selectionChangedTimer = new QTimer(this); - m_selectionChangedTimer->setSingleShot(true); - m_selectionChangedTimer->setInterval(300); - connect(m_selectionChangedTimer, SIGNAL(timeout()), - this, SLOT(emitSelectionChangedSignal())); - // When changing the view mode, the selection is lost due to reinstantiating // a new item view with a custom selection model. Pass the ownership of the // selection model to DolphinView, so that it can be shared by all item views. @@ -1340,8 +1340,6 @@ void DolphinView::createView() } m_selectionModel->setParent(this); - view->setSelectionMode(QAbstractItemView::ExtendedSelection); - m_versionControlObserver = new VersionControlObserver(view); connect(m_versionControlObserver, SIGNAL(infoMessage(const QString&)), this, SIGNAL(infoMessage(const QString&))); -- cgit v1.3