]> sigrok.org Git - pulseview.git/commitdiff
Use proposed clang-tidy fixes
authorSoeren Apel <redacted>
Sun, 17 Nov 2019 20:15:04 +0000 (21:15 +0100)
committerSoeren Apel <redacted>
Sun, 24 Nov 2019 19:27:23 +0000 (20:27 +0100)
pv/dialogs/settings.cpp
pv/subwindows/decoder_selector/model.cpp
pv/subwindows/decoder_selector/subwindow.cpp
pv/subwindows/decoder_selector/subwindow.hpp
pv/widgets/popup.hpp

index 55181e4c3e86bc5a7b5cebb6a0c54790ac7a9d07..0dc6b055813ea80320e1ba49ab79ff882854b8a2 100644 (file)
@@ -240,7 +240,7 @@ QWidget *Settings::get_general_settings_form(QWidget *parent) const
        if (current_style.isEmpty())
                style_cb->setCurrentIndex(0);
        else
-               style_cb->setCurrentIndex(style_cb->findText(current_style, 0));
+               style_cb->setCurrentIndex(style_cb->findText(current_style, nullptr));
 
        connect(style_cb, SIGNAL(currentIndexChanged(int)),
                this, SLOT(on_general_style_changed(int)));
index 7b41a39fb129dcdebb5d29f7bc99ed230995b082..dafe4f2d1bf3fe66a4a8473513788f7174540d27 100644 (file)
@@ -128,7 +128,7 @@ QVariant DecoderCollectionModel::data(const QModelIndex& index, int role) const
 Qt::ItemFlags DecoderCollectionModel::flags(const QModelIndex& index) const
 {
        if (!index.isValid())
-               return 0;
+               return nullptr;
 
        return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 }
index 610c61dba107711b0209919b81d725143c2a3eda..63cab9f94a6ab6f7ee9a026570107ed030c54c0b 100644 (file)
@@ -33,7 +33,6 @@
 #include "pv/subwindows/decoder_selector/subwindow.hpp"
 
 using std::reverse;
-using std::shared_ptr;
 
 namespace pv {
 namespace subwindows {
index 6b671cf5451c225e0a9ea4b5aed859da17321f69..c189fb24860efb085a859617e5bd8bf4bcb896eb 100644 (file)
@@ -65,7 +65,7 @@ class DecoderCollectionModel : public QAbstractItemModel
        Q_OBJECT
 
 public:
-       DecoderCollectionModel(QObject* parent = 0);
+       DecoderCollectionModel(QObject* parent = nullptr);
 
        QVariant data(const QModelIndex& index, int role) const override;
        Qt::ItemFlags flags(const QModelIndex& index) const override;
@@ -147,7 +147,7 @@ private:
        QCustomSortFilterProxyModel* sort_filter_model_;
 };
 
-} // decoder_selector
+} // namespace decoder_selector
 } // namespace subwindows
 } // namespace pv
 
index 736313c79d9615ae890a7c585027483b3761f87d..879c5f9d83542e3a4fc50485441554cabdc9ea24 100644 (file)
@@ -37,7 +37,7 @@ class QWidthAdjustingScrollArea : public QScrollArea
        Q_OBJECT
 
 public:
-       QWidthAdjustingScrollArea(QWidget* parent = 0);
+       QWidthAdjustingScrollArea(QWidget* parent = nullptr);
        void setWidget(QWidget* w);
        bool eventFilter(QObject* obj, QEvent* ev);
 };