From: Peter Penz Date: Fri, 18 May 2007 08:42:45 +0000 (+0000) Subject: ignore spontaneous show events (thanks to Dominik Haumann for pointing this out) X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b10326777ffe797bf573f8e9ce557774a39bb8f8?ds=sidebyside ignore spontaneous show events (thanks to Dominik Haumann for pointing this out) svn path=/trunk/KDE/kdebase/apps/; revision=665855 --- diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 07887e2bd..565323b4a 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -139,6 +139,9 @@ void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url) void InfoSidebarPage::showEvent(QShowEvent* event) { SidebarPage::showEvent(event); + if (event->spontaneous()) { + return; + } showItemInfo(); } diff --git a/src/terminalsidebarpage.cpp b/src/terminalsidebarpage.cpp index 3e3c21668..cfa55c0d8 100644 --- a/src/terminalsidebarpage.cpp +++ b/src/terminalsidebarpage.cpp @@ -24,7 +24,8 @@ #include #include -#include +#include +#include TerminalSidebarPage::TerminalSidebarPage(QWidget* parent) : SidebarPage(parent), @@ -51,6 +52,11 @@ void TerminalSidebarPage::setUrl(const KUrl& url) void TerminalSidebarPage::showEvent(QShowEvent* event) { + if (event->spontaneous()) { + SidebarPage::showEvent(event); + return; + } + if (m_terminal == 0) { KLibFactory* factory = KLibLoader::self()->factory("libkonsolepart"); KParts::Part* part = factory ? static_cast(factory->create(this, "KParts::ReadOnlyPart")) : 0; diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp index 1f537bd71..75e12bcf8 100644 --- a/src/treeviewsidebarpage.cpp +++ b/src/treeviewsidebarpage.cpp @@ -65,6 +65,11 @@ void TreeViewSidebarPage::setUrl(const KUrl& url) void TreeViewSidebarPage::showEvent(QShowEvent* event) { + if (event->spontaneous()) { + SidebarPage::showEvent(event); + return; + } + if (m_dirLister == 0) { // Postpone the creating of the dir lister to the first show event. // This assures that no performance and memory overhead is given when the TreeView is not