Cppcheck warnings.

develop
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;
QSaveFile file(path);
// cppcheck-suppress ConfigurationNotChecked
if (file.open(QIODevice::WriteOnly))
{
VPLayoutFileWriter fileWriter;

View File

@ -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()));

View File

@ -83,10 +83,10 @@ public:
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:
void setCurrentColor(const QColor &col);
void setCurrentColor(const QColor &color);
Q_SIGNALS:
void colorChanged(const QColor &);