58#if defined(QGISDEBUG) && defined(QGS_GIT_REMOTE_URL)
62 QString remote = QStringLiteral( QGS_GIT_REMOTE_URL );
63 if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains( QLatin1String(
"github.com" ) ) )
65 QString path = remote.remove( QRegularExpression(
".*github.com[:/]" ) ).remove( QStringLiteral(
".git" ) );
66 srcUrl =
"https://github.com/" + path +
"/blob/" + hash;
70 const auto constMMessageList = mMessageList;
76 const int sPrefixLength = strlen( CMAKE_SOURCE_DIR ) + 1;
77 file = m.file().mid( sPrefixLength );
89 if ( !m.tag().isEmpty() )
96 if ( !file.isEmpty() )
98 where += QStringLiteral(
"file: %1 row: %2" ).arg( file ).arg( m.line() );
100 if ( !m.function().isEmpty() )
102 where += QStringLiteral(
"function %1:" ).arg( m.function() );
104 if ( !where.isEmpty() )
106 str += QStringLiteral(
" (%1)" ).arg( where );
112 str +=
"<p><b>" + m.tag() +
":</b> " + m.message();
114 const QString location = QStringLiteral(
"%1 : %2 : %3" ).arg( file ).arg( m.line() ).arg( m.function() );
115 if ( !srcUrl.isEmpty() )
117 const QString url = QStringLiteral(
"%1/%2#L%3" ).arg( srcUrl, file ).arg( m.line() );
118 str += QStringLiteral(
"<br>(<a href='%1'>%2</a>)" ).arg( url, location );
122 str += QStringLiteral(
"<br>(%1)" ).arg( location );