Skip to content

Commit

Permalink
Patched in Jürgens MSVC logger improvements.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@7311 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Nov 1, 2007
1 parent a5def47 commit 33ba195
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ IF (WIN32)
# Turn on defines for non standard maths stuff
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)

# Turn off deprecation warnings
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS)
# Some file access stuff not defined in native win32
# environment
ADD_DEFINITIONS(-DF_OK=0)
Expand Down
2 changes: 2 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ int main(int argc, char *argv[])
_set_fmode(_O_BINARY);
#endif

#ifndef _MSC_VER
// Set up the custom qWarning/qDebug custom handler
qInstallMsgHandler( myMessageOutput );
#endif

/////////////////////////////////////////////////////////////////
// Command line options 'behaviour' flag setup
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgslogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ void QgsLogger::debug(const QString& msg, int debuglevel, const char* file, cons
}
else
{
#ifndef _MSC_VER
qDebug("%s: %d: (%s) %s", file, line, function, msg.toLocal8Bit().data());
#else
qDebug("%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().data());
#endif
}
}
}
Expand Down

0 comments on commit 33ba195

Please sign in to comment.