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