Author: cazfi
Date: Fri Aug 12 14:13:10 2016
New Revision: 33574

URL: http://svn.gna.org/viewcvs/freeciv?rev=33574&view=rev
Log:
Merged ruledit_qt_setup(), ruledit_qt_run(), and ruledit_qt_close()

See patch #7591

Modified:
    branches/S2_6/tools/ruledit/ruledit.cpp
    branches/S2_6/tools/ruledit/ruledit_qt.cpp
    branches/S2_6/tools/ruledit/ruledit_qt.h

Modified: branches/S2_6/tools/ruledit/ruledit.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit.cpp?rev=33574&r1=33573&r2=33574&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/ruledit.cpp     (original)
+++ branches/S2_6/tools/ruledit/ruledit.cpp     Fri Aug 12 14:13:10 2016
@@ -99,9 +99,7 @@
     game_init();
     i_am_server();
 
-    ruledit_qt_setup(ui_options, argv);
-    ruledit_qt_run();
-    ruledit_qt_close();
+    ruledit_qt_run(ui_options, argv);
   }
 
   registry_module_close();

Modified: branches/S2_6/tools/ruledit/ruledit_qt.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit_qt.cpp?rev=33574&r1=33573&r2=33574&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/ruledit_qt.cpp  (original)
+++ branches/S2_6/tools/ruledit/ruledit_qt.cpp  Fri Aug 12 14:13:10 2016
@@ -53,12 +53,13 @@
 static QApplication *qapp;
 
 /**************************************************************************
-  Setup ruledit-qt gui.
-**************************************************************************/
-bool ruledit_qt_setup(int argc, char **argv)
+  Run ruledit-qt gui.
+**************************************************************************/
+int ruledit_qt_run(int argc, char **argv)
 {
   ruledit_main *main_window;
   QWidget *central;
+  int ret;
 
   qapp = new QApplication(argc, argv);
   central = new QWidget;
@@ -69,24 +70,12 @@
   main_window->setCentralWidget(central);
   main_window->setVisible(true);
 
-  return true;
-}
-
-/**************************************************************************
-  Execute ruledit-qt gui.
-**************************************************************************/
-int ruledit_qt_run()
-{
-  return qapp->exec();
-}
-
-/**************************************************************************
-  Close ruledit-qt gui.
-**************************************************************************/
-void ruledit_qt_close()
-{
+  ret = qapp->exec();
+
   delete gui;
   delete qapp;
+
+  return ret;
 }
 
 /**************************************************************************

Modified: branches/S2_6/tools/ruledit/ruledit_qt.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/ruledit_qt.h?rev=33574&r1=33573&r2=33574&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/ruledit_qt.h    (original)
+++ branches/S2_6/tools/ruledit/ruledit_qt.h    Fri Aug 12 14:13:10 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -82,9 +82,7 @@
     void launch_now();
 };
 
-bool ruledit_qt_setup(int argc, char **argv);
-int ruledit_qt_run();
-void ruledit_qt_close();
+int ruledit_qt_run(int argc, char **argv);
 void ruledit_qt_display_requirers(const char *msg);
 
 #endif // FC__RULEDIT_QT_H


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to