diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp index b72864a157dd2b83623384156a233a6cdaf9bda4..c300f3ab9ca94f52c50bae4cfcdfdf4f1746a99b 100644 --- a/src/tools/uic/uic.cpp +++ b/src/tools/uic/uic.cpp @@ -122,13 +122,13 @@ void Uic::writeCopyrightHeader(DomUI *ui) if (comment.size()) out << "/*\n" << comment << "\n*/\n\n"; - out << "/********************************************************************************\n"; - out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; - out << "**\n"; - out << "** Created by: Qt User Interface Compiler version " << QLatin1String(QT_VERSION_STR) << "\n"; - out << "**\n"; - out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; - out << "********************************************************************************/\n\n"; + out << "/********************************************************************************\n"; + out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; + out << "**\n"; + out << "** Created by: Qt User Interface Compiler version " << QLatin1String(QT_VERSION_STR) << "\n"; + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; + out << "********************************************************************************/\n\n"; } // Check the version with a stream reader at the <ui> element. diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 06102ec1d6f013839011a95fd8f55e349e92a30d..3f3a6e7c65dfdd1027fd758ec328122f09f00089 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3400,27 +3400,27 @@ void QFileDialogPrivate::_q_deleteCurrent() if (!index.isValid()) continue; - QString fileName = index.data(QFileSystemModel::FileNameRole).toString(); - QString filePath = index.data(QFileSystemModel::FilePathRole).toString(); - bool isDir = model->isDir(index); + QString fileName = index.data(QFileSystemModel::FileNameRole).toString(); + QString filePath = index.data(QFileSystemModel::FilePathRole).toString(); + bool isDir = model->isDir(index); - QFile::Permissions p(index.parent().data(QFileSystemModel::FilePermissions).toInt()); + QFile::Permissions p(index.parent().data(QFileSystemModel::FilePermissions).toInt()); #ifndef QT_NO_MESSAGEBOX - Q_Q(QFileDialog); - if (!(p & QFile::WriteUser) && (QMessageBox::warning(q_func(), QFileDialog::tr("Delete"), - QFileDialog::tr("'%1' is write protected.\nDo you want to delete it anyway?") - .arg(fileName), - QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)) - return; - else if (QMessageBox::warning(q_func(), QFileDialog::tr("Delete"), - QFileDialog::tr("Are you sure you want to delete '%1'?") - .arg(fileName), - QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) - return; + Q_Q(QFileDialog); + if (!(p & QFile::WriteUser) && (QMessageBox::warning(q_func(), QFileDialog::tr("Delete"), + QFileDialog::tr("'%1' is write protected.\nDo you want to delete it anyway?") + .arg(fileName), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)) + return; + else if (QMessageBox::warning(q_func(), QFileDialog::tr("Delete"), + QFileDialog::tr("Are you sure you want to delete '%1'?") + .arg(fileName), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) + return; #else - if (!(p & QFile::WriteUser)) - return; + if (!(p & QFile::WriteUser)) + return; #endif // QT_NO_MESSAGEBOX // the event loop has run, we can NOT reuse index because the model might have removed it. diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index ac8cd45f9ea6b326013285ece8ba825dc0138f5d..1c5c5416280bfc2bdde45bfca843433122d5fbfb 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -1173,8 +1173,8 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity() if (!proxy) { q->setInputMethodHints(focusItem->inputMethodHints()); } else if (QWidget *widget = proxy->widget()) { - if (QWidget *fw = widget->focusWidget()) - widget = fw; + if (QWidget *fw = widget->focusWidget()) + widget = fw; q->setInputMethodHints(widget->inputMethodHints()); } else { q->setInputMethodHints(0); diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 35c54f102fa6459828065a577d886fe6e43c6406..4a5ae6578aaf806e697e0f614db65c712d263425 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1311,8 +1311,8 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index) if (!lineEdit) emit q->currentTextChanged(text); #ifndef QT_NO_ACCESSIBILITY - QAccessibleValueChangeEvent event(q, text); - QAccessible::updateAccessibility(&event); + QAccessibleValueChangeEvent event(q, text); + QAccessible::updateAccessibility(&event); #endif } @@ -2830,8 +2830,8 @@ void QComboBox::clear() Q_D(QComboBox); d->model->removeRows(0, d->model->rowCount(d->root), d->root); #ifndef QT_NO_ACCESSIBILITY - QAccessibleValueChangeEvent event(this, QString()); - QAccessible::updateAccessibility(&event); + QAccessibleValueChangeEvent event(this, QString()); + QAccessible::updateAccessibility(&event); #endif } @@ -2844,8 +2844,8 @@ void QComboBox::clearEditText() if (d->lineEdit) d->lineEdit->clear(); #ifndef QT_NO_ACCESSIBILITY - QAccessibleValueChangeEvent event(this, QString()); - QAccessible::updateAccessibility(&event); + QAccessibleValueChangeEvent event(this, QString()); + QAccessible::updateAccessibility(&event); #endif } @@ -2858,8 +2858,8 @@ void QComboBox::setEditText(const QString &text) if (d->lineEdit) d->lineEdit->setText(text); #ifndef QT_NO_ACCESSIBILITY - QAccessibleValueChangeEvent event(this, text); - QAccessible::updateAccessibility(&event); + QAccessibleValueChangeEvent event(this, text); + QAccessible::updateAccessibility(&event); #endif } @@ -3004,8 +3004,8 @@ bool QComboBox::event(QEvent *event) case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::HoverMove: - if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) - d->updateHoverControl(he->pos()); + if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) + d->updateHoverControl(he->pos()); break; case QEvent::ShortcutOverride: if (d->lineEdit) diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp index 0d4c6b25c490f344ae66cedc0be88607fd36429d..46f903fa1e6de9dfc395c54ca09314780f1fe1e5 100644 --- a/src/widgets/widgets/qscrollbar.cpp +++ b/src/widgets/widgets/qscrollbar.cpp @@ -479,8 +479,8 @@ bool QScrollBar::event(QEvent *event) case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::HoverMove: - if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) - d_func()->updateHoverControl(he->pos()); + if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) + d_func()->updateHoverControl(he->pos()); break; case QEvent::StyleChange: d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this)); diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index f25a96f0c11b57f28fe7ec77d5b0c9b9920bd2df..f866fe8bdae3b977f0cad0ebf3881baec0fd86c2 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -961,8 +961,8 @@ bool QToolButton::event(QEvent *event) case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::HoverMove: - if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) - d_func()->updateHoverControl(he->pos()); + if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event)) + d_func()->updateHoverControl(he->pos()); break; default: break;