[glom] create_database(): Actually use the progress slot.



commit 91a639628e80a46048c14046cd0616b3b9c1292c
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat May 1 12:09:35 2010 +0200

    create_database(): Actually use the progress slot.

 ChangeLog                |    4 ++++
 glom/libglom/db_utils.cc |   14 ++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5d45221..9c37bde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-05-01  Murray Cumming  <murrayc murrayc com>
 
+	* glom/libglom/db_utils.cc: create_database(): Actually use the progress slot.
+
+2010-05-01  Murray Cumming  <murrayc murrayc com>
+
 	Move some Base_DB methods to DbUtils and test database recreation.
 	
 	* glom/base_db.[h|cc]: Move many db-related methods to 
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index 725dd73..f3b104d 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -111,6 +111,8 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
   //std::cout << "Awake" << std::endl;
 #endif
 
+  progress();
+  
   try
   {
     ConnectionPool::get_instance()->create_database(database_name);
@@ -122,10 +124,14 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
     return false;
   }
 
+  progress();
+  
   //Connect to the actual database:
   ConnectionPool* connection_pool = ConnectionPool::get_instance();
   connection_pool->set_database(database_name);
 
+  progress();
+  
   sharedptr<SharedConnection> sharedconnection;
   try
   {
@@ -144,16 +150,22 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
 
   if(sharedconnection)
   {
+    progress();
+    
     bool test = add_standard_tables(document); //Add internal, hidden, tables.
     if(!test)
       return false;
 
+    progress();
+    
     //Create the developer group, and make this user a member of it:
     //If we got this far then the user must really have developer privileges already:
     test = add_standard_groups(document);
     if(!test)
       return false;
 
+    progress();
+
     //std::cout << "create_database(): Creation of standard tables and groups finished." << std::endl;
 
     //Set the title based on the title in the example document, or the user-supplied title when creating new documents:
@@ -169,6 +181,8 @@ bool create_database(Document* document, const Glib::ustring& database_name, con
       //std::cout << "create_database(): database has title: " << prefs.m_name << std::endl;
     }
 
+    progress();
+
     return true;
   }
   else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]