diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 21:03:34 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 21:03:34 +0000 |
| commit | 7ef8d11baeaf1847ba7f1df5d858f8cffea9300d (patch) | |
| tree | a741fb49db8834efd4b46d760b89082547eb2a9d /src/plugins/General/streambrowser | |
| parent | 6f301f5880f7efce76ed46e7b502830642b87370 (diff) | |
| download | qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.gz qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.bz2 qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.zip | |
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/streambrowser')
| -rw-r--r-- | src/plugins/General/streambrowser/streamwindow.cpp | 15 | ||||
| -rw-r--r-- | src/plugins/General/streambrowser/streamwindow.h | 4 |
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 |
