Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtCore/qtmocconstants.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2024 Intel Corporation.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QTMOCCONSTANTS_H
0005 #define QTMOCCONSTANTS_H
0006 
0007 //
0008 //  W A R N I N G
0009 //  -------------
0010 //
0011 // This file is not part of the Qt API. It exists to be used by the code that
0012 // moc generates. This file will not change quickly, but it over the long term,
0013 // it will likely change or even be removed.
0014 //
0015 // We mean it.
0016 //
0017 
0018 #include <QtCore/qflags.h>
0019 #include <QtCore/qtconfigmacros.h>
0020 #include <QtCore/qtypes.h>
0021 
0022 QT_BEGIN_NAMESPACE
0023 
0024 namespace QtMocConstants {
0025 // revision 7 is Qt 5.0 everything lower is not supported
0026 // revision 8 is Qt 5.12: It adds the enum name to QMetaEnum
0027 // revision 9 is Qt 6.0: It adds the metatype of properties and methods
0028 // revision 10 is Qt 6.2: The metatype of the metaobject is stored in the metatypes array
0029 //                        and metamethods store a flag stating whether they are const
0030 // revision 11 is Qt 6.5: The metatype for void is stored in the metatypes array
0031 // revision 12 is Qt 6.6: It adds the metatype for enums
0032 // revision 13 is Qt 6.9: Adds support for 64-bit QFlags and moves the method revision
0033 enum { OutputRevision = 13 };   // Used by moc, qmetaobjectbuilder and qdbus
0034 
0035 enum PropertyFlags : uint {
0036     Invalid = 0x00000000,
0037     Readable = 0x00000001,
0038     Writable = 0x00000002,
0039     Resettable = 0x00000004,
0040     EnumOrFlag = 0x00000008,
0041     Alias = 0x00000010,
0042     // Reserved for future usage = 0x00000020,
0043     StdCppSet = 0x00000100,
0044     Constant = 0x00000400,
0045     Final = 0x00000800,
0046     Designable = 0x00001000,
0047     Scriptable = 0x00004000,
0048     Stored = 0x00010000,
0049     User = 0x00100000,
0050     Required = 0x01000000,
0051     Bindable = 0x02000000,
0052 };
0053 inline constexpr PropertyFlags DefaultPropertyFlags { Readable | Designable | Scriptable | Stored };
0054 
0055 enum MethodFlags : uint {
0056     AccessPrivate = 0x00,
0057     AccessProtected = 0x01,
0058     AccessPublic = 0x02,
0059     AccessMask = 0x03, // mask
0060 
0061     MethodMethod = 0x00,
0062     MethodSignal = 0x04,
0063     MethodSlot = 0x08,
0064     MethodConstructor = 0x0c,
0065     MethodTypeMask = 0x0c,
0066 
0067     MethodCompatibility = 0x10,
0068     MethodCloned = 0x20,
0069     MethodScriptable = 0x40,
0070     MethodRevisioned = 0x80,
0071 
0072     MethodIsConst = 0x100, // no use case for volatile so far
0073 };
0074 
0075 enum MetaObjectFlag : uint {
0076     DynamicMetaObject = 0x01,               // is derived from QAbstractDynamicMetaObject
0077     RequiresVariantMetaObject = 0x02,
0078     PropertyAccessInStaticMetaCall = 0x04,  // since Qt 5.5, property code is in the static metacall
0079     AllocatedMetaObject = 0x08,             // meta object was allocated in dynamic memory (and may be freed)
0080 };
0081 
0082 enum MetaDataFlags : uint {
0083     IsUnresolvedType = 0x80000000,
0084     TypeNameIndexMask = 0x7FFFFFFF,
0085     IsUnresolvedSignal = 0x70000000,
0086 };
0087 
0088 enum EnumFlags : uint {
0089     EnumIsFlag = 0x1,
0090     EnumIsScoped = 0x2,
0091     EnumIs64Bit = 0x40,
0092 };
0093 
0094 } // namespace QtMocConstants
0095 
0096 QT_END_NAMESPACE
0097 
0098 #endif // QTMOCCONSTANTS_H