From eff295ccaf56fffc44ff7e8bd399677e9008d020 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Sep 2021 18:09:53 +0300 Subject: [PATCH] Cppcheck warnings. --- src/app/puzzle/vpmainwindow.cpp | 1 - src/libs/vwidgets/qtcolorpicker.cpp | 8 ++++---- src/libs/vwidgets/qtcolorpicker.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index fd0ef4c39..42c16d2dc 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -542,7 +542,6 @@ auto VPMainWindow::SaveLayout(const QString &path, QString &error) -> bool { bool success = false; QSaveFile file(path); - // cppcheck-suppress ConfigurationNotChecked if (file.open(QIODevice::WriteOnly)) { VPLayoutFileWriter fileWriter; diff --git a/src/libs/vwidgets/qtcolorpicker.cpp b/src/libs/vwidgets/qtcolorpicker.cpp index 4d77c6edf..4af80d542 100644 --- a/src/libs/vwidgets/qtcolorpicker.cpp +++ b/src/libs/vwidgets/qtcolorpicker.cpp @@ -267,9 +267,9 @@ private: \sa QFrame */ -QtColorPicker::QtColorPicker(QWidget *parent, - int cols, bool enableColorDialog) - : QPushButton(parent), popup(0), withColorDialog(enableColorDialog) +QtColorPicker::QtColorPicker(QWidget *parent, int columns, bool enableColorDialog) + : QPushButton(parent), + withColorDialog(enableColorDialog) { setFocusPolicy(Qt::StrongFocus); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); @@ -286,7 +286,7 @@ QtColorPicker::QtColorPicker(QWidget *parent, dirty = true; // Create color grid popup and connect to it. - popup = new ColorPickerPopup(cols, withColorDialog, this); + popup = new ColorPickerPopup(columns, withColorDialog, this); connect(popup, SIGNAL(selected(const QColor &)), SLOT(setCurrentColor(const QColor &))); connect(popup, SIGNAL(hid()), SLOT(popupClosed())); diff --git a/src/libs/vwidgets/qtcolorpicker.h b/src/libs/vwidgets/qtcolorpicker.h index 1ef681886..8782567a5 100644 --- a/src/libs/vwidgets/qtcolorpicker.h +++ b/src/libs/vwidgets/qtcolorpicker.h @@ -83,10 +83,10 @@ public: auto CustomColors() const -> QVector; - static QColor getColor(const QPoint &pos, bool allowCustomColors = true); + static QColor getColor(const QPoint &point, bool allowCustomColors = true); public Q_SLOTS: - void setCurrentColor(const QColor &col); + void setCurrentColor(const QColor &color); Q_SIGNALS: void colorChanged(const QColor &);