Cppcheck warnings.

This commit is contained in:
Roman Telezhynskyi 2021-09-13 18:09:53 +03:00
parent e56d601761
commit eff295ccaf
3 changed files with 6 additions and 7 deletions

View File

@ -542,7 +542,6 @@ auto VPMainWindow::SaveLayout(const QString &path, QString &error) -> bool
{ {
bool success = false; bool success = false;
QSaveFile file(path); QSaveFile file(path);
// cppcheck-suppress ConfigurationNotChecked
if (file.open(QIODevice::WriteOnly)) if (file.open(QIODevice::WriteOnly))
{ {
VPLayoutFileWriter fileWriter; VPLayoutFileWriter fileWriter;

View File

@ -267,9 +267,9 @@ private:
\sa QFrame \sa QFrame
*/ */
QtColorPicker::QtColorPicker(QWidget *parent, QtColorPicker::QtColorPicker(QWidget *parent, int columns, bool enableColorDialog)
int cols, bool enableColorDialog) : QPushButton(parent),
: QPushButton(parent), popup(0), withColorDialog(enableColorDialog) withColorDialog(enableColorDialog)
{ {
setFocusPolicy(Qt::StrongFocus); setFocusPolicy(Qt::StrongFocus);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
@ -286,7 +286,7 @@ QtColorPicker::QtColorPicker(QWidget *parent,
dirty = true; dirty = true;
// Create color grid popup and connect to it. // 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 &)), connect(popup, SIGNAL(selected(const QColor &)),
SLOT(setCurrentColor(const QColor &))); SLOT(setCurrentColor(const QColor &)));
connect(popup, SIGNAL(hid()), SLOT(popupClosed())); connect(popup, SIGNAL(hid()), SLOT(popupClosed()));

View File

@ -83,10 +83,10 @@ public:
auto CustomColors() const -> QVector<QColor>; auto CustomColors() const -> QVector<QColor>;
static QColor getColor(const QPoint &pos, bool allowCustomColors = true); static QColor getColor(const QPoint &point, bool allowCustomColors = true);
public Q_SLOTS: public Q_SLOTS:
void setCurrentColor(const QColor &col); void setCurrentColor(const QColor &color);
Q_SIGNALS: Q_SIGNALS:
void colorChanged(const QColor &); void colorChanged(const QColor &);