24#include <QLoggingCategory>
25#include "qmmp_export.h"
27#define QMMP_VERSION_MAJOR 2
28#define QMMP_VERSION_MINOR 3
29#define QMMP_VERSION_PATCH 1
30#define QMMP_VERSION_STABLE 1
32#define QMMP_VERSION_INT (QMMP_VERSION_MAJOR<<16 | QMMP_VERSION_MINOR<<8 | QMMP_VERSION_PATCH)
38#define QStringToFileName(s) TagLib::FileName(reinterpret_cast<const wchar_t *>(s.utf16()))
40#define QStringToFileName(s) s.toLocal8Bit().constData()
43#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
45#include <QLatin1String>
48inline namespace Literals {
49inline namespace StringLiterals {
51inline QString
operator""_s(
const char16_t *str,
size_t size)
noexcept
53 return QString(QStringPrivate(
nullptr,
const_cast<char16_t *
>(str), qsizetype(size)));
56constexpr inline QLatin1String
operator""_L1(
const char *str,
size_t size)
noexcept
58 return QLatin1String(str,
int(size));
61inline QByteArray
operator""_ba(
const char *str,
size_t size)
noexcept
63 return QByteArray(QByteArrayData(
nullptr,
const_cast<char *
>(str), qsizetype(size)));
70using QLatin1StringView = QLatin1String;
74using namespace Qt::Literals::StringLiterals;
76QMMP_EXPORT Q_DECLARE_LOGGING_CATEGORY(core)
77QMMP_EXPORT Q_DECLARE_LOGGING_CATEGORY(plugin)
79#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
80#define qCFatal qCCritical
124 UNKNOWN_PROPERTY = -1,
138 REPLAYGAIN_TRACK_GAIN = 0,
139 REPLAYGAIN_TRACK_PEAK,
140 REPLAYGAIN_ALBUM_GAIN,
141 REPLAYGAIN_ALBUM_PEAK
172 CHAN_FRONT_LEFT = 0x01,
173 CHAN_FRONT_RIGHT = 0x02,
174 CHAN_REAR_LEFT = 0x04,
175 CHAN_REAR_RIGHT = 0x08,
176 CHAN_FRONT_CENTER = 0x10,
177 CHAN_REAR_CENTER = 0x20,
178 CHAN_SIDE_LEFT = 0x40,
179 CHAN_SIDE_RIGHT = 0x80,
185 static QString configDir();
189 static void setConfigDir(
const QString &path);
193 static QString cacheDir();
197 static QString strVersion();
201 static QString pluginPath();
206 static QStringList findPlugins(
const QString &prefix);
210 static QString systemLanguageID();
214 static QString uiLanguageID();
219 static void setUiLanguageID(
const QString &code);
223 static QString dataPath();
228 static QString userDataPath();
233 static bool isPortable();
237 static QString m_configDir;
238 static QString m_langID;
240 static QString m_appDir;