Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstringliteral.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2020 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QSTRINGLITERAL_H
6#define QSTRINGLITERAL_H
7
8#include <QtCore/qarraydata.h>
9#include <QtCore/qarraydatapointer.h>
10
11#if 0
12#pragma qt_class(QStringLiteral)
13#endif
14
15QT_BEGIN_NAMESPACE
16
17// all our supported compilers support Unicode string literals,
18// even if their Q_COMPILER_UNICODE_STRING has been revoked due
19// to lacking stdlib support. But QStringLiteral only needs the
20// core language feature, so just use u"" here unconditionally:
21
22#define QT_UNICODE_LITERAL(str) u"" str
23
24using QStringPrivate = QArrayDataPointer<char16_t>;
25
26namespace QtPrivate {
27template <qsizetype N>
28static Q_ALWAYS_INLINE QStringPrivate qMakeStringPrivate(const char16_t (&literal)[N])
29{
30 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
31 auto str = const_cast<char16_t *>(literal);
32 return { nullptr, str, N - 1 };
33}
34}
35
36#define QStringLiteral(str)
37 (QString(QtPrivate::qMakeStringPrivate(QT_UNICODE_LITERAL(str))))
38 /**/
39
40
41QT_END_NAMESPACE
42
43#endif // QSTRINGLITERAL_H
static constexpr auto SHLIB_VERSION
INIT_FUNC(BN_CTX_get)
INIT_FUNC(SSL_CTX_new)
INIT_FUNC(SSL_up_ref)
INIT_FUNC(BIO_meth_set_ctrl)
INIT_FUNC(SSL_write)
INIT_FUNC(RAND_bytes)
INIT_FUNC(BIO_meth_set_read)
INIT_FUNC(BN_bin2bn)
INIT_FUNC(BIO_test_flags)
INIT_FUNC(BN_CTX_new)
INIT_FUNC(BIO_meth_set_write)
INIT_FUNC(BIO_meth_set_gets)
INIT_FUNC(SSL_accept)
INIT_FUNC(TLS_server_method)
INIT_FUNC(SSL_peek)
INIT_FUNC(BIO_clear_flags)
INIT_FUNC(ERR_error_string)
INIT_FUNC(BN_hex2bn)
INIT_FUNC(BIO_meth_set_create)
INIT_FUNC(BN_bn2dec)
INIT_FUNC(SSL_shutdown)
static std::unique_ptr< QLibrary > loadLib()
INIT_FUNC(SSL_CTX_use_PrivateKey_file)
INIT_FUNC(SSL_read)
INIT_FUNC(TLS_client_method)
INIT_FUNC(BN_CTX_end)
static char ErrorString[]
INIT_FUNC(BIO_read)
INIT_FUNC(BN_rand)
INIT_FUNC(BIO_meth_new)
INIT_FUNC(BIO_meth_free)
INIT_FUNC(SSL_ctrl)
INIT_FUNC(BIO_meth_set_destroy)
INIT_FUNC(BIO_s_mem)
INIT_FUNC(BN_copy)
INIT_FUNC(BIO_meth_set_puts)
INIT_FUNC(SSL_CTX_free)
INIT_FUNC(BN_dec2bn)
INIT_FUNC(SSL_connect)
INIT_FUNC(SSL_get_error)
INIT_FUNC(SSL_free)
INIT_FUNC(BIO_write)
INIT_FUNC(SSL_CTX_load_verify_locations)
INIT_FUNC(BIO_set_flags)
INIT_FUNC(SSL_new)
INIT_FUNC(BN_CTX_start)
INIT_FUNC(BN_bn2hex)
INIT_FUNC(BIO_meth_set_callback_ctrl)
INIT_FUNC(BIO_set_init)
INIT_FUNC(SSL_set_bio)
INIT_FUNC(BN_asc2bn)
INIT_FUNC(BN_num_bits_word)
INIT_FUNC(BN_mod_word)
INIT_FUNC(SSL_CTX_set_verify)
INIT_FUNC(SSL_CTX_use_PrivateKey)
INIT_FUNC(BIO_set_data)
INIT_FUNC(BN_num_bits)
INIT_FUNC(SSL_stateless)
INIT_FUNC(SSL_CTX_use_certificate_chain_file)
INIT_FUNC(BN_bn2bin)
INIT_FUNC(BN_mod_exp)
INIT_FUNC(BIO_get_data)
INIT_FUNC(SSL_CTX_set_options)
INIT_FUNC(ERR_get_error)
INIT_FUNC(SSL_CTX_up_ref)
INIT_FUNC(BIO_new)
INIT_FUNC(BIO_free)
INIT_FUNC(BN_CTX_free)
CHECK_VERSIONS("va-drm", VA_DRM_NEEDED_SOVERSION, VA_MAJOR_VERSION+1)
DEFINE_FUNC(pw_deinit, 0)
#define QT_UNICODE_LITERAL(str)