Qt 4.8
|
#include <QtCore/qglobal.h>
#include <QtCore/qbasicatomic.h>
Go to the source code of this file.
Classes | |
class | QAtomicInt |
The QAtomicInt class provides platform-independent atomic operations on integers. More... | |
class | QAtomicPointer< T > |
The QAtomicPointer class is a template class that provides platform-independent atomic operations on pointers. More... | |
Functions | |
template<typename T > | |
void | qAtomicAssign (T *&d, T *x) |
This is a helper for the assignment operators of implicitly shared classes. More... | |
template<typename T > | |
void | qAtomicDetach (T *&d) |
This is a helper for the detach method of implicitly shared classes. More... | |
|
inline |
This is a helper for the assignment operators of implicitly shared classes.
Your assignment operator should look like this:
Definition at line 195 of file qatomic.h.
Referenced by QColormap::hPal(), QSqlRecord::operator=(), QSqlField::operator=(), QSqlQuery::operator=(), QColormap::operator=(), QDBusMessage::operator=(), QPen::operator=(), QDBusArgument::operator=(), QSqlDatabase::operator=(), QUrl::operator=(), QKeySequence::operator=(), and qt_conv16ToRgb().
|
inline |
This is a helper for the detach method of implicitly shared classes.
Your private class needs a copy constructor which copies the members and sets the refcount to 1. After that, your detach function should look like this:
Definition at line 214 of file qatomic.h.
Referenced by QSqlField::detach(), QSqlRecord::detach(), QScopedSharedPointer< QScriptDebuggerConsoleCommandGroupDataPrivate >::detach(), operator>>(), QUrl::resolved(), and QKeySequence::setKey().