Disable automatic conversions from 8-bit strings

This commit is contained in:
Jonas Kvinge
2024-04-11 02:56:01 +02:00
parent 58944993b8
commit 0c6872b352
310 changed files with 2501 additions and 2332 deletions

View File

@@ -28,7 +28,7 @@
#include "alsapcmdevicefinder.h"
#include "enginedevice.h"
AlsaPCMDeviceFinder::AlsaPCMDeviceFinder() : DeviceFinder(QStringLiteral("alsa"), { "alsa", "alsasink" }) {}
AlsaPCMDeviceFinder::AlsaPCMDeviceFinder() : DeviceFinder(QStringLiteral("alsa"), { QStringLiteral("alsa"), QStringLiteral("alsasink") }) {}
EngineDeviceList AlsaPCMDeviceFinder::ListDevices() {
@@ -45,22 +45,22 @@ EngineDeviceList AlsaPCMDeviceFinder::ListDevices() {
char *hint_desc = snd_device_name_get_hint(*n, "DESC");
if (hint_io && hint_name && hint_desc && strcmp(hint_io, "Output") == 0) {
QString name(hint_name);
const QString name = QString::fromUtf8(hint_name);
char *desc_last = hint_desc;
QString description;
for (char *desc_i = hint_desc; desc_i && *desc_i != '\0'; ++desc_i) {
if (*desc_i == '\n') {
*desc_i = '\0';
if (!description.isEmpty()) description.append(' ');
description.append(desc_last);
if (!description.isEmpty()) description.append(QLatin1Char(' '));
description.append(QString::fromUtf8(desc_last));
desc_last = desc_i + 1;
}
}
if (desc_last) {
if (!description.isEmpty()) description.append(' ');
description.append(desc_last);
if (!description.isEmpty()) description.append(QLatin1Char(' '));
description.append(QString::fromUtf8(desc_last));
}
EngineDevice device;