diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-02 15:57:44 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-02 15:57:44 +0100 |
commit | d3e6e732c70ebc2340d6376d727b3c623be23810 (patch) | |
tree | 18d469f02ac36edd04b87a9bfa4886ceef0490f0 /src/widgets/dialogs | |
parent | fdfd63053ae6b10af06553be3c1b15de274bebf7 (diff) | |
parent | ba8d3430029d8c4342e9a47c110ee8c9879818f4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
config.tests/unix/compile.test
src/plugins/platforms/cocoa/qcocoahelpers.mm
src/tools/qlalr/cppgenerator.cpp
Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 34 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 7b59f96f30..288922d740 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3407,27 +3407,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/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index cd5643660d..207b6e3919 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1903,7 +1903,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) "<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>" "<p>Qt is The Qt Company Ltd product developed as an open source " "project. See <a href=\"http://%3/\">%3</a> for more information.</p>" - ).arg(QStringLiteral("2015"), + ).arg(QStringLiteral("2016"), QStringLiteral("qt.io/licensing"), QStringLiteral("qt.io")); QMessageBox *msgBox = new QMessageBox(parent); |