Skip to content

Commit

Permalink
[cleanup] Remove rotten mimeapps.list, generated artifacts, and refer…
Browse files Browse the repository at this point in the history
…ences to Ovi Music. Contributes JB#38022
  • Loading branch information
Andrew Branson committed Mar 17, 2017
1 parent 2d4dccd commit 981b24b
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 183 deletions.
4 changes: 0 additions & 4 deletions data/data.pro
Expand Up @@ -15,10 +15,6 @@ testdata.files = \
hl-examples.xml
INSTALLS += testdata

applications.path = /usr/share/applications
applications.files = mimeapps.list
INSTALLS += applications

XML_FILES = highlight1.xml.in

genreg.input = XML_FILES
Expand Down
48 changes: 0 additions & 48 deletions data/gen-regexps
Expand Up @@ -232,52 +232,4 @@ rx_test ("xxx ~http://maps.ovi.com/#|50.060185|19.9328789|11|0|0|normal.day~ and
# Foreign letters are not part of a URL.
rx_test ("xxx |www.10010.com|四川专区特惠活动进行中 xxx")

# OVI Music URL

ovimusicurl = rx_seq (rx_opt (rx_ci ("https?://")),
"music\\.",
rx_or (rx_seq (rx_ci ("ovi\\."),
rx_or (rx_ci ("mobi"), rx_ci ("com")),
rx_opt (rx_ci ("\\.cn"))),
rx_seq (rx_opt (rx_ci ("mobi\\.")), rx_ci ("ovi\\.com\\.cn"))),
rx_opt ("/"),
rx_opt (hu_suffix))

rx_output (ovimusicurl, "OVIMUSICURL")

rx_test_setup (ovimusicurl, "ovimusic")

rx_test ("xxx |http://music.ovi.com| xxx")
rx_test ("xxx |http://music.ovi.mobi| xxx")
rx_test ("xxx |http://music.ovi.com.cn| xxx")
rx_test ("xxx |http://music.ovi.com/cn/zh/pc| xxx")
rx_test ("xxx |http://music.ovi.mobi/fi/fi/pc| xxx")

rx_test ("xxx (see also: |http://music.ovi.com|) ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/|) ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/file|) ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/file/|) ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com|). note, dot should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/|). ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/file|). ending ) should not be included")
rx_test ("xxx (see also: |http://music.ovi.com/file/|). xxx")

rx_test ("xxx see also: |http://music.ovi.com|. dot should not be included")
rx_test ("xxx see also: |http://music.ovi.com/|. dot should not be included")
rx_test ("xxx see also: |http://music.ovi.com/file|. dot should not be included")
rx_test ("xxx see also: |http://music.ovi.com/file/|. dot should not be included")

rx_test ("xxx see also: |http://music.ovi.com|, comma should not be included")
rx_test ("xxx see also: |http://music.ovi.com/|, comma should not be included")
rx_test ("xxx see also: |http://music.ovi.com/file|, comma should not be included")
rx_test ("xxx see also: |http://music.ovi.com/file/|, comma should not be included")

rx_test ("xxxx See also: |http://music.ovi.com/something_(one_%26_two)| parenss included in the address...")
rx_test ("xxxx See also: |http://music.ovi.com/something_(three_%26_four)|. ... but dot is not")
rx_test ("xxxx See also: |http://music.ovi.com/something_(three_%26_four)|, ... but comma is not")

rx_test ("xxxx (See also: |http://music.ovi.com/something_(five_%26_six)|) this might be tricky")
rx_test ("testing also |music.ovi.com/(bar)baz(bar)bar|.")
rx_test ("testing also |music.ovi.com/(bar)baz(bar)bar|, period.")

rx_run ()
1 change: 0 additions & 1 deletion data/highlight1.xml.in
Expand Up @@ -2,7 +2,6 @@
<actions>
<highlight regexp="([mM][aA][iI][lL][tT][oO]:)?[a-zA-Z0-9_!#$%&amp;'*+/=?^`{|}~-]+(\.[a-zA-Z0-9_!#$%&amp;'*+/=?^`{|}~-]+)*@([a-zA-Z0-9_-]+\.)+[a-zA-Z0-9_-]+" name="email-address"/>
<highlight regexp="@PHONENUMBER@" name="phone-number"/>
<highlight regexp="@OVIMUSICURL@" name="ovi-music-url" specialCaseOf="http-url"/>
<highlight regexp="@HTTPURL@" name="http-url"/>
<highlight regexp="[fF][tT][pP]://([a-zA-Z0-9_]+((:[a-zA-Z0-9_]+)?)@)?([a-zA-Z0-9_\-]+\.)+[a-zA-Z0-9_\-]+(:\d+)?(/([a-zA-Z0-9_/?%:;@&amp;=+$,\-.!~*'#]*[a-zA-Z0-9_/?%:;@&amp;=+$,\-!~*'#]|\([a-zA-Z0-9_/?%:;@&amp;=+$,\-.!~*'#]*\))*)?" name="ftp-url"/>
<highlight regexp="[fF][eE][eE][dD]:(//)?([a-zA-Z0-9_]+((:[a-zA-Z0-9_]+)?)@)?([a-zA-Z0-9_\-]+\.)+[a-zA-Z0-9_\-]+(:\d+)?(/([a-zA-Z0-9_/?%:;@&amp;=+$,\-.!~*'#]*[a-zA-Z0-9_/?%:;@&amp;=+$,\-!~*'#]|\([a-zA-Z0-9_/?%:;@&amp;=+$,\-.!~*'#]*\))*)?" name="feed-url"/>
Expand Down
110 changes: 0 additions & 110 deletions data/mimeapps.list

This file was deleted.

1 change: 0 additions & 1 deletion rpm/libcontentaction-qt5.spec
Expand Up @@ -79,7 +79,6 @@ rm -rf %{buildroot}
%{_datadir}/contentaction/highlight1.xml
%{_datadir}/contentaction/tracker1.xml
%{_libdir}/libcontentaction5.so.*
%exclude %{_datadir}/applications/mimeapps.list

%files devel
%defattr(-,root,root,-)
Expand Down
3 changes: 1 addition & 2 deletions tests/applications/applications.pro
Expand Up @@ -23,8 +23,7 @@ desktop_tests.files = \
gallerywithfilename.desktop \
browser.desktop \
special-browser.desktop \
regexpmatcher.desktop \
ovi-music.desktop
regexpmatcher.desktop
INSTALLS += desktop_tests

unix{
Expand Down
1 change: 0 additions & 1 deletion tests/applications/mimeinfo.cache
Expand Up @@ -11,7 +11,6 @@ x-maemo-nepomuk/music-piece=complexmusic.desktop
x-maemo-urischeme/mailto=emailer.desktop
x-maemo-highlight/email-address=emailer.desktop;
x-maemo-highlight/http-url=browser.desktop;
x-maemo-highlight/ovi-music-url=ovi-music.desktop;
x-maemo-highlight/ftp-url=browser.desktop;
x-maemo-highlight/feed-url=browser.desktop;
x-maemo-highlight/phone-number=caller.desktop;
Expand Down
9 changes: 0 additions & 9 deletions tests/applications/ovi-music.desktop

This file was deleted.

7 changes: 0 additions & 7 deletions tests/test-highlight.sh
Expand Up @@ -129,12 +129,5 @@ strstr "$res" ".*'http://maps.ovi.com/#|50.060185|19.9328789|11|0|0|normal.day'
# A URL immediately followed by non-ascii letters.
strstr "$res" ".*'www.10010.com' browser" || exit 10

# music suite URLs
strstr "$res" ".*'http://music.ovi.com' ovi-music browser" || exit 11
strstr "$res" ".*'http://music.ovi.mobi' ovi-music browser" || exit 11
strstr "$res" ".*'http://music.ovi.com.cn' ovi-music browser" || exit 11
strstr "$res" ".*'http://music.ovi.com/cn/zh/pc' ovi-music browser" || exit 11
strstr "$res" ".*'http://music.ovi.mobi/fi/fi/pc' ovi-music browser" || exit 11

strstr "$res" ".*'"
exit 0

0 comments on commit 981b24b

Please sign in to comment.