[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/kdewin-installer/shared
From:       Ralf Habacker <Ralf.Habacker () freenet ! de>
Date:       2010-07-31 17:13:29
Message-ID: 20100731171329.A09E6AC783 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1157589 by habacker:

define DISABLE_GENERICPROCESS_PARENT_CONTROL to disable parent show/hide control

 M  +11 -0     downloaderprogress.cpp  


--- trunk/kdesupport/kdewin-installer/shared/downloaderprogress.cpp #1157588:1157589
@@ -32,6 +32,12 @@
 #include <QtGui/QGridLayout>
 #include <QtGui/QDesktopWidget>
 
+
+//#define DISABLE_GENERICPROCESS_PARENT_CONTROL
+// show() and hide() controls also parent widget 
+// this may have unwanted side effects 
+// uncomment the above listed define to disable 
+
 #ifdef USE_GUI
 GenericProgress::GenericProgress(QWidget *parent)
   : QWidget(parent), m_titleLabel(NULL), m_parent(parent)
@@ -48,18 +54,23 @@
 
 void GenericProgress::show()
 {
+#ifndef DISABLE_GENERICPROCESS_PARENT_CONTROL
   if(m_parent) {
     m_parent->show();
     const QRect &r = QDesktopWidget().screenGeometry();
     m_parent->move(r.width() / 2 - m_parent->width() / 2, r.height() / 2 - m_parent->height() / 2);
     return;
   }
+#endif
   QWidget::show();
 }
 
 void GenericProgress::hide()
 {
+#ifndef DISABLE_GENERICPROCESS_PARENT_CONTROL
   m_parent ? m_parent->hide() : QWidget::hide();
+#endif
+  	QWidget::hide();
 }
 
 void GenericProgress::updateDisplay()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic