From 1c2a092a64c609e10f0fcbf2936b5dae70ee5e8c Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Tue, 7 Sep 2021 14:07:08 +0200 Subject: QXmppDataForm: Merge constructors Can be done because binary compatibility has been broken. --- src/base/QXmppDataForm.cpp | 18 ------------------ src/base/QXmppDataForm.h | 12 ++++-------- 2 files changed, 4 insertions(+), 26 deletions(-) (limited to 'src/base') diff --git a/src/base/QXmppDataForm.cpp b/src/base/QXmppDataForm.cpp index 307e6f9e..d37e2c5e 100644 --- a/src/base/QXmppDataForm.cpp +++ b/src/base/QXmppDataForm.cpp @@ -337,15 +337,6 @@ public: /// \xep{0004, Data Forms}. /// -/// -/// Constructs a QXmppDataForm::Field of the specified \a type. -/// -QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type) - : d(new QXmppDataFormFieldPrivate) -{ - d->type = type; -} - /// /// Constructs a QXmppDataForm::Field with the specified attributes. /// @@ -659,15 +650,6 @@ public: /// Data Forms}. /// -/// -/// Constructs a QXmppDataForm of the specified \a type. -/// -QXmppDataForm::QXmppDataForm(Type type) - : d(new QXmppDataFormPrivate) -{ - d->type = type; -} - /// /// Constructs a QXmppDataForm with the specified attributes. /// diff --git a/src/base/QXmppDataForm.h b/src/base/QXmppDataForm.h index 35d1019e..5da81e65 100644 --- a/src/base/QXmppDataForm.h +++ b/src/base/QXmppDataForm.h @@ -119,10 +119,8 @@ public: TextSingleField }; - // ### QXmpp2: merge ctors - Field(QXmppDataForm::Field::Type type = QXmppDataForm::Field::TextSingleField); - Field(QXmppDataForm::Field::Type type, - const QString &key, + Field(Type type = TextSingleField, + const QString &key = {}, const QVariant &value = {}, bool isRequired = false, const QString &label = {}, @@ -190,10 +188,8 @@ public: ///< or the data is a generic data set. }; - // ### QXmpp2: merge ctors - QXmppDataForm(QXmppDataForm::Type type = QXmppDataForm::None); - QXmppDataForm(QXmppDataForm::Type type, - const QList &fields, + QXmppDataForm(Type type = None, + const QList &fields = {}, const QString &title = {}, const QString &instructions = {}); QXmppDataForm(const QXmppDataFormBase &based); -- cgit v1.2.3