[qet] [3761] Diagram editor : Disable the waiting dialog at opening of project due to a weird bug

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


Revision: 3761
Author:   blacksun
Date:     2015-02-23 23:37:26 +0100 (Mon, 23 Feb 2015)
Log Message:
-----------
Diagram editor : Disable the waiting dialog at opening of project due to a weird bug

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

Modified: branches/Qt5/sources/qetproject.cpp
===================================================================
--- branches/Qt5/sources/qetproject.cpp	2015-02-23 16:51:59 UTC (rev 3760)
+++ branches/Qt5/sources/qetproject.cpp	2015-02-23 22:37:26 UTC (rev 3761)
@@ -1131,28 +1131,34 @@
 	// map destinee a accueillir les schemas
 	QMultiMap<int, Diagram *> loaded_diagrams;
 	
+	//@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());
-	for (uint i = 0 ; i < diagram_nodes.length() ; ++ i) {
-		dlgWaiting->setProgressBar(i+1);
-		if (diagram_nodes.at(i).isElement()) {
+//	dlgWaiting->setProgressBarRange(0, diagram_nodes.length());
+	for (int i = 0 ; i < diagram_nodes.length() ; ++ i)
+	{
+//		dlgWaiting->setProgressBar(i+1);
+		if (diagram_nodes.at(i).isElement())
+		{
 			QDomElement diagram_xml_element = diagram_nodes.at(i).toElement();
 			Diagram *diagram = new Diagram(this);
 			bool diagram_loading = diagram -> initFromXml(diagram_xml_element);
-			if (diagram_loading) {
-				dlgWaiting->setDetail( diagram->title() );
+			if (diagram_loading)
+			{
+//				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;
 				loaded_diagrams.insert(diagram_order, diagram);
-			} else {
+			}
+			else
+			{
 				delete diagram;
 			}
 		}
@@ -1169,7 +1175,7 @@
 
 
 	//delete dialog object
-	delete dlgWaiting;
+//	delete dlgWaiting;
 }
 
 /**


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