Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
diff Main.cs @ 23:d1259ec9d089
Re #250:
* Add extra debugging code
QApplication.Exec() should quit anyway (after completion return a success/error code and Main loop should finish) but even using Environment.Exit() never completes
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 21 Feb 2010 19:49:59 +0000 |
parents | ff011053ec3f |
children | 55d4f16c982b |
line wrap: on
line diff
--- a/Main.cs Sun Feb 21 14:55:23 2010 +0000 +++ b/Main.cs Sun Feb 21 19:49:59 2010 +0000 @@ -17,21 +17,24 @@ { private static ILog logger = LogManager.GetLogger(typeof(MainClass)); static MainWindow win; + static QApplication app; public static void Main(string[] args) { try { logger.InfoFormat("Starting application with args: {0}", args.ToString()); - new QApplication(args); + app = new QApplication(args); SetUpWarFoundryEnvironment(); win = new MainWindow(); win.Show(); logger.Debug("Starting exec"); - QApplication.Exec(); + int result = QApplication.Exec (); logger.Info("Closing application"); + Environment.Exit(result); + logger.Info("Exited"); } catch(Exception ex) {