diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-10-02 14:32:29 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-10-04 05:26:31 +0000 |
| commit | 64521e36c453e2ad945a60cb9e70fe9b9970c43c (patch) | |
| tree | 30654c349dc465a947963a5c35c18f82eb4d1daf /src/corelib/doc/snippets | |
| parent | 9aa0bd9cba720cd64835e8d60d3740ccd2a0b950 (diff) | |
Prefer using namespace Qt::StringLiterals
... over Qt::Literals::StringLiterals.
The latter works, but is needlessly verbose. Since such code is
copy'n'pasted, use the preferred form everywhere, to avoid
proliferation.
The docs have been fixed to suggest the shortcut in a separate commit.
As a drive-by, move them to their preferred location, after the
QT_BEGIN_NAMESPACE, but only if they were far away to begin with.
Pick-to: 6.10 6.8 6.5
Change-Id: I0325f749f3b5a331d9c6af458a9bd3bb70d4aa3b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/doc/snippets')
| -rw-r--r-- | src/corelib/doc/snippets/qmetatype/registerConverters.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/doc/snippets/qstring/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/doc/snippets/qmetatype/registerConverters.cpp b/src/corelib/doc/snippets/qmetatype/registerConverters.cpp index dfe802ae1c2..a966d239905 100644 --- a/src/corelib/doc/snippets/qmetatype/registerConverters.cpp +++ b/src/corelib/doc/snippets/qmetatype/registerConverters.cpp @@ -5,7 +5,7 @@ #include <QMetaType> #include <QString> -using namespace Qt::Literals::StringLiterals; +using namespace Qt::StringLiterals; int main() { //! [member] diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp index 736ce52b256..cb79e64a18b 100644 --- a/src/corelib/doc/snippets/qstring/main.cpp +++ b/src/corelib/doc/snippets/qstring/main.cpp @@ -5,7 +5,7 @@ #include <QWidget> #include <stdio.h> -using namespace Qt::Literals::StringLiterals; +using namespace Qt::StringLiterals; class Widget : public QWidget { |
