aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/streambrowser
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/streambrowser')
-rw-r--r--src/plugins/General/streambrowser/streamwindow.cpp15
-rw-r--r--src/plugins/General/streambrowser/streamwindow.h4
2 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/General/streambrowser/streamwindow.cpp b/src/plugins/General/streambrowser/streamwindow.cpp
index 814196132..8a5db864c 100644
--- a/src/plugins/General/streambrowser/streamwindow.cpp
+++ b/src/plugins/General/streambrowser/streamwindow.cpp
@@ -279,13 +279,14 @@ void StreamWindow::editStream()
EditStreamDialog dialog(this);
dialog.setWindowTitle(tr("Edit Stream"));
- QMap<EditStreamDialog::Key, QString> values;
- values[EditStreamDialog::URL] = m_favoritesModel->item(row, 0)->data().toString();
- values[EditStreamDialog::NAME] = m_favoritesModel->item(row, 0)->text();
- values[EditStreamDialog::GENRE] = m_favoritesModel->item(row, 1)->text();
- values[EditStreamDialog::BITRATE] = m_favoritesModel->item(row, 2)->text();
- values[EditStreamDialog::TYPE] = m_favoritesModel->item(row, 3)->text();
- dialog.setValues(values);
+ QMap<EditStreamDialog::Key, QString> initialValues = {
+ { EditStreamDialog::URL, m_favoritesModel->item(row, 0)->data().toString() },
+ { EditStreamDialog::NAME, m_favoritesModel->item(row, 0)->text() },
+ { EditStreamDialog::GENRE, m_favoritesModel->item(row, 1)->text() },
+ { EditStreamDialog::BITRATE, m_favoritesModel->item(row, 2)->text() },
+ { EditStreamDialog::TYPE, m_favoritesModel->item(row, 3)->text() }
+ };
+ dialog.setValues(initialValues);
if(dialog.exec() == QDialog::Accepted)
{
diff --git a/src/plugins/General/streambrowser/streamwindow.h b/src/plugins/General/streambrowser/streamwindow.h
index 7c878cc56..7c5bfcdc8 100644
--- a/src/plugins/General/streambrowser/streamwindow.h
+++ b/src/plugins/General/streambrowser/streamwindow.h
@@ -42,7 +42,7 @@ class StreamWindow : public QWidget
{
Q_OBJECT
public:
- StreamWindow(QWidget *parent = nullptr);
+ explicit StreamWindow(QWidget *parent = nullptr);
~StreamWindow();
@@ -81,7 +81,7 @@ class StreamsProxyModel: public QSortFilterProxyModel
{
Q_OBJECT
public:
- StreamsProxyModel(QObject *parent) : QSortFilterProxyModel(parent){}
+ explicit StreamsProxyModel(QObject *parent) : QSortFilterProxyModel(parent){}
protected:
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override