File indexing completed on 2024-06-23 05:48:52
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009, 2023 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_UTF16_HPP 0010 #define KASTEN_UTF16_HPP 0011 0012 // Qt 0013 #include <QMetaType> 0014 #include <QString> 0015 0016 struct Utf16 0017 { 0018 public: 0019 Utf16(QChar v); 0020 Utf16(const Utf16&) = default; 0021 Utf16(); 0022 0023 ~Utf16() = default; 0024 0025 Utf16& operator=(const Utf16&) = default; 0026 0027 public: 0028 QString toString() const; 0029 0030 public: 0031 QChar value; 0032 }; 0033 0034 inline Utf16::Utf16() = default; 0035 inline Utf16::Utf16(QChar v) : value(v) {} 0036 0037 inline QString Utf16::toString() const { return QString(value); } 0038 0039 Q_DECLARE_METATYPE(Utf16) 0040 0041 #endif