Permalink
Browse files

Autofill manager was always storing forms.

exec() only returns the correct value when the standard buttons are
used.  Change to use the messagebox.buttonRole to determine what button
was pressed.

Issue: 912
  • Loading branch information...
1 parent 10682f2 commit d8e83f65ee738a56ffc0703f065e8c74f08697e7 @icefox icefox committed Feb 6, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/autofillmanager.cpp
@@ -201,7 +201,8 @@ void AutoFillManager::post(const QNetworkRequest &request, const QByteArray &out
messageBox.addButton(tr("Not now"), QMessageBox::RejectRole);
messageBox.addButton(QMessageBox::Yes);
messageBox.setDefaultButton(QMessageBox::Yes);
- switch (messageBox.exec()) {
+ messageBox.exec();
+ switch (messageBox.buttonRole(messageBox.clickedButton())) {
case QMessageBox::DestructiveRole:
m_never.append(url);
return;

0 comments on commit d8e83f6

Please sign in to comment.