Skip to content

Commit

Permalink
Turned off SPIERSview debug to file
Browse files Browse the repository at this point in the history
  • Loading branch information
alanspencer committed Jun 13, 2020
1 parent 811b4ef commit 3e3831e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions SPIERSview/SPIERSview.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ TEMPLATE = app
QT += network xml gui core widgets opengl

# Allow debug in release
QMAKE_CXXFLAGS_RELEASE += -g
QMAKE_CFLAGS_RELEASE += -g
QMAKE_LFLAGS_RELEASE =
#QMAKE_CXXFLAGS_RELEASE += -g
#QMAKE_CFLAGS_RELEASE += -g
#QMAKE_LFLAGS_RELEASE =

CONFIG += qt \
release \
Expand Down
7 changes: 5 additions & 2 deletions SPIERSview/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void logMessageOutput(QtMsgType type, const QMessageLogContext &context, const Q
{
QByteArray localMsg = msg.toLocal8Bit();
QString txt;
bool logToFile = true;
bool logToFile = false;

switch (type)
{
Expand Down Expand Up @@ -334,8 +334,11 @@ int main(int argc, char *argv[])
}
}

// Do nothing until all events are received
// Do nothing until all events are received for the appllication start
app.processEvents();

// We then check again, as if seems that the QEvent::FileOpen event doesn't get picked up in the first check,
// but does seem to be picked up on a second check! This is a real bodge, there must be a better way to do this...
app.processEvents();

// If we have got this far then we are trying to load a file by name that has been caught in the QEvent::FileOpen
Expand Down

0 comments on commit 3e3831e

Please sign in to comment.