Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct behavior of the 'User Agent' menu. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Correct behavior of the 'User Agent' menu. #11

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 31, 2012

Because check state of a menu item (QAction) cannot be controlled in a slot connected to the 'triggered' signal, if the user cancels the dialog for setting a custom user agent string, the 'Other...' item stays checked, which isn't optimal.

This patch corrects that behavior by remembering the previous checked item. This approach was necessary because QAction::data of the 'Default' item is always empty but WebPage::s_userAgent may be either empty or contain the value of QWebPage::userAgentForUrl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant