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
qtranslator_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:header-decls-only
4
5#ifndef QTRANSLATOR_P_H
6#define QTRANSLATOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the Qt translation tools. This header file may change from version
14// to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/private/qglobal_p.h>
20
21enum {
22 Q_EQ = 0x01,
23 Q_LT = 0x02,
24 Q_LEQ = 0x03,
25 Q_BETWEEN = 0x04,
26
27 Q_NOT = 0x08,
28 Q_MOD_10 = 0x10,
29 Q_MOD_100 = 0x20,
30 Q_LEAD_1000 = 0x40,
31
32 Q_AND = 0xFD,
33 Q_OR = 0xFE,
34 Q_NEWRULE = 0xFF,
35
36 Q_OP_MASK = 0x07,
37
38 Q_NEQ = Q_NOT | Q_EQ,
39 Q_GT = Q_NOT | Q_LEQ,
40 Q_GEQ = Q_NOT | Q_LT,
41 Q_NOT_BETWEEN = Q_NOT | Q_BETWEEN
42};
43
44#endif
\inmodule QtCore
Definition qfile.h:96
\inmodule QtCore
Definition qresource.h:21
bool do_load(const QString &filename, const QString &directory)
const uchar * contextArray
bool do_load(const uchar *data, qsizetype len, const QString &directory)
const uchar * messageArray
QString do_translate(const char *context, const char *sourceText, const char *comment, int n) const
const uchar * offsetArray
bool load_translation(const QStringList &languages, const QString &filename, const QString &prefix, const QString &directory, const QString &suffix)
std::unique_ptr< QResource > resource
std::vector< std::unique_ptr< QTranslator > > subTranslators
const uchar * numerusRulesArray
\inmodule QtCore
Definition qtranslator.h:20
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)
#define QStringLiteral(str)
Definition qstring.h:1826
static const int MagicLength
static QString getMessage(const uchar *m, const uchar *end, const char *context, const char *sourceText, const char *comment, uint numerus)
static quint32 read32(const uchar *data)
static void elfHash_continue(const char *name, uint &h)
static bool isValidNumerusRules(const uchar *rules, uint rulesSize)
static QString dotQmLiteral()
static uint elfHash(const char *name)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
static uint numerusHelper(int n, const uchar *rules, uint rulesSize)
static quint8 read8(const uchar *data)
static quint16 read16(const uchar *data)
static const uchar magic[MagicLength]
static void elfHash_finish(uint &h)