]> cloud.milkyroute.net Git - dolphin.git/commitdiff
ignore spontaneous show events (thanks to Dominik Haumann for pointing this out)
authorPeter Penz <peter.penz19@gmail.com>
Fri, 18 May 2007 08:42:45 +0000 (08:42 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 18 May 2007 08:42:45 +0000 (08:42 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=665855

src/infosidebarpage.cpp
src/terminalsidebarpage.cpp
src/treeviewsidebarpage.cpp

index 07887e2bdcac69df07e6a0078d0a18698c87b2b3..565323b4a088a3d130668b66d9039f7114b1f7be 100644 (file)
@@ -139,6 +139,9 @@ void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url)
 void InfoSidebarPage::showEvent(QShowEvent* event)
 {
     SidebarPage::showEvent(event);
+    if (event->spontaneous()) {
+        return;
+    }
     showItemInfo();
 }
 
index 3e3c216680077e8656e192d6ddf7515ee74ca4c3..cfa55c0d84c80f6e06543f8b92a912214d62cbd4 100644 (file)
@@ -24,7 +24,8 @@
 #include <kparts/part.h>
 #include <kshell.h>
 
-#include <QtGui/QBoxLayout>
+#include <QBoxLayout>
+#include <QShowEvent>
 
 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<KParts::Part*>(factory->create(this, "KParts::ReadOnlyPart")) : 0;
index 1f537bd71928d08e5ab199ac2a2fda3cb6c51341..75e12bcf8a8ca42223e9149e9727fcf87e3ec5b2 100644 (file)
@@ -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