Commit c37affca authored by Hardik Beladiya's avatar Hardik Beladiya Committed by Andreas Cord-Landwehr

Stop sound when leaving config dialog.

REVIEW: 121734
parent bd6928f0
......@@ -217,6 +217,7 @@ void MainWindow::showSettingsDialog()
connect(dialog, SIGNAL(accepted()), appearenceDialog, SLOT(saveSettings()));
connect(dialog, SIGNAL(accepted()), SLOT(updateTrainingPhraseFont()));
connect(dialog, SIGNAL(accepted()), SLOT(updateKcfgUseContributorResources()));
connect(dialog, SIGNAL(finished()), soundDialog, SLOT(stopPlaying()));
dialog->exec();
}
......
......@@ -114,6 +114,11 @@ void SoundDeviceDialogPage::playRecordedSound()
OutputDeviceController::self().play(KUrl::fromLocalFile(m_recordTestFile.fileName()));
}
void SoundDeviceDialogPage::stopPlaying()
{
OutputDeviceController::self().stop();
}
void SoundDeviceDialogPage::recordSound()
{
if (CaptureDeviceController::self().state() == CaptureDeviceController::RecordingState)
......
......@@ -43,6 +43,7 @@ public slots:
void playRecordedSound();
void recordSound();
void updatePlayButtonIcons();
void stopPlaying();
private:
Ui::SoundDeviceDialogPage *ui;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment