[qet] [3779] Restore and fix DialogWaiting

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3779
Author:   scorpio810
Date:     2015-03-01 18:39:29 +0100 (Sun, 01 Mar 2015)
Log Message:
-----------
Restore and fix DialogWaiting

Modified Paths:
--------------
    branches/Qt5/sources/qetproject.cpp
    branches/Qt5/sources/ui/dialogwaiting.cpp

Modified: branches/Qt5/sources/qetproject.cpp
===================================================================
--- branches/Qt5/sources/qetproject.cpp	2015-03-01 13:38:05 UTC (rev 3778)
+++ branches/Qt5/sources/qetproject.cpp	2015-03-01 17:39:29 UTC (rev 3779)
@@ -1133,17 +1133,17 @@
 	
 	//@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting
 	//show DialogWaiting
-//	DialogWaiting* dlgWaiting = new DialogWaiting();
-//	dlgWaiting -> setModal(true);
-//	dlgWaiting -> show();
-//	dlgWaiting -> setTitle( tr("<b>Ouverture du projet en cours...</b>") );
+	DialogWaiting* dlgWaiting = new DialogWaiting();
+	dlgWaiting -> setModal(true);
+	dlgWaiting -> show();
+	dlgWaiting -> setTitle( tr("<b>Ouverture du projet en cours...</b>") );
 	
 	// recherche les schemas dans le projet
 	QDomNodeList diagram_nodes = document_root_.elementsByTagName("diagram");
-//	dlgWaiting->setProgressBarRange(0, diagram_nodes.length());
+	dlgWaiting->setProgressBarRange(0, diagram_nodes.length());
 	for (int i = 0 ; i < diagram_nodes.length() ; ++ i)
 	{
-//		dlgWaiting->setProgressBar(i+1);
+		dlgWaiting->setProgressBar(i+1);
 		if (diagram_nodes.at(i).isElement())
 		{
 			QDomElement diagram_xml_element = diagram_nodes.at(i).toElement();
@@ -1151,7 +1151,7 @@
 			bool diagram_loading = diagram -> initFromXml(diagram_xml_element);
 			if (diagram_loading)
 			{
-//				dlgWaiting->setDetail( diagram->title() );
+				dlgWaiting->setDetail( diagram->title() );
 				// recupere l'attribut order du schema
 				int diagram_order = -1;
 				if (!QET::attributeIsAnInteger(diagram_xml_element, "order", &diagram_order)) diagram_order = 500000;
@@ -1175,7 +1175,7 @@
 
 
 	//delete dialog object
-//	delete dlgWaiting;
+	delete dlgWaiting;
 }
 
 /**

Modified: branches/Qt5/sources/ui/dialogwaiting.cpp
===================================================================
--- branches/Qt5/sources/ui/dialogwaiting.cpp	2015-03-01 13:38:05 UTC (rev 3778)
+++ branches/Qt5/sources/ui/dialogwaiting.cpp	2015-03-01 17:39:29 UTC (rev 3779)
@@ -46,6 +46,7 @@
  */
 void DialogWaiting::setProgressBar(int val){
 	ui->progressBar->setValue(val);
+	qApp->processEvents();
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/