60#if defined( QGISDEBUG ) && defined( QGS_GIT_REMOTE_URL )
64 QString remote = QStringLiteral( QGS_GIT_REMOTE_URL );
65 if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains(
"github.com"_L1 ) )
67 QString path = remote.remove( QRegularExpression(
".*github.com[:/]" ) ).remove( u
".git"_s );
68 srcUrl =
"https://github.com/" + path +
"/blob/" + hash;
72 const auto constMMessageList = mMessageList;
78 const int sPrefixLength = strlen( CMAKE_SOURCE_DIR ) + 1;
79 file = m.file().mid( sPrefixLength );
91 if ( !m.tag().isEmpty() )
98 if ( !file.isEmpty() )
100 where += u
"file: %1 row: %2"_s.arg( file ).arg( m.line() );
102 if ( !m.function().isEmpty() )
104 where += u
"function %1:"_s.arg( m.function() );
106 if ( !where.isEmpty() )
108 str += u
" (%1)"_s.arg( where );
114 str +=
"<p><b>" + m.tag() +
":</b> " + m.message();
116 const QString location = u
"%1 : %2 : %3"_s.arg( file ).arg( m.line() ).arg( m.function() );
117 if ( !srcUrl.isEmpty() )
119 const QString url = u
"%1/%2#L%3"_s.arg( srcUrl, file ).arg( m.line() );
120 str += u
"<br>(<a href='%1'>%2</a>)"_s.arg( url, location );
124 str += u
"<br>(%1)"_s.arg( location );