- ldforge can now open files from command-line input

Sat, 30 Aug 2014 14:54:10 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sat, 30 Aug 2014 14:54:10 +0300
changeset 864
34033bc2ffb6
parent 863
238082c94304
child 865
6d68840fcb26

- ldforge can now open files from command-line input
- fixed compilation
- deleted obsolete ldforge.pro

ldforge.pro file | annotate | diff | comparison | revisions
src/addObjectDialog.cc file | annotate | diff | comparison | revisions
src/macros.h file | annotate | diff | comparison | revisions
src/main.cc file | annotate | diff | comparison | revisions
--- a/ldforge.pro	Sun Aug 24 01:42:46 2014 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Sat Sep 22 17:29:49 2012
-######################################################################
-
-TEMPLATE        = app
-TARGET          = ldforge
-RC_FILE         = ldforge.rc
-RESOURCES       = ldforge.qrc
-RCC_DIR         = ./build_shared/
-MOC_DIR         = ./build_shared/
-UI_DIR          = ./build_shared/
-SOURCES         = src/*.cc src/actions/*.cc
-HEADERS         = src/*.h src/misc/*.h
-FORMS           = ui/*.ui
-QT             += opengl network
-QMAKE_CXXFLAGS += -std=c++0x
-CONFIG         += debug_and_release
-
-CONFIG (debug, debug|release) {
-	DEFINES += DEBUG
-	OBJECTS_DIR = ./build_debug/
-} else {
-	DEFINES += RELEASE
-	OBJECTS_DIR = ./build_release/
-}
-
-exists(.git): DEFINES += GIT_DESCRIBE="\"\\\"$$system(git describe --tags --long)\\\"\""
-
-unix {
-	LIBS += -lGLU
-	DEFINES += COMPILE_DATE="\"\\\"$$system(LC_ALL=C date \"+%d %h %Y %H:%M:%S\")\\\"\""
-}
--- a/src/addObjectDialog.cc	Sun Aug 24 01:42:46 2014 +0300
+++ b/src/addObjectDialog.cc	Sat Aug 30 14:54:10 2014 +0300
@@ -355,7 +355,7 @@
 		case OBJ_BFC:
 		{
 			LDBFCPtr bfc = InitObject<LDBFC> (obj);
-			assert (within (dlg.rb_bfcType->value(), 0, int (BFCStatement::NumValues) - 1));
+			assert (IsWithin (dlg.rb_bfcType->value(), 0, int (BFCStatement::NumValues) - 1));
 			bfc->setStatement (BFCStatement (dlg.rb_bfcType->value()));
 		} break;
 
--- a/src/macros.h	Sun Aug 24 01:42:46 2014 +0300
+++ b/src/macros.h	Sat Aug 30 14:54:10 2014 +0300
@@ -102,7 +102,7 @@
 #undef assert
 
 #ifdef DEBUG
-# define assert(N) { ((N) ? (void) 0 : assertionFailure (__FILE__, __LINE__, FUNCNAME, #N)); }
+# define assert(N) { ((N) ? (void) 0 : HandleAssertFailure (__FILE__, __LINE__, FUNCNAME, #N)); }
 #else
 # define assert(N) {}
 #endif // DEBUG
--- a/src/main.cc	Sun Aug 24 01:42:46 2014 +0300
+++ b/src/main.cc	Sat Aug 30 14:54:10 2014 +0300
@@ -80,6 +80,10 @@
 		Config::Save();
 	}
 
+	// Process the command line
+	for (int arg = 1; arg < argc; ++arg)
+		OpenMainModel (QString::fromLocal8Bit (argv[arg]));
+
 	int result = app.exec();
 	g_IsExiting = true;
 	return result;

mercurial