qmlpuppet: fix Qt5 builds

Change-Id: Ie3fedef867bf2327b145b4ef4e5b282858076b23
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2022-12-20 19:52:59 +01:00
parent 74da3abb32
commit e16af85f32
11 changed files with 26 additions and 26 deletions

View File

@@ -40,6 +40,8 @@ add_qtc_executable(qml2puppet
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
qml2puppet/main.cpp
qml2puppet/qmlbase.h qml2puppet/appmetadata.h
qml2puppet/qmlpuppet.h qml2puppet/qmlpuppet.cpp qml2puppet/configcrashpad.h
qmlpuppet.qrc
)
@@ -180,15 +182,6 @@ extend_qtc_executable(qml2puppet
animationdriver.cpp animationdriver.h
)
extend_qtc_executable(qml2puppet
SOURCES_PREFIX qml2puppet/runner
SOURCES
runtime/qmlruntime.h runtime/qmlruntime.cpp
runtime/qmlconfiguration.h runtime/loadwatcher.h
puppet/qmlpuppet.h puppet/qmlpuppet.cpp puppet/configcrashpad.h
qmlbase.h appmetadata.h
)
extend_qtc_executable(qml2puppet
SOURCES_PREFIX qmlprivategate
SOURCES
@@ -209,24 +202,31 @@ extend_qtc_executable(qml2puppet
PUBLIC_INCLUDES src/libs
)
extend_qtc_executable(qml2puppet
PUBLIC_INCLUDES ${CMAKE_CURRENT_LIST_DIR}/qml2puppet/runner/runtime
)
extend_qtc_executable(qml2puppet
CONDITION TARGET Nanotrace
DEPENDS Nanotrace
)
if (Qt5_VERSION VERSION_GREATER_EQUAL 6.4.0)
extend_qtc_executable(qml2puppet
DEFINES ENABLE_INTERNAL_QML_RUNTIME
PUBLIC_INCLUDES ${CMAKE_CURRENT_LIST_DIR}/qml2puppet/runner
SOURCES_PREFIX qml2puppet/runner
SOURCES
qmlruntime.h qmlruntime.cpp
qmlconfiguration.h loadwatcher.h
)
# Turn the tool into its own self-contained qml module
qt6_add_qml_module(qml2puppet
qt_add_qml_module(qml2puppet
URI QmlRuntime.QmlConfiguration
VERSION 1.0
)
if (QTC_STATIC_BUILD AND Qt5_VERSION VERSION_GREATER_EQUAL 6.0.0)
qt6_import_qml_plugins(qml2puppet PATH_TO_SCAN ${SRCDIR})
if (QTC_STATIC_BUILD)
qt_import_qml_plugins(qml2puppet PATH_TO_SCAN ${SRCDIR})
endif()
endif()
# Crashpad
# only windows requires separate crashpad client per process until client->SetHandlerIPCPipe()

View File

@@ -16,7 +16,6 @@ inline Q_LOGGING_CATEGORY(deprecated, "qt.tools.qds.deprecated");
inline Q_LOGGING_CATEGORY(verbose1, "qt.tools.qds.verbose1");
inline Q_LOGGING_CATEGORY(verbose2, "qt.tools.qds.verbose2");
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
inline void registerMessageHandler()
{
qInstallMessageHandler(
@@ -45,8 +44,6 @@ inline void registerMessageHandler()
}
});
}
#endif
} // namespace Logging
namespace AppInfo {

View File

@@ -1,12 +1,15 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "runner/puppet/qmlpuppet.h"
#include "runner/runtime/qmlruntime.h"
#include "qmlpuppet.h"
#ifdef ENABLE_INTERNAL_QML_RUNTIME
#include "runner/qmlruntime.h"
#endif
QmlBase *getQmlRunner(int &argc, char **argv)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
#ifdef ENABLE_INTERNAL_QML_RUNTIME
for (int i = 0; i < argc; i++) {
if (!strcmp(argv[i], "--qml-runtime")){
qInfo() << "Starting QML Runtime";