src/main.cpp

changeset 1012
413ecd6b9801
parent 998
5be0ce31ce60
child 1014
f0a8ecb6a357
child 1215
77a0270352a3
--- a/src/main.cpp	Sat Oct 24 13:19:27 2015 +0300
+++ b/src/main.cpp	Wed Nov 18 19:05:22 2015 +0200
@@ -35,6 +35,7 @@
 #include "documentmanager.h"
 
 MainWindow* g_win = nullptr;
+ConfigurationValueBag* Config = nullptr;
 const Vertex Origin (0.0f, 0.0f, 0.0f);
 const Matrix IdentityMatrix ({1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f});
 
@@ -47,12 +48,17 @@
 	QApplication app (argc, argv);
 	app.setOrganizationName (APPNAME);
 	app.setApplicationName (APPNAME);
-	initCrashCatcher();
-	MainWindow* win = new MainWindow;
-	LDPaths* paths = new LDPaths (win);
+
+	static ConfigurationValueBag configObject;
+	Config = &configObject;
+
+	LDPaths* paths = new LDPaths;
 	paths->checkPaths();
 	paths->deleteLater();
+
+	initCrashCatcher();
 	initColors();
+	MainWindow* win = new MainWindow;
 	LoadPrimitives();
 	win->show();
 
@@ -61,4 +67,4 @@
 		win->documents()->openMainModel (QString::fromLocal8Bit (argv[arg]));
 
 	return app.exec();
-}
\ No newline at end of file
+}

mercurial