Gui/Mod: handle several compiler warnings:
* ignore -Wfree-nonheap-object for generated code * replace 0 with Qt::NoModifier when creating a QKeyEvent * in Qt 5.14 QCombobox::activated(QString) is deprecated, use textActivated * don't mix QCheckBox::setChecked() with tristate API
This commit is contained in:
@@ -3193,12 +3193,6 @@ static int column;
|
||||
#define yylex ExpressionParserlex
|
||||
int ExpressionParserlex();
|
||||
|
||||
// Parser, defined in ExpressionParser.y
|
||||
# define YYTOKENTYPE
|
||||
#include "ExpressionParser.tab.c"
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Scanner, defined in ExpressionParser.l
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||
@@ -3206,14 +3200,24 @@ int ExpressionParserlex();
|
||||
#elif defined (__GNUC__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
|
||||
// Parser, defined in ExpressionParser.y
|
||||
# define YYTOKENTYPE
|
||||
#include "ExpressionParser.tab.c"
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Scanner, defined in ExpressionParser.l
|
||||
#include "lex.ExpressionParser.c"
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#elif defined (__GNUC__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define strdup _strdup
|
||||
#endif
|
||||
|
||||
@@ -461,11 +461,15 @@ void Quantity_yyerror(char *errorinfo)
|
||||
#endif
|
||||
|
||||
|
||||
// for VC9 (isatty and fileno not supported anymore)
|
||||
//#ifdef _MSC_VER
|
||||
//int isatty (int i) {return _isatty(i);}
|
||||
//int fileno(FILE *stream) {return _fileno(stream);}
|
||||
//#endif
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||
# pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
|
||||
#elif defined (__GNUC__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
# pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
||||
#endif
|
||||
|
||||
namespace QuantityParser {
|
||||
|
||||
@@ -479,22 +483,15 @@ int QuantityLexer();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Scanner, defined in QuantityParser.l
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||
# pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
|
||||
#elif defined (__GNUC__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
#endif
|
||||
#include "QuantityLexer.c"
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#elif defined (__GNUC__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
}
|
||||
|
||||
Quantity Quantity::parse(const QString &string)
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ bool CommandCompleter::eventFilter(QObject *o, QEvent *ev)
|
||||
}
|
||||
case Qt::Key_Tab: {
|
||||
if (this->popup()->isVisible()) {
|
||||
QKeyEvent kevent(ke->type(),Qt::Key_Down,0);
|
||||
QKeyEvent kevent(ke->type(), Qt::Key_Down, Qt::NoModifier);
|
||||
qApp->sendEvent(this->popup(), &kevent);
|
||||
return true;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ bool CommandCompleter::eventFilter(QObject *o, QEvent *ev)
|
||||
}
|
||||
case Qt::Key_Backtab: {
|
||||
if (this->popup()->isVisible()) {
|
||||
QKeyEvent kevent(ke->type(),Qt::Key_Up,0);
|
||||
QKeyEvent kevent(ke->type(), Qt::Key_Up, Qt::NoModifier);
|
||||
qApp->sendEvent(this->popup(), &kevent);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,9 +173,14 @@ DlgDisplayPropertiesImp::~DlgDisplayPropertiesImp()
|
||||
|
||||
void DlgDisplayPropertiesImp::setupConnections()
|
||||
{
|
||||
connect(d->ui.changeMaterial, qOverload<int>(&QComboBox::activated), this, &DlgDisplayPropertiesImp::onChangeMaterialActivated);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
|
||||
connect(d->ui.changeMode, qOverload<const QString&>(&QComboBox::activated), this, &DlgDisplayPropertiesImp::onChangeModeActivated);
|
||||
connect(d->ui.changePlot, qOverload<const QString&>(&QComboBox::activated), this, &DlgDisplayPropertiesImp::onChangePlotActivated);
|
||||
#else
|
||||
connect(d->ui.changeMode, &QComboBox::textActivated, this, &DlgDisplayPropertiesImp::onChangeModeActivated);
|
||||
connect(d->ui.changePlot, &QComboBox::textActivated, this, &DlgDisplayPropertiesImp::onChangePlotActivated);
|
||||
#endif
|
||||
connect(d->ui.changeMaterial, qOverload<int>(&QComboBox::activated), this, &DlgDisplayPropertiesImp::onChangeMaterialActivated);
|
||||
connect(d->ui.buttonColor, &ColorButton::changed, this, &DlgDisplayPropertiesImp::onButtonColorChanged);
|
||||
connect(d->ui.spinTransparency, qOverload<int>(&QSpinBox::valueChanged), this, &DlgDisplayPropertiesImp::onSpinTransparencyValueChanged);
|
||||
connect(d->ui.spinPointSize, qOverload<int>(&QSpinBox::valueChanged), this, &DlgDisplayPropertiesImp::onSpinPointSizeValueChanged);
|
||||
|
||||
@@ -748,8 +748,8 @@ TaskSketcherConstraints::TaskSketcherConstraints(ViewProviderSketch *sketchView)
|
||||
//QMetaObject::connectSlotsByName(this);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General");
|
||||
ui->filterBox->setChecked(hGrp->GetBool("ConstraintFilterEnabled", true) ? Qt::Checked : Qt::Unchecked);
|
||||
ui->filterButton->setEnabled(ui->filterBox->checkState() == Qt::Checked);
|
||||
ui->filterBox->setChecked(hGrp->GetBool("ConstraintFilterEnabled", true));
|
||||
ui->filterButton->setEnabled(ui->filterBox->isChecked());
|
||||
|
||||
createFilterButtonActions();
|
||||
createSettingButtonActions();
|
||||
|
||||
Reference in New Issue
Block a user