fuzz.h: fix upper/lowercase flags

GUI: suppress clazy warnings
This commit is contained in:
gitlost 2024-01-05 22:55:57 +00:00
parent d42eb13841
commit f3a982c1dd
18 changed files with 450 additions and 446 deletions

View file

@ -1,6 +1,6 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2021-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2021-2024 Robin Stuart <rstuart114@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,14 +19,15 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
//#include <QDebug>
#include <QSettings>
#include <QClipboard>
#include <QMimeData>
#include <QSettings>
#include "cliwindow.h"
// Shorthand
#define QSL QStringLiteral
#define QSL QStringLiteral
#define QSEmpty QLatin1String("")
static const int tempMessageTimeout = 2000;
@ -64,13 +65,13 @@ CLIWindow::CLIWindow(BarcodeItem *bc, const bool autoHeight, const double height
btnCLICopy->setIcon(copyIcon);
btnCLIClose->setIcon(closeIcon);
connect(btnCLIClose, SIGNAL( clicked( bool )), SLOT(close()));
connect(btnCLICopy, SIGNAL( clicked( bool )), SLOT(copy_to_clipboard()));
connect(radCLIUnix, SIGNAL(toggled( bool )), SLOT(generate_cli()));
connect(radCLIWin, SIGNAL(toggled( bool )), SLOT(generate_cli()));
connect(chkCLILongOpts, SIGNAL(toggled( bool )), SLOT(generate_cli()));
connect(chkCLIBarcodeName, SIGNAL(toggled( bool )), SLOT(generate_cli()));
connect(chkCLINoEXE, SIGNAL(toggled( bool )), SLOT(generate_cli()));
connect(btnCLIClose, SIGNAL(clicked(bool)), SLOT(close()));
connect(btnCLICopy, SIGNAL(clicked(bool)), SLOT(copy_to_clipboard()));
connect(radCLIUnix, SIGNAL(toggled(bool)), SLOT(generate_cli()));
connect(radCLIWin, SIGNAL(toggled(bool)), SLOT(generate_cli()));
connect(chkCLILongOpts, SIGNAL(toggled(bool)), SLOT(generate_cli()));
connect(chkCLIBarcodeName, SIGNAL(toggled(bool)), SLOT(generate_cli()));
connect(chkCLINoEXE, SIGNAL(toggled(bool)), SLOT(generate_cli()));
generate_cli();
}
@ -107,7 +108,7 @@ void CLIWindow::generate_cli()
chkCLINoEXE->setEnabled(false);
}
QString cmd = m_bc->bc.getAsCLI(radCLIWin->isChecked(), chkCLILongOpts->isChecked(),
chkCLIBarcodeName->isChecked(), noEXE, m_autoHeight, m_heightPerRow, QSL("") /*outfile*/,
chkCLIBarcodeName->isChecked(), noEXE, m_autoHeight, m_heightPerRow, QSEmpty /*outfile*/,
m_xdimdpVars);
txtCLICmd->setPlainText(cmd);

View file

@ -1,6 +1,6 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2009-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,11 +20,11 @@
//#include <QDebug>
#include <QFileDialog>
#include <QUiLoader>
#include <QStringList>
#include <QMessageBox>
#include <QSettings>
#include <QRegularExpression>
#include <QSettings>
#include <QStringList>
#include <QUiLoader>
#include "datawindow.h"
@ -67,7 +67,7 @@ DataWindow::DataWindow(const QString &input, bool isEscaped, int seg_no) : Valid
lastPosn = match.capturedEnd(0);
}
}
out += input.mid(lastPosn);
out += input.midRef(lastPosn);
txtDataInput->setPlainText(out);
statusBarData->showMessage(tr("Converted LFs"), tempMessageTimeout);
} else {
@ -75,11 +75,11 @@ DataWindow::DataWindow(const QString &input, bool isEscaped, int seg_no) : Valid
}
txtDataInput->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(close()));
connect(btnDataClear, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
connect(btnFromFile, SIGNAL( clicked( bool )), SLOT(from_file()));
connect(txtDataInput, SIGNAL( textChanged() ), this, SLOT(text_changed()));
connect(btnCancel, SIGNAL(clicked(bool)), SLOT(close()));
connect(btnDataClear, SIGNAL(clicked(bool)), SLOT(clear_data()));
connect(btnOK, SIGNAL(clicked(bool)), SLOT(okay()));
connect(btnFromFile, SIGNAL(clicked(bool)), SLOT(from_file()));
connect(txtDataInput, SIGNAL(textChanged()), this, SLOT(text_changed()));
btnDataClear->setEnabled(!txtDataInput->toPlainText().isEmpty());
}

