Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. * When possible use a ranged for loop instead of begin() and end() iterators
This commit is contained in:
@@ -69,14 +69,14 @@ TaskCSysDragger::~TaskCSysDragger()
|
||||
|
||||
void TaskCSysDragger::setupGui()
|
||||
{
|
||||
Gui::TaskView::TaskBox *incrementsBox = new Gui::TaskView::TaskBox(
|
||||
auto incrementsBox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("button_valid"),
|
||||
tr("Increments"), true, nullptr);
|
||||
|
||||
QGridLayout *gridLayout = new QGridLayout();
|
||||
auto gridLayout = new QGridLayout();
|
||||
gridLayout->setColumnStretch(1, 1);
|
||||
|
||||
QLabel *tLabel = new QLabel(tr("Translation Increment:"), incrementsBox);
|
||||
auto tLabel = new QLabel(tr("Translation Increment:"), incrementsBox);
|
||||
gridLayout->addWidget(tLabel, 0, 0, Qt::AlignRight);
|
||||
|
||||
int spinBoxWidth = QApplication::fontMetrics().averageCharWidth() * 20;
|
||||
@@ -87,7 +87,7 @@ void TaskCSysDragger::setupGui()
|
||||
tSpinBox->setMinimumWidth(spinBoxWidth);
|
||||
gridLayout->addWidget(tSpinBox, 0, 1, Qt::AlignLeft);
|
||||
|
||||
QLabel *rLabel = new QLabel(tr("Rotation Increment:"), incrementsBox);
|
||||
auto rLabel = new QLabel(tr("Rotation Increment:"), incrementsBox);
|
||||
gridLayout->addWidget(rLabel, 1, 0, Qt::AlignRight);
|
||||
|
||||
rSpinBox = new QuantitySpinBox(incrementsBox);
|
||||
|
||||
Reference in New Issue
Block a user