summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 092c57ef7f..5f61dd984f 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -137,8 +137,8 @@ public:
inline bool isWidgetType() const { return d_ptr->isWidget; }
inline bool isWindowType() const { return d_ptr->isWindow; }
- inline bool signalsBlocked() const { return d_ptr->blockSig; }
- bool blockSignals(bool b);
+ inline bool signalsBlocked() const Q_DECL_NOTHROW { return d_ptr->blockSig; }
+ bool blockSignals(bool b) Q_DECL_NOTHROW;
QThread *thread() const;
void moveToThread(QThread *thread);
@@ -413,11 +413,7 @@ public:
Q_SIGNALS:
void destroyed(QObject * = 0);
- void objectNameChanged(const QString &objectName
-#if !defined(Q_QDOC)
- , QPrivateSignal
-#endif
- );
+ void objectNameChanged(const QString &objectName, QPrivateSignal);
public:
inline QObject *parent() const { return d_ptr->parent; }
@@ -448,6 +444,8 @@ protected:
QScopedPointer<QObjectData> d_ptr;
static const QMetaObject staticQtMetaObject;
+ friend inline const QMetaObject *qt_getQtMetaObject() Q_DECL_NOEXCEPT
+ { return &staticQtMetaObject; }
friend struct QMetaObject;
friend struct QMetaObjectPrivate;
@@ -550,17 +548,17 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
class QSignalBlocker
{
public:
- inline explicit QSignalBlocker(QObject *o);
- inline explicit QSignalBlocker(QObject &o);
+ inline explicit QSignalBlocker(QObject *o) Q_DECL_NOTHROW;
+ inline explicit QSignalBlocker(QObject &o) Q_DECL_NOTHROW;
inline ~QSignalBlocker();
#ifdef Q_COMPILER_RVALUE_REFS
- inline QSignalBlocker(QSignalBlocker &&other);
- inline QSignalBlocker &operator=(QSignalBlocker &&other);
+ inline QSignalBlocker(QSignalBlocker &&other) Q_DECL_NOTHROW;
+ inline QSignalBlocker &operator=(QSignalBlocker &&other) Q_DECL_NOTHROW;
#endif
- inline void reblock();
- inline void unblock();
+ inline void reblock() Q_DECL_NOTHROW;
+ inline void unblock() Q_DECL_NOTHROW;
private:
Q_DISABLE_COPY(QSignalBlocker)
QObject * m_o;
@@ -568,20 +566,20 @@ private:
bool m_inhibited;
};
-QSignalBlocker::QSignalBlocker(QObject *o)
+QSignalBlocker::QSignalBlocker(QObject *o) Q_DECL_NOTHROW
: m_o(o),
m_blocked(o && o->blockSignals(true)),
m_inhibited(false)
{}
-QSignalBlocker::QSignalBlocker(QObject &o)
+QSignalBlocker::QSignalBlocker(QObject &o) Q_DECL_NOTHROW
: m_o(&o),
m_blocked(o.blockSignals(true)),
m_inhibited(false)
{}
#ifdef Q_COMPILER_RVALUE_REFS
-QSignalBlocker::QSignalBlocker(QSignalBlocker &&other)
+QSignalBlocker::QSignalBlocker(QSignalBlocker &&other) Q_DECL_NOTHROW
: m_o(other.m_o),
m_blocked(other.m_blocked),
m_inhibited(other.m_inhibited)
@@ -589,7 +587,7 @@ QSignalBlocker::QSignalBlocker(QSignalBlocker &&other)
other.m_o = 0;
}
-QSignalBlocker &QSignalBlocker::operator=(QSignalBlocker &&other)
+QSignalBlocker &QSignalBlocker::operator=(QSignalBlocker &&other) Q_DECL_NOTHROW
{
if (this != &other) {
// if both *this and other block the same object's signals:
@@ -612,13 +610,13 @@ QSignalBlocker::~QSignalBlocker()
m_o->blockSignals(m_blocked);
}
-void QSignalBlocker::reblock()
+void QSignalBlocker::reblock() Q_DECL_NOTHROW
{
if (m_o) m_o->blockSignals(true);
m_inhibited = false;
}
-void QSignalBlocker::unblock()
+void QSignalBlocker::unblock() Q_DECL_NOTHROW
{
if (m_o) m_o->blockSignals(m_blocked);
m_inhibited = true;