summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp')
-rw-r--r--Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
index 3811004..03af455 100644
--- a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
+++ b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
@@ -83,25 +83,15 @@ bool QtSoundSelectionStyledItemDelegate::editorEvent(QEvent* event, QAbstractIte
selectedAction->setCheckable(true);
selectedAction->setChecked(true);
}
- auto chooseSoundFile = popUpMenu->addAction(tr("Choose sound fileā€¦"));
selectedAction = popUpMenu->exec(mouseEvent->globalPos(), selectedAction);
if (selectedAction == defaultSound) {
model->setData(index, "defaultSound", Qt::EditRole);
}
- else if (customSoundFile && (selectedAction == customSoundFile)) {
- model->setData(index, customSoundFile->text(), Qt::EditRole);
- }
else if (selectedAction == noSound) {
model->setData(index, "", Qt::EditRole);
}
- else if (selectedAction == chooseSoundFile) {
- auto newPath = QFileDialog::getOpenFileName(0, tr("Choose notification sound file"), "", tr("WAV Files (*.wav)"));
- if (!newPath.isEmpty()) {
- model->setData(index, newPath, Qt::EditRole);
- }
- }
delete popUpMenu;
}