qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qmetatype_expect_fail Test:
#####################################################################
qt_internal_add_test(tst_qmetatype_expect_fail
GUI
SOURCES
declare_metatype_noninline.cpp declare_metatype_noninline.h
tst_qmetatype.cpp
)

View File

@ -0,0 +1,11 @@
// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "declare_metatype_noninline.h"
Q_DECLARE_METATYPE(ToBeDeclaredMetaTypeNonInline)
int ToBeDeclaredMetaTypeNonInline::triggerRegistration()
{
return qMetaTypeId<ToBeDeclaredMetaTypeNonInline>();
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef DECLARE_METATYPE_NONINLINE_H
#define DECLARE_METATYPE_NONINLINE_H
#include <QtCore/qmetatype.h>
struct ToBeDeclaredMetaTypeNonInline {
static int triggerRegistration();
};
#endif // DECLARE_METATYPE_NONINLINE_H

View File

@ -0,0 +1,5 @@
CONFIG += testcase
TARGET = tst_qmetatype_expect_fail
QT = core
HEADERS = declare_metatype_noninline.h
SOURCES = tst_qmetatype.cpp declare_metatype_noninline.cpp

View File

@ -0,0 +1,17 @@
// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore>
#include "declare_metatype_noninline.h"
int main(int argc, char **argv)
{
qDebug("expect no warning here");
const int id = qRegisterMetaType<ToBeDeclaredMetaTypeNonInline>("ToBeDeclaredMetaTypeNonInline");
qDebug("expect a qfatal now");
const int result = ToBeDeclaredMetaTypeNonInline::triggerRegistration();
Q_ASSERT(id == result);
qDebug("if you read this, check that a qFatal was seen, "
"otherwise the test failed.");
}