[rkward-cvs] SF.net SVN: rkward:[2521] trunk/rkward/rkward/misc/rkprogresscontrol.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Jun 9 20:46:54 UTC 2009


Revision: 2521
          http://rkward.svn.sourceforge.net/rkward/?rev=2521&view=rev
Author:   tfry
Date:     2009-06-09 20:46:54 +0000 (Tue, 09 Jun 2009)

Log Message:
-----------
setDetailsWidgetVisible(false) may crash on windows, when the details widget is empty

Modified Paths:
--------------
    trunk/rkward/rkward/misc/rkprogresscontrol.cpp

Modified: trunk/rkward/rkward/misc/rkprogresscontrol.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkprogresscontrol.cpp	2009-06-09 20:45:51 UTC (rev 2520)
+++ trunk/rkward/rkward/misc/rkprogresscontrol.cpp	2009-06-09 20:46:54 UTC (rev 2521)
@@ -235,10 +235,6 @@
 		output_text->setLineWrapMode (QTextEdit::NoWrap);
 		output_text->setMinimumWidth (QFontMetrics (output_text->font ()).averageCharWidth () * RKSettingsModuleR::getDefaultWidth ());
 		output_box->setStretchFactor (output_text, 10);
-
-		if (!(mode_flags & RKProgressControl::OutputShownByDefault)) {
-			output_box->hide ();
-		}
 	}
 	setDetailsWidget (output_box);
 	connect (this, SIGNAL(aboutToShowDetails()), this, SLOT(scrollDown()));
@@ -246,11 +242,11 @@
 	KDialog::ButtonCodes button_codes = KDialog::Cancel;
 	if (mode_flags & RKProgressControl::OutputSwitchable) button_codes |= KDialog::Details;
 	setButtons (button_codes);
-	setButtonText (KDialog::Details, output_button_text);
+	if (button_codes & KDialog::Details) setButtonText (KDialog::Details, output_button_text);
 	if (mode_flags & RKProgressControl::AllowCancel) setButtonText (KDialog::Cancel, i18n ("Cancel"));
 	else (setCloseTextToClose ());
 
-	setDetailsWidgetVisible (mode_flags & RKProgressControl::OutputShownByDefault);
+	if (mode_flags & RKProgressControl::OutputShownByDefault) setDetailsWidgetVisible (true);
 
 	prevent_close = (mode_flags & RKProgressControl::PreventClose);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list