diff options
author | Liang Qi <liang.qi@qt.io> | 2018-04-26 10:12:21 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-04-26 13:08:13 +0200 |
commit | 1169242f14f9e27cbe4e3360dd47d0825eaf9e60 (patch) | |
tree | 63e79e41bc48b9dc3cd40d3c29bacfd303c3c7b6 /src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h | |
parent | 9f731b6841bbc9b7425a95303369d05be895f949 (diff) | |
parent | f95c18b04e260a633d7a1d7cb0d3aaca01f9782f (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/imports/imports.pro
src/src.pro
Change-Id: Icdc39b6169d15b2102acd0e4d550a8d91e4b0744
Diffstat (limited to 'src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h')
-rw-r--r-- | src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h b/src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h new file mode 100644 index 0000000000..635072adbc --- /dev/null +++ b/src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtQml 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$ +** +****************************************************************************/ + +#ifndef QVERSIONEDPACKET_P_H +#define QVERSIONEDPACKET_P_H + +#include "qpacket_p.h" + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +// QPacket with a fixed data stream version, centrally set by some Connector +template<class Connector> +class QVersionedPacket : public QPacket +{ +public: + QVersionedPacket(const QByteArray &ba) : QPacket(Connector::dataStreamVersion(), ba) {} + QVersionedPacket() : QPacket(Connector::dataStreamVersion()) {} +}; + +QT_END_NAMESPACE + +#endif // QVERSIONEDPACKET_P_H |