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:
@@ -107,10 +107,10 @@ bool WaitCursorP::isModalDialog(QObject* o) const
|
||||
parent = QWidget::find(window->winId());
|
||||
}
|
||||
while (parent) {
|
||||
QMessageBox* dlg = qobject_cast<QMessageBox*>(parent);
|
||||
auto dlg = qobject_cast<QMessageBox*>(parent);
|
||||
if (dlg && dlg->isModal())
|
||||
return true;
|
||||
QProgressDialog* pd = qobject_cast<QProgressDialog*>(parent);
|
||||
auto pd = qobject_cast<QProgressDialog*>(parent);
|
||||
if (pd)
|
||||
return true;
|
||||
parent = parent->parentWidget();
|
||||
|
||||
Reference in New Issue
Block a user