[rekonq] Review Request: Change the "Paste & Go" action's text to "Paste & Search" if the content of the clipboard is not a URL
Johannes Tröscher
fritz_van_tom at hotmail.com
Fri Aug 26 04:18:42 UTC 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102441/#review6017
-----------------------------------------------------------
i think that's a good idea, but you should show "Paste && Go" if the clipboard is empty, because the user should know that the context menu has this entry if he opens it for the first time.
i've added a few suggestions to improve the check if it's an url.
what if you've not set a default searchEngine yet?
src/urlbar/urlbar.cpp
<http://git.reviewboard.kde.org/r/102441/#comment5306>
make that const
src/urlbar/urlbar.cpp
<http://git.reviewboard.kde.org/r/102441/#comment5307>
QUrl::fromUserInput(clipboardText).isValid() would be a better check if it's an url.
maybe use a ternary operator here.
eg. declare "a = new KAction(this):" and then
a->setText(QUrl::fromUserInput(clipboardText).isValid() ? i18n("Paste && Go") : i18n("Paste && Search"));
- Johannes
On Aug. 25, 2011, 9:53 p.m., Furkan Üzümcü wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102441/
> -----------------------------------------------------------
>
> (Updated Aug. 25, 2011, 9:53 p.m.)
>
>
> Review request for rekonq.
>
>
> Summary
> -------
>
> If the content of the clipboard is not a URL, the "Paste & Go" action's text is changed to "Paste & Search".
>
>
> Diffs
> -----
>
> src/urlbar/urlbar.cpp 04d9698
>
> Diff: http://git.reviewboard.kde.org/r/102441/diff
>
>
> Testing
> -------
>
> Compiles and works.
>
>
> Thanks,
>
> Furkan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rekonq/attachments/20110826/b07b4e7c/attachment.html>
More information about the rekonq
mailing list