Skip to content

Commit 33ba195

Browse files
author
timlinux
committed
Patched in Jürgens MSVC logger improvements.
git-svn-id: http://svn.osgeo.org/qgis/trunk@7311 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a5def47 commit 33ba195

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ IF (WIN32)
152152
# Turn on defines for non standard maths stuff
153153
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
154154

155+
# Turn off deprecation warnings
156+
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
157+
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS)
155158
# Some file access stuff not defined in native win32
156159
# environment
157160
ADD_DEFINITIONS(-DF_OK=0)

src/app/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,10 @@ int main(int argc, char *argv[])
229229
_set_fmode(_O_BINARY);
230230
#endif
231231

232+
#ifndef _MSC_VER
232233
// Set up the custom qWarning/qDebug custom handler
233234
qInstallMsgHandler( myMessageOutput );
235+
#endif
234236

235237
/////////////////////////////////////////////////////////////////
236238
// Command line options 'behaviour' flag setup

src/core/qgslogger.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ void QgsLogger::debug(const QString& msg, int debuglevel, const char* file, cons
4747
}
4848
else
4949
{
50+
#ifndef _MSC_VER
5051
qDebug("%s: %d: (%s) %s", file, line, function, msg.toLocal8Bit().data());
52+
#else
53+
qDebug("%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().data());
54+
#endif
5155
}
5256
}
5357
}

0 commit comments

Comments
 (0)