# HG changeset patch # User Santeri Piippo # Date 1382107625 -10800 # Node ID dcacfd2cd81bf1a3229d46afae2a33c0123411b2 # Parent 7ace3537a560f28d47a59f57d53b307992cf73a9 - added debug/release build configuration. Debug builds are really useful things! - fixed an assertion failure with use of QString::operator[] diff -r 7ace3537a560 -r dcacfd2cd81b ldforge.pro --- a/ldforge.pro Wed Oct 16 23:20:35 2013 +0300 +++ b/ldforge.pro Fri Oct 18 17:47:05 2013 +0300 @@ -21,7 +21,14 @@ FORMS = ui/*.ui QT += opengl network QMAKE_CXXFLAGS += -std=c++0x +CONFIG += debug_and_release + +CONFIG (debug, debug|release) { + TARGET = ldforge_debug +} else { + TARGET = ldforge +} unix { LIBS += -lGLU -} \ No newline at end of file +} diff -r 7ace3537a560 -r dcacfd2cd81b src/file.cpp --- a/src/file.cpp Wed Oct 16 23:20:35 2013 +0300 +++ b/src/file.cpp Fri Oct 18 17:47:05 2013 +0300 @@ -281,7 +281,7 @@ void FileLoader::work (int i) { // User wishes to abort, so stop here now. if (aborted()) -{ for (LDObject * obj : m_objs) + { for (LDObject* obj : m_objs) delete obj; m_objs.clear(); @@ -298,7 +298,7 @@ // Trim the trailing newline qchar c; - while ( (c = line[line.length() - 1]) == '\n' || c == '\r') + while (!line.isEmpty() && (c = line[line.length() - 1]) == '\n' || c == '\r') line.chop (1); LDObject* obj = parseLine (line);