mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T398, style
This commit is contained in:
@@ -45,13 +45,14 @@ namespace BlackGui
|
||||
// audio is optional
|
||||
const bool audio = this->hasAudio();
|
||||
this->setEnabled(audio);
|
||||
ui->le_ExtraInfo->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.");
|
||||
|
||||
bool c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::onLoopbackToggled);
|
||||
Q_ASSERT(c);
|
||||
|
||||
if (audio)
|
||||
{
|
||||
ui->le_ExtraInfo->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.");
|
||||
|
||||
this->initAudioDeviceLists();
|
||||
|
||||
// default
|
||||
@@ -146,7 +147,7 @@ namespace BlackGui
|
||||
ui->cb_SetupAudioOutputDevice->clear();
|
||||
ui->cb_SetupAudioInputDevice->clear();
|
||||
|
||||
for (auto &device : devices)
|
||||
for (const CAudioDeviceInfo &device : devices)
|
||||
{
|
||||
if (device.getType() == CAudioDeviceInfo::InputDevice)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
|
||||
#include <QStringBuilder>
|
||||
#include <QHostInfo>
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -18,7 +19,7 @@ namespace BlackMisc
|
||||
{
|
||||
CAudioDeviceInfo::CAudioDeviceInfo() :
|
||||
m_type(Unknown), m_deviceIndex(invalidDeviceIndex()),
|
||||
m_deviceName(""), m_hostName(QHostInfo::localHostName())
|
||||
m_hostName(QHostInfo::localHostName())
|
||||
{ }
|
||||
|
||||
CAudioDeviceInfo::CAudioDeviceInfo(DeviceType type, const int index, const QString &name) :
|
||||
@@ -29,13 +30,8 @@ namespace BlackMisc
|
||||
QString CAudioDeviceInfo::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
if (this->m_hostName.isEmpty()) return m_deviceName;
|
||||
QString s(this->m_deviceName);
|
||||
s.append(" [");
|
||||
s.append(this->getHostName());
|
||||
s.append("]");
|
||||
return s;
|
||||
if (m_hostName.isEmpty()) { return m_deviceName; }
|
||||
return m_deviceName % QStringLiteral(" [") % this->getHostName() % QStringLiteral("]");
|
||||
}
|
||||
|
||||
} // Voice
|
||||
} // BlackMisc
|
||||
|
||||
Reference in New Issue
Block a user