View file

@ -1,6 +1,6 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2009-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,16 +19,17 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
//#include <QDebug>
#include <QUiLoader>
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
#include <QStringBuilder>
#include <QUiLoader>
#include "exportwindow.h"
// Shorthand
#define QSL QStringLiteral
#define QSL QStringLiteral
#define QSEmpty QLatin1String("")
ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data)
: m_bc(bc), m_output_data(output_data), m_lines(0)
@ -50,7 +51,7 @@ ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data)
linDestPath->setText(settings.value(QSL("studio/export/destination"),
QDir::toNativeSeparators(QDir::homePath())).toString());
linPrefix->setText(settings.value(QSL("studio/export/file_prefix"), QSL("bcs_")).toString());
linPostfix->setText(settings.value(QSL("studio/export/file_postfix"), QSL("")).toString());
linPostfix->setText(settings.value(QSL("studio/export/file_postfix"), QSEmpty).toString());
cmbFileName->setCurrentIndex(settings.value(QSL("studio/export/name_format"), 0).toInt());
cmbFileType->setCurrentIndex(std::min(settings.value(QSL("studio/export/filetype"), 0).toInt(),
cmbFileType->count() - 1));
@ -60,9 +61,9 @@ ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data)
QIcon folderIcon(QIcon::fromTheme(QSL("folder"), QIcon(QSL(":res/folder.svg"))));
btnDestPath->setIcon(folderIcon);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(close()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(process()));
connect(btnDestPath, SIGNAL( clicked( bool )), SLOT(get_directory()));
connect(btnCancel, SIGNAL(clicked(bool)), SLOT(close()));
connect(btnOK, SIGNAL(clicked(bool)), SLOT(process()));
connect(btnDestPath, SIGNAL(clicked(bool)), SLOT(get_directory()));
m_dataList = m_output_data.split('\n');
m_lines = m_dataList.size();

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2008 by BogDan Vatra <bogdan@licentia.eu> *
* Copyright (C) 2009-2023 by Robin Stuart <rstuart114@gmail.com> *
* Copyright (C) 2009-2024 by Robin Stuart <rstuart114@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -18,11 +18,11 @@
#ifndef Z_MAINWINDOW_H
#define Z_MAINWINDOW_H
#include <QtGui>
#include <QGraphicsItem>
#include <QMainWindow>
#include <QGraphicsScene>
#include <QButtonGroup>
#include <QMainWindow>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QSettings>
class QLabel;
class QShortcut;
@ -54,8 +54,8 @@ public slots:
void update_preview();
void change_options();
void on_fgcolor_clicked();
void on_bgcolor_clicked();
void fgcolor_clicked();
void bgcolor_clicked();
void fgcolor_changed(const QColor& color);
void bgcolor_changed(const QColor& color);
void fgcolor_edited();

View file

