diff options
| author | Linus Jahn <lnj@kaidan.im> | 2021-09-07 14:07:08 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2021-09-07 14:07:08 +0200 |
| commit | 1c2a092a64c609e10f0fcbf2936b5dae70ee5e8c (patch) | |
| tree | 2a6448a42e249a46a1827e5685b04f2a8104e323 /src | |
| parent | 09571ab88bbf8aa7f29b09036efe2b86688bd7d3 (diff) | |
| download | qxmpp-1c2a092a64c609e10f0fcbf2936b5dae70ee5e8c.tar.gz | |
QXmppDataForm: Merge constructors
Can be done because binary compatibility has been broken.
Diffstat (limited to 'src')
| -rw-r--r-- | src/base/QXmppDataForm.cpp | 18 | ||||
| -rw-r--r-- | src/base/QXmppDataForm.h | 12 |
2 files changed, 4 insertions, 26 deletions
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 @@ -338,15 +338,6 @@ public: /// /// -/// 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. /// /// \since QXmpp 1.3 @@ -660,15 +651,6 @@ public: /// /// -/// 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. /// /// \since QXmpp 1.3 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<Field> &fields, + QXmppDataForm(Type type = None, + const QList<Field> &fields = {}, const QString &title = {}, const QString &instructions = {}); QXmppDataForm(const QXmppDataFormBase &based); |
