diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2022-08-07 22:18:38 +0200 |
|---|---|---|
| committer | Oliver Wolff <oliver.wolff@qt.io> | 2022-09-01 15:51:48 +0200 |
| commit | 812a0d3125cb89e340c59aa92cdc946862fb009d (patch) | |
| tree | 03f0fb406ec984e815455366b32a93e6fee66b88 /src/corelib/kernel/qobject.cpp | |
| parent | 24e8a693cdf418a90559472addfd49637ff4e270 (diff) | |
QAnyStringView: construct from any T implicitly convertible to QString/QByteArray
This includes QDBusReply, QProperty, and QStringBuilder expressions.
The new constructor subsumes the QStringBuilder case without requiring
jumping though hoops to delay the definition of the ctor the way we
had to for the explicit QStringBuilder constructor, so remove the
explicit QStringBuilder one again.
[ChangeLog][QtCore][QAnyStringView] Can now be constructed from
anything that implicitly converts to either QString or QByteArray.
Fixes: QTBUG-105389
Change-Id: I0e584dd3e20d591381609a3329ef47cec7356ecc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
| -rw-r--r-- | src/corelib/kernel/qobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index ac5e839eb2e..f2124678f07 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1279,7 +1279,7 @@ void QObject::setObjectName(QAnyStringView name) d->extraData->objectName.removeBindingUnlessInWrapper(); - if (d->extraData->objectName.value() != name) { + if (d->extraData->objectName != name) { d->extraData->objectName.setValueBypassingBindings(name.toString()); d->extraData->objectName.notify(); // also emits a signal } |
