2023-08-23 17:51:05 +02:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-08-23 18:18:46 +02:00
|
|
|
#include "utils_global.h"
|
|
|
|
|
|
2023-08-23 17:51:05 +02:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
namespace Utils {
|
|
|
|
|
|
2023-08-23 18:18:46 +02:00
|
|
|
using Key = QByteArray;
|
|
|
|
|
|
|
|
|
|
inline Key keyFromString(const QString &str) { return str.toUtf8(); }
|
2023-08-24 14:36:01 +02:00
|
|
|
inline QString stringFromKey(const Key &key) { return QString::fromUtf8(key); }
|
2023-08-23 18:18:46 +02:00
|
|
|
|
2023-08-23 17:51:05 +02:00
|
|
|
} // Utils
|