Dokit
Internal development documentation
Loading...
Searching...
No Matches
stringliterals_p.h File Reference

Declares the DOKIT_USE_STRINGLITERALS macro, and related functions. More...

#include <QtGlobal>
Include dependency graph for stringliterals_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DOKIT_STRING_INDEX_TYPE   qsizetype
 Internal macro for matching the index type used by QString methods.
#define DOKIT_USE_STRINGLITERALS   using namespace Qt::Literals::StringLiterals;
 Internal macro for using either official Qt string literals (added in Qt 6.4), or our own equivalent ones for older Qt versions.

Detailed Description

Declares the DOKIT_USE_STRINGLITERALS macro, and related functions.

This is only required to support Qt versions earlier than 6.4, since Qt added string literal operators in that versions. This header can, and will, be removed entirely when Dokit no longer supports Qt versions earlier than 6.4.

Definition in file stringliterals_p.h.

Macro Definition Documentation

◆ DOKIT_STRING_INDEX_TYPE

#define DOKIT_STRING_INDEX_TYPE   qsizetype

Internal macro for matching the index type used by QString methods.

Specifically, from Qt 6.0.0 onwards, QString (and related classes, and methods) use qsizetype for index positions, while Qt5 used int instead.

Todo
Remove this macro when Dokit no longer supports Qt5.

Definition at line 41 of file stringliterals_p.h.

Referenced by AbstractCommand::appendSiPrefix(), and DsoCommand::processOptions().

◆ DOKIT_USE_STRINGLITERALS

#define DOKIT_USE_STRINGLITERALS   using namespace Qt::Literals::StringLiterals;

Internal macro for using either official Qt string literals (added in Qt 6.4), or our own equivalent ones for older Qt versions.

Todo
Remove this macro when Dokit no longer supports Qt versions earlier than 6.4.

Definition at line 71 of file stringliterals_p.h.