qthreadstorage.h: fix position of namespace macros
The file contains two implementations of the class template, one for QT_CONFIG(thread) and one for without. Both are in the QT_NAMESPACE, but each provided their own QT_{BEGIN,END}_NAMESPACE macro pair. This is unneeded and may throw off scripts which use the macros as insertion positions (like includemocs, which, however, operates on .cpp files, not headers). To fix, move the namespace macro pair to be around the #if QT_CONFIG(thread) block. Pick-to: 6.9 6.8 6.5 Change-Id: I56c1f9a4ef7df0fba54c72d8a213fa92573b826c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f6af3a5816
commit
8553ffd8d1
@ -6,10 +6,9 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if QT_CONFIG(thread)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if QT_CONFIG(thread)
|
||||
|
||||
class Q_CORE_EXPORT QThreadStorageData
|
||||
{
|
||||
@ -114,16 +113,12 @@ public:
|
||||
{ qThreadStorage_setLocalData(d, &t); }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#else // !QT_CONFIG(thread)
|
||||
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <typename T, typename U>
|
||||
inline bool qThreadStorage_hasLocalData(const QScopedPointer<T, U> &data)
|
||||
{
|
||||
@ -193,8 +188,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_CONFIG(thread)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTHREADSTORAGE_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user