61#if defined(QGISDEBUG) && defined(QGS_GIT_REMOTE_URL)
65 QString remote = QStringLiteral( QGS_GIT_REMOTE_URL );
66 if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains(
"github.com"_L1 ) )
68 QString path = remote.remove( QRegularExpression(
".*github.com[:/]" ) ).remove( u
".git"_s );
69 srcUrl =
"https://github.com/" + path +
"/blob/" + hash;
73 const auto constMMessageList = mMessageList;
79 const int sPrefixLength = strlen( CMAKE_SOURCE_DIR ) + 1;
80 file = m.file().mid( sPrefixLength );
92 if ( !m.tag().isEmpty() )
99 if ( !file.isEmpty() )
101 where += u
"file: %1 row: %2"_s.arg( file ).arg( m.line() );
103 if ( !m.function().isEmpty() )
105 where += u
"function %1:"_s.arg( m.function() );
107 if ( !where.isEmpty() )
109 str += u
" (%1)"_s.arg( where );
115 str +=
"<p><b>" + m.tag() +
":</b> " + m.message();
117 const QString location = u
"%1 : %2 : %3"_s.arg( file ).arg( m.line() ).arg( m.function() );
118 if ( !srcUrl.isEmpty() )
120 const QString url = u
"%1/%2#L%3"_s.arg( srcUrl, file ).arg( m.line() );
121 str += u
"<br>(<a href='%1'>%2</a>)"_s.arg( url, location );
125 str += u
"<br>(%1)"_s.arg( location );