summaryrefslogtreecommitdiff
path: root/src/labs/platform/qquicklabsplatformicon.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-10-18 12:01:20 +0200
committerMitch Curtis <mitch.curtis@qt.io>2021-10-26 15:02:17 +0200
commitd0507b6d5eab28f36cc39c1f46d8a87ab76bb88e (patch)
tree57d3d76c3807f5d2a46b082838b32d8564a0e55b /src/labs/platform/qquicklabsplatformicon.cpp
parentc61cfa84875442ced136653f3734bbdf249098dc (diff)
downloadqtdeclarative-d0507b6d5eab28f36cc39c1f46d8a87ab76bb88e.tar.gz
Rename labs platform types to avoid duplicate type names
Qt Labs Platform and Qt Quick Dialogs contain the same type names, which may cause issues when both modules are imported from QML. This may be the cause of the linker error when building Qt for Web Assembly: wasm-ld: error: duplicate symbol: vtable for QQuickPlatformFontDialog >>> defined in /home/qt/RTA/qt5/6.2.1/wasm_32/./qml/Qt/labs/platform/libqtlabsplatformplugin.a(mocs_compilation.cpp.o) >>> defined in /home/qt/RTA/qt5/6.2.1/wasm_32/lib/libQt6QuickDialogs2QuickImpl.a(mocs_compilation.cpp.o) Fixes: QTBUG-97465 Pick-to: 6.2 Change-Id: I43dfab7cf4f56e4bfcdd4262dcf7d99f82351434 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/labs/platform/qquicklabsplatformicon.cpp')
-rw-r--r--src/labs/platform/qquicklabsplatformicon.cpp81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/labs/platform/qquicklabsplatformicon.cpp b/src/labs/platform/qquicklabsplatformicon.cpp
new file mode 100644
index 0000000000..a3d0f325f4
--- /dev/null
+++ b/src/labs/platform/qquicklabsplatformicon.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Labs Platform module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquicklabsplatformicon_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QUrl QQuickLabsPlatformIcon::source() const
+{
+ return m_source;
+}
+
+void QQuickLabsPlatformIcon::setSource(const QUrl& source)
+{
+ m_source = source;
+}
+
+QString QQuickLabsPlatformIcon::name() const
+{
+ return m_name;
+}
+
+void QQuickLabsPlatformIcon::setName(const QString& name)
+{
+ m_name = name;
+}
+
+bool QQuickLabsPlatformIcon::isMask() const
+{
+ return m_mask;
+}
+
+void QQuickLabsPlatformIcon::setMask(bool mask)
+{
+ m_mask = mask;
+}
+
+bool QQuickLabsPlatformIcon::operator==(const QQuickLabsPlatformIcon &other) const
+{
+ return m_source == other.m_source && m_name == other.m_name && m_mask == other.m_mask;
+}
+
+bool QQuickLabsPlatformIcon::operator!=(const QQuickLabsPlatformIcon &other) const
+{
+ return !(*this == other);
+}
+
+QT_END_NAMESPACE