From 49dc7d2b8c77975de864e46f08f6fb59bc44b03a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 Apr 2014 16:57:31 -0700 Subject: Fix minor coding style issues in new code in QtCore Change-Id: I444daf8e81257f55746f9d32fbcb60a2e1b69444 Reviewed-by: Liang Qi Reviewed-by: Rafael Roquetto Reviewed-by: Lars Knoll --- src/corelib/kernel/qppsattribute.cpp | 7 +++---- src/corelib/kernel/qppsobject.cpp | 18 +++++++++--------- src/corelib/tools/qchar.h | 3 ++- src/corelib/tools/qstring.h | 3 ++- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/corelib/kernel/qppsattribute.cpp b/src/corelib/kernel/qppsattribute.cpp index f6745d2354..93d7ae756e 100644 --- a/src/corelib/kernel/qppsattribute.cpp +++ b/src/corelib/kernel/qppsattribute.cpp @@ -127,8 +127,7 @@ QPpsAttribute QPpsAttributePrivate::createPpsAttribute(const QPpsAttributeMap &v // /////////////////////////// -QPpsAttribute::QPpsAttribute(): - d(new QPpsAttributePrivate()) +QPpsAttribute::QPpsAttribute() : d(new QPpsAttributePrivate()) { } @@ -136,7 +135,7 @@ QPpsAttribute::~QPpsAttribute() { } -QPpsAttribute::QPpsAttribute(const QPpsAttribute &other): d(other.d) +QPpsAttribute::QPpsAttribute(const QPpsAttribute &other) : d(other.d) { } @@ -147,7 +146,7 @@ QPpsAttribute &QPpsAttribute::operator=(const QPpsAttribute &other) } #ifdef Q_COMPILER_RVALUE_REFS -QPpsAttribute::QPpsAttribute(QPpsAttribute &&other): d(other.d) +QPpsAttribute::QPpsAttribute(QPpsAttribute &&other) : d(other.d) { other.d->type = QPpsAttribute::None; } diff --git a/src/corelib/kernel/qppsobject.cpp b/src/corelib/kernel/qppsobject.cpp index eb8e69baff..1095ad51da 100644 --- a/src/corelib/kernel/qppsobject.cpp +++ b/src/corelib/kernel/qppsobject.cpp @@ -94,12 +94,12 @@ Q_GLOBAL_STATIC(QPpsMaxSize, ppsMaxSize) // /////////////////////////////////////////////////////////////////////////////// -QPpsObjectPrivate::QPpsObjectPrivate(const QString &path) : - notifier(0), - path(path), - error(EOK), - fd(-1), - readyReadEnabled(true) +QPpsObjectPrivate::QPpsObjectPrivate(const QString &path) + : notifier(0), + path(path), + error(EOK), + fd(-1), + readyReadEnabled(true) { } @@ -490,9 +490,9 @@ void QPpsObjectPrivate::encodeObject(pps_encoder_t *encoder, const QVariantMap & // /////////////////////////////////////////////////////////////////////////////// -QPpsObject::QPpsObject(const QString &path, QObject *parent) : - QObject(parent), - d_ptr(new QPpsObjectPrivate(path)) +QPpsObject::QPpsObject(const QString &path, QObject *parent) + : QObject(parent), + d_ptr(new QPpsObjectPrivate(path)) { } diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index 1955758fca..24c757f9f4 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -353,7 +353,8 @@ public: inline Direction direction() const { return QChar::direction(ucs); } inline JoiningType joiningType() const { return QChar::joiningType(ucs); } #if QT_DEPRECATED_SINCE(5, 3) - QT_DEPRECATED inline Joining joining() const { + QT_DEPRECATED inline Joining joining() const + { switch (QChar::joiningType(ucs)) { case QChar::Joining_Causing: return QChar::Center; case QChar::Joining_Dual: return QChar::Dual; diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 359d0c49e5..3985bc76fe 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -949,7 +949,8 @@ public: QChar::Direction direction() const { return QChar(*this).direction(); } QChar::JoiningType joiningType() const { return QChar(*this).joiningType(); } #if QT_DEPRECATED_SINCE(5, 3) - QT_DEPRECATED QChar::Joining joining() const { + QT_DEPRECATED QChar::Joining joining() const + { switch (QChar(*this).joiningType()) { case QChar::Joining_Causing: return QChar::Center; case QChar::Joining_Dual: return QChar::Dual; -- cgit v1.2.3