Correct the QFileDialog's delete warning message.

"Are sure you want to delete '%1'?" should be:
"Are you sure you want to delete '%1'?"

Title of the message box should be Delete, not Open.

Task-number: QTBUG-26851
Change-Id: I40933c5e1b231d3d2e3274b4d669267d26ba8cfc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
Mitch Curtis 2012-09-04 12:14:11 +02:00 committed by Qt by Nokia
parent 917b4bec21
commit e525df612c

View File

@ -2764,13 +2764,13 @@ void QFileDialogPrivate::_q_deleteCurrent()
QFile::Permissions p(index.parent().data(QFileSystemModel::FilePermissions).toInt());
#ifndef QT_NO_MESSAGEBOX
Q_Q(QFileDialog);
if (!(p & QFile::WriteUser) && (QMessageBox::warning(q_func(), q_func()->windowTitle(),
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(), q_func()->windowTitle(),
QFileDialog::tr("Are sure you want to delete '%1'?")
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;