[Okular-devel] Review Request 108614: Open url in browser
Albert Astals Cid
aacid at kde.org
Sun Mar 10 23:01:34 UTC 2013
> On March 10, 2013, 12:27 a.m., Azat Khuzhin wrote:
> > Seems more appropriate for me. But one more thing, is reg1 still needed?
>
> Jaydeep Solanki wrote:
> Yes, because it prevents "asdfhttp://www.google.com" from getting detected.
>
> Azat Khuzhin wrote:
> I think that for this it is not necessary.
> Because of "\b" in you first regexp.
>
> Jaydeep Solanki wrote:
> No.
> '\b' detects word boundry.
> For example, in "asdfhttp://www.google.com", '/' is not considered as part of a word, so the first 'w' in 'www.' will be considered as boundary, thus detecting 'www.google.com' as a url, which should not be detected.
> A better way to do this is lookbehind assertion, but Qt doesn't support it, so I finally decided to use two regexs.
>
> Azat Khuzhin wrote:
> Yes, it make sense.
>
> BTW qt5 support it https://bugreports.qt-project.org/browse/QTBUG-2371.
> Maybe you want to leave a TODO for qt5?
>
> Jaydeep Solanki wrote:
> Oh, I didn't know that, thanks!
> I'll make sure, this gets improved when kdelibs move to qt5.
Do you think you could implement a unittest (just for the 'static QString getUrl' method) like the ones we have in the tests/ folder? Have you ever used QtTest? If not drop by #okular and ping me.
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108614/#review28857
-----------------------------------------------------------
On March 9, 2013, 8:13 p.m., Jaydeep Solanki wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108614/
> -----------------------------------------------------------
>
> (Updated March 9, 2013, 8:13 p.m.)
>
>
> Review request for Okular.
>
>
> Description
> -------
>
> When selected text is right clicked, it checks for a url, if found, a QAction is added to open the url in the default browser.
>
> pdf with links update : http://goo.gl/wBM6p
>
>
> This addresses bug 281027.
> http://bugs.kde.org/show_bug.cgi?id=281027
>
>
> Diffs
> -----
>
> ui/pageview.cpp b018dfe
>
> Diff: http://git.reviewboard.kde.org/r/108614/diff/
>
>
> Testing
> -------
>
> just check if the icon appears properly, because I have an issue with the icon.
>
>
> Thanks,
>
> Jaydeep Solanki
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20130310/39cb38fa/attachment.html>
More information about the Okular-devel
mailing list