diff options
Diffstat (limited to 'src/gui')
821 files changed, 12149 insertions, 37809 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index dc7837aa63..0ff1ef0c94 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -145,6 +145,8 @@ qt_internal_add_module(Gui math3d/qvector4d.h math3d/qvectornd.cpp math3d/qvectornd.h painting/qbackingstore.cpp painting/qbackingstore.h + painting/qbackingstoredefaultcompositor.cpp painting/qbackingstoredefaultcompositor_p.h + painting/qbackingstorerhisupport.cpp painting/qbackingstorerhisupport_p.h painting/qbezier.cpp painting/qbezier_p.h painting/qblendfunctions.cpp painting/qblendfunctions_p.h painting/qblittable.cpp painting/qblittable_p.h @@ -167,7 +169,8 @@ qt_internal_add_module(Gui painting/qfixed_p.h painting/qgrayraster.c painting/qgrayraster_p.h painting/qicc.cpp painting/qicc_p.h - painting/qimagescale.cpp + painting/qimagescale.cpp painting/qimagescale_p.h + painting/qmath_p.h painting/qmemrotate.cpp painting/qmemrotate_p.h painting/qoutlinemapper.cpp painting/qoutlinemapper_p.h painting/qpagedpaintdevice.cpp painting/qpagedpaintdevice.h painting/qpagedpaintdevice_p.h @@ -185,7 +188,7 @@ qt_internal_add_module(Gui painting/qpathsimplifier.cpp painting/qpathsimplifier_p.h painting/qpdf.cpp painting/qpdf_p.h painting/qpdfwriter.cpp painting/qpdfwriter.h - painting/qpen.cpp painting/qpen.h + painting/qpen.cpp painting/qpen.h painting/qpen_p.h painting/qpixellayout.cpp painting/qpixellayout_p.h painting/qplatformbackingstore.cpp painting/qplatformbackingstore.h painting/qpolygon.cpp painting/qpolygon.h @@ -206,8 +209,6 @@ qt_internal_add_module(Gui rhi/qrhi_p_p.h rhi/qrhinull.cpp rhi/qrhinull_p.h rhi/qrhinull_p_p.h - rhi/qrhiprofiler.cpp rhi/qrhiprofiler_p.h - rhi/qrhiprofiler_p_p.h rhi/qshader.cpp rhi/qshader_p.h rhi/qshader_p_p.h rhi/qshaderdescription.cpp rhi/qshaderdescription_p.h @@ -291,6 +292,14 @@ qt_internal_add_resource(Gui "qpdf" ${qpdf_resource_files} ) +qt_internal_add_resource(Gui "gui_shaders" + PREFIX + "/qt-project.org/gui" + FILES + "painting/shaders/backingstorecompose.vert.qsb" + "painting/shaders/backingstorecompose.frag.qsb" +) + if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) target_link_options(Gui PRIVATE "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtGui.dynlist") @@ -322,6 +331,13 @@ if(QT_FEATURE_opengl) if(QT_FEATURE_opengles2) find_package(GLESv2) target_link_libraries(Gui PUBLIC GLESv2::GLESv2) + + if(INTEGRITY AND _qt_igy_gui_libs) + find_package(IntegrityPlatformGraphics) + target_link_libraries(Gui + INTERFACE $<LINK_ONLY:IntegrityPlatformGraphics::IntegrityPlatformGraphics>) + endif() + elseif(NOT QT_FEATURE_opengl_dynamic) target_link_libraries(Gui PUBLIC WrapOpenGL::WrapOpenGL) endif() @@ -334,6 +350,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengl kernel/qopenglcontext_platform.h kernel/qplatformopenglcontext.cpp kernel/qplatformopenglcontext.h opengl/qopengl.cpp opengl/qopengl.h opengl/qopengl_p.h + opengl/qopenglext.h opengl/qopenglextensions_p.h opengl/qopenglextrafunctions.h opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h @@ -360,6 +377,7 @@ qt_internal_extend_target(Gui CONDITION APPLE image/qimage_darwin.mm painting/qcoregraphics.mm painting/qcoregraphics_p.h painting/qrasterbackingstore.cpp painting/qrasterbackingstore_p.h + painting/qrhibackingstore.cpp painting/qrhibackingstore_p.h platform/darwin/qmacmime.mm platform/darwin/qmacmime_p.h platform/darwin/qapplekeymapper.mm platform/darwin/qapplekeymapper_p.h text/coretext/qcoretextfontdatabase.mm text/coretext/qcoretextfontdatabase_p.h @@ -385,8 +403,10 @@ qt_internal_extend_target(Gui CONDITION WIN32 platform/windows/qwindowsguieventdispatcher.cpp platform/windows/qwindowsguieventdispatcher_p.h platform/windows/qwindowsmime_p.h platform/windows/qwindowsnativeinterface.cpp + rhi/cs_tdr_p.h rhi/qrhid3d11.cpp rhi/qrhid3d11_p.h rhi/qrhid3d11_p_p.h + rhi/vs_test_p.h text/windows/qwindowsfontdatabase.cpp text/windows/qwindowsfontdatabase_p.h text/windows/qwindowsfontdatabasebase.cpp text/windows/qwindowsfontdatabasebase_p.h text/windows/qwindowsfontengine.cpp text/windows/qwindowsfontengine_p.h @@ -460,7 +480,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_egl qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility SOURCES - accessible/qaccessible.cpp accessible/qaccessible.h + accessible/qaccessible.cpp accessible/qaccessible.h accessible/qaccessible_base.h accessible/qaccessiblebridge.cpp accessible/qaccessiblebridge.h accessible/qaccessiblebridgeutils.cpp accessible/qaccessiblebridgeutils_p.h accessible/qaccessiblecache.cpp accessible/qaccessiblecache_p.h @@ -566,38 +586,45 @@ qt_internal_extend_target(Gui CONDITION ((QT_FEATURE_png) AND (WIN32 AND MINGW)) -fno-reorder-blocks-and-partition ) -if(NOT ANDROID) - if(TEST_architecture_arch STREQUAL x86_64) - qt_internal_extend_target(Gui - SOURCES - painting/qdrawhelper_sse2.cpp - ) - else() - qt_internal_add_simd_part(Gui SIMD sse2 - SOURCES - painting/qdrawhelper_sse2.cpp - ) - endif() - - qt_internal_add_simd_part(Gui SIMD ssse3 - SOURCES - image/qimage_ssse3.cpp - painting/qdrawhelper_ssse3.cpp +if(TEST_architecture_arch STREQUAL x86_64) + qt_internal_extend_target(Gui + SOURCES + painting/qdrawhelper_sse2.cpp ) - - qt_internal_add_simd_part(Gui SIMD sse4_1 +else() + qt_internal_add_simd_part(Gui SIMD sse2 SOURCES - painting/qdrawhelper_sse4.cpp - painting/qimagescale_sse4.cpp + painting/qdrawhelper_sse2.cpp ) +endif() - qt_internal_add_simd_part(Gui SIMD neon - SOURCES - image/qimage_neon.cpp - painting/qdrawhelper_neon.cpp painting/qdrawhelper_neon_p.h - painting/qimagescale_neon.cpp - ) +qt_internal_add_simd_part(Gui SIMD ssse3 + SOURCES + image/qimage_ssse3.cpp + painting/qdrawhelper_ssse3.cpp +) +qt_internal_add_simd_part(Gui SIMD sse4_1 + SOURCES + painting/qdrawhelper_sse4.cpp + painting/qimagescale_sse4.cpp +) + +qt_internal_add_simd_part(Gui SIMD arch_haswell + SOURCES + painting/qdrawhelper_avx2.cpp + EXCLUDE_OSX_ARCHITECTURES + arm64 +) + +qt_internal_add_simd_part(Gui SIMD neon + SOURCES + image/qimage_neon.cpp + painting/qdrawhelper_neon.cpp painting/qdrawhelper_neon_p.h + painting/qimagescale_neon.cpp +) + +if(NOT ANDROID) qt_internal_add_simd_part(Gui SIMD mips_dsp SOURCES painting/qdrawhelper_mips_dsp.cpp painting/qdrawhelper_mips_dsp_p.h @@ -611,13 +638,6 @@ if(NOT ANDROID) image/qimage_mips_dspr2_asm.S painting/qdrawhelper_mips_dspr2_asm.S ) - - qt_internal_add_simd_part(Gui SIMD arch_haswell - SOURCES - painting/qdrawhelper_avx2.cpp - EXCLUDE_OSX_ARCHITECTURES - arm64 - ) endif() qt_internal_extend_target(Gui CONDITION ANDROID @@ -703,7 +723,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_textmarkdownwriter qt_internal_extend_target(Gui CONDITION QT_FEATURE_cssparser SOURCES - painting/qcssutil.cpp + painting/qcssutil.cpp painting/qcssutil_p.h text/qcssparser.cpp text/qcssparser_p.h ) @@ -822,6 +842,11 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AN X11::X11 ) +qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengles2 + SOURCES + opengl/qopengles2ext.h +) + qt_internal_extend_target(Gui CONDITION QT_FEATURE_egl AND QT_FEATURE_opengl SOURCES opengl/platform/egl/qeglpbuffer.cpp opengl/platform/egl/qeglpbuffer_p.h @@ -860,10 +885,12 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_vulkan SOURCES rhi/qrhivulkan.cpp rhi/qrhivulkan_p.h rhi/qrhivulkan_p_p.h + rhi/qrhivulkanext_p.h vulkan/qbasicvulkanplatforminstance.cpp vulkan/qbasicvulkanplatforminstance_p.h vulkan/qplatformvulkaninstance.cpp vulkan/qplatformvulkaninstance.h + vulkan/qvulkandefaultinstance.cpp vulkan/qvulkandefaultinstance_p.h vulkan/qvulkanfunctions.cpp - vulkan/qvulkaninstance.cpp vulkan/qvulkaninstance.h + vulkan/qvulkaninstance.cpp vulkan/qvulkaninstance.h vulkan/qvulkaninstance_p.h vulkan/qvulkanwindow.cpp vulkan/qvulkanwindow.h vulkan/qvulkanwindow_p.h ) if(QT_FEATURE_vulkan) @@ -884,10 +911,14 @@ if (QT_FEATURE_vulkan) list(APPEND vulkan_fun_outputs "vulkan/${vulkan_fun_p_cpp}") if(NOT "${QT_HOST_PATH}" STREQUAL "") + set(host_executable_suffix "") + if(CMAKE_HOST_WIN32) + set(host_executable_suffix ".exe") + endif() qt_path_join(qvkgen "${QT_HOST_PATH}" "${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_LIBEXECDIR}" - "qvkgen") + "qvkgen${host_executable_suffix}") else() set(qvkgen "${QT_CMAKE_EXPORT_NAMESPACE}::qvkgen") endif() @@ -897,7 +928,7 @@ if (QT_FEATURE_vulkan) "${CMAKE_CURRENT_SOURCE_DIR}/vulkan/vk.xml" "${CMAKE_CURRENT_SOURCE_DIR}/vulkan/generated_header.txt" "${CMAKE_CURRENT_BINARY_DIR}/vulkan/qvulkanfunctions" - DEPENDS vulkan/vk.xml + DEPENDS vulkan/vk.xml ${qvkgen} COMMENT "Generating vulkan data" ) @@ -917,6 +948,7 @@ add_custom_command( OUTPUT ${vulkan_fun_outputs} ${vulkan_fun_command_content} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + VERBATIM ) # special case end @@ -1022,7 +1054,7 @@ qt_internal_extend_target(Gui CONDITION IOS OR MACOS qt_internal_extend_target(Gui # special case CONDITION NOT GCC OR NOT QT_COMPILER_VERSION_MAJOR STREQUAL 5 # source subtraction gone wrong SOURCES - painting/qdrawhelper.cpp + painting/qdrawhelper.cpp painting/qdrawhelper_neon_p.h NO_PCH_SOURCES "painting/qdrawhelper.cpp" ) diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 2249e3c121..8de528fc1e 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "atspiadaptor_p.h" #include "qspiaccessiblebridge_p.h" @@ -66,6 +30,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(lcAccessibilityAtspi, "qt.accessibility.atspi") Q_LOGGING_CATEGORY(lcAccessibilityAtspiCreation, "qt.accessibility.atspi.creation") @@ -133,11 +99,11 @@ AtSpiAdaptor::AtSpiAdaptor(DBusConnection *connection, QObject *parent) connect(m_applicationAdaptor, SIGNAL(windowActivated(QObject*,bool)), this, SLOT(windowActivated(QObject*,bool))); updateEventListeners(); - bool success = m_dbus->connection().connect(QLatin1String("org.a11y.atspi.Registry"), QLatin1String("/org/a11y/atspi/registry"), - QLatin1String("org.a11y.atspi.Registry"), QLatin1String("EventListenerRegistered"), this, + bool success = m_dbus->connection().connect("org.a11y.atspi.Registry"_L1, "/org/a11y/atspi/registry"_L1, + "org.a11y.atspi.Registry"_L1, "EventListenerRegistered"_L1, this, SLOT(eventListenerRegistered(QString,QString))); - success = success && m_dbus->connection().connect(QLatin1String("org.a11y.atspi.Registry"), QLatin1String("/org/a11y/atspi/registry"), - QLatin1String("org.a11y.atspi.Registry"), QLatin1String("EventListenerDeregistered"), this, + success = success && m_dbus->connection().connect("org.a11y.atspi.Registry"_L1, "/org/a11y/atspi/registry"_L1, + "org.a11y.atspi.Registry"_L1, "EventListenerDeregistered"_L1, this, SLOT(eventListenerDeregistered(QString,QString))); } @@ -150,7 +116,7 @@ AtSpiAdaptor::~AtSpiAdaptor() */ QString AtSpiAdaptor::introspect(const QString &path) const { - static const QLatin1String accessibleIntrospection( + static const QLatin1StringView accessibleIntrospection( " <interface name=\"org.a11y.atspi.Accessible\">\n" " <property access=\"read\" type=\"s\" name=\"Name\"/>\n" " <property access=\"read\" type=\"s\" name=\"Description\"/>\n" @@ -198,7 +164,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String actionIntrospection( + static const QLatin1StringView actionIntrospection( " <interface name=\"org.a11y.atspi.Action\">\n" " <property access=\"read\" type=\"i\" name=\"NActions\"/>\n" " <method name=\"GetDescription\">\n" @@ -224,7 +190,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String applicationIntrospection( + static const QLatin1StringView applicationIntrospection( " <interface name=\"org.a11y.atspi.Application\">\n" " <property access=\"read\" type=\"s\" name=\"ToolkitName\"/>\n" " <property access=\"read\" type=\"s\" name=\"Version\"/>\n" @@ -239,7 +205,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String componentIntrospection( + static const QLatin1StringView componentIntrospection( " <interface name=\"org.a11y.atspi.Component\">\n" " <method name=\"Contains\">\n" " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n" @@ -302,7 +268,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String editableTextIntrospection( + static const QLatin1StringView editableTextIntrospection( " <interface name=\"org.a11y.atspi.EditableText\">\n" " <method name=\"SetTextContents\">\n" " <arg direction=\"in\" type=\"s\" name=\"newContents\"/>\n" @@ -335,7 +301,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String tableIntrospection( + static const QLatin1StringView tableIntrospection( " <interface name=\"org.a11y.atspi.Table\">\n" " <property access=\"read\" type=\"i\" name=\"NRows\"/>\n" " <property access=\"read\" type=\"i\" name=\"NColumns\"/>\n" @@ -443,7 +409,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String textIntrospection( + static const QLatin1StringView textIntrospection( " <interface name=\"org.a11y.atspi.Text\">\n" " <property access=\"read\" type=\"i\" name=\"CharacterCount\"/>\n" " <property access=\"read\" type=\"i\" name=\"CaretOffset\"/>\n" @@ -571,7 +537,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const " </interface>\n" ); - static const QLatin1String valueIntrospection( + static const QLatin1StringView valueIntrospection( " <interface name=\"org.a11y.atspi.Value\">\n" " <property access=\"read\" type=\"d\" name=\"MinimumValue\"/>\n" " <property access=\"read\" type=\"d\" name=\"MaximumValue\"/>\n" @@ -594,19 +560,19 @@ QString AtSpiAdaptor::introspect(const QString &path) const QString xml; xml.append(accessibleIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_COMPONENT))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_COMPONENT ""_L1)) xml.append(componentIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_TEXT))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_TEXT ""_L1)) xml.append(textIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_EDITABLE_TEXT))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_EDITABLE_TEXT ""_L1)) xml.append(editableTextIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_ACTION))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_ACTION ""_L1)) xml.append(actionIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_TABLE))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_TABLE ""_L1)) xml.append(tableIntrospection); - if (interfaces.contains(QLatin1String(ATSPI_DBUS_INTERFACE_VALUE))) + if (interfaces.contains(ATSPI_DBUS_INTERFACE_VALUE ""_L1)) xml.append(valueIntrospection); - if (path == QLatin1String(QSPI_OBJECT_PATH_ROOT)) + if (path == QSPI_OBJECT_PATH_ROOT ""_L1) xml.append(applicationIntrospection); return xml; @@ -624,74 +590,74 @@ void AtSpiAdaptor::setBitFlag(const QString &flag) } else { // Object:Foo:Bar QString right = flag.mid(7); if (false) { - } else if (right.startsWith(QLatin1String("ActiveDescendantChanged"))) { + } else if (right.startsWith("ActiveDescendantChanged"_L1)) { sendObject_active_descendant_changed = 1; - } else if (right.startsWith(QLatin1String("AttributesChanged"))) { + } else if (right.startsWith("AttributesChanged"_L1)) { sendObject_attributes_changed = 1; - } else if (right.startsWith(QLatin1String("BoundsChanged"))) { + } else if (right.startsWith("BoundsChanged"_L1)) { sendObject_bounds_changed = 1; - } else if (right.startsWith(QLatin1String("ChildrenChanged"))) { + } else if (right.startsWith("ChildrenChanged"_L1)) { sendObject_children_changed = 1; - } else if (right.startsWith(QLatin1String("ColumnDeleted"))) { + } else if (right.startsWith("ColumnDeleted"_L1)) { sendObject_column_deleted = 1; - } else if (right.startsWith(QLatin1String("ColumnInserted"))) { + } else if (right.startsWith("ColumnInserted"_L1)) { sendObject_column_inserted = 1; - } else if (right.startsWith(QLatin1String("ColumnReordered"))) { + } else if (right.startsWith("ColumnReordered"_L1)) { sendObject_column_reordered = 1; - } else if (right.startsWith(QLatin1String("LinkSelected"))) { + } else if (right.startsWith("LinkSelected"_L1)) { sendObject_link_selected = 1; - } else if (right.startsWith(QLatin1String("ModelChanged"))) { + } else if (right.startsWith("ModelChanged"_L1)) { sendObject_model_changed = 1; - } else if (right.startsWith(QLatin1String("PropertyChange"))) { - if (right == QLatin1String("PropertyChange:AccessibleDescription")) { + } else if (right.startsWith("PropertyChange"_L1)) { + if (right == "PropertyChange:AccessibleDescription"_L1) { sendObject_property_change_accessible_description = 1; - } else if (right == QLatin1String("PropertyChange:AccessibleName")) { + } else if (right == "PropertyChange:AccessibleName"_L1) { sendObject_property_change_accessible_name = 1; - } else if (right == QLatin1String("PropertyChange:AccessibleParent")) { + } else if (right == "PropertyChange:AccessibleParent"_L1) { sendObject_property_change_accessible_parent = 1; - } else if (right == QLatin1String("PropertyChange:AccessibleRole")) { + } else if (right == "PropertyChange:AccessibleRole"_L1) { sendObject_property_change_accessible_role = 1; - } else if (right == QLatin1String("PropertyChange:TableCaption")) { + } else if (right == "PropertyChange:TableCaption"_L1) { sendObject_property_change_accessible_table_caption = 1; - } else if (right == QLatin1String("PropertyChange:TableColumnDescription")) { + } else if (right == "PropertyChange:TableColumnDescription"_L1) { sendObject_property_change_accessible_table_column_description = 1; - } else if (right == QLatin1String("PropertyChange:TableColumnHeader")) { + } else if (right == "PropertyChange:TableColumnHeader"_L1) { sendObject_property_change_accessible_table_column_header = 1; - } else if (right == QLatin1String("PropertyChange:TableRowDescription")) { + } else if (right == "PropertyChange:TableRowDescription"_L1) { sendObject_property_change_accessible_table_row_description = 1; - } else if (right == QLatin1String("PropertyChange:TableRowHeader")) { + } else if (right == "PropertyChange:TableRowHeader"_L1) { sendObject_property_change_accessible_table_row_header = 1; - } else if (right == QLatin1String("PropertyChange:TableSummary")) { + } else if (right == "PropertyChange:TableSummary"_L1) { sendObject_property_change_accessible_table_summary = 1; - } else if (right == QLatin1String("PropertyChange:AccessibleValue")) { + } else if (right == "PropertyChange:AccessibleValue"_L1) { sendObject_property_change_accessible_value = 1; } else { sendObject_property_change = 1; } - } else if (right.startsWith(QLatin1String("RowDeleted"))) { + } else if (right.startsWith("RowDeleted"_L1)) { sendObject_row_deleted = 1; - } else if (right.startsWith(QLatin1String("RowInserted"))) { + } else if (right.startsWith("RowInserted"_L1)) { sendObject_row_inserted = 1; - } else if (right.startsWith(QLatin1String("RowReordered"))) { + } else if (right.startsWith("RowReordered"_L1)) { sendObject_row_reordered = 1; - } else if (right.startsWith(QLatin1String("SelectionChanged"))) { + } else if (right.startsWith("SelectionChanged"_L1)) { sendObject_selection_changed = 1; - } else if (right.startsWith(QLatin1String("StateChanged"))) { + } else if (right.startsWith("StateChanged"_L1)) { sendObject_state_changed = 1; - } else if (right.startsWith(QLatin1String("TextAttributesChanged"))) { + } else if (right.startsWith("TextAttributesChanged"_L1)) { sendObject_text_attributes_changed = 1; - } else if (right.startsWith(QLatin1String("TextBoundsChanged"))) { + } else if (right.startsWith("TextBoundsChanged"_L1)) { sendObject_text_bounds_changed = 1; - } else if (right.startsWith(QLatin1String("TextCaretMoved"))) { + } else if (right.startsWith("TextCaretMoved"_L1)) { sendObject_text_caret_moved = 1; - } else if (right.startsWith(QLatin1String("TextChanged"))) { + } else if (right.startsWith("TextChanged"_L1)) { sendObject_text_changed = 1; - } else if (right.startsWith(QLatin1String("TextSelectionChanged"))) { + } else if (right.startsWith("TextSelectionChanged"_L1)) { sendObject_text_selection_changed = 1; - } else if (right.startsWith(QLatin1String("ValueChanged"))) { + } else if (right.startsWith("ValueChanged"_L1)) { sendObject_value_changed = 1; - } else if (right.startsWith(QLatin1String("VisibleDataChanged")) - || right.startsWith(QLatin1String("VisibledataChanged"))) { // typo in libatspi + } else if (right.startsWith("VisibleDataChanged"_L1) + || right.startsWith("VisibledataChanged"_L1)) { // typo in libatspi sendObject_visible_data_changed = 1; } else { qCDebug(lcAccessibilityAtspi) << "WARNING: subscription string not handled:" << flag; @@ -705,39 +671,39 @@ void AtSpiAdaptor::setBitFlag(const QString &flag) } else { // object:Foo:Bar QString right = flag.mid(7); if (false) { - } else if (right.startsWith(QLatin1String("Activate"))) { + } else if (right.startsWith("Activate"_L1)) { sendWindow_activate = 1; - } else if (right.startsWith(QLatin1String("Close"))) { + } else if (right.startsWith("Close"_L1)) { sendWindow_close= 1; - } else if (right.startsWith(QLatin1String("Create"))) { + } else if (right.startsWith("Create"_L1)) { sendWindow_create = 1; - } else if (right.startsWith(QLatin1String("Deactivate"))) { + } else if (right.startsWith("Deactivate"_L1)) { sendWindow_deactivate = 1; - } else if (right.startsWith(QLatin1String("Lower"))) { + } else if (right.startsWith("Lower"_L1)) { sendWindow_lower = 1; - } else if (right.startsWith(QLatin1String("Maximize"))) { + } else if (right.startsWith("Maximize"_L1)) { sendWindow_maximize = 1; - } else if (right.startsWith(QLatin1String("Minimize"))) { + } else if (right.startsWith("Minimize"_L1)) { sendWindow_minimize = 1; - } else if (right.startsWith(QLatin1String("Move"))) { + } else if (right.startsWith("Move"_L1)) { sendWindow_move = 1; - } else if (right.startsWith(QLatin1String("Raise"))) { + } else if (right.startsWith("Raise"_L1)) { sendWindow_raise = 1; - } else if (right.startsWith(QLatin1String("Reparent"))) { + } else if (right.startsWith("Reparent"_L1)) { sendWindow_reparent = 1; - } else if (right.startsWith(QLatin1String("Resize"))) { + } else if (right.startsWith("Resize"_L1)) { sendWindow_resize = 1; - } else if (right.startsWith(QLatin1String("Restore"))) { + } else if (right.startsWith("Restore"_L1)) { sendWindow_restore = 1; - } else if (right.startsWith(QLatin1String("Restyle"))) { + } else if (right.startsWith("Restyle"_L1)) { sendWindow_restyle = 1; - } else if (right.startsWith(QLatin1String("Shade"))) { + } else if (right.startsWith("Shade"_L1)) { sendWindow_shade = 1; - } else if (right.startsWith(QLatin1String("Unshade"))) { + } else if (right.startsWith("Unshade"_L1)) { sendWindow_unshade = 1; - } else if (right.startsWith(QLatin1String("DesktopCreate"))) { + } else if (right.startsWith("DesktopCreate"_L1)) { // ignore this one - } else if (right.startsWith(QLatin1String("DesktopDestroy"))) { + } else if (right.startsWith("DesktopDestroy"_L1)) { // ignore this one } else { qCDebug(lcAccessibilityAtspi) << "WARNING: subscription string not handled:" << flag; @@ -768,9 +734,9 @@ void AtSpiAdaptor::setBitFlag(const QString &flag) */ void AtSpiAdaptor::updateEventListeners() { - QDBusMessage m = QDBusMessage::createMethodCall(QLatin1String("org.a11y.atspi.Registry"), - QLatin1String("/org/a11y/atspi/registry"), - QLatin1String("org.a11y.atspi.Registry"), QLatin1String("GetRegisteredEvents")); + QDBusMessage m = QDBusMessage::createMethodCall("org.a11y.atspi.Registry"_L1, + "/org/a11y/atspi/registry"_L1, + "org.a11y.atspi.Registry"_L1, "GetRegisteredEvents"_L1); QDBusReply<QSpiEventListenerArray> listenersReply = m_dbus->connection().call(m); if (listenersReply.isValid()) { const QSpiEventListenerArray evList = listenersReply.value(); @@ -819,13 +785,12 @@ void AtSpiAdaptor::windowActivated(QObject* window, bool active) QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(data)); - QString status = active ? QLatin1String("Activate") : QLatin1String("Deactivate"); + QString status = active ? "Activate"_L1 : "Deactivate"_L1; QString path = pathForObject(window); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_WINDOW), status, args); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_WINDOW ""_L1, status, args); - QVariantList stateArgs = packDBusSignalArguments(QLatin1String("active"), active ? 1 : 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("StateChanged"), stateArgs); + QVariantList stateArgs = packDBusSignalArguments("active"_L1, active ? 1 : 0, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "StateChanged"_L1, stateArgs); } QVariantList AtSpiAdaptor::packDBusSignalArguments(const QString &type, int data1, int data2, const QVariant &variantData) const @@ -852,10 +817,10 @@ bool AtSpiAdaptor::sendDBusSignal(const QString &path, const QString &interface, QAccessibleInterface *AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) const { - if (dbusPath == QLatin1String(QSPI_OBJECT_PATH_ROOT)) + if (dbusPath == QSPI_OBJECT_PATH_ROOT ""_L1) return QAccessible::queryAccessibleInterface(qApp); - QStringList parts = dbusPath.split(QLatin1Char('/')); + QStringList parts = dbusPath.split(u'/'); if (parts.size() != 6) { qCDebug(lcAccessibilityAtspi) << "invalid path: " << dbusPath; return nullptr; @@ -875,8 +840,7 @@ void AtSpiAdaptor::notifyStateChange(QAccessibleInterface *interface, const QStr { QString path = pathForInterface(interface); QVariantList stateArgs = packDBusSignalArguments(state, value, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("StateChanged"), stateArgs); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "StateChanged"_L1, stateArgs); } @@ -892,13 +856,13 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) break; case QAccessible::ObjectShow: { if (sendObject || sendObject_state_changed) { - notifyStateChange(event->accessibleInterface(), QLatin1String("showing"), 1); + notifyStateChange(event->accessibleInterface(), "showing"_L1, 1); } break; } case QAccessible::ObjectHide: { if (sendObject || sendObject_state_changed) { - notifyStateChange(event->accessibleInterface(), QLatin1String("showing"), 0); + notifyStateChange(event->accessibleInterface(), "showing"_L1, 0); } break; } @@ -915,18 +879,18 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) case QAccessible::NameChanged: { if (sendObject || sendObject_property_change || sendObject_property_change_accessible_name) { QString path = pathForInterface(event->accessibleInterface()); - QVariantList args = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("PropertyChange"), args); + QVariantList args = packDBusSignalArguments("accessible-name"_L1, 0, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "PropertyChange"_L1, args); } break; } case QAccessible::DescriptionChanged: { if (sendObject || sendObject_property_change || sendObject_property_change_accessible_description) { QString path = pathForInterface(event->accessibleInterface()); - QVariantList args = packDBusSignalArguments(QLatin1String("accessible-description"), 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("PropertyChange"), args); + QVariantList args = packDBusSignalArguments("accessible-description"_L1, 0, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "PropertyChange"_L1, args); } break; } @@ -973,16 +937,16 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) if (!textRemoved.isEmpty()) { data.setVariant(QVariant::fromValue(textRemoved)); - QVariantList args = packDBusSignalArguments(QLatin1String("delete"), changePosition, textRemoved.length(), QVariant::fromValue(data)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("TextChanged"), args); + QVariantList args = packDBusSignalArguments("delete"_L1, changePosition, textRemoved.length(), QVariant::fromValue(data)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "TextChanged"_L1, args); } if (!textInserted.isEmpty()) { data.setVariant(QVariant::fromValue(textInserted)); - QVariantList args = packDBusSignalArguments(QLatin1String("insert"), changePosition, textInserted.length(), QVariant::fromValue(data)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("TextChanged"), args); + QVariantList args = packDBusSignalArguments("insert"_L1, changePosition, textInserted.length(), QVariant::fromValue(data)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "TextChanged"_L1, args); } // send a cursor update @@ -990,8 +954,8 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) // QDBusVariant cursorData; // cursorData.setVariant(QVariant::fromValue(cursorPosition)); // QVariantList args = packDBusSignalArguments(QString(), cursorPosition, 0, QVariant::fromValue(cursorData)); -// sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), -// QLatin1String("TextCaretMoved"), args); +// sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, +// "TextCaretMoved"_L1, args); } break; } @@ -1008,8 +972,8 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) int pos = iface->textInterface()->cursorPosition(); cursorData.setVariant(QVariant::fromValue(pos)); QVariantList args = packDBusSignalArguments(QString(), pos, 0, QVariant::fromValue(cursorData)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("TextCaretMoved"), args); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "TextCaretMoved"_L1, args); } break; } @@ -1018,8 +982,8 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) QAccessibleInterface * iface = event->accessibleInterface(); QString path = pathForInterface(iface); QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(QDBusVariant(QVariant(QString())))); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("TextSelectionChanged"), args); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "TextSelectionChanged"_L1, args); } break; } @@ -1032,19 +996,19 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) } if (iface->valueInterface()) { QString path = pathForInterface(iface); - QVariantList args = packDBusSignalArguments(QLatin1String("accessible-value"), 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("PropertyChange"), args); + QVariantList args = packDBusSignalArguments("accessible-value"_L1, 0, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "PropertyChange"_L1, args); } else if (iface->role() == QAccessible::ComboBox) { // Combo Box with AT-SPI likes to be special // It requires a name-change to update caches and then selection-changed QString path = pathForInterface(iface); - QVariantList args1 = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("PropertyChange"), args1); + QVariantList args1 = packDBusSignalArguments("accessible-name"_L1, 0, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "PropertyChange"_L1, args1); QVariantList args2 = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(QDBusVariant(QVariant(0)))); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("SelectionChanged"), args2); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "SelectionChanged"_L1, args2); } else { qCWarning(lcAccessibilityAtspi) << "ValueChanged event and no ValueInterface or ComboBox: " << iface; } @@ -1061,9 +1025,8 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) } QString path = pathForInterface(iface); int selected = iface->state().selected ? 1 : 0; - QVariantList stateArgs = packDBusSignalArguments(QLatin1String("selected"), selected, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("StateChanged"), stateArgs); + QVariantList stateArgs = packDBusSignalArguments("selected"_L1, selected, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "StateChanged"_L1, stateArgs); break; } @@ -1077,7 +1040,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) return; } int checked = iface->state().checked; - notifyStateChange(iface, QLatin1String("checked"), checked); + notifyStateChange(iface, "checked"_L1, checked); } else if (stateChange.active) { QAccessibleInterface * iface = event->accessibleInterface(); if (!iface || !(iface->role() == QAccessible::Window && (sendWindow || sendWindow_activate))) @@ -1087,17 +1050,17 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) QDBusVariant data; data.setVariant(windowTitle); QVariantList args = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(data)); - QString status = isActive ? QLatin1String("Activate") : QLatin1String("Deactivate"); + QString status = isActive ? "Activate"_L1 : "Deactivate"_L1; QString path = pathForInterface(iface); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_WINDOW), status, args); - notifyStateChange(iface, QLatin1String("active"), isActive); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_WINDOW ""_L1, status, args); + notifyStateChange(iface, "active"_L1, isActive); } else if (stateChange.disabled) { QAccessibleInterface *iface = event->accessibleInterface(); QAccessible::State state = iface->state(); bool enabled = !state.disabled; - notifyStateChange(iface, QLatin1String("enabled"), enabled); - notifyStateChange(iface, QLatin1String("sensitive"), enabled); + notifyStateChange(iface, "enabled"_L1, enabled); + notifyStateChange(iface, "sensitive"_L1, enabled); } } break; @@ -1166,21 +1129,20 @@ void AtSpiAdaptor::sendFocusChanged(QAccessibleInterface *interface) const static QString lastFocusPath; // "remove" old focus if (!lastFocusPath.isEmpty()) { - QVariantList stateArgs = packDBusSignalArguments(QLatin1String("focused"), 0, 0, variantForPath(lastFocusPath)); - sendDBusSignal(lastFocusPath, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("StateChanged"), stateArgs); + QVariantList stateArgs = packDBusSignalArguments("focused"_L1, 0, 0, variantForPath(lastFocusPath)); + sendDBusSignal(lastFocusPath, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "StateChanged"_L1, stateArgs); } // send new focus { QString path = pathForInterface(interface); - QVariantList stateArgs = packDBusSignalArguments(QLatin1String("focused"), 1, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), - QLatin1String("StateChanged"), stateArgs); + QVariantList stateArgs = packDBusSignalArguments("focused"_L1, 1, 0, variantForPath(path)); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, + "StateChanged"_L1, stateArgs); QVariantList focusArgs = packDBusSignalArguments(QString(), 0, 0, variantForPath(path)); - sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_FOCUS), - QLatin1String("Focus"), focusArgs); + sendDBusSignal(path, ATSPI_DBUS_INTERFACE_EVENT_FOCUS ""_L1, "Focus"_L1, focusArgs); lastFocusPath = path; } } @@ -1191,8 +1153,8 @@ void AtSpiAdaptor::childrenChanged(QAccessibleInterface *interface) const int childCount = interface->childCount(); for (int i = 0; i < interface->childCount(); ++i) { QString childPath = pathForInterface(interface->child(i)); - QVariantList args = packDBusSignalArguments(QLatin1String("add"), childCount, 0, childPath); - sendDBusSignal(parentPath, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), QLatin1String("ChildrenChanged"), args); + QVariantList args = packDBusSignalArguments("add"_L1, childCount, 0, childPath); + sendDBusSignal(parentPath, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "ChildrenChanged"_L1, args); } } @@ -1210,8 +1172,8 @@ void AtSpiAdaptor::notifyAboutCreation(QAccessibleInterface *interface) const QString path = pathForInterface(interface); int childCount = parent->childCount(); QString parentPath = pathForInterface(parent); - QVariantList args = packDBusSignalArguments(QLatin1String("add"), childCount, 0, variantForPath(path)); - sendDBusSignal(parentPath, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), QLatin1String("ChildrenChanged"), args); + QVariantList args = packDBusSignalArguments("add"_L1, childCount, 0, variantForPath(path)); + sendDBusSignal(parentPath, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "ChildrenChanged"_L1, args); } void AtSpiAdaptor::notifyAboutDestruction(QAccessibleInterface *interface) const @@ -1236,8 +1198,8 @@ void AtSpiAdaptor::notifyAboutDestruction(QAccessibleInterface *interface) const // } QString parentPath = pathForInterface(parent); - QVariantList args = packDBusSignalArguments(QLatin1String("remove"), childIndex, 0, variantForPath(path)); - sendDBusSignal(parentPath, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT), QLatin1String("ChildrenChanged"), args); + QVariantList args = packDBusSignalArguments("remove"_L1, childIndex, 0, variantForPath(path)); + sendDBusSignal(parentPath, ATSPI_DBUS_INTERFACE_EVENT_OBJECT ""_L1, "ChildrenChanged"_L1, args); } /*! @@ -1262,34 +1224,34 @@ bool AtSpiAdaptor::handleMessage(const QDBusMessage &message, const QDBusConnect // qCDebug(lcAccessibilityAtspi) << "AtSpiAdaptor::handleMessage: " << interface << function; - if (function == QLatin1String("Introspect")) { + if (function == "Introspect"_L1) { //introspect(message.path()); return false; } // handle properties like regular functions - if (interface == QLatin1String("org.freedesktop.DBus.Properties")) { + if (interface == "org.freedesktop.DBus.Properties"_L1) { interface = message.arguments().at(0).toString(); // Get/Set + Name function = message.member() + message.arguments().at(1).toString(); } // switch interface to call - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_ACCESSIBLE)) + if (interface == ATSPI_DBUS_INTERFACE_ACCESSIBLE ""_L1) return accessibleInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_APPLICATION)) + if (interface == ATSPI_DBUS_INTERFACE_APPLICATION ""_L1) return applicationInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_COMPONENT)) + if (interface == ATSPI_DBUS_INTERFACE_COMPONENT ""_L1) return componentInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_ACTION)) + if (interface == ATSPI_DBUS_INTERFACE_ACTION ""_L1) return actionInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_TEXT)) + if (interface == ATSPI_DBUS_INTERFACE_TEXT ""_L1) return textInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_EDITABLE_TEXT)) + if (interface == ATSPI_DBUS_INTERFACE_EDITABLE_TEXT ""_L1) return editableTextInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_VALUE)) + if (interface == ATSPI_DBUS_INTERFACE_VALUE ""_L1) return valueInterface(accessible, function, message, connection); - if (interface == QLatin1String(ATSPI_DBUS_INTERFACE_TABLE)) + if (interface == ATSPI_DBUS_INTERFACE_TABLE ""_L1) return tableInterface(accessible, function, message, connection); qCDebug(lcAccessibilityAtspi) << "AtSpiAdaptor::handleMessage with unknown interface: " << message.path() << interface << function; @@ -1299,35 +1261,35 @@ bool AtSpiAdaptor::handleMessage(const QDBusMessage &message, const QDBusConnect // Application bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) { - if (message.path() != QLatin1String(ATSPI_DBUS_PATH_ROOT)) { + if (message.path() != ATSPI_DBUS_PATH_ROOT ""_L1) { qCDebug(lcAccessibilityAtspi) << "WARNING Qt AtSpiAdaptor: Could not find application interface for: " << message.path() << interface; return false; } - if (function == QLatin1String("SetId")) { - Q_ASSERT(message.signature() == QLatin1String("ssv")); + if (function == "SetId"_L1) { + Q_ASSERT(message.signature() == "ssv"_L1); QVariant value = qvariant_cast<QDBusVariant>(message.arguments().at(2)).variant(); m_applicationId = value.toInt(); return true; } - if (function == QLatin1String("GetId")) { - Q_ASSERT(message.signature() == QLatin1String("ss")); + if (function == "GetId"_L1) { + Q_ASSERT(message.signature() == "ss"_L1); QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(m_applicationId))); return connection.send(reply); } - if (function == QLatin1String("GetToolkitName")) { - Q_ASSERT(message.signature() == QLatin1String("ss")); - QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String("Qt")))); + if (function == "GetToolkitName"_L1) { + Q_ASSERT(message.signature() == "ss"_L1); + QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant("Qt"_L1))); return connection.send(reply); } - if (function == QLatin1String("GetVersion")) { - Q_ASSERT(message.signature() == QLatin1String("ss")); - QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1String(qVersion())))); + if (function == "GetVersion"_L1) { + Q_ASSERT(message.signature() == "ss"_L1); + QDBusMessage reply = message.createReply(QVariant::fromValue(QDBusVariant(QLatin1StringView(qVersion())))); return connection.send(reply); } - if (function == QLatin1String("GetLocale")) { - Q_ASSERT(message.signature() == QLatin1String("u")); + if (function == "GetLocale"_L1) { + Q_ASSERT(message.signature() == "u"_L1); QDBusMessage reply = message.createReply(QVariant::fromValue(QLocale().name())); return connection.send(reply); } @@ -1341,8 +1303,8 @@ bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const Q void AtSpiAdaptor::registerApplication() { OrgA11yAtspiSocketInterface *registry; - registry = new OrgA11yAtspiSocketInterface(QLatin1String(QSPI_REGISTRY_NAME), - QLatin1String(QSPI_OBJECT_PATH_ROOT), m_dbus->connection()); + registry = new OrgA11yAtspiSocketInterface(QSPI_REGISTRY_NAME ""_L1, + QSPI_OBJECT_PATH_ROOT ""_L1, m_dbus->connection()); QDBusPendingReply<QSpiObjectReference> reply; QSpiObjectReference ref = QSpiObjectReference(m_dbus->connection(), QDBusObjectPath(QSPI_OBJECT_PATH_ROOT)); @@ -1362,17 +1324,17 @@ void AtSpiAdaptor::registerApplication() // Accessible bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) { - if (function == QLatin1String("GetRole")) { + if (function == "GetRole"_L1) { sendReply(connection, message, (uint) getRole(interface)); - } else if (function == QLatin1String("GetName")) { + } else if (function == "GetName"_L1) { sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Name)))); - } else if (function == QLatin1String("GetRoleName")) { + } else if (function == "GetRoleName"_L1) { sendReply(connection, message, QSpiAccessibleBridge::namesForRole(interface->role()).name()); - } else if (function == QLatin1String("GetLocalizedRoleName")) { + } else if (function == "GetLocalizedRoleName"_L1) { sendReply(connection, message, QVariant::fromValue(QSpiAccessibleBridge::namesForRole(interface->role()).localizedName())); - } else if (function == QLatin1String("GetChildCount")) { + } else if (function == "GetChildCount"_L1) { sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->childCount()))); - } else if (function == QLatin1String("GetIndexInParent")) { + } else if (function == "GetIndexInParent"_L1) { int childIndex = -1; QAccessibleInterface * parent = interface->parent(); if (parent) { @@ -1382,20 +1344,20 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS } } sendReply(connection, message, childIndex); - } else if (function == QLatin1String("GetParent")) { + } else if (function == "GetParent"_L1) { QString path; QAccessibleInterface * parent = interface->parent(); if (!parent) { - path = QLatin1String(ATSPI_DBUS_PATH_NULL); + path = ATSPI_DBUS_PATH_NULL ""_L1; } else if (parent->role() == QAccessible::Application) { - path = QLatin1String(ATSPI_DBUS_PATH_ROOT); + path = ATSPI_DBUS_PATH_ROOT ""_L1; } else { path = pathForInterface(parent); } // Parent is a property, so it needs to be wrapped inside an extra variant. sendReply(connection, message, QVariant::fromValue( QDBusVariant(QVariant::fromValue(QSpiObjectReference(connection, QDBusObjectPath(path)))))); - } else if (function == QLatin1String("GetChildAtIndex")) { + } else if (function == "GetChildAtIndex"_L1) { const int index = message.arguments().at(0).toInt(); if (index < 0) { sendReply(connection, message, QVariant::fromValue( @@ -1405,11 +1367,11 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS sendReply(connection, message, QVariant::fromValue( QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(childInterface))))); } - } else if (function == QLatin1String("GetInterfaces")) { + } else if (function == "GetInterfaces"_L1) { sendReply(connection, message, accessibleInterfaces(interface)); - } else if (function == QLatin1String("GetDescription")) { + } else if (function == "GetDescription"_L1) { sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Description)))); - } else if (function == QLatin1String("GetState")) { + } else if (function == "GetState"_L1) { quint64 spiState = spiStatesFromQState(interface->state()); if (interface->tableInterface()) { setSpiStateBit(&spiState, ATSPI_STATE_MANAGES_DESCENDANTS); @@ -1425,14 +1387,14 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS } sendReply(connection, message, QVariant::fromValue(spiStateSetFromSpiStates(spiState))); - } else if (function == QLatin1String("GetAttributes")) { + } else if (function == "GetAttributes"_L1) { sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet())); - } else if (function == QLatin1String("GetRelationSet")) { + } else if (function == "GetRelationSet"_L1) { sendReply(connection, message, QVariant::fromValue(relationSet(interface, connection))); - } else if (function == QLatin1String("GetApplication")) { + } else if (function == "GetApplication"_L1) { sendReply(connection, message, QVariant::fromValue( QSpiObjectReference(connection, QDBusObjectPath(QSPI_OBJECT_PATH_ROOT)))); - } else if (function == QLatin1String("GetChildren")) { + } else if (function == "GetChildren"_L1) { QSpiObjectReferenceArray children; const int numChildren = interface->childCount(); children.reserve(numChildren); @@ -1460,7 +1422,7 @@ QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface) { QStringList ifaces; qCDebug(lcAccessibilityAtspiCreation) << "AtSpiAdaptor::accessibleInterfaces create: " << interface->object(); - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_ACCESSIBLE); + ifaces << ATSPI_DBUS_INTERFACE_ACCESSIBLE ""_L1; if ( (!interface->rect().isEmpty()) || (interface->object() && interface->object()->isWidgetType()) || @@ -1470,27 +1432,27 @@ QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface) (interface->role() == QAccessible::Row) || (interface->object() && interface->object()->inherits("QSGItem")) ) { - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_COMPONENT); + ifaces << ATSPI_DBUS_INTERFACE_COMPONENT ""_L1; } else { qCDebug(lcAccessibilityAtspiCreation) << " IS NOT a component"; } if (interface->role() == QAccessible::Application) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_APPLICATION); + ifaces << ATSPI_DBUS_INTERFACE_APPLICATION ""_L1; if (interface->actionInterface() || interface->valueInterface()) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_ACTION); + ifaces << ATSPI_DBUS_INTERFACE_ACTION ""_L1; if (interface->textInterface()) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_TEXT); + ifaces << ATSPI_DBUS_INTERFACE_TEXT ""_L1; if (interface->editableTextInterface()) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_EDITABLE_TEXT); + ifaces << ATSPI_DBUS_INTERFACE_EDITABLE_TEXT ""_L1; if (interface->valueInterface()) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_VALUE); + ifaces << ATSPI_DBUS_INTERFACE_VALUE ""_L1; if (interface->tableInterface()) - ifaces << QLatin1String(ATSPI_DBUS_INTERFACE_TABLE); + ifaces << ATSPI_DBUS_INTERFACE_TABLE ""_L1; return ifaces; } @@ -1537,21 +1499,21 @@ QString AtSpiAdaptor::pathForObject(QObject *object) const QString AtSpiAdaptor::pathForInterface(QAccessibleInterface *interface) const { if (!interface || !interface->isValid()) - return QLatin1String(ATSPI_DBUS_PATH_NULL); + return ATSPI_DBUS_PATH_NULL ""_L1; if (interface->role() == QAccessible::Application) - return QLatin1String(QSPI_OBJECT_PATH_ROOT); + return QSPI_OBJECT_PATH_ROOT ""_L1; QAccessible::Id id = QAccessible::uniqueId(interface); Q_ASSERT((int)id < 0); - return QLatin1String(QSPI_OBJECT_PATH_PREFIX) + QString::number(id); + return QSPI_OBJECT_PATH_PREFIX ""_L1 + QString::number(id); } bool AtSpiAdaptor::inheritsQAction(QObject *object) { const QMetaObject *mo = object->metaObject(); while (mo) { - const QLatin1String cn(mo->className()); - if (cn == QLatin1String("QAction")) + const QLatin1StringView cn(mo->className()); + if (cn == "QAction"_L1) return true; mo = mo->superClass(); } @@ -1590,7 +1552,7 @@ static QRect getRelativeRect(QAccessibleInterface *interface) bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) { - if (function == QLatin1String("Contains")) { + if (function == "Contains"_L1) { bool ret = false; int x = message.arguments().at(0).toInt(); int y = message.arguments().at(1).toInt(); @@ -1600,7 +1562,7 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt else ret = getRelativeRect(interface).contains(x, y); sendReply(connection, message, ret); - } else if (function == QLatin1String("GetAccessibleAtPoint")) { + } else if (function == "GetAccessibleAtPoint"_L1) { int x = message.arguments().at(0).toInt(); int y = message.arguments().at(1).toInt(); uint coordType = message.arguments().at(2).toUInt(); @@ -1626,16 +1588,16 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt sendReply(connection, message, QVariant::fromValue( QSpiObjectReference(connection, QDBusObjectPath(ATSPI_DBUS_PATH_NULL)))); } - } else if (function == QLatin1String("GetAlpha")) { + } else if (function == "GetAlpha"_L1) { sendReply(connection, message, (double) 1.0); - } else if (function == QLatin1String("GetExtents")) { + } else if (function == "GetExtents"_L1) { uint coordType = message.arguments().at(0).toUInt(); sendReply(connection, message, QVariant::fromValue(getExtents(interface, coordType))); - } else if (function == QLatin1String("GetLayer")) { + } else if (function == "GetLayer"_L1) { sendReply(connection, message, QVariant::fromValue((uint)1)); - } else if (function == QLatin1String("GetMDIZOrder")) { + } else if (function == "GetMDIZOrder"_L1) { sendReply(connection, message, QVariant::fromValue((short)0)); - } else if (function == QLatin1String("GetPosition")) { + } else if (function == "GetPosition"_L1) { uint coordType = message.arguments().at(0).toUInt(); QRect rect; if (coordType == ATSPI_COORD_TYPE_SCREEN) @@ -1645,12 +1607,12 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt QVariantList pos; pos << rect.x() << rect.y(); connection.send(message.createReply(pos)); - } else if (function == QLatin1String("GetSize")) { + } else if (function == "GetSize"_L1) { QRect rect = interface->rect(); QVariantList size; size << rect.width() << rect.height(); connection.send(message.createReply(size)); - } else if (function == QLatin1String("GrabFocus")) { + } else if (function == "GrabFocus"_L1) { QAccessibleActionInterface *actionIface = interface->actionInterface(); if (actionIface && actionIface->actionNames().contains(QAccessibleActionInterface::setFocusAction())) { actionIface->doAction(QAccessibleActionInterface::setFocusAction()); @@ -1658,7 +1620,7 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt } else { sendReply(connection, message, false); } - } else if (function == QLatin1String("SetExtents")) { + } else if (function == "SetExtents"_L1) { // int x = message.arguments().at(0).toInt(); // int y = message.arguments().at(1).toInt(); // int width = message.arguments().at(2).toInt(); @@ -1666,13 +1628,13 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt // uint coordinateType = message.arguments().at(4).toUInt(); qCDebug(lcAccessibilityAtspi) << "SetExtents is not implemented."; sendReply(connection, message, false); - } else if (function == QLatin1String("SetPosition")) { + } else if (function == "SetPosition"_L1) { // int x = message.arguments().at(0).toInt(); // int y = message.arguments().at(1).toInt(); // uint coordinateType = message.arguments().at(2).toUInt(); qCDebug(lcAccessibilityAtspi) << "SetPosition is not implemented."; sendReply(connection, message, false); - } else if (function == QLatin1String("SetSize")) { + } else if (function == "SetSize"_L1) { // int width = message.arguments().at(0).toInt(); // int height = message.arguments().at(1).toInt(); qCDebug(lcAccessibilityAtspi) << "SetSize is not implemented."; @@ -1692,10 +1654,10 @@ QRect AtSpiAdaptor::getExtents(QAccessibleInterface *interface, uint coordType) // Action interface bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) { - if (function == QLatin1String("GetNActions")) { + if (function == "GetNActions"_L1) { int count = QAccessibleBridgeUtils::effectiveActionNames(interface).count(); sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(count)))); - } else if (function == QLatin1String("DoAction")) { + } else if (function == "DoAction"_L1) { int index = message.arguments().at(0).toInt(); const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); if (index < 0 || index >= actionNames.count()) @@ -1703,15 +1665,15 @@ bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QStrin const QString actionName = actionNames.at(index); bool success = QAccessibleBridgeUtils::performEffectiveAction(interface, actionName); sendReply(connection, message, success); - } else if (function == QLatin1String("GetActions")) { + } else if (function == "GetActions"_L1) { sendReply(connection, message, QVariant::fromValue(getActions(interface))); - } else if (function == QLatin1String("GetName")) { + } else if (function == "GetName"_L1) { int index = message.arguments().at(0).toInt(); const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); if (index < 0 || index >= actionNames.count()) return false; sendReply(connection, message, actionNames.at(index)); - } else if (function == QLatin1String("GetDescription")) { + } else if (function == "GetDescription"_L1) { int index = message.arguments().at(0).toInt(); const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); if (index < 0 || index >= actionNames.count()) @@ -1722,7 +1684,7 @@ bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QStrin else description = qAccessibleLocalizedActionDescription(actionNames.at(index)); sendReply(connection, message, description); - } else if (function == QLatin1String("GetKeyBinding")) { + } else if (function == "GetKeyBinding"_L1) { int index = message.arguments().at(0).toInt(); const QStringList actionNames = QAccessibleBridgeUtils::effectiveActionNames(interface); if (index < 0 || index >= actionNames.count()) @@ -1736,7 +1698,7 @@ bool AtSpiAdaptor::actionInterface(QAccessibleInterface *interface, const QStrin keyBindings.append(acc); } if (keyBindings.length() > 0) - sendReply(connection, message, keyBindings.join(QLatin1Char(';'))); + sendReply(connection, message, keyBindings.join(u';')); else sendReply(connection, message, QString()); } else { @@ -1777,31 +1739,31 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString return false; // properties - if (function == QLatin1String("GetCaretOffset")) { + if (function == "GetCaretOffset"_L1) { sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->cursorPosition())))); - } else if (function == QLatin1String("GetCharacterCount")) { + } else if (function == "GetCharacterCount"_L1) { sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(interface->textInterface()->characterCount())))); // functions - } else if (function == QLatin1String("AddSelection")) { + } else if (function == "AddSelection"_L1) { int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); int lastSelection = interface->textInterface()->selectionCount(); interface->textInterface()->setSelection(lastSelection, startOffset, endOffset); sendReply(connection, message, (interface->textInterface()->selectionCount() > lastSelection)); - } else if (function == QLatin1String("GetAttributeRun")) { + } else if (function == "GetAttributeRun"_L1) { int offset = message.arguments().at(0).toInt(); bool includeDefaults = message.arguments().at(1).toBool(); Q_UNUSED(includeDefaults); connection.send(message.createReply(getAttributes(interface, offset, includeDefaults))); - } else if (function == QLatin1String("GetAttributeValue")) { + } else if (function == "GetAttributeValue"_L1) { int offset = message.arguments().at(0).toInt(); QString attributeName = message.arguments().at(1).toString(); connection.send(message.createReply(getAttributeValue(interface, offset, attributeName))); - } else if (function == QLatin1String("GetAttributes")) { + } else if (function == "GetAttributes"_L1) { int offset = message.arguments().at(0).toInt(); connection.send(message.createReply(getAttributes(interface, offset, true))); - } else if (function == QLatin1String("GetBoundedRanges")) { + } else if (function == "GetBoundedRanges"_L1) { int x = message.arguments().at(0).toInt(); int y = message.arguments().at(1).toInt(); int width = message.arguments().at(2).toInt(); @@ -1818,23 +1780,23 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString Q_UNUSED(yClipType); qCDebug(lcAccessibilityAtspi) << "Not implemented: QSpiAdaptor::GetBoundedRanges"; sendReply(connection, message, QVariant::fromValue(QSpiTextRangeList())); - } else if (function == QLatin1String("GetCharacterAtOffset")) { + } else if (function == "GetCharacterAtOffset"_L1) { int offset = message.arguments().at(0).toInt(); int start; int end; QString result = interface->textInterface()->textAtOffset(offset, QAccessible::CharBoundary, &start, &end); sendReply(connection, message, (int) *(qPrintable (result))); - } else if (function == QLatin1String("GetCharacterExtents")) { + } else if (function == "GetCharacterExtents"_L1) { int offset = message.arguments().at(0).toInt(); int coordType = message.arguments().at(1).toUInt(); connection.send(message.createReply(getCharacterExtents(interface, offset, coordType))); - } else if (function == QLatin1String("GetDefaultAttributeSet") || function == QLatin1String("GetDefaultAttributes")) { + } else if (function == "GetDefaultAttributeSet"_L1 || function == "GetDefaultAttributes"_L1) { // GetDefaultAttributes is deprecated in favour of GetDefaultAttributeSet. // Empty set seems reasonable. There is no default attribute set. sendReply(connection, message, QVariant::fromValue(QSpiAttributeSet())); - } else if (function == QLatin1String("GetNSelections")) { + } else if (function == "GetNSelections"_L1) { sendReply(connection, message, interface->textInterface()->selectionCount()); - } else if (function == QLatin1String("GetOffsetAtPoint")) { + } else if (function == "GetOffsetAtPoint"_L1) { qCDebug(lcAccessibilityAtspi) << message.signature(); Q_ASSERT(!message.signature().isEmpty()); QPoint point(message.arguments().at(0).toInt(), message.arguments().at(1).toInt()); @@ -1845,12 +1807,12 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString } int offset = interface->textInterface()->offsetAtPoint(point); sendReply(connection, message, offset); - } else if (function == QLatin1String("GetRangeExtents")) { + } else if (function == "GetRangeExtents"_L1) { int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); uint coordType = message.arguments().at(2).toUInt(); connection.send(message.createReply(getRangeExtents(interface, startOffset, endOffset, coordType))); - } else if (function == QLatin1String("GetSelection")) { + } else if (function == "GetSelection"_L1) { int selectionNum = message.arguments().at(0).toInt(); int start, end; interface->textInterface()->selection(selectionNum, &start, &end); @@ -1859,13 +1821,13 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString QVariantList sel; sel << start << end; connection.send(message.createReply(sel)); - } else if (function == QLatin1String("GetText")) { + } else if (function == "GetText"_L1) { int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); if (endOffset == -1) // AT-SPI uses -1 to signal all characters endOffset = interface->textInterface()->characterCount(); sendReply(connection, message, interface->textInterface()->text(startOffset, endOffset)); - } else if (function == QLatin1String("GetTextAfterOffset")) { + } else if (function == "GetTextAfterOffset"_L1) { int offset = message.arguments().at(0).toInt(); int type = message.arguments().at(1).toUInt(); int startOffset, endOffset; @@ -1873,7 +1835,7 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString QVariantList ret; ret << text << startOffset << endOffset; connection.send(message.createReply(ret)); - } else if (function == QLatin1String("GetTextAtOffset")) { + } else if (function == "GetTextAtOffset"_L1) { int offset = message.arguments().at(0).toInt(); int type = message.arguments().at(1).toUInt(); int startOffset, endOffset; @@ -1881,7 +1843,7 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString QVariantList ret; ret << text << startOffset << endOffset; connection.send(message.createReply(ret)); - } else if (function == QLatin1String("GetTextBeforeOffset")) { + } else if (function == "GetTextBeforeOffset"_L1) { int offset = message.arguments().at(0).toInt(); int type = message.arguments().at(1).toUInt(); int startOffset, endOffset; @@ -1889,15 +1851,15 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString QVariantList ret; ret << text << startOffset << endOffset; connection.send(message.createReply(ret)); - } else if (function == QLatin1String("RemoveSelection")) { + } else if (function == "RemoveSelection"_L1) { int selectionNum = message.arguments().at(0).toInt(); interface->textInterface()->removeSelection(selectionNum); sendReply(connection, message, true); - } else if (function == QLatin1String("SetCaretOffset")) { + } else if (function == "SetCaretOffset"_L1) { int offset = message.arguments().at(0).toInt(); interface->textInterface()->setCursorPosition(offset); sendReply(connection, message, true); - } else if (function == QLatin1String("SetSelection")) { + } else if (function == "SetSelection"_L1) { int selectionNum = message.arguments().at(0).toInt(); int startOffset = message.arguments().at(1).toInt(); int endOffset = message.arguments().at(2).toInt(); @@ -1962,81 +1924,72 @@ namespace // https://bugzilla.gnome.org/show_bug.cgi?id=744553 "ATK docs provide no guidance for allowed values of some text attributes" // specifically for "weight", "invalid", "language" and value range for colors - if (ia2Name == QLatin1String("background-color")) { + if (ia2Name == "background-color"_L1) { name = QStringLiteral("bg-color"); value = atspiColor(value); - } else if (ia2Name == QLatin1String("font-family")) { + } else if (ia2Name == "font-family"_L1) { name = QStringLiteral("family-name"); - } else if (ia2Name == QLatin1String("color")) { + } else if (ia2Name == "color"_L1) { name = QStringLiteral("fg-color"); value = atspiColor(value); - } else if (ia2Name == QLatin1String("text-align")) { + } else if (ia2Name == "text-align"_L1) { name = QStringLiteral("justification"); - if (value == QLatin1String("justify")) { + if (value == "justify"_L1) { value = QStringLiteral("fill"); - } else { - if (value != QLatin1String("left") && - value != QLatin1String("right") && - value != QLatin1String("center") - ) { - value = QString(); - qCDebug(lcAccessibilityAtspi) << "Unknown text-align attribute value \"" << value << "\" cannot be translated to AT-SPI."; - } + } else if (value != "left"_L1 && value != "right"_L1 && value != "center"_L1) { + qCDebug(lcAccessibilityAtspi) << "Unknown text-align attribute value \"" + << value << "\" cannot be translated to AT-SPI."; + value = QString(); } - } else if (ia2Name == QLatin1String("font-size")) { + } else if (ia2Name == "font-size"_L1) { name = QStringLiteral("size"); value = atspiSize(value); - } else if (ia2Name == QLatin1String("font-style")) { + } else if (ia2Name == "font-style"_L1) { name = QStringLiteral("style"); - if (value != QLatin1String("normal") && - value != QLatin1String("italic") && - value != QLatin1String("oblique") - ) { + if (value != "normal"_L1 && value != "italic"_L1 && value != "oblique"_L1) { + qCDebug(lcAccessibilityAtspi) << "Unknown font-style attribute value \"" << value + << "\" cannot be translated to AT-SPI."; value = QString(); - qCDebug(lcAccessibilityAtspi) << "Unknown font-style attribute value \"" << value << "\" cannot be translated to AT-SPI."; } - } else if (ia2Name == QLatin1String("text-underline-type")) { + } else if (ia2Name == "text-underline-type"_L1) { name = QStringLiteral("underline"); - if (value != QLatin1String("none") && - value != QLatin1String("single") && - value != QLatin1String("double") - ) { + if (value != "none"_L1 && value != "single"_L1 && value != "double"_L1) { + qCDebug(lcAccessibilityAtspi) << "Unknown text-underline-type attribute value \"" + << value << "\" cannot be translated to AT-SPI."; value = QString(); - qCDebug(lcAccessibilityAtspi) << "Unknown text-underline-type attribute value \"" << value << "\" cannot be translated to AT-SPI."; } - } else if (ia2Name == QLatin1String("font-weight")) { + } else if (ia2Name == "font-weight"_L1) { name = QStringLiteral("weight"); - if (value == QLatin1String("normal")) + if (value == "normal"_L1) // Orca seems to accept all IAccessible2 values except for "normal" // (on which it produces traceback and fails to read any following text attributes), // but that is the default value, so omit it anyway value = QString(); - } else if (ia2Name == QLatin1String("text-position")) { + } else if (ia2Name == "text-position"_L1) { name = QStringLiteral("vertical-align"); - if (value != QLatin1String("baseline") && - value != QLatin1String("super") && - value != QLatin1String("sub") - ) { + if (value != "baseline"_L1 && value != "super"_L1 && value != "sub"_L1) { + qCDebug(lcAccessibilityAtspi) << "Unknown text-position attribute value \"" << value + << "\" cannot be translated to AT-SPI."; value = QString(); - qCDebug(lcAccessibilityAtspi) << "Unknown text-position attribute value \"" << value << "\" cannot be translated to AT-SPI."; } - } else if (ia2Name == QLatin1String("writing-mode")) { + } else if (ia2Name == "writing-mode"_L1) { name = QStringLiteral("direction"); - if (value == QLatin1String("lr")) + if (value == "lr"_L1) value = QStringLiteral("ltr"); - else if (value == QLatin1String("rl")) + else if (value == "rl"_L1) value = QStringLiteral("rtl"); - else if (value == QLatin1String("tb")) { + else if (value == "tb"_L1) { // IAccessible2 docs refer to XSL, which specifies "tb" is shorthand for "tb-rl"; so at least give a hint about the horizontal direction (ATK does not support vertical direction in this attribute (yet)) value = QStringLiteral("rtl"); qCDebug(lcAccessibilityAtspi) << "writing-mode attribute value \"tb\" translated only w.r.t. horizontal direction; vertical direction ignored"; } else { + qCDebug(lcAccessibilityAtspi) << "Unknown writing-mode attribute value \"" << value + << "\" cannot be translated to AT-SPI."; value = QString(); - qCDebug(lcAccessibilityAtspi) << "Unknown writing-mode attribute value \"" << value << "\" cannot be translated to AT-SPI."; } - } else if (ia2Name == QLatin1String("language")) { + } else if (ia2Name == "language"_L1) { // OK - ATK has no docs on the format of the value, IAccessible2 has reasonable format - leave it at that now - } else if (ia2Name == QLatin1String("invalid")) { + } else if (ia2Name == "invalid"_L1) { // OK - ATK docs are vague but suggest they support the same range of values as IAccessible2 } else { // attribute we know nothing about @@ -2057,10 +2010,10 @@ QVariantList AtSpiAdaptor::getAttributes(QAccessibleInterface *interface, int of int endOffset; QString joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset); - const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive); + const QStringList attributes = joined.split(u';', Qt::SkipEmptyParts, Qt::CaseSensitive); for (const QString &attr : attributes) { QStringList items; - items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive); + items = attr.split(u':', Qt::SkipEmptyParts, Qt::CaseSensitive); AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]); if (!attribute.isNull()) set[attribute.name] = attribute.value; @@ -2081,10 +2034,10 @@ QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, in int endOffset; joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset); - const QStringList attributes = joined.split (QLatin1Char(';'), Qt::SkipEmptyParts, Qt::CaseSensitive); + const QStringList attributes = joined.split (u';', Qt::SkipEmptyParts, Qt::CaseSensitive); for (const QString& attr : attributes) { QStringList items; - items = attr.split(QLatin1Char(':'), Qt::SkipEmptyParts, Qt::CaseSensitive); + items = attr.split(u':', Qt::SkipEmptyParts, Qt::CaseSensitive); AtSpiAttribute attribute = atspiTextAttribute(items[0], items[1]); if (!attribute.isNull()) map[attribute.name] = attribute.value; @@ -2165,7 +2118,7 @@ static void replaceTextFallback(QAccessibleInterface *accessible, long startOffs bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection) { - if (function == QLatin1String("CopyText")) { + if (function == "CopyText"_L1) { #ifndef QT_NO_CLIPBOARD int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); @@ -2173,7 +2126,7 @@ bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const QGuiApplication::clipboard()->setText(t); #endif connection.send(message.createReply(true)); - } else if (function == QLatin1String("CutText")) { + } else if (function == "CutText"_L1) { #ifndef QT_NO_CLIPBOARD int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); @@ -2185,7 +2138,7 @@ bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const QGuiApplication::clipboard()->setText(t); #endif connection.send(message.createReply(true)); - } else if (function == QLatin1String("DeleteText")) { + } else if (function == "DeleteText"_L1) { int startOffset = message.arguments().at(0).toInt(); int endOffset = message.arguments().at(1).toInt(); if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()) @@ -2193,7 +2146,7 @@ bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const else replaceTextFallback(interface, startOffset, endOffset, QString()); connection.send(message.createReply(true)); - } else if (function == QLatin1String("InsertText")) { + } else if (function == "InsertText"_L1) { int position = message.arguments().at(0).toInt(); QString text = message.arguments().at(1).toString(); int length = message.arguments().at(2).toInt(); @@ -2203,7 +2156,7 @@ bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const else replaceTextFallback(interface, position, position, text); connection.send(message.createReply(true)); - } else if (function == QLatin1String("PasteText")) { + } else if (function == "PasteText"_L1) { #ifndef QT_NO_CLIPBOARD int position = message.arguments().at(0).toInt(); const QString txt = QGuiApplication::clipboard()->text(); @@ -2213,14 +2166,14 @@ bool AtSpiAdaptor::editableTextInterface(QAccessibleInterface *interface, const replaceTextFallback(interface, position, position, txt); #endif connection.send(message.createReply(true)); - } else if (function == QLatin1String("SetTextContents")) { + } else if (function == "SetTextContents"_L1) { QString newContents = message.arguments().at(0).toString(); if (QAccessibleEditableTextInterface *editableTextIface = interface->editableTextInterface()) editableTextIface->replaceText(0, interface->textInterface()->characterCount(), newContents); else replaceTextFallback(interface, 0, -1, newContents); connection.send(message.createReply(true)); - } else if (function == QLatin1String("")) { + } else if (function == ""_L1) { connection.send(message.createReply()); } else { qCDebug(lcAccessibilityAtspi) << "WARNING: AtSpiAdaptor::editableTextInterface does not implement " << function << message.path(); @@ -2236,7 +2189,7 @@ bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString if (!valueIface) return false; - if (function == QLatin1String("SetCurrentValue")) { + if (function == "SetCurrentValue"_L1) { QDBusVariant v = qvariant_cast<QDBusVariant>(message.arguments().at(2)); double value = v.variant().toDouble(); //Temporary fix @@ -2245,13 +2198,13 @@ bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString connection.send(message.createReply()); // FIXME is the reply needed? } else { QVariant value; - if (function == QLatin1String("GetCurrentValue")) + if (function == "GetCurrentValue"_L1) value = valueIface->currentValue(); - else if (function == QLatin1String("GetMaximumValue")) + else if (function == "GetMaximumValue"_L1) value = valueIface->maximumValue(); - else if (function == QLatin1String("GetMinimumIncrement")) + else if (function == "GetMinimumIncrement"_L1) value = valueIface->minimumStepSize(); - else if (function == QLatin1String("GetMinimumValue")) + else if (function == "GetMinimumValue"_L1) value = valueIface->minimumValue(); else { qCDebug(lcAccessibilityAtspi) << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path(); @@ -2279,7 +2232,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString if (0) { // properties - } else if (function == QLatin1String("GetCaption")) { + } else if (function == "GetCaption"_L1) { QAccessibleInterface * captionInterface= interface->tableInterface()->caption(); if (captionInterface) { QSpiObjectReference ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(captionInterface))); @@ -2288,23 +2241,23 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString sendReply(connection, message, QVariant::fromValue( QSpiObjectReference(connection, QDBusObjectPath(ATSPI_DBUS_PATH_NULL)))); } - } else if (function == QLatin1String("GetNColumns")) { + } else if (function == "GetNColumns"_L1) { connection.send(message.createReply(QVariant::fromValue(QDBusVariant( QVariant::fromValue(interface->tableInterface()->columnCount()))))); - } else if (function == QLatin1String("GetNRows")) { + } else if (function == "GetNRows"_L1) { connection.send(message.createReply(QVariant::fromValue(QDBusVariant( QVariant::fromValue(interface->tableInterface()->rowCount()))))); - } else if (function == QLatin1String("GetNSelectedColumns")) { + } else if (function == "GetNSelectedColumns"_L1) { connection.send(message.createReply(QVariant::fromValue(QDBusVariant( QVariant::fromValue(interface->tableInterface()->selectedColumnCount()))))); - } else if (function == QLatin1String("GetNSelectedRows")) { + } else if (function == "GetNSelectedRows"_L1) { connection.send(message.createReply(QVariant::fromValue(QDBusVariant( QVariant::fromValue(interface->tableInterface()->selectedRowCount()))))); - } else if (function == QLatin1String("GetSummary")) { + } else if (function == "GetSummary"_L1) { QAccessibleInterface *summary = interface->tableInterface() ? interface->tableInterface()->summary() : nullptr; QSpiObjectReference ref(connection, QDBusObjectPath(pathForInterface(summary))); connection.send(message.createReply(QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref))))); - } else if (function == QLatin1String("GetAccessibleAt")) { + } else if (function == "GetAccessibleAt"_L1) { int row = message.arguments().at(0).toInt(); int column = message.arguments().at(1).toInt(); if ((row < 0) || @@ -2325,7 +2278,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } connection.send(message.createReply(QVariant::fromValue(ref))); - } else if (function == QLatin1String("GetIndexAt")) { + } else if (function == "GetIndexAt"_L1) { int row = message.arguments().at(0).toInt(); int column = message.arguments().at(1).toInt(); QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column); @@ -2337,13 +2290,13 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString qCDebug(lcAccessibilityAtspi) << "QSpiAdaptor::GetIndexAt row:" << row << " col:" << column << " logical index:" << index; Q_ASSERT(index > 0); connection.send(message.createReply(index)); - } else if ((function == QLatin1String("GetColumnAtIndex")) || (function == QLatin1String("GetRowAtIndex"))) { + } else if ((function == "GetColumnAtIndex"_L1) || (function == "GetRowAtIndex"_L1)) { int index = message.arguments().at(0).toInt(); int ret = -1; if (index >= 0) { QAccessibleInterface * cell = interface->child(index); if (cell) { - if (function == QLatin1String("GetColumnAtIndex")) { + if (function == "GetColumnAtIndex"_L1) { if (cell->role() == QAccessible::ColumnHeader) { ret = index; } else if (cell->role() == QAccessible::RowHeader) { @@ -2375,16 +2328,16 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } connection.send(message.createReply(ret)); - } else if (function == QLatin1String("GetColumnDescription")) { + } else if (function == "GetColumnDescription"_L1) { int column = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->columnDescription(column))); - } else if (function == QLatin1String("GetRowDescription")) { + } else if (function == "GetRowDescription"_L1) { int row = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->rowDescription(row))); - } else if (function == QLatin1String("GetRowColumnExtentsAtIndex")) { + } else if (function == "GetRowColumnExtentsAtIndex"_L1) { int index = message.arguments().at(0).toInt(); bool success = false; @@ -2412,17 +2365,17 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString list << success << row << col << rowExtents << colExtents << isSelected; connection.send(message.createReply(list)); - } else if (function == QLatin1String("GetColumnExtentAt")) { + } else if (function == "GetColumnExtentAt"_L1) { int row = message.arguments().at(0).toInt(); int column = message.arguments().at(1).toInt(); connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->columnExtent())); - } else if (function == QLatin1String("GetRowExtentAt")) { + } else if (function == "GetRowExtentAt"_L1) { int row = message.arguments().at(0).toInt(); int column = message.arguments().at(1).toInt(); connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->rowExtent())); - } else if (function == QLatin1String("GetColumnHeader")) { + } else if (function == "GetColumnHeader"_L1) { int column = message.arguments().at(0).toInt(); QSpiObjectReference ref; @@ -2435,7 +2388,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } connection.send(message.createReply(QVariant::fromValue(ref))); - } else if (function == QLatin1String("GetRowHeader")) { + } else if (function == "GetRowHeader"_L1) { int row = message.arguments().at(0).toInt(); QSpiObjectReference ref; QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, 0)->tableCellInterface(); @@ -2447,31 +2400,31 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } connection.send(message.createReply(QVariant::fromValue(ref))); - } else if (function == QLatin1String("GetSelectedColumns")) { + } else if (function == "GetSelectedColumns"_L1) { connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedColumns()))); - } else if (function == QLatin1String("GetSelectedRows")) { + } else if (function == "GetSelectedRows"_L1) { connection.send(message.createReply(QVariant::fromValue(interface->tableInterface()->selectedRows()))); - } else if (function == QLatin1String("IsColumnSelected")) { + } else if (function == "IsColumnSelected"_L1) { int column = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->isColumnSelected(column))); - } else if (function == QLatin1String("IsRowSelected")) { + } else if (function == "IsRowSelected"_L1) { int row = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->isRowSelected(row))); - } else if (function == QLatin1String("IsSelected")) { + } else if (function == "IsSelected"_L1) { int row = message.arguments().at(0).toInt(); int column = message.arguments().at(1).toInt(); QAccessibleTableCellInterface* cell = interface->tableInterface()->cellAt(row, column)->tableCellInterface(); connection.send(message.createReply(cell->isSelected())); - } else if (function == QLatin1String("AddColumnSelection")) { + } else if (function == "AddColumnSelection"_L1) { int column = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->selectColumn(column))); - } else if (function == QLatin1String("AddRowSelection")) { + } else if (function == "AddRowSelection"_L1) { int row = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->selectRow(row))); - } else if (function == QLatin1String("RemoveColumnSelection")) { + } else if (function == "RemoveColumnSelection"_L1) { int column = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->unselectColumn(column))); - } else if (function == QLatin1String("RemoveRowSelection")) { + } else if (function == "RemoveRowSelection"_L1) { int row = message.arguments().at(0).toInt(); connection.send(message.createReply(interface->tableInterface()->unselectRow(row))); } else { @@ -2482,4 +2435,6 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } QT_END_NAMESPACE + +#include "moc_atspiadaptor_p.cpp" #endif //QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/linux/atspiadaptor_p.h b/src/gui/accessible/linux/atspiadaptor_p.h index b9f4011695..3d785e4c25 100644 --- a/src/gui/accessible/linux/atspiadaptor_p.h +++ b/src/gui/accessible/linux/atspiadaptor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef ATSPIADAPTOR_H diff --git a/src/gui/accessible/linux/dbusconnection.cpp b/src/gui/accessible/linux/dbusconnection.cpp index 45ddc8e496..b4a8643474 100644 --- a/src/gui/accessible/linux/dbusconnection.cpp +++ b/src/gui/accessible/linux/dbusconnection.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only @@ -53,11 +17,13 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + /* note: do not change these to QStringLiteral; we are unloaded before QtDBus is done using the strings. */ -#define A11Y_SERVICE QLatin1String("org.a11y.Bus") -#define A11Y_PATH QLatin1String("/org/a11y/bus") +#define A11Y_SERVICE "org.a11y.Bus"_L1 +#define A11Y_PATH "/org/a11y/bus"_L1 /*! \class DBusConnection @@ -69,6 +35,14 @@ QT_BEGIN_NAMESPACE DBusConnection::DBusConnection(QObject *parent) : QObject(parent), m_a11yConnection(QString()), m_enabled(false) { + // If the bus is explicitly set via env var it overrides everything else. + QByteArray addressEnv = qgetenv("AT_SPI_BUS_ADDRESS"); + if (!addressEnv.isEmpty()) { + m_enabled = true; + connectA11yBus(QString::fromLocal8Bit(addressEnv)); + return; + } + // Start monitoring if "org.a11y.Bus" is registered as DBus service. QDBusConnection c = QDBusConnection::sessionBus(); if (!c.isConnected()) { @@ -128,9 +102,8 @@ void DBusConnection::serviceRegistered() emit enabledChanged(m_enabled); } else { QDBusConnection c = QDBusConnection::sessionBus(); - QDBusMessage m = QDBusMessage::createMethodCall(QLatin1String("org.a11y.Bus"), - QLatin1String("/org/a11y/bus"), - QLatin1String("org.a11y.Bus"), QLatin1String("GetAddress")); + QDBusMessage m = QDBusMessage::createMethodCall(A11Y_SERVICE, A11Y_PATH, A11Y_SERVICE, + "GetAddress"_L1); c.callWithCallback(m, this, SLOT(connectA11yBus(QString)), SLOT(dbusError(QDBusError))); } } @@ -149,7 +122,7 @@ void DBusConnection::connectA11yBus(const QString &address) qWarning("Could not find Accessibility DBus address."); return; } - m_a11yConnection = QDBusConnection(QDBusConnection::connectToBus(address, QLatin1String("a11y"))); + m_a11yConnection = QDBusConnection(QDBusConnection::connectToBus(address, "a11y"_L1)); if (m_enabled) emit enabledChanged(true); @@ -170,3 +143,5 @@ QDBusConnection DBusConnection::connection() const } QT_END_NAMESPACE + +#include "moc_dbusconnection_p.cpp" diff --git a/src/gui/accessible/linux/dbusconnection_p.h b/src/gui/accessible/linux/dbusconnection_p.h index 826630fddc..8b231c5ad0 100644 --- a/src/gui/accessible/linux/dbusconnection_p.h +++ b/src/gui/accessible/linux/dbusconnection_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef DBUSCONNECTION_H @@ -52,9 +16,11 @@ // We mean it. // +#include <QtCore/QObject> #include <QtCore/QString> #include <QtDBus/QDBusConnection> #include <QtDBus/QDBusVariant> +#include <QtCore/private/qglobal_p.h> Q_MOC_INCLUDE(<QtDBus/QDBusError>) QT_BEGIN_NAMESPACE diff --git a/src/gui/accessible/linux/qspi_constant_mappings.cpp b/src/gui/accessible/linux/qspi_constant_mappings.cpp index f428726138..5e83ede1a7 100644 --- a/src/gui/accessible/linux/qspi_constant_mappings.cpp +++ b/src/gui/accessible/linux/qspi_constant_mappings.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qspi_constant_mappings_p.h" diff --git a/src/gui/accessible/linux/qspi_constant_mappings_p.h b/src/gui/accessible/linux/qspi_constant_mappings_p.h index 17e36825f6..ea571181e6 100644 --- a/src/gui/accessible/linux/qspi_constant_mappings_p.h +++ b/src/gui/accessible/linux/qspi_constant_mappings_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only // // W A R N I N G diff --git a/src/gui/accessible/linux/qspi_struct_marshallers.cpp b/src/gui/accessible/linux/qspi_struct_marshallers.cpp index 1f49d8533f..8c979c0f19 100644 --- a/src/gui/accessible/linux/qspi_struct_marshallers.cpp +++ b/src/gui/accessible/linux/qspi_struct_marshallers.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qspi_struct_marshallers_p.h" @@ -49,6 +13,24 @@ #ifndef QT_NO_ACCESSIBILITY QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QSpiIntList) +QT_IMPL_METATYPE_EXTERN(QSpiUIntList) +QT_IMPL_METATYPE_EXTERN(QSpiObjectReference) +QT_IMPL_METATYPE_EXTERN(QSpiObjectReferenceArray) +QT_IMPL_METATYPE_EXTERN(QSpiAccessibleCacheItem) +QT_IMPL_METATYPE_EXTERN(QSpiAccessibleCacheArray) +QT_IMPL_METATYPE_EXTERN(QSpiAction) +QT_IMPL_METATYPE_EXTERN(QSpiActionArray) +QT_IMPL_METATYPE_EXTERN(QSpiEventListener) +QT_IMPL_METATYPE_EXTERN(QSpiEventListenerArray) +QT_IMPL_METATYPE_EXTERN(QSpiRelationArrayEntry) +QT_IMPL_METATYPE_EXTERN(QSpiRelationArray) +QT_IMPL_METATYPE_EXTERN(QSpiTextRange) +QT_IMPL_METATYPE_EXTERN(QSpiTextRangeList) +QT_IMPL_METATYPE_EXTERN(QSpiAttributeSet) +QT_IMPL_METATYPE_EXTERN(QSpiAppUpdate) +QT_IMPL_METATYPE_EXTERN(QSpiDeviceEvent) + QSpiObjectReference::QSpiObjectReference() : path(QDBusObjectPath(ATSPI_DBUS_PATH_NULL)) {} diff --git a/src/gui/accessible/linux/qspi_struct_marshallers_p.h b/src/gui/accessible/linux/qspi_struct_marshallers_p.h index c7a4a97176..4338b49dd2 100644 --- a/src/gui/accessible/linux/qspi_struct_marshallers_p.h +++ b/src/gui/accessible/linux/qspi_struct_marshallers_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_SPI_STRUCT_MARSHALLERS_H @@ -176,23 +140,23 @@ void qSpiInitializeStructTypes(); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QSpiIntList) -Q_DECLARE_METATYPE(QSpiUIntList) -Q_DECLARE_METATYPE(QSpiObjectReference) -Q_DECLARE_METATYPE(QSpiObjectReferenceArray) -Q_DECLARE_METATYPE(QSpiAccessibleCacheItem) -Q_DECLARE_METATYPE(QSpiAccessibleCacheArray) -Q_DECLARE_METATYPE(QSpiAction) -Q_DECLARE_METATYPE(QSpiActionArray) -Q_DECLARE_METATYPE(QSpiEventListener) -Q_DECLARE_METATYPE(QSpiEventListenerArray) -Q_DECLARE_METATYPE(QSpiRelationArrayEntry) -Q_DECLARE_METATYPE(QSpiRelationArray) -Q_DECLARE_METATYPE(QSpiTextRange) -Q_DECLARE_METATYPE(QSpiTextRangeList) -Q_DECLARE_METATYPE(QSpiAttributeSet) -Q_DECLARE_METATYPE(QSpiAppUpdate) -Q_DECLARE_METATYPE(QSpiDeviceEvent) +QT_DECL_METATYPE_EXTERN(QSpiIntList, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiUIntList, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiObjectReference, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiObjectReferenceArray, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiAccessibleCacheItem, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiAccessibleCacheArray, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiAction, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiActionArray, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiEventListener, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiEventListenerArray, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiRelationArrayEntry, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiRelationArray, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiTextRange, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiTextRangeList, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiAttributeSet, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiAppUpdate, /* not exported */) +QT_DECL_METATYPE_EXTERN(QSpiDeviceEvent, /* not exported */) // For qdbusxml2cpp-generated code QT_USE_NAMESPACE diff --git a/src/gui/accessible/linux/qspiaccessiblebridge.cpp b/src/gui/accessible/linux/qspiaccessiblebridge.cpp index 9b9b7a46a5..0c8dbcdb80 100644 --- a/src/gui/accessible/linux/qspiaccessiblebridge.cpp +++ b/src/gui/accessible/linux/qspiaccessiblebridge.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qspiaccessiblebridge_p.h" @@ -57,6 +21,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + /*! \class QSpiAccessibleBridge \internal @@ -95,10 +61,10 @@ void QSpiAccessibleBridge::updateStatus() cache = new QSpiDBusCache(dbusConnection->connection(), this); dec = new DeviceEventControllerAdaptor(this); - dbusConnection->connection().registerObject(QLatin1String(ATSPI_DBUS_PATH_DEC), this, QDBusConnection::ExportAdaptors); + dbusConnection->connection().registerObject(ATSPI_DBUS_PATH_DEC ""_L1, this, QDBusConnection::ExportAdaptors); dbusAdaptor = new AtSpiAdaptor(dbusConnection, this); - dbusConnection->connection().registerVirtualObject(QLatin1String(QSPI_OBJECT_PATH_ACCESSIBLE), dbusAdaptor, QDBusConnection::SubPath); + dbusConnection->connection().registerVirtualObject(QSPI_OBJECT_PATH_ACCESSIBLE ""_L1, dbusAdaptor, QDBusConnection::SubPath); dbusAdaptor->registerApplication(); } } @@ -275,7 +241,7 @@ static RoleMapping map[] = { void QSpiAccessibleBridge::initializeConstantMappings() { for (uint i = 0; i < sizeof(map) / sizeof(RoleMapping); ++i) - m_spiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1String(map[i].name), tr(map[i].name))); + m_spiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1StringView(map[i].name), tr(map[i].name))); // -1 because we have button duplicated, as PushButton and Button. Q_ASSERT_X(m_spiRoleMapping.size() == @@ -300,4 +266,6 @@ RoleNames QSpiAccessibleBridge::namesForRole(QAccessible::Role role) } QT_END_NAMESPACE + +#include "moc_qspiaccessiblebridge_p.cpp" #endif //QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/linux/qspiaccessiblebridge_p.h b/src/gui/accessible/linux/qspiaccessiblebridge_p.h index ef3eff366d..5ad48c5cc4 100644 --- a/src/gui/accessible/linux/qspiaccessiblebridge_p.h +++ b/src/gui/accessible/linux/qspiaccessiblebridge_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QSPIACCESSIBLEBRIDGE_H diff --git a/src/gui/accessible/linux/qspiapplicationadaptor.cpp b/src/gui/accessible/linux/qspiapplicationadaptor.cpp index af333795a4..0636699a32 100644 --- a/src/gui/accessible/linux/qspiapplicationadaptor.cpp +++ b/src/gui/accessible/linux/qspiapplicationadaptor.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qspiapplicationadaptor_p.h" @@ -236,4 +200,6 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error QT_END_NAMESPACE +#include "moc_qspiapplicationadaptor_p.cpp" + #endif //QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/linux/qspiapplicationadaptor_p.h b/src/gui/accessible/linux/qspiapplicationadaptor_p.h index 3f0ade8dde..b852951385 100644 --- a/src/gui/accessible/linux/qspiapplicationadaptor_p.h +++ b/src/gui/accessible/linux/qspiapplicationadaptor_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_SPI_APPLICATION_H #define Q_SPI_APPLICATION_H diff --git a/src/gui/accessible/linux/qspidbuscache.cpp b/src/gui/accessible/linux/qspidbuscache.cpp index 189cd2adf8..063397e994 100644 --- a/src/gui/accessible/linux/qspidbuscache.cpp +++ b/src/gui/accessible/linux/qspidbuscache.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qspidbuscache_p.h" @@ -48,6 +12,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + /*! \class QSpiDBusCache \internal @@ -69,7 +35,7 @@ QSpiDBusCache::QSpiDBusCache(QDBusConnection c, QObject* parent) : QObject(parent) { new CacheAdaptor(this); - c.registerObject(QLatin1String(QSPI_OBJECT_PATH_CACHE), this, QDBusConnection::ExportAdaptors); + c.registerObject(QSPI_OBJECT_PATH_CACHE ""_L1, this, QDBusConnection::ExportAdaptors); } void QSpiDBusCache::emitAddAccessible(const QSpiAccessibleCacheItem& item) @@ -88,4 +54,6 @@ QSpiAccessibleCacheArray QSpiDBusCache::GetItems() } QT_END_NAMESPACE + +#include "moc_qspidbuscache_p.cpp" #endif //QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/linux/qspidbuscache_p.h b/src/gui/accessible/linux/qspidbuscache_p.h index 89bee59d3a..7a6e111f14 100644 --- a/src/gui/accessible/linux/qspidbuscache_p.h +++ b/src/gui/accessible/linux/qspidbuscache_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_SPI_CACHE_H diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 2fdcbfdd27..0ccdb97e3c 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessible.h" @@ -54,11 +18,14 @@ #include <QtCore/qdebug.h> #include <QtCore/qloggingcategory.h> #include <QtCore/qmetaobject.h> +#include <QtCore/private/qmetaobject_p.h> #include <QtCore/qhash.h> #include <private/qfactoryloader_p.h> QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core"); /*! @@ -162,7 +129,6 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core"); \value hasPopup The object opens a popup. \value hotTracked The object's appearance is sensitive to the mouse cursor position. \value invalid The object is no longer valid (because it has been deleted). - \value invalidEntry Input validation current input invalid. \value invisible The object is not visible to the user. \value linked The object is linked to another object, e.g. a hyperlink. \value marqueed The object displays scrolling contents, e.g. a log view. @@ -471,7 +437,7 @@ QAccessibleInterface::~QAccessibleInterface() /* accessible widgets plugin discovery stuff */ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, - (QAccessibleFactoryInterface_iid, QLatin1String("/accessible"))) + (QAccessibleFactoryInterface_iid, "/accessible"_L1)) typedef QHash<QString, QAccessiblePlugin*> QAccessiblePluginsHash; Q_GLOBAL_STATIC(QAccessiblePluginsHash, qAccessiblePlugins) @@ -681,8 +647,27 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) // Create a QAccessibleInterface for the object class. Start by the most // derived class and walk up the class hierarchy. const QMetaObject *mo = object->metaObject(); + const auto *objectPriv = QObjectPrivate::get(object); + /* + We do not want to cache each and every QML metaobject (Button_QMLTYPE_124, + Button_QMLTYPE_125, etc.). Those dynamic metaobjects shouldn't have an + accessible interface in any case. Instead, we start the whole checking + with the first non-dynamic meta-object. To avoid potential regressions + in other areas of Qt that also use dynamic metaobjects, we only do this + for objects that are QML-related (approximated by checking whether they + have ddata set). + */ + const bool qmlRelated = !objectPriv->isDeletingChildren && + objectPriv->declarativeData; + while (qmlRelated && mo) { + auto mop = QMetaObjectPrivate::get(mo); + if (!mop || !(mop->flags & DynamicMetaObject)) + break; + + mo = mo->superClass(); + }; while (mo) { - const QString cn = QLatin1String(mo->className()); + const QString cn = QLatin1StringView(mo->className()); // Check if the class has a InterfaceFactory installed. for (int i = qAccessibleFactories()->count(); i > 0; --i) { @@ -696,14 +681,15 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) // Find a QAccessiblePlugin (factory) for the class name. If there's // no entry in the cache try to create it using the plugin loader. if (!qAccessiblePlugins()->contains(cn)) { + QAccessiblePlugin *factory = nullptr; // 0 means "no plugin found". This is cached as well. const int index = loader()->indexOf(cn); - if (index != -1) { - QAccessiblePlugin *factory = qobject_cast<QAccessiblePlugin *>(loader()->instance(index)); - qAccessiblePlugins()->insert(cn, factory); - } + if (index != -1) + factory = qobject_cast<QAccessiblePlugin *>(loader()->instance(index)); + qAccessiblePlugins()->insert(cn, factory); } // At this point the cache should contain a valid factory pointer or 0: + Q_ASSERT(qAccessiblePlugins()->contains(cn)); QAccessiblePlugin *factory = qAccessiblePlugins()->value(cn); if (factory) { QAccessibleInterface *result = factory->create(cn, object); @@ -1842,16 +1828,16 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface) QStringList stateStrings; QAccessible::State st = iface->state(); if (st.focusable) - stateStrings << QLatin1String("focusable"); + stateStrings << "focusable"_L1; if (st.focused) - stateStrings << QLatin1String("focused"); + stateStrings << "focused"_L1; if (st.selected) - stateStrings << QLatin1String("selected"); + stateStrings << "selected"_L1; if (st.invisible) - stateStrings << QLatin1String("invisible"); + stateStrings << "invisible"_L1; if (!stateStrings.isEmpty()) - d << stateStrings.join(QLatin1Char('|')); + d << stateStrings.join(u'|'); if (!st.invisible) d << "rect=" << iface->rect(); @@ -2516,6 +2502,7 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface() /*! \class QAccessibleTableInterface + \inmodule QtGui \ingroup accessibility \brief The QAccessibleTableInterface class implements support for @@ -2662,6 +2649,7 @@ QAccessibleTableInterface::~QAccessibleTableInterface() /*! \class QAccessibleActionInterface + \inmodule QtGui \ingroup accessibility \brief The QAccessibleActionInterface class implements support for @@ -3001,3 +2989,4 @@ QAccessibleHyperlinkInterface::~QAccessibleHyperlinkInterface() QT_END_NAMESPACE +#include "moc_qaccessible_base.cpp" diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index d7bb31706e..b5a69702e1 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -1,41 +1,12 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + + +#if 0 +// keep existing syncqt header working after the move of the class +// into qaccessible_base +#pragma qt_class(QAccessible) +#endif #include <QtGui/qtguiglobal.h> @@ -53,8 +24,7 @@ #include <QtCore/qvariant.h> #include <QtGui/qcolor.h> #include <QtGui/qevent.h> - -#include <stdlib.h> +#include <QtGui/qaccessible_base.h> QT_BEGIN_NAMESPACE @@ -63,387 +33,6 @@ class QAccessibleEvent; class QWindow; class QTextCursor; -class Q_GUI_EXPORT QAccessible -{ - Q_GADGET -public: - - enum Event { - SoundPlayed = 0x0001, - Alert = 0x0002, - ForegroundChanged = 0x0003, - MenuStart = 0x0004, - MenuEnd = 0x0005, - PopupMenuStart = 0x0006, - PopupMenuEnd = 0x0007, - ContextHelpStart = 0x000C, - ContextHelpEnd = 0x000D, - DragDropStart = 0x000E, - DragDropEnd = 0x000F, - DialogStart = 0x0010, - DialogEnd = 0x0011, - ScrollingStart = 0x0012, - ScrollingEnd = 0x0013, - - MenuCommand = 0x0018, - - // Values from IAccessible2 - ActionChanged = 0x0101, - ActiveDescendantChanged = 0x0102, - AttributeChanged = 0x0103, - DocumentContentChanged = 0x0104, - DocumentLoadComplete = 0x0105, - DocumentLoadStopped = 0x0106, - DocumentReload = 0x0107, - HyperlinkEndIndexChanged = 0x0108, - HyperlinkNumberOfAnchorsChanged = 0x0109, - HyperlinkSelectedLinkChanged = 0x010A, - HypertextLinkActivated = 0x010B, - HypertextLinkSelected = 0x010C, - HyperlinkStartIndexChanged = 0x010D, - HypertextChanged = 0x010E, - HypertextNLinksChanged = 0x010F, - ObjectAttributeChanged = 0x0110, - PageChanged = 0x0111, - SectionChanged = 0x0112, - TableCaptionChanged = 0x0113, - TableColumnDescriptionChanged = 0x0114, - TableColumnHeaderChanged = 0x0115, - TableModelChanged = 0x0116, - TableRowDescriptionChanged = 0x0117, - TableRowHeaderChanged = 0x0118, - TableSummaryChanged = 0x0119, - TextAttributeChanged = 0x011A, - TextCaretMoved = 0x011B, - // TextChanged = 0x011C, is deprecated in IA2, use TextUpdated - TextColumnChanged = 0x011D, - TextInserted = 0x011E, - TextRemoved = 0x011F, - TextUpdated = 0x0120, - TextSelectionChanged = 0x0121, - VisibleDataChanged = 0x0122, - - ObjectCreated = 0x8000, - ObjectDestroyed = 0x8001, - ObjectShow = 0x8002, - ObjectHide = 0x8003, - ObjectReorder = 0x8004, - Focus = 0x8005, - Selection = 0x8006, - SelectionAdd = 0x8007, - SelectionRemove = 0x8008, - SelectionWithin = 0x8009, - StateChanged = 0x800A, - LocationChanged = 0x800B, - NameChanged = 0x800C, - DescriptionChanged = 0x800D, - ValueChanged = 0x800E, - ParentChanged = 0x800F, - HelpChanged = 0x80A0, - DefaultActionChanged = 0x80B0, - AcceleratorChanged = 0x80C0, - - InvalidEvent - }; - Q_ENUM(Event) - - // 64 bit enums seem hard on some platforms (windows...) - // which makes using a bit field a sensible alternative - struct State { - // http://msdn.microsoft.com/en-us/library/ms697270.aspx - quint64 disabled : 1; // used to be Unavailable - quint64 selected : 1; - quint64 focusable : 1; - quint64 focused : 1; - quint64 pressed : 1; - quint64 checkable : 1; - quint64 checked : 1; - quint64 checkStateMixed : 1; // used to be Mixed - quint64 readOnly : 1; - quint64 hotTracked : 1; - quint64 defaultButton : 1; - quint64 expanded : 1; - quint64 collapsed : 1; - quint64 busy : 1; - quint64 expandable : 1; - quint64 marqueed : 1; - quint64 animated : 1; - quint64 invisible : 1; - quint64 offscreen : 1; - quint64 sizeable : 1; - quint64 movable : 1; - quint64 selfVoicing : 1; - quint64 selectable : 1; - quint64 linked : 1; - quint64 traversed : 1; - quint64 multiSelectable : 1; - quint64 extSelectable : 1; - quint64 passwordEdit : 1; // used to be Protected - quint64 hasPopup : 1; - quint64 modal : 1; - - // IA2 - we chose to not add some IA2 states for now - // Below the ones that seem helpful - quint64 active : 1; - quint64 invalid : 1; // = defunct - quint64 editable : 1; - quint64 multiLine : 1; - quint64 selectableText : 1; - quint64 supportsAutoCompletion : 1; - - quint64 searchEdit : 1; - - // quint64 horizontal : 1; - // quint64 vertical : 1; - // quint64 invalidEntry : 1; - // quint64 managesDescendants : 1; - // quint64 singleLine : 1; // we have multi line, this is redundant. - // quint64 stale : 1; - // quint64 transient : 1; - // quint64 pinned : 1; - - // Apple - see http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/ - // quint64 playsSound : 1; - // quint64 summaryElement : 1; - // quint64 updatesFrequently : 1; - // quint64 adjustable : 1; - // more and not included here: http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Attributes.html - - // MSAA - // quint64 alertLow : 1; - // quint64 alertMedium : 1; - // quint64 alertHigh : 1; - - State() { - memset(this, 0, sizeof(State)); - } - friend inline bool operator==(const QAccessible::State &first, const QAccessible::State &second) - { - return memcmp(&first, &second, sizeof(QAccessible::State)) == 0; - } - }; - - - - - - enum Role { - NoRole = 0x00000000, - TitleBar = 0x00000001, - MenuBar = 0x00000002, - ScrollBar = 0x00000003, - Grip = 0x00000004, - Sound = 0x00000005, - Cursor = 0x00000006, - Caret = 0x00000007, - AlertMessage = 0x00000008, - Window = 0x00000009, - Client = 0x0000000A, - PopupMenu = 0x0000000B, - MenuItem = 0x0000000C, - ToolTip = 0x0000000D, - Application = 0x0000000E, - Document = 0x0000000F, - Pane = 0x00000010, - Chart = 0x00000011, - Dialog = 0x00000012, - Border = 0x00000013, - Grouping = 0x00000014, - Separator = 0x00000015, - ToolBar = 0x00000016, - StatusBar = 0x00000017, - Table = 0x00000018, - ColumnHeader = 0x00000019, - RowHeader = 0x0000001A, - Column = 0x0000001B, - Row = 0x0000001C, - Cell = 0x0000001D, - Link = 0x0000001E, - HelpBalloon = 0x0000001F, - Assistant = 0x00000020, - List = 0x00000021, - ListItem = 0x00000022, - Tree = 0x00000023, - TreeItem = 0x00000024, - PageTab = 0x00000025, - PropertyPage = 0x00000026, - Indicator = 0x00000027, - Graphic = 0x00000028, - StaticText = 0x00000029, - EditableText = 0x0000002A, // Editable, selectable, etc. - Button = 0x0000002B, -#ifndef Q_QDOC - PushButton = Button, // deprecated -#endif - CheckBox = 0x0000002C, - RadioButton = 0x0000002D, - ComboBox = 0x0000002E, - // DropList = 0x0000002F, - ProgressBar = 0x00000030, - Dial = 0x00000031, - HotkeyField = 0x00000032, - Slider = 0x00000033, - SpinBox = 0x00000034, - Canvas = 0x00000035, // MSAA: ROLE_SYSTEM_DIAGRAM - The object represents a graphical image that is used to diagram data. - Animation = 0x00000036, - Equation = 0x00000037, - ButtonDropDown = 0x00000038, // The object represents a button that expands a grid. - ButtonMenu = 0x00000039, - ButtonDropGrid = 0x0000003A, - Whitespace = 0x0000003B, // The object represents blank space between other objects. - PageTabList = 0x0000003C, - Clock = 0x0000003D, - Splitter = 0x0000003E, - // Reserved space in case MSAA roles needs to be added - - // Additional Qt roles where enum value does not map directly to MSAA: - LayeredPane = 0x00000080, - Terminal = 0x00000081, - Desktop = 0x00000082, - Paragraph = 0x00000083, - WebDocument = 0x00000084, - Section = 0x00000085, - Notification = 0x00000086, - - // IAccessible2 roles - // IA2_ROLE_CANVAS = 0x401, // An object that can be drawn into and to manage events from the objects drawn into it - // IA2_ROLE_CAPTION = 0x402, - // IA2_ROLE_CHECK_MENU_ITEM = 0x403, - ColorChooser = 0x404, - // IA2_ROLE_DATE_EDITOR = 0x405, - // IA2_ROLE_DESKTOP_ICON = 0x406, - // IA2_ROLE_DESKTOP_PANE = 0x407, - // IA2_ROLE_DIRECTORY_PANE = 0x408, - // IA2_ROLE_EDITBAR = 0x409, - // IA2_ROLE_EMBEDDED_OBJECT = 0x40A, - // IA2_ROLE_ENDNOTE = 0x40B, - // IA2_ROLE_FILE_CHOOSER = 0x40C, - // IA2_ROLE_FONT_CHOOSER = 0x40D, - Footer = 0x40E, - // IA2_ROLE_FOOTNOTE = 0x40F, - Form = 0x410, - // some platforms (windows and at-spi) use Frame for regular windows - // because window was taken for tool/dock windows by MSAA - // Frame = 0x411, - // IA2_ROLE_GLASS_PANE = 0x412, - // IA2_ROLE_HEADER = 0x413, - Heading = 0x414, - // IA2_ROLE_ICON = 0x415, - // IA2_ROLE_IMAGE_MAP = 0x416, - // IA2_ROLE_INPUT_METHOD_WINDOW = 0x417, - // IA2_ROLE_INTERNAL_FRAME = 0x418, - // IA2_ROLE_LABEL = 0x419, - // IA2_ROLE_LAYERED_PANE = 0x41A, - Note = 0x41B, - // IA2_ROLE_OPTION_PANE = 0x41C, - // IA2_ROLE_PAGE = 0x41D, - // IA2_ROLE_PARAGRAPH = 0x42E, - // IA2_ROLE_RADIO_MENU_ITEM = 0x41F, - // IA2_ROLE_REDUNDANT_OBJECT = 0x420, - // IA2_ROLE_ROOT_PANE = 0x421, - // IA2_ROLE_RULER = 0x422, - // IA2_ROLE_SCROLL_PANE = 0x423, - // IA2_ROLE_SECTION = 0x424, - // IA2_ROLE_SHAPE = 0x425, - // IA2_ROLE_SPLIT_PANE = 0x426, - // IA2_ROLE_TEAR_OFF_MENU = 0x427, - // IA2_ROLE_TERMINAL = 0x428, - // IA2_ROLE_TEXT_FRAME = 0x429, - // IA2_ROLE_TOGGLE_BUTTON = 0x42A, - // IA2_ROLE_VIEW_PORT = 0x42B, - ComplementaryContent = 0x42C, - - UserRole = 0x0000ffff - }; - Q_ENUM(Role) - - enum Text { - Name = 0, - Description, - Value, - Help, - Accelerator, - DebugDescription, - UserText = 0x0000ffff - }; - - enum RelationFlag { - Label = 0x00000001, - Labelled = 0x00000002, - Controller = 0x00000004, - Controlled = 0x00000008, - AllRelations = 0xffffffff - }; - Q_DECLARE_FLAGS(Relation, RelationFlag) - - enum InterfaceType - { - TextInterface, - EditableTextInterface, - ValueInterface, - ActionInterface, - ImageInterface, - TableInterface, - TableCellInterface, - HyperlinkInterface - }; - - enum TextBoundaryType { - CharBoundary, - WordBoundary, - SentenceBoundary, - ParagraphBoundary, - LineBoundary, - NoBoundary - }; - - typedef QAccessibleInterface*(*InterfaceFactory)(const QString &key, QObject*); - typedef void(*UpdateHandler)(QAccessibleEvent *event); - typedef void(*RootObjectHandler)(QObject*); - - typedef unsigned Id; - - static void installFactory(InterfaceFactory); - static void removeFactory(InterfaceFactory); - static UpdateHandler installUpdateHandler(UpdateHandler); - static RootObjectHandler installRootObjectHandler(RootObjectHandler); - - class Q_GUI_EXPORT ActivationObserver - { - public: - virtual ~ActivationObserver(); - virtual void accessibilityActiveChanged(bool active) = 0; - }; - static void installActivationObserver(ActivationObserver *); - static void removeActivationObserver(ActivationObserver *); - - static QAccessibleInterface *queryAccessibleInterface(QObject *); - static Id uniqueId(QAccessibleInterface *iface); - static QAccessibleInterface *accessibleInterface(Id uniqueId); - static Id registerAccessibleInterface(QAccessibleInterface *iface); - static void deleteAccessibleInterface(Id uniqueId); - - static void updateAccessibility(QAccessibleEvent *event); - - static bool isActive(); - static void setActive(bool active); - static void setRootObject(QObject *object); - - static void cleanup(); - - static QPair< int, int > qAccessibleTextBoundaryHelper(const QTextCursor &cursor, TextBoundaryType boundaryType); - -private: - static UpdateHandler updateHandler; - static RootObjectHandler rootObjectHandler; - - QAccessible() {} - - friend class QAccessibleCache; -}; - -Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation) - class QAccessible2Interface; class QAccessibleTextInterface; class QAccessibleEditableTextInterface; diff --git a/src/gui/accessible/qaccessible_base.h b/src/gui/accessible/qaccessible_base.h new file mode 100644 index 0000000000..5a4c999029 --- /dev/null +++ b/src/gui/accessible/qaccessible_base.h @@ -0,0 +1,411 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + + +#ifndef QT_NO_ACCESSIBILITY +#ifndef QACCESSIBLE_BASE_H +#define QACCESSIBLE_BASE_H + + +#if 0 +// QAccessible class is handled in qaccessible.h +#pragma qt_sync_stop_processing +#endif + +#include <QtCore/qglobal.h> +#include <QtGui/qtguiglobal.h> +#include <QtCore/qobjectdefs.h> + +#include <cstring> // memset, memcmp + +QT_BEGIN_NAMESPACE + +class QAccessibleInterface; +class QAccessibleEvent; +class QTextCursor; + +class Q_GUI_EXPORT QAccessible +{ + Q_GADGET +public: + + enum Event { + SoundPlayed = 0x0001, + Alert = 0x0002, + ForegroundChanged = 0x0003, + MenuStart = 0x0004, + MenuEnd = 0x0005, + PopupMenuStart = 0x0006, + PopupMenuEnd = 0x0007, + ContextHelpStart = 0x000C, + ContextHelpEnd = 0x000D, + DragDropStart = 0x000E, + DragDropEnd = 0x000F, + DialogStart = 0x0010, + DialogEnd = 0x0011, + ScrollingStart = 0x0012, + ScrollingEnd = 0x0013, + + MenuCommand = 0x0018, + + // Values from IAccessible2 + ActionChanged = 0x0101, + ActiveDescendantChanged = 0x0102, + AttributeChanged = 0x0103, + DocumentContentChanged = 0x0104, + DocumentLoadComplete = 0x0105, + DocumentLoadStopped = 0x0106, + DocumentReload = 0x0107, + HyperlinkEndIndexChanged = 0x0108, + HyperlinkNumberOfAnchorsChanged = 0x0109, + HyperlinkSelectedLinkChanged = 0x010A, + HypertextLinkActivated = 0x010B, + HypertextLinkSelected = 0x010C, + HyperlinkStartIndexChanged = 0x010D, + HypertextChanged = 0x010E, + HypertextNLinksChanged = 0x010F, + ObjectAttributeChanged = 0x0110, + PageChanged = 0x0111, + SectionChanged = 0x0112, + TableCaptionChanged = 0x0113, + TableColumnDescriptionChanged = 0x0114, + TableColumnHeaderChanged = 0x0115, + TableModelChanged = 0x0116, + TableRowDescriptionChanged = 0x0117, + TableRowHeaderChanged = 0x0118, + TableSummaryChanged = 0x0119, + TextAttributeChanged = 0x011A, + TextCaretMoved = 0x011B, + // TextChanged = 0x011C, is deprecated in IA2, use TextUpdated + TextColumnChanged = 0x011D, + TextInserted = 0x011E, + TextRemoved = 0x011F, + TextUpdated = 0x0120, + TextSelectionChanged = 0x0121, + VisibleDataChanged = 0x0122, + + ObjectCreated = 0x8000, + ObjectDestroyed = 0x8001, + ObjectShow = 0x8002, + ObjectHide = 0x8003, + ObjectReorder = 0x8004, + Focus = 0x8005, + Selection = 0x8006, + SelectionAdd = 0x8007, + SelectionRemove = 0x8008, + SelectionWithin = 0x8009, + StateChanged = 0x800A, + LocationChanged = 0x800B, + NameChanged = 0x800C, + DescriptionChanged = 0x800D, + ValueChanged = 0x800E, + ParentChanged = 0x800F, + HelpChanged = 0x80A0, + DefaultActionChanged = 0x80B0, + AcceleratorChanged = 0x80C0, + + InvalidEvent + }; + Q_ENUM(Event) + + // 64 bit enums seem hard on some platforms (windows...) + // which makes using a bit field a sensible alternative + struct State { + // http://msdn.microsoft.com/en-us/library/ms697270.aspx + quint64 disabled : 1; // used to be Unavailable + quint64 selected : 1; + quint64 focusable : 1; + quint64 focused : 1; + quint64 pressed : 1; + quint64 checkable : 1; + quint64 checked : 1; + quint64 checkStateMixed : 1; // used to be Mixed + quint64 readOnly : 1; + quint64 hotTracked : 1; + quint64 defaultButton : 1; + quint64 expanded : 1; + quint64 collapsed : 1; + quint64 busy : 1; + quint64 expandable : 1; + quint64 marqueed : 1; + quint64 animated : 1; + quint64 invisible : 1; + quint64 offscreen : 1; + quint64 sizeable : 1; + quint64 movable : 1; + quint64 selfVoicing : 1; + quint64 selectable : 1; + quint64 linked : 1; + quint64 traversed : 1; + quint64 multiSelectable : 1; + quint64 extSelectable : 1; + quint64 passwordEdit : 1; // used to be Protected + quint64 hasPopup : 1; + quint64 modal : 1; + + // IA2 - we chose to not add some IA2 states for now + // Below the ones that seem helpful + quint64 active : 1; + quint64 invalid : 1; // = defunct + quint64 editable : 1; + quint64 multiLine : 1; + quint64 selectableText : 1; + quint64 supportsAutoCompletion : 1; + + quint64 searchEdit : 1; + + // quint64 horizontal : 1; + // quint64 vertical : 1; + // quint64 invalidEntry : 1; + // quint64 managesDescendants : 1; + // quint64 singleLine : 1; // we have multi line, this is redundant. + // quint64 stale : 1; + // quint64 transient : 1; + // quint64 pinned : 1; + + // Apple - see http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/ + // quint64 playsSound : 1; + // quint64 summaryElement : 1; + // quint64 updatesFrequently : 1; + // quint64 adjustable : 1; + // more and not included here: http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Attributes.html + + // MSAA + // quint64 alertLow : 1; + // quint64 alertMedium : 1; + // quint64 alertHigh : 1; + + State() { + std::memset(this, 0, sizeof(State)); + } + friend inline bool operator==(const QAccessible::State &first, const QAccessible::State &second) + { + return std::memcmp(&first, &second, sizeof(QAccessible::State)) == 0; + } + }; + + + + + + enum Role { + NoRole = 0x00000000, + TitleBar = 0x00000001, + MenuBar = 0x00000002, + ScrollBar = 0x00000003, + Grip = 0x00000004, + Sound = 0x00000005, + Cursor = 0x00000006, + Caret = 0x00000007, + AlertMessage = 0x00000008, + Window = 0x00000009, + Client = 0x0000000A, + PopupMenu = 0x0000000B, + MenuItem = 0x0000000C, + ToolTip = 0x0000000D, + Application = 0x0000000E, + Document = 0x0000000F, + Pane = 0x00000010, + Chart = 0x00000011, + Dialog = 0x00000012, + Border = 0x00000013, + Grouping = 0x00000014, + Separator = 0x00000015, + ToolBar = 0x00000016, + StatusBar = 0x00000017, + Table = 0x00000018, + ColumnHeader = 0x00000019, + RowHeader = 0x0000001A, + Column = 0x0000001B, + Row = 0x0000001C, + Cell = 0x0000001D, + Link = 0x0000001E, + HelpBalloon = 0x0000001F, + Assistant = 0x00000020, + List = 0x00000021, + ListItem = 0x00000022, + Tree = 0x00000023, + TreeItem = 0x00000024, + PageTab = 0x00000025, + PropertyPage = 0x00000026, + Indicator = 0x00000027, + Graphic = 0x00000028, + StaticText = 0x00000029, + EditableText = 0x0000002A, // Editable, selectable, etc. + Button = 0x0000002B, +#ifndef Q_QDOC + PushButton = Button, // deprecated +#endif + CheckBox = 0x0000002C, + RadioButton = 0x0000002D, + ComboBox = 0x0000002E, + // DropList = 0x0000002F, + ProgressBar = 0x00000030, + Dial = 0x00000031, + HotkeyField = 0x00000032, + Slider = 0x00000033, + SpinBox = 0x00000034, + Canvas = 0x00000035, // MSAA: ROLE_SYSTEM_DIAGRAM - The object represents a graphical image that is used to diagram data. + Animation = 0x00000036, + Equation = 0x00000037, + ButtonDropDown = 0x00000038, // The object represents a button that expands a grid. + ButtonMenu = 0x00000039, + ButtonDropGrid = 0x0000003A, + Whitespace = 0x0000003B, // The object represents blank space between other objects. + PageTabList = 0x0000003C, + Clock = 0x0000003D, + Splitter = 0x0000003E, + // Reserved space in case MSAA roles needs to be added + + // Additional Qt roles where enum value does not map directly to MSAA: + LayeredPane = 0x00000080, + Terminal = 0x00000081, + Desktop = 0x00000082, + Paragraph = 0x00000083, + WebDocument = 0x00000084, + Section = 0x00000085, + Notification = 0x00000086, + + // IAccessible2 roles + // IA2_ROLE_CANVAS = 0x401, // An object that can be drawn into and to manage events from the objects drawn into it + // IA2_ROLE_CAPTION = 0x402, + // IA2_ROLE_CHECK_MENU_ITEM = 0x403, + ColorChooser = 0x404, + // IA2_ROLE_DATE_EDITOR = 0x405, + // IA2_ROLE_DESKTOP_ICON = 0x406, + // IA2_ROLE_DESKTOP_PANE = 0x407, + // IA2_ROLE_DIRECTORY_PANE = 0x408, + // IA2_ROLE_EDITBAR = 0x409, + // IA2_ROLE_EMBEDDED_OBJECT = 0x40A, + // IA2_ROLE_ENDNOTE = 0x40B, + // IA2_ROLE_FILE_CHOOSER = 0x40C, + // IA2_ROLE_FONT_CHOOSER = 0x40D, + Footer = 0x40E, + // IA2_ROLE_FOOTNOTE = 0x40F, + Form = 0x410, + // some platforms (windows and at-spi) use Frame for regular windows + // because window was taken for tool/dock windows by MSAA + // Frame = 0x411, + // IA2_ROLE_GLASS_PANE = 0x412, + // IA2_ROLE_HEADER = 0x413, + Heading = 0x414, + // IA2_ROLE_ICON = 0x415, + // IA2_ROLE_IMAGE_MAP = 0x416, + // IA2_ROLE_INPUT_METHOD_WINDOW = 0x417, + // IA2_ROLE_INTERNAL_FRAME = 0x418, + // IA2_ROLE_LABEL = 0x419, + // IA2_ROLE_LAYERED_PANE = 0x41A, + Note = 0x41B, + // IA2_ROLE_OPTION_PANE = 0x41C, + // IA2_ROLE_PAGE = 0x41D, + // IA2_ROLE_PARAGRAPH = 0x42E, + // IA2_ROLE_RADIO_MENU_ITEM = 0x41F, + // IA2_ROLE_REDUNDANT_OBJECT = 0x420, + // IA2_ROLE_ROOT_PANE = 0x421, + // IA2_ROLE_RULER = 0x422, + // IA2_ROLE_SCROLL_PANE = 0x423, + // IA2_ROLE_SECTION = 0x424, + // IA2_ROLE_SHAPE = 0x425, + // IA2_ROLE_SPLIT_PANE = 0x426, + // IA2_ROLE_TEAR_OFF_MENU = 0x427, + // IA2_ROLE_TERMINAL = 0x428, + // IA2_ROLE_TEXT_FRAME = 0x429, + // IA2_ROLE_TOGGLE_BUTTON = 0x42A, + // IA2_ROLE_VIEW_PORT = 0x42B, + ComplementaryContent = 0x42C, + + UserRole = 0x0000ffff + }; + Q_ENUM(Role) + + enum Text { + Name = 0, + Description, + Value, + Help, + Accelerator, + DebugDescription, + UserText = 0x0000ffff + }; + + enum RelationFlag { + Label = 0x00000001, + Labelled = 0x00000002, + Controller = 0x00000004, + Controlled = 0x00000008, + AllRelations = 0xffffffff + }; + Q_DECLARE_FLAGS(Relation, RelationFlag) + + enum InterfaceType + { + TextInterface, + EditableTextInterface, + ValueInterface, + ActionInterface, + ImageInterface, + TableInterface, + TableCellInterface, + HyperlinkInterface + }; + + enum TextBoundaryType { + CharBoundary, + WordBoundary, + SentenceBoundary, + ParagraphBoundary, + LineBoundary, + NoBoundary + }; + + typedef QAccessibleInterface*(*InterfaceFactory)(const QString &key, QObject*); + typedef void(*UpdateHandler)(QAccessibleEvent *event); + typedef void(*RootObjectHandler)(QObject*); + + typedef unsigned Id; + + static void installFactory(InterfaceFactory); + static void removeFactory(InterfaceFactory); + static UpdateHandler installUpdateHandler(UpdateHandler); + static RootObjectHandler installRootObjectHandler(RootObjectHandler); + + class Q_GUI_EXPORT ActivationObserver + { + public: + virtual ~ActivationObserver(); + virtual void accessibilityActiveChanged(bool active) = 0; + }; + static void installActivationObserver(ActivationObserver *); + static void removeActivationObserver(ActivationObserver *); + + static QAccessibleInterface *queryAccessibleInterface(QObject *); + static Id uniqueId(QAccessibleInterface *iface); + static QAccessibleInterface *accessibleInterface(Id uniqueId); + static Id registerAccessibleInterface(QAccessibleInterface *iface); + static void deleteAccessibleInterface(Id uniqueId); + + static void updateAccessibility(QAccessibleEvent *event); + + static bool isActive(); + static void setActive(bool active); + static void setRootObject(QObject *object); + + static void cleanup(); + + static QPair< int, int > qAccessibleTextBoundaryHelper(const QTextCursor &cursor, TextBoundaryType boundaryType); + +private: + static UpdateHandler updateHandler; + static RootObjectHandler rootObjectHandler; + + QAccessible() {} + + friend class QAccessibleCache; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation) + +QT_END_NAMESPACE + +#endif // QACCESSIBLE_BASE_H +#endif // QT_CONFIG(accessibility) diff --git a/src/gui/accessible/qaccessiblebridge.cpp b/src/gui/accessible/qaccessiblebridge.cpp index c6a417e063..750a53d90d 100644 --- a/src/gui/accessible/qaccessiblebridge.cpp +++ b/src/gui/accessible/qaccessiblebridge.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessiblebridge.h" @@ -138,4 +102,6 @@ QAccessibleBridgePlugin::~QAccessibleBridgePlugin() QT_END_NAMESPACE +#include "moc_qaccessiblebridge.cpp" + #endif // QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/qaccessiblebridge.h b/src/gui/accessible/qaccessiblebridge.h index 168889135b..c2d7abffc7 100644 --- a/src/gui/accessible/qaccessiblebridge.h +++ b/src/gui/accessible/qaccessiblebridge.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCESSIBLEBRIDGE_H #define QACCESSIBLEBRIDGE_H diff --git a/src/gui/accessible/qaccessiblebridgeutils.cpp b/src/gui/accessible/qaccessiblebridgeutils.cpp index a15b93e31e..994f95fee9 100644 --- a/src/gui/accessible/qaccessiblebridgeutils.cpp +++ b/src/gui/accessible/qaccessiblebridgeutils.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessiblebridgeutils_p.h" #include <QtCore/qmath.h> diff --git a/src/gui/accessible/qaccessiblebridgeutils_p.h b/src/gui/accessible/qaccessiblebridgeutils_p.h index f34fcc5816..b65a4d0b6c 100644 --- a/src/gui/accessible/qaccessiblebridgeutils_p.h +++ b/src/gui/accessible/qaccessiblebridgeutils_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCESSIBLEBRIDGEUTILS_H #define QACCESSIBLEBRIDGEUTILS_H diff --git a/src/gui/accessible/qaccessiblecache.cpp b/src/gui/accessible/qaccessiblecache.cpp index 84d0936386..487d79a1f5 100644 --- a/src/gui/accessible/qaccessiblecache.cpp +++ b/src/gui/accessible/qaccessiblecache.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessiblecache_p.h" #include <QtCore/qdebug.h> @@ -215,4 +179,6 @@ void QAccessibleCache::deleteInterface(QAccessible::Id id, QObject *obj) QT_END_NAMESPACE +#include "moc_qaccessiblecache_p.cpp" + #endif diff --git a/src/gui/accessible/qaccessiblecache_mac.mm b/src/gui/accessible/qaccessiblecache_mac.mm index 3f49eb98fd..77a9613d38 100644 --- a/src/gui/accessible/qaccessiblecache_mac.mm +++ b/src/gui/accessible/qaccessiblecache_mac.mm @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessiblecache_p.h" diff --git a/src/gui/accessible/qaccessiblecache_p.h b/src/gui/accessible/qaccessiblecache_p.h index 387a54e783..d846806bc5 100644 --- a/src/gui/accessible/qaccessiblecache_p.h +++ b/src/gui/accessible/qaccessiblecache_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCESSIBLECACHE_P #define QACCESSIBLECACHE_P diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index 771cfda574..c9a5d405f4 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qaccessibleobject.h" diff --git a/src/gui/accessible/qaccessibleobject.h b/src/gui/accessible/qaccessibleobject.h index fd07d33a18..23b2d630ea 100644 --- a/src/gui/accessible/qaccessibleobject.h +++ b/src/gui/accessible/qaccessibleobject.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCESSIBLEOBJECT_H #define QACCESSIBLEOBJECT_H diff --git a/src/gui/accessible/qaccessibleplugin.cpp b/src/gui/accessible/qaccessibleplugin.cpp index 27497858b5..b8baf09de0 100644 --- a/src/gui/accessible/qaccessibleplugin.cpp +++ b/src/gui/accessible/qaccessibleplugin.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <QtCore/qglobal.h> @@ -48,6 +12,7 @@ QT_BEGIN_NAMESPACE /*! \class QAccessiblePlugin + \inmodule QtGui \brief The QAccessiblePlugin class provides an abstract base class for plugins provinding accessibility information for user interface elements. @@ -89,4 +54,6 @@ QAccessiblePlugin::~QAccessiblePlugin() QT_END_NAMESPACE +#include "moc_qaccessibleplugin.cpp" + #endif // QT_NO_ACCESSIBILITY diff --git a/src/gui/accessible/qaccessibleplugin.h b/src/gui/accessible/qaccessibleplugin.h index 04169fdeac..3375bfcbda 100644 --- a/src/gui/accessible/qaccessibleplugin.h +++ b/src/gui/accessible/qaccessibleplugin.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QACCESSIBLEPLUGIN_H #define QACCESSIBLEPLUGIN_H diff --git a/src/gui/accessible/qplatformaccessibility.cpp b/src/gui/accessible/qplatformaccessibility.cpp index 75caeec5dc..9995399aeb 100644 --- a/src/gui/accessible/qplatformaccessibility.cpp +++ b/src/gui/accessible/qplatformaccessibility.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qplatformaccessibility.h" #include <private/qfactoryloader_p.h> #include "qaccessibleplugin.h" @@ -47,11 +11,13 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + #ifndef QT_NO_ACCESSIBILITY /* accessiblebridge plugin discovery stuff */ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, bridgeloader, - (QAccessibleBridgeFactoryInterface_iid, QLatin1String("/accessiblebridge"))) + (QAccessibleBridgeFactoryInterface_iid, "/accessiblebridge"_L1)) Q_GLOBAL_STATIC(QList<QAccessibleBridge *>, bridges) diff --git a/src/gui/accessible/qplatformaccessibility.h b/src/gui/accessible/qplatformaccessibility.h index 5d668c2bd6..2eabfa9e31 100644 --- a/src/gui/accessible/qplatformaccessibility.h +++ b/src/gui/accessible/qplatformaccessibility.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPLATFORMACCESSIBILITY_H #define QPLATFORMACCESSIBILITY_H diff --git a/src/gui/accessible/windows/apisupport/qwindowsuiawrapper.cpp b/src/gui/accessible/windows/apisupport/qwindowsuiawrapper.cpp index 8038e1a3c3..d9ff723a61 100644 --- a/src/gui/accessible/windows/apisupport/qwindowsuiawrapper.cpp +++ b/src/gui/accessible/windows/apisupport/qwindowsuiawrapper.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <initguid.h> diff --git a/src/gui/accessible/windows/apisupport/qwindowsuiawrapper_p.h b/src/gui/accessible/windows/apisupport/qwindowsuiawrapper_p.h index b814295215..05b93f8393 100644 --- a/src/gui/accessible/windows/apisupport/qwindowsuiawrapper_p.h +++ b/src/gui/accessible/windows/apisupport/qwindowsuiawrapper_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QWINDOWSUIAWRAPPER_H #define QWINDOWSUIAWRAPPER_H diff --git a/src/gui/accessible/windows/apisupport/uiaattributeids_p.h b/src/gui/accessible/windows/apisupport/uiaattributeids_p.h index 795cb9e551..2078351a98 100644 --- a/src/gui/accessible/windows/apisupport/uiaattributeids_p.h +++ b/src/gui/accessible/windows/apisupport/uiaattributeids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAATTRIBUTEIDS_H #define UIAATTRIBUTEIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiaclientinterfaces_p.h b/src/gui/accessible/windows/apisupport/uiaclientinterfaces_p.h index a4f3e15baa..fb74042bfa 100644 --- a/src/gui/accessible/windows/apisupport/uiaclientinterfaces_p.h +++ b/src/gui/accessible/windows/apisupport/uiaclientinterfaces_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIACLIENTINTERFACES_H #define UIACLIENTINTERFACES_H diff --git a/src/gui/accessible/windows/apisupport/uiacontroltypeids_p.h b/src/gui/accessible/windows/apisupport/uiacontroltypeids_p.h index b5c5a0a4ff..21d8080bc2 100644 --- a/src/gui/accessible/windows/apisupport/uiacontroltypeids_p.h +++ b/src/gui/accessible/windows/apisupport/uiacontroltypeids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIACONTROLTYPEIDS_H #define UIACONTROLTYPEIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiaerrorids_p.h b/src/gui/accessible/windows/apisupport/uiaerrorids_p.h index 8c2a24dbc7..b965fe5c30 100644 --- a/src/gui/accessible/windows/apisupport/uiaerrorids_p.h +++ b/src/gui/accessible/windows/apisupport/uiaerrorids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAERRORIDS_H #define UIAERRORIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiaeventids_p.h b/src/gui/accessible/windows/apisupport/uiaeventids_p.h index ed6c36834e..7ac6d85ec5 100644 --- a/src/gui/accessible/windows/apisupport/uiaeventids_p.h +++ b/src/gui/accessible/windows/apisupport/uiaeventids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAEVENTIDS_H #define UIAEVENTIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiageneralids_p.h b/src/gui/accessible/windows/apisupport/uiageneralids_p.h index 220554f885..a6fdeceee3 100644 --- a/src/gui/accessible/windows/apisupport/uiageneralids_p.h +++ b/src/gui/accessible/windows/apisupport/uiageneralids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAGENERALIDS_H #define UIAGENERALIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiapatternids_p.h b/src/gui/accessible/windows/apisupport/uiapatternids_p.h index d3f4c9bd7a..0ff463cd36 100644 --- a/src/gui/accessible/windows/apisupport/uiapatternids_p.h +++ b/src/gui/accessible/windows/apisupport/uiapatternids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAPATTERNIDS_H #define UIAPATTERNIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiapropertyids_p.h b/src/gui/accessible/windows/apisupport/uiapropertyids_p.h index 9c14a35271..77fc454e0f 100644 --- a/src/gui/accessible/windows/apisupport/uiapropertyids_p.h +++ b/src/gui/accessible/windows/apisupport/uiapropertyids_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIAPROPERTYIDS_H #define UIAPROPERTYIDS_H diff --git a/src/gui/accessible/windows/apisupport/uiaserverinterfaces_p.h b/src/gui/accessible/windows/apisupport/uiaserverinterfaces_p.h index fde16206da..6cf15cacb0 100644 --- a/src/gui/accessible/windows/apisupport/uiaserverinterfaces_p.h +++ b/src/gui/accessible/windows/apisupport/uiaserverinterfaces_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIASERVERINTERFACES_H #define UIASERVERINTERFACES_H diff --git a/src/gui/accessible/windows/apisupport/uiatypes_p.h b/src/gui/accessible/windows/apisupport/uiatypes_p.h index 0d2e1161e4..465bd07a07 100644 --- a/src/gui/accessible/windows/apisupport/uiatypes_p.h +++ b/src/gui/accessible/windows/apisupport/uiatypes_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef UIATYPES_H #define UIATYPES_H diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp index 8afe77ed46..2a7f1a6db2 100644 --- a/src/gui/animation/qguivariantanimation.cpp +++ b/src/gui/animation/qguivariantanimation.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <QtGui/qtguiglobal.h> #include <QtCore/qvariantanimation.h> diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index f5d26977af..2c009cbc41 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -25,13 +25,17 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system) #### Libraries -qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS) # special case +qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR HURD) # special case qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi) qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb) qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm) qt_find_package(EGL PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl) +if(INTEGRITY AND _qt_igy_gui_libs) + qt_find_package(IntegrityPlatformGraphics + PROVIDED_TARGETS IntegrityPlatformGraphics::IntegrityPlatformGraphics + MODULE_NAME gui QMAKE_LIB integrity_platform_graphics) +endif() qt_find_package(WrapSystemFreetype 2.2.0 PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype) -set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED) if(QT_FEATURE_system_zlib) qt_add_qmake_lib_dependency(freetype zlib) endif() @@ -40,7 +44,7 @@ qt_add_qmake_lib_dependency(fontconfig freetype) qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm) qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz) qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput) -qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG MODULE_NAME gui QMAKE_LIB libjpeg) +qt_find_package(WrapSystemJpeg PROVIDED_TARGETS WrapSystemJpeg::WrapSystemJpeg MODULE_NAME gui QMAKE_LIB libjpeg) qt_find_package(WrapSystemMd4c PROVIDED_TARGETS WrapSystemMd4c::WrapSystemMd4c MODULE_NAME gui QMAKE_LIB libmd4c) qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng) if(QT_FEATURE_system_zlib) @@ -289,11 +293,16 @@ fbGetDisplayByIndex(0); "# FIXME: qmake: ['DEFINES += EGL_API_FB=1', '!integrity: DEFINES += LINUX=1'] ) +set(test_libs EGL::EGL) +if(INTEGRITY AND _qt_igy_gui_libs) + set(test_libs ${test_libs} IntegrityPlatformGraphics::IntegrityPlatformGraphics) +endif() + # egl-openwfd qt_config_compile_test(egl_openwfd LABEL "OpenWFD EGL" LIBRARIES - EGL::EGL + ${test_libs} CODE "#include <wfd.h> @@ -397,10 +406,15 @@ if(WASM) endif() # special case end +set(test_libs GLESv2::GLESv2) +if(INTEGRITY AND _qt_igy_gui_libs) + set(test_libs ${test_libs} IntegrityPlatformGraphics::IntegrityPlatformGraphics) +endif() + qt_config_compile_test(opengles3 LABEL "OpenGL ES 3.0" LIBRARIES - GLESv2::GLESv2 + ${test_libs} # special case begin COMPILE_OPTIONS ${extra_compiler_options} # special case end @@ -425,11 +439,12 @@ glMapBufferRange(GL_ARRAY_BUFFER, 0, 0, GL_MAP_READ_BIT); } ") + # opengles31 qt_config_compile_test(opengles31 LABEL "OpenGL ES 3.1" LIBRARIES - GLESv2::GLESv2 + ${test_libs} CODE "#include <GLES3/gl31.h> @@ -447,7 +462,7 @@ glProgramUniform1i(0, 0, 0); qt_config_compile_test(opengles32 LABEL "OpenGL ES 3.2" LIBRARIES - GLESv2::GLESv2 + ${test_libs} CODE "#include <GLES3/gl32.h> @@ -796,7 +811,7 @@ qt_feature("egl_x11" PRIVATE qt_feature("eglfs" PRIVATE SECTION "Platform plugins" LABEL "EGLFS" - CONDITION NOT ANDROID AND NOT APPLE AND NOT WIN32 AND NOT WASM AND QT_FEATURE_egl + CONDITION NOT ANDROID AND NOT APPLE AND NOT WIN32 AND NOT WASM AND NOT QNX AND QT_FEATURE_egl ) qt_feature("eglfs_brcm" PRIVATE LABEL "EGLFS Raspberry Pi" @@ -884,7 +899,7 @@ qt_feature("sessionmanager" PUBLIC qt_feature_definition("sessionmanager" "QT_NO_SESSIONMANAGER" NEGATE VALUE "1") qt_feature("tslib" PRIVATE LABEL "tslib" - CONDITION Tslib_FOUND + CONDITION Tslib_FOUND AND NOT INTEGRITY ) qt_feature("tuiotouch" PRIVATE LABEL "TuioTouch" @@ -1158,7 +1173,6 @@ qt_feature("accessibility" PUBLIC SECTION "Utilities" LABEL "Accessibility" PURPOSE "Provides accessibility support." - CONDITION QT_FEATURE_properties ) qt_feature_definition("accessibility" "QT_NO_ACCESSIBILITY" NEGATE VALUE "1") qt_feature("multiprocess" PRIVATE @@ -1321,7 +1335,7 @@ qt_configure_add_report_entry( ) qt_configure_add_report_entry( TYPE ERROR - MESSAGE "The OpenGL functionality tests failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform." + MESSAGE "The OpenGL functionality tests failed! You might need to modify the OpenGL package search path by setting the OpenGL_DIR CMake variable to the OpenGL library's installation directory." CONDITION QT_FEATURE_gui AND NOT WATCHOS AND ( NOT INPUT_opengl STREQUAL 'no' ) AND NOT QT_FEATURE_opengl_desktop AND NOT QT_FEATURE_opengles2 AND NOT QT_FEATURE_opengl_dynamic ) qt_configure_add_report_entry( diff --git a/src/gui/doc/includes/windows.h b/src/gui/doc/includes/windows.h index aa42233e75..e900698255 100644 --- a/src/gui/doc/includes/windows.h +++ b/src/gui/doc/includes/windows.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #pragma once diff --git a/src/gui/doc/snippets/brush/brush.cpp b/src/gui/doc/snippets/brush/brush.cpp index 947fc1602a..83b5e2108a 100644 --- a/src/gui/doc/snippets/brush/brush.cpp +++ b/src/gui/doc/snippets/brush/brush.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QLinearGradient> namespace brush { diff --git a/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp index 4dce793090..5f98df40f0 100644 --- a/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp +++ b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QBrush> diff --git a/src/gui/doc/snippets/clipboard/clipwindow.cpp b/src/gui/doc/snippets/clipboard/clipwindow.cpp index ae31d01383..4ed0c81f7f 100644 --- a/src/gui/doc/snippets/clipboard/clipwindow.cpp +++ b/src/gui/doc/snippets/clipboard/clipwindow.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtWidgets> #include <QMimeData> diff --git a/src/gui/doc/snippets/clipboard/clipwindow.h b/src/gui/doc/snippets/clipboard/clipwindow.h index 6e4fa0c73a..d22fd4f744 100644 --- a/src/gui/doc/snippets/clipboard/clipwindow.h +++ b/src/gui/doc/snippets/clipboard/clipwindow.h @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #ifndef CLIPWINDOW_H #define CLIPWINDOW_H diff --git a/src/gui/doc/snippets/clipboard/main.cpp b/src/gui/doc/snippets/clipboard/main.cpp index 08d41df483..9d68f539d1 100644 --- a/src/gui/doc/snippets/clipboard/main.cpp +++ b/src/gui/doc/snippets/clipboard/main.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QApplication> diff --git a/src/gui/doc/snippets/code/doc_src_coordsys.cpp b/src/gui/doc/snippets/code/doc_src_coordsys.cpp index df4a0c8c76..03da9ef31a 100644 --- a/src/gui/doc/snippets/code/doc_src_coordsys.cpp +++ b/src/gui/doc/snippets/code/doc_src_coordsys.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> #include <QWidget> diff --git a/src/gui/doc/snippets/code/doc_src_richtext.cpp b/src/gui/doc/snippets/code/doc_src_richtext.cpp index d6c8e3e5d3..8d7e76503a 100644 --- a/src/gui/doc/snippets/code/doc_src_richtext.cpp +++ b/src/gui/doc/snippets/code/doc_src_richtext.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QTextDocument> #include <QTextEdit> diff --git a/src/gui/doc/snippets/code/doc_src_richtext.qdoc b/src/gui/doc/snippets/code/doc_src_richtext.qdoc index 17faf1ac86..39e29caa8d 100644 --- a/src/gui/doc/snippets/code/doc_src_richtext.qdoc +++ b/src/gui/doc/snippets/code/doc_src_richtext.qdoc @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [7] <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" /> diff --git a/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp index 9bbbbc32a7..621d00a401 100644 --- a/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp +++ b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QAccessible> namespace src_gui_accessible_qaccessible { diff --git a/src/gui/doc/snippets/code/src_gui_image_qicon.cpp b/src/gui/doc/snippets/code/src_gui_image_qicon.cpp index f70426e5f1..d446f16c3c 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qicon.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qicon.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QIcon> #include <QPainter> #include <QToolButton> diff --git a/src/gui/doc/snippets/code/src_gui_image_qimage.cpp b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp index cbc2aaae33..759b085be4 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qimage.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QImage> #include <QRgb> diff --git a/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp index 88330523b3..c703cc580a 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QImage> #include <QImageReader> diff --git a/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp index 1bf141d8f9..98b1fcdc9d 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QImage> #include <QImageWriter> diff --git a/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp index c9371ba1b5..390f69a703 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QLabel> #include <QMovie> diff --git a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp index 9c52a5075f..2ef59d8f24 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QBitmap> #include <QPixmap> diff --git a/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp index 80be2af9bd..9d2566c540 100644 --- a/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp +++ b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> #include <QPixmap> #include <QPixmapCache> diff --git a/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp index fa2e9d1269..a608312424 100644 --- a/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp +++ b/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QStandardItemModel> #include <QTreeView> #include <QWidget> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qaction.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qaction.cpp index 763238076c..054b40d7c0 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qaction.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qaction.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [0] QApplication app(argc, argv); diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp index fafffc3d08..ab8521b465 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QApplication> #include <QStyleFactory> #include <QWidget> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp index 55e24c3be3..61792521ca 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QClipboard> #include <QGuiApplication> #include <QMimeData> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp index 7ae0444d06..c24e755e92 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QWheelEvent> namespace src_gui_kernel_qevent { diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp index d26a15f783..e9a2446b91 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QApplication> #include <QMessageBox> #include <QSessionManager> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp index 1030cc71e2..b73f887af2 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QCursor> #include <QGuiApplication> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp index 6ba5bde2e0..0e4c56d8a4 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QKeySequence> #include <QMenu> #include <QTranslator> diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qshortcut.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qshortcut.cpp index 370afd0679..d67aea1288 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qshortcut.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qshortcut.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [0] shortcut = new QShortcut(QKeySequence(tr("Ctrl+O", "File|Open")), diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp index 06a51ef128..c08b318a4d 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QKeySequence> namespace src_gui_kernel_qshortcutmap { diff --git a/src/gui/doc/snippets/code/src_gui_math3d_qquaternion.cpp b/src/gui/doc/snippets/code/src_gui_math3d_qquaternion.cpp index 47c571c299..6f27ba9db9 100644 --- a/src/gui/doc/snippets/code/src_gui_math3d_qquaternion.cpp +++ b/src/gui/doc/snippets/code/src_gui_math3d_qquaternion.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QQuaternion> #include <QVector3D> diff --git a/src/gui/doc/snippets/code/src_gui_opengl_qopenglfunctions.cpp b/src/gui/doc/snippets/code/src_gui_opengl_qopenglfunctions.cpp index 946e3caef5..14531446a1 100644 --- a/src/gui/doc/snippets/code/src_gui_opengl_qopenglfunctions.cpp +++ b/src/gui/doc/snippets/code/src_gui_opengl_qopenglfunctions.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QOpenGLFunctions> #include <QtOpenGL/QOpenGLWindow> diff --git a/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp index 842a547f83..69eedff7d1 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> namespace src_gui_painting_qbrush { diff --git a/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp index ecb52d0756..0a2bc832ff 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> namespace src_gui_painting_qcolor { diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp index 3a72c2aed8..17436c9de5 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QOpenGLFunctions> #include <QPaintEvent> #include <QPainter> diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp index f11b6f59c5..cd538b750c 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QLinearGradient> #include <QPainter> #include <QPainterPath> diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp index 973037cf42..a9c21afb9f 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> #include <QPen> diff --git a/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp index a1123564aa..6401c29de5 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPaintEvent> #include <QPainter> diff --git a/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp index d45521a791..26a95566d4 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QRegion> namespace src_gui_painting_qregion_unix { diff --git a/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp index 97b9ee8af9..fbc6d9add8 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause namespace src_gui_painting_qtransform { /* wrap non-code snippets diff --git a/src/gui/doc/snippets/code/src_gui_text_qfont.cpp b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp index 5bd5e69009..d62730e918 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qfont.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QFont> #include <QFontInfo> #include <QFontMetrics> diff --git a/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp index 3c0da7691f..33a82f8dd1 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QFont> #include <QFontMetrics> diff --git a/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp index 063d189e78..fa4798ea04 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QChar> #include <QList> #include <QRegularExpression> diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp index 8e3825cb14..1438474b98 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QImage> #include <QTextCursor> #include <QTextDocument> diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp index 21e1f85ce7..570728f41d 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause namespace src_gui_text_qtextdocument { /* wrap non-code snippet diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp index d05dffcbc4..a55857cb88 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QTextDocumentWriter> namespace src_gui_text_qtextdocumentwriter { diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp index 4a156edac9..2602c2ced0 100644 --- a/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp +++ b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QFont> #include <QFontMetrics> #include <QPainter> diff --git a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp index f1aff54fea..96c8040eb2 100644 --- a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp +++ b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QDesktopServices> #include <QObject> #include <QStandardPaths> @@ -84,7 +37,7 @@ mailto:user@foo.com?subject=Test&body=Just a test void wrapper1() { //! [2] -QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode)); +QDesktopServices::openUrl(QUrl("file:///C:/Program Files", QUrl::TolerantMode)); //! [2] } diff --git a/src/gui/doc/snippets/code/src_gui_util_qundostack.cpp b/src/gui/doc/snippets/code/src_gui_util_qundostack.cpp index 8f59fe9cb3..fe3ced1d02 100644 --- a/src/gui/doc/snippets/code/src_gui_util_qundostack.cpp +++ b/src/gui/doc/snippets/code/src_gui_util_qundostack.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [0] class AppendText : public QUndoCommand diff --git a/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp index 7503c12afb..f562126ffd 100644 --- a/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp +++ b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QLineEdit> #include <QValidator> #include <QWidget> diff --git a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanfunctions.cpp b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanfunctions.cpp index df08418581..a83c6eb7f9 100644 --- a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanfunctions.cpp +++ b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanfunctions.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QVulkanDeviceFunctions> #include <QVulkanFunctions> diff --git a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkaninstance.cpp b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkaninstance.cpp index 1dfd43ad10..bfb7c7c3a4 100644 --- a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkaninstance.cpp +++ b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkaninstance.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QGuiApplication> #include <QVulkanFunctions> diff --git a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanwindow.cpp b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanwindow.cpp index 1f4988ca35..7f9abb638e 100644 --- a/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanwindow.cpp +++ b/src/gui/doc/snippets/code/src_gui_vulkan_qvulkanwindow.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QGuiApplication> #include <QVulkanDeviceFunctions> #include <QVulkanWindow> diff --git a/src/gui/doc/snippets/draganddrop/dragwidget.cpp b/src/gui/doc/snippets/draganddrop/dragwidget.cpp index ba8a0cc39d..4f592de10b 100644 --- a/src/gui/doc/snippets/draganddrop/dragwidget.cpp +++ b/src/gui/doc/snippets/draganddrop/dragwidget.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> #include <QLabel> diff --git a/src/gui/doc/snippets/draganddrop/dragwidget.h b/src/gui/doc/snippets/draganddrop/dragwidget.h index eb069d73d2..2861104a00 100644 --- a/src/gui/doc/snippets/draganddrop/dragwidget.h +++ b/src/gui/doc/snippets/draganddrop/dragwidget.h @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #ifndef DRAGWIDGET_H #define DRAGWIDGET_H diff --git a/src/gui/doc/snippets/draganddrop/main.cpp b/src/gui/doc/snippets/draganddrop/main.cpp index 95a6b3ff00..12e3317a25 100644 --- a/src/gui/doc/snippets/draganddrop/main.cpp +++ b/src/gui/doc/snippets/draganddrop/main.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.cpp b/src/gui/doc/snippets/draganddrop/mainwindow.cpp index 003e57c4fd..c6f4454f5e 100644 --- a/src/gui/doc/snippets/draganddrop/mainwindow.cpp +++ b/src/gui/doc/snippets/draganddrop/mainwindow.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtWidgets> diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.h b/src/gui/doc/snippets/draganddrop/mainwindow.h index 85581e7909..7c24115a4d 100644 --- a/src/gui/doc/snippets/draganddrop/mainwindow.h +++ b/src/gui/doc/snippets/draganddrop/mainwindow.h @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #ifndef MAINWINDOW_H #define MAINWINDOW_H diff --git a/src/gui/doc/snippets/dragging/main.cpp b/src/gui/doc/snippets/dragging/main.cpp index b08a18b894..a266be0fb9 100644 --- a/src/gui/doc/snippets/dragging/main.cpp +++ b/src/gui/doc/snippets/dragging/main.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> diff --git a/src/gui/doc/snippets/dragging/mainwindow.cpp b/src/gui/doc/snippets/dragging/mainwindow.cpp index 5614c9351b..8eecfa53b7 100644 --- a/src/gui/doc/snippets/dragging/mainwindow.cpp +++ b/src/gui/doc/snippets/dragging/mainwindow.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> diff --git a/src/gui/doc/snippets/dragging/mainwindow.h b/src/gui/doc/snippets/dragging/mainwindow.h index fd7f659b2d..9d2a18e55e 100644 --- a/src/gui/doc/snippets/dragging/mainwindow.h +++ b/src/gui/doc/snippets/dragging/mainwindow.h @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #ifndef MAINWINDOW_H #define MAINWINDOW_H diff --git a/src/gui/doc/snippets/droparea/droparea.cpp b/src/gui/doc/snippets/droparea/droparea.cpp index b66cf0c031..6b3583acff 100644 --- a/src/gui/doc/snippets/droparea/droparea.cpp +++ b/src/gui/doc/snippets/droparea/droparea.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QApplication> #include <QClipboard> #include <QMimeData> diff --git a/src/gui/doc/snippets/dropevents/window.cpp b/src/gui/doc/snippets/dropevents/window.cpp index a62b656b64..753bb8705f 100644 --- a/src/gui/doc/snippets/dropevents/window.cpp +++ b/src/gui/doc/snippets/dropevents/window.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QComboBox> #include <QDragEnterEvent> #include <QLabel> diff --git a/src/gui/doc/snippets/droprectangle/window.cpp b/src/gui/doc/snippets/droprectangle/window.cpp index 7b71d4b508..351f4d12c1 100644 --- a/src/gui/doc/snippets/droprectangle/window.cpp +++ b/src/gui/doc/snippets/droprectangle/window.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QDragMoveEvent> #include <QFrame> #include <QMimeData> diff --git a/src/gui/doc/snippets/image/image.cpp b/src/gui/doc/snippets/image/image.cpp index 3f2e7371e0..b1c42d62da 100644 --- a/src/gui/doc/snippets/image/image.cpp +++ b/src/gui/doc/snippets/image/image.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> namespace image { void wrapper0() { diff --git a/src/gui/doc/snippets/image/supportedformat.cpp b/src/gui/doc/snippets/image/supportedformat.cpp index c6a9779ac9..61aed40c57 100644 --- a/src/gui/doc/snippets/image/supportedformat.cpp +++ b/src/gui/doc/snippets/image/supportedformat.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtGui> diff --git a/src/gui/doc/snippets/overview/using-qt-gui.cmake b/src/gui/doc/snippets/overview/using-qt-gui.cmake index 65a3f9034a..4f774c43ff 100644 --- a/src/gui/doc/snippets/overview/using-qt-gui.cmake +++ b/src/gui/doc/snippets/overview/using-qt-gui.cmake @@ -1,2 +1,2 @@ -find_package(Qt6 COMPONENTS Gui REQUIRED) +find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) diff --git a/src/gui/doc/snippets/picture/picture.cpp b/src/gui/doc/snippets/picture/picture.cpp index cdf0dda84b..2faf0dde5f 100644 --- a/src/gui/doc/snippets/picture/picture.cpp +++ b/src/gui/doc/snippets/picture/picture.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QtWidgets> namespace picture { diff --git a/src/gui/doc/snippets/plaintextlayout/window.cpp b/src/gui/doc/snippets/plaintextlayout/window.cpp index 36c061635e..77ed9d4e54 100644 --- a/src/gui/doc/snippets/plaintextlayout/window.cpp +++ b/src/gui/doc/snippets/plaintextlayout/window.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPainter> #include <QTextLayout> #include <QWidget> diff --git a/src/gui/doc/snippets/polygon/polygon.cpp b/src/gui/doc/snippets/polygon/polygon.cpp index 8105ebf491..4afb586135 100644 --- a/src/gui/doc/snippets/polygon/polygon.cpp +++ b/src/gui/doc/snippets/polygon/polygon.cpp @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include <QPolygon> namespace polygon { diff --git a/src/gui/doc/snippets/qfileopenevent/Info.plist b/src/gui/doc/snippets/qfileopenevent/Info.plist index 85311bb037..98ab05e708 100644 --- a/src/gui/doc/snippets/qfileopenevent/Info.plist +++ b/src/gui/doc/snippets/qfileopenevent/Info.plist @@ -1,52 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Samuel Gaist <samuel.gaist@edeltech.ch> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR |