18 #include "qgsversion.h"
19 #include "qgsconfig.h"
26 : mMessage( theMessage )
29 , mFunction( theFunction )
37 append( theMessage, theTag );
55 #if defined(QGISDEBUG) && defined(QGS_GIT_REMOTE_URL)
59 QString remote = QString( QGS_GIT_REMOTE_URL );
61 if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains(
"github.com" ) )
63 QString path = remote.remove( QRegExp(
".*github.com[:/]" ) ).remove(
".git" );
64 srcUrl =
"https://github.com/" + path +
"/blob/" + hash;
73 int sPrefixLength = strlen( CMAKE_SOURCE_DIR ) + 1;
74 file = m.
file().mid( sPrefixLength );
84 str += QString(
"\nat %1 : %2 : %3" ).arg( file ).arg( m.
line() ).arg( m.
function() );
89 str +=
"<p><b>" + m.
tag() +
":</b> " + m.
message();
91 QString location = QString(
"%1 : %2 : %3" ).arg( file ).arg( m.
line() ).arg( m.
function() );
92 if ( !srcUrl.isEmpty() )
94 QString url = QString(
"%1/%2#L%3" ).arg( srcUrl ).arg( file ).arg( m.
line() );
95 str += QString(
"<br>(<a href='%1'>%2</a>)" ).arg( url ).arg( location );
99 str += QString(
"<br>(%1)" ).arg( location );