@ -1,6 +1,6 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2022-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2022-2024 Robin Stuart <rstuart114@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,8 +19,8 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
//#include <QDebug>
#include <QUiLoader>
#include <QSettings>
#include <QUiLoader>
#include <math.h>
#include "scalewindow.h"
@ -98,16 +98,16 @@ ScaleWindow::ScaleWindow(BarcodeItem *bc, Zint::QZintXdimDpVars *vars, double or
btnScaleUnset->setEnabled(m_vars.set);
btnOK->setIcon(okIcon);
connect(btnCancel, SIGNAL(clicked( bool )), SLOT(close()));
connect(btnScaleUnset, SIGNAL( clicked( bool )), SLOT(unset_scale()));
connect(btnOK, SIGNAL(clicked( bool )), SLOT(okay()));
connect(spnXdim, SIGNAL(valueChanged( double )), SLOT(update_scale()));
connect(cmbXdimUnits, SIGNAL(currentIndexChanged( int )), SLOT(x_dim_units_change()));
connect(btnXdimDefault, SIGNAL(clicked( bool )), SLOT(x_dim_default()));
connect(spnResolution, SIGNAL(valueChanged( int )), SLOT(update_scale()));
connect(cmbResolutionUnits, SIGNAL(currentIndexChanged( int )), SLOT(resolution_units_change()));
connect(btnResolutionDefault, SIGNAL(clicked( bool )), SLOT(resolution_default()));
connect(cmbFileType, SIGNAL(currentIndexChanged( int )), SLOT(update_scale()));
connect(btnCancel, SIGNAL(clicked(bool)), SLOT(close()));
connect(btnScaleUnset, SIGNAL(clicked(bool)), SLOT(unset_scale()));
connect(btnOK, SIGNAL(clicked(bool)), SLOT(okay()));
connect(spnXdim, SIGNAL(valueChanged(double)), SLOT(update_scale()));
connect(cmbXdimUnits, SIGNAL(currentIndexChanged(int)), SLOT(x_dim_units_change()));
connect(btnXdimDefault, SIGNAL(clicked(bool)), SLOT(x_dim_default()));
connect(spnResolution, SIGNAL(valueChanged(int)), SLOT(update_scale()));
connect(cmbResolutionUnits, SIGNAL(currentIndexChanged(int)), SLOT(resolution_units_change()));
connect(btnResolutionDefault, SIGNAL(clicked(bool)), SLOT(resolution_default()));
connect(cmbFileType, SIGNAL(currentIndexChanged(int)), SLOT(update_scale()));
}
ScaleWindow::~ScaleWindow()

View file

@ -1,6 +1,6 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2009-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -20,16 +20,17 @@
//#include <QDebug>
#include <QFile>
#include <QUiLoader>
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
#include <QUiLoader>
#include "sequencewindow.h"
#include "exportwindow.h"
// Shorthand
#define QSL QStringLiteral
#define QSL QStringLiteral
#define QSEmpty QLatin1String("")
SequenceWindow::SequenceWindow(BarcodeItem *bc) : m_bc(bc)
{
@ -46,7 +47,7 @@ SequenceWindow::SequenceWindow(BarcodeItem *bc) : m_bc(bc)
spnSeqEndVal->setValue(settings.value(QSL("studio/sequence/end_value"), 10).toInt());
spnSeqIncVal->setValue(settings.value(QSL("studio/sequence/increment"), 1).toInt());
linSeqFormat->setText(settings.value(QSL("studio/sequence/format"), QSL("$$$$$$")).toString());
txtSeqPreview->setPlainText(settings.value(QSL("studio/sequence/preview"), QSL("")).toString());
txtSeqPreview->setPlainText(settings.value(QSL("studio/sequence/preview"), QSEmpty).toString());
QIcon closeIcon(QIcon::fromTheme(QSL("window-close"), QIcon(QSL(":res/x.svg"))));
QIcon clearIcon(QSL(":res/delete.svg"));
@ -54,12 +55,12 @@ SequenceWindow::SequenceWindow(BarcodeItem *bc) : m_bc(bc)
btnSeqClear->setIcon(clearIcon);
check_generate();
connect(btnSeqClose, SIGNAL( clicked( bool )), SLOT(close()));
connect(btnSeqClear, SIGNAL( clicked( bool )), SLOT(clear_preview()));
connect(btnSeqCreate, SIGNAL( clicked( bool )), SLOT(create_sequence()));
connect(txtSeqPreview, SIGNAL( textChanged()), SLOT(check_generate()));
connect(btnSeqFromFile, SIGNAL( clicked( bool )), SLOT(from_file()));
connect(btnSeqExport, SIGNAL( clicked( bool )), SLOT(generate_sequence()));
connect(btnSeqClose, SIGNAL(clicked(bool)), SLOT(close()));
connect(btnSeqClear, SIGNAL(clicked(bool)), SLOT(clear_preview()));
connect(btnSeqCreate, SIGNAL(clicked(bool)), SLOT(create_sequence()));
connect(txtSeqPreview, SIGNAL(textChanged()), SLOT(check_generate()));
connect(btnSeqFromFile, SIGNAL(clicked(bool)), SLOT(from_file()));
connect(btnSeqExport, SIGNAL(clicked(bool)), SLOT(generate_sequence()));
}
SequenceWindow::~SequenceWindow()