QGIS API Documentation
4.1.0-Master (376402f9aeb)
Loading...
Searching...
No Matches
src
core
qgsthreadingutils.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsthreadingutils.cpp
3
--------------------------------------
4
Date : April 2023
5
Copyright : (C) 2023 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgsthreadingutils.h
"
17
18
#include <QCoreApplication>
19
#include <QString>
20
21
using namespace
Qt::StringLiterals;
22
23
#if defined( QGISDEBUG )
24
QSet< QString > QgsThreadingUtils::sEmittedWarnings;
25
QMutex QgsThreadingUtils::sEmittedWarningMutex;
26
#endif
27
28
QString
QgsThreadingUtils::threadDescription
( QThread *thread )
29
{
30
return
u
"%1%2"
_s.arg( thread == qApp->thread() ? u
"MAIN thread"
_s : QString() ).arg(
reinterpret_cast<
qint64
>
( QThread::currentThread() ), 0, 16 );
31
}
QgsThreadingUtils::threadDescription
static QString threadDescription(QThread *thread)
Returns a descriptive identifier for a thread.
Definition
qgsthreadingutils.cpp:28
qgsthreadingutils.h
Generated on
for QGIS API Documentation by
1.15.0