Warnings fixes on recent compilers

This commit is contained in:
Bertrand Songis
2019-08-12 11:29:34 +02:00
parent b9d64c2ca1
commit 08290d76fb
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -45,14 +45,14 @@ joystickDialog::joystickDialog(QWidget *parent, int stick) :
};
memcpy(jscal, jscaltmp, sizeof (jscal));
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegExp("jsmapCB_[0-9]+"))) {
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegularExpression("jsmapCB_[0-9]+"))) {
populateSourceCombo(cb);
sticks[cb->property("channel").toUInt()] = cb;
}
foreach(QCheckBox *ib, findChildren<QCheckBox *>(QRegExp("ChInv_[0-9]+"))) {
foreach(QCheckBox *ib, findChildren<QCheckBox *>(QRegularExpression("ChInv_[0-9]+"))) {
invert[ib->property("channel").toUInt()] = ib;
}
foreach(QSlider *sl, findChildren<QSlider *>(QRegExp("Ch_[0-9]+"))) {
foreach(QSlider *sl, findChildren<QSlider *>(QRegularExpression("Ch_[0-9]+"))) {
sliders[sl->property("channel").toUInt()] = sl;
}
@@ -100,7 +100,7 @@ void SimulatorLoader::registerSimulators()
path.truncate(path.lastIndexOf('\\'));
dir.setPath(path);
#else
dir = SIMULATOR_LIB_SEARCH_PATH;
dir.setPath(SIMULATOR_LIB_SEARCH_PATH);
#endif
registerSimulators(dir);
}
@@ -444,7 +444,7 @@ QLayout *VirtualJoystickWidget::createNodeValueLayout(QChar type, QLabel *& valL
val->setObjectName(QString("val_%1").arg(type));
val->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
val->setAlignment(Qt::AlignCenter);
val->setMinimumWidth(val->fontMetrics().width("-100 "));
val->setMinimumWidth(val->fontMetrics().horizontalAdvance("-100 "));
QVBoxLayout * layout = new QVBoxLayout();
layout->setContentsMargins(2, 2, 2, 2);
layout->setSpacing(2);