Showing the changes to interface/src/scripting/AudioDeviceScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -43,7 +43,7 @@ AudioDeviceScriptingInterface::AudioDeviceScriptingInterface(): QAbstractListMod · 42 unmodified lines | ||
| 43 | 43 | //fill up model |
| 44 | 44 | onDeviceChanged(); |
| 45 | 45 | //set up previously saved device |
| 46 | − SettingsScriptingInterface *settings = SettingsScriptingInterface::getInstance(); | |
| 46 | + SettingsScriptingInterface* settings = SettingsScriptingInterface::getInstance(); | |
| 47 | 47 | const QString inDevice = settings->getValue("audio_input_device").toString(); |
| 48 | 48 | if (inDevice != _currentInputDevice) { |
| 49 | 49 | setInputDeviceAsync(inDevice); |
| @@ -72,7 +72,7 @@ bool AudioDeviceScriptingInterface::setOutputDevice(const QString& deviceName) { · 22 unmodified lines | ||
| 72 | 72 | return result; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | −bool AudioDeviceScriptingInterface::setDeviceFromMenu(const QString &deviceMenuName) { | |
| 75 | +bool AudioDeviceScriptingInterface::setDeviceFromMenu(const QString& deviceMenuName) { | |
| 76 | 76 | QAudio::Mode mode; |
| 77 | 77 | |
| 78 | 78 | if (deviceMenuName.indexOf("for Output") != -1) { |
| @@ -229,33 +229,34 @@ void AudioDeviceScriptingInterface::onDeviceChanged() · 150 unmodified lines | ||
| 229 | 229 | emit deviceChanged(); |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | −void AudioDeviceScriptingInterface::onCurrentInputDeviceChanged(const QString &name) | |
| 232 | +void AudioDeviceScriptingInterface::onCurrentInputDeviceChanged(const QString& name) | |
| 233 | 233 | { |
| 234 | 234 | currentDeviceUpdate(name, QAudio::AudioInput); |
| 235 | 235 | //we got a signal that device changed. Save it now |
| 236 | − SettingsScriptingInterface *settings = SettingsScriptingInterface::getInstance(); | |
| 236 | + SettingsScriptingInterface* settings = SettingsScriptingInterface::getInstance(); | |
| 237 | 237 | settings->setValue("audio_input_device", name); |
| 238 | 238 | emit currentInputDeviceChanged(name); |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | −void AudioDeviceScriptingInterface::onCurrentOutputDeviceChanged(const QString &name) | |
| 241 | +void AudioDeviceScriptingInterface::onCurrentOutputDeviceChanged(const QString& name) | |
| 242 | 242 | { |
| 243 | 243 | currentDeviceUpdate(name, QAudio::AudioOutput); |
| 244 | 244 | //we got a signal that device changed. Save it now |
| 245 | − SettingsScriptingInterface *settings = SettingsScriptingInterface::getInstance(); | |
| 245 | + SettingsScriptingInterface* settings = SettingsScriptingInterface::getInstance(); | |
| 246 | 246 | settings->setValue("audio_output_device", name); |
| 247 | 247 | emit currentOutputDeviceChanged(name); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | −void AudioDeviceScriptingInterface::currentDeviceUpdate(const QString &name, QAudio::Mode mode) | |
| 250 | +void AudioDeviceScriptingInterface::currentDeviceUpdate(const QString& name, QAudio::Mode mode) | |
| 251 | 251 | { |
| 252 | 252 | QVector<int> role; |
| 253 | 253 | role.append(SelectedRole); |
| 254 | 254 | |
| 255 | 255 | for (int i = 0; i < _devices.size(); i++) { |
| 256 | 256 | ScriptingAudioDeviceInfo di = _devices.at(i); |
| 257 | − if (di.mode != mode) | |
| 257 | + if (di.mode != mode) { | |
| 258 | 258 | continue; |
| 259 | + } | |
| 259 | 260 | if (di.selected && di.name != name ) { |
| 260 | 261 | di.selected = false; |
| 261 | 262 | _devices[i] = di; |