Skip to content

Commit

Permalink
Update src/core/qgsthreadingutils.h
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
nyalldawson and m-kuhn committed Dec 13, 2022
1 parent e13df52 commit 0c34839
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsthreadingutils.h
Expand Up @@ -36,6 +36,8 @@
#endif

#if defined(QGISDEBUG)
// !!DO NOT USE THIS FOR NEW CODE !!
// This is in place to keep legacy code running and should be removed in the future.
#define QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL if ( QThread::currentThread() != thread() ) {qWarning() << QStringLiteral("%2 (%1:%3) is run from a different thread than the object %4 lives in [0x%5 vs 0x%6]" ).arg( QString( __FILE__ ), QString( __FUNCTION__ ), QString::number( __LINE__ ), objectName() ).arg( reinterpret_cast< qint64 >( QThread::currentThread() ), 0, 16 ).arg( reinterpret_cast< qint64 >( thread() ), 0, 16 ).toLocal8Bit().constData(); }
#else
#define QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL do {} while(false);
Expand Down

0 comments on commit 0c34839

Please sign in to comment.