mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Notify user when enumerating audio devices
This commit is contained in:
parent
617d4eaa7f
commit
5014c62bfa
@ -2806,6 +2806,7 @@ void Configuration::impl::load_audio_devices (QAudio::Mode mode, QComboBox * com
|
||||
|
||||
combo_box->clear ();
|
||||
|
||||
Q_EMIT self_->enumerating_audio_devices ();
|
||||
int current_index = -1;
|
||||
auto const& devices = QAudioDeviceInfo::availableDevices (mode);
|
||||
Q_FOREACH (auto const& p, devices)
|
||||
|
@ -293,6 +293,12 @@ public:
|
||||
// the fault condition has been rectified or is transient.
|
||||
Q_SIGNAL void transceiver_failure (QString const& reason) const;
|
||||
|
||||
// signal announces audio devices are being enumerated
|
||||
//
|
||||
// As this can take some time, particularly on Linux, consumers
|
||||
// might like to notify the user.
|
||||
Q_SIGNAL void enumerating_audio_devices ();
|
||||
|
||||
private:
|
||||
class impl;
|
||||
pimpl<impl> m_;
|
||||
|
@ -781,6 +781,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
connect (&m_config, &Configuration::udp_server_changed, m_messageClient, &MessageClient::set_server);
|
||||
connect (&m_config, &Configuration::udp_server_port_changed, m_messageClient, &MessageClient::set_server_port);
|
||||
connect (&m_config, &Configuration::accept_udp_requests_changed, m_messageClient, &MessageClient::enable);
|
||||
connect (&m_config, &Configuration::enumerating_audio_devices, [this] () {
|
||||
showStatusMessage (tr ("Enumerating audio devices"));
|
||||
});
|
||||
|
||||
// set up configurations menu
|
||||
connect (m_multi_settings, &MultiSettings::configurationNameChanged, [this] (QString const& name) {
|
||||
|
Loading…
Reference in New Issue
Block a user