changeset 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 9641addafffe
files Main.cs
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/Main.cs	Sun Feb 21 14:55:23 2010 +0000
     1.2 +++ b/Main.cs	Sun Feb 21 19:49:59 2010 +0000
     1.3 @@ -17,21 +17,24 @@
     1.4  	{
     1.5  		private static ILog logger = LogManager.GetLogger(typeof(MainClass));
     1.6  		static MainWindow win;
     1.7 +		static QApplication app;
     1.8  		
     1.9  		public static void Main(string[] args)
    1.10  		{
    1.11  			try
    1.12  			{
    1.13  				logger.InfoFormat("Starting application with args: {0}", args.ToString());
    1.14 -				new QApplication(args);
    1.15 +				app = new QApplication(args);
    1.16  				
    1.17  				SetUpWarFoundryEnvironment();
    1.18  				
    1.19  				win = new MainWindow();
    1.20  				win.Show();
    1.21  				logger.Debug("Starting exec");
    1.22 -				QApplication.Exec();
    1.23 +				int result = QApplication.Exec ();
    1.24  				logger.Info("Closing application");
    1.25 +				Environment.Exit(result);
    1.26 +				logger.Info("Exited");
    1.27  			}
    1.28  			catch(Exception ex)
    1.29  			{