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,26 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(test_moc_macro_target)
find_package(Qt6Core REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt_generate_moc(main_gen_test.cpp
"${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc"
TARGET QtGenerateMacroTest
)
add_executable(QtGenerateMacroTest main_gen_test.cpp "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc")
target_include_directories(QtGenerateMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
target_link_libraries(QtGenerateMacroTest PRIVATE Qt6::Core)
qt_wrap_cpp(moc_file mywrapobject.h
TARGET QtWrapMacroTest
)
add_executable(QtWrapMacroTest main_wrap_test.cpp ${moc_file})
target_include_directories(QtWrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface")
target_link_libraries(QtWrapMacroTest PRIVATE Qt::Core)

View File

@ -0,0 +1,20 @@
// Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef MYINTERFACE_H
#define MYINTERFACE_H
#include <qglobal.h>
class MyInterface
{
};
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(MyInterface, "org.cmake.example.MyInterface")
QT_END_NAMESPACE
#endif

View File

@ -0,0 +1,23 @@
// Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QObject>
#include "myinterface.h"
class MyObject : public QObject, MyInterface
{
Q_OBJECT
Q_INTERFACES(MyInterface)
public:
explicit MyObject(QObject *parent = nullptr) : QObject(parent) { }
};
int main(int argc, char **argv)
{
MyObject mo;
mo.objectName();
return 0;
}
#include "main_gen_test.moc"

View File

@ -0,0 +1,13 @@
// Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QObject>
#include "mywrapobject.h"
int main(int argc, char **argv)
{
MyWrapObject mwo;
mwo.objectName();
return 0;
}

View File

@ -0,0 +1,19 @@
// Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef MYWRAPOBJECT_H
#define MYWRAPOBJECT_H
#include <QObject>
#include "myinterface.h"
class MyWrapObject : public QObject, MyInterface
{
Q_OBJECT
Q_INTERFACES(MyInterface)
public:
explicit MyWrapObject(QObject *parent = nullptr) : QObject(parent) { }
};
#endif