diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2018-09-13 10:04:07 +0200 |
---|---|---|
committer | Rainer Keller <Rainer.Keller@qt.io> | 2018-09-17 13:44:02 +0000 |
commit | cdf465babd7fbf406498d9963be28084d956e290 (patch) | |
tree | eb0f53b770e08702df0a2be2b4f724f39d352c08 /src/imports/opcua/opcuatype.h | |
parent | 7a0eca889996309c04aca65a2fceea2a45d1a343 (diff) |
Convert QLocalizedText to a gadget
This will not add any overhead to execution but saves a lot of QML hassle
because the wrapper that was present before needs to have additional
converter functions to allow QML to unwrap LocalizedText to QLocalizedText
in case it is returned in a QVariant. This happens for example if a node
method called on a server returns such types.
Change-Id: I664c417d1bebdc266764d51d564d12d98a4101a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/imports/opcua/opcuatype.h')
-rw-r--r-- | src/imports/opcua/opcuatype.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/imports/opcua/opcuatype.h b/src/imports/opcua/opcuatype.h deleted file mode 100644 index 8568ec7..0000000 --- a/src/imports/opcua/opcuatype.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt OPC UA module. -** -** $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$ -** -****************************************************************************/ - -#pragma once - -#include <qopcuatype.h> - -QT_BEGIN_NAMESPACE - -class LocalizedText : public QOpcUa::QLocalizedText -{ - Q_GADGET - Q_PROPERTY(QString locale READ locale WRITE setLocale) - Q_PROPERTY(QString text READ text WRITE setText) - -public: - LocalizedText(); - LocalizedText(const QLocalizedText &other); - LocalizedText &operator=(const LocalizedText &); -}; - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(LocalizedText) - |