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
|
|
|
// Opt-in to new classes during the transition phase.
|
|
|
|
|
// #define QTC_USE_STORE
|
|
|
|
|
|
|
|
|
|
#ifdef QTC_USE_STORE
|
|
|
|
|
|
|
|
|
|
using Key = QByteArray;
|
|
|
|
|
|
|
|
|
|
inline Key keyFromString(const QString &str) { return str.toUtf8(); }
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
2023-08-23 17:51:05 +02:00
|
|
|
using Key = QString;
|
|
|
|
|
|
2023-08-23 18:18:46 +02:00
|
|
|
inline Key keyFromString(const QString &str) { return str; }
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-08-23 17:51:05 +02:00
|
|
|
} // Utils
|