Skip to content

Commit

Permalink
chore: replace HTTP by HTTPS in various links
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Nov 16, 2023
1 parent 88b3ca2 commit 9686adc
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/lib/src/reverse-search/reverse-search-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ QList<ReverseSearchEngine> ReverseSearchLoader::getAllReverseSearchEngines() con
ret.insert(3, ReverseSearchEngine(3, savePath("webservices/3.ico"), "Google", "https://www.google.com/searchbyimage?image_url={url}", 3));
ret.insert(4, ReverseSearchEngine(4, savePath("webservices/4.ico"), "TinEye", "https://www.tineye.com/search/?url={url}", 4));
ret.insert(5, ReverseSearchEngine(5, savePath("webservices/5.ico"), "Yandex", "https://yandex.ru/images/search?rpt=imageview&img_url={url}", 5));
ret.insert(6, ReverseSearchEngine(6, savePath("webservices/6.ico"), "waifu2x", "http://waifu2x.udp.jp/index.html?url={url}", 6));
ret.insert(6, ReverseSearchEngine(6, savePath("webservices/6.ico"), "waifu2x", "https://waifu2x.udp.jp/index.html?url={url}", 6));
}

// Load groups
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tests/src/downloader/batch-downloader-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TEST_CASE("BatchDownloader")

SECTION("Single image download")
{
auto img = QSharedPointer<Image>(new Image(site, {{ "file_url", "http://test.com/img/filename.jpg" }}, profile));
auto img = QSharedPointer<Image>(new Image(site, {{ "file_url", "https://test.com/img/filename.jpg" }}, profile));
DownloadQueryImage query(img, site, "out.jpg", "tests/resources/tmp");

SECTION("Valid")
Expand Down
6 changes: 3 additions & 3 deletions src/lib/tests/src/downloader/image-downloader-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ QSharedPointer<Image> createImage(Profile *profile, Site *site, bool noMd5 = fal
}
details["ext"] = "jpg";
details["id"] = "7331";
details["file_url"] = "http://test.com/img/oldfilename.jpg";
details["sample_url"] = "http://test.com/sample/oldfilename.jpg";
details["preview_url"] = "http://test.com/preview/oldfilename.jpg";
details["file_url"] = "https://test.com/img/oldfilename.jpg";
details["sample_url"] = "https://test.com/sample/oldfilename.jpg";
details["preview_url"] = "https://test.com/preview/oldfilename.jpg";
details["page_url"] = "/posts/7331";
details["tags"] = "tag1 tag2 tag3";

Expand Down
14 changes: 7 additions & 7 deletions src/lib/tests/src/filename/filename-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ TEST_CASE("Filename")
details["has_children"] = "true";
details["has_note"] = "true";
details["has_comments"] = "true";
details["file_url"] = "http://test.com/img/oldfilename.jpg";
details["sample_url"] = "http://test.com/sample/oldfilename.jpg";
details["preview_url"] = "http://test.com/preview/oldfilename.jpg";
details["file_url"] = "https://test.com/img/oldfilename.jpg";
details["sample_url"] = "https://test.com/sample/oldfilename.jpg";
details["preview_url"] = "https://test.com/preview/oldfilename.jpg";
details["width"] = "800";
details["height"] = "600";
details["source"] = "http://google.com/";
details["source"] = "https://google.com/";
details["tags_general"] = "tag1 tag2 tag3 test_tag1 test_tag2 test_tag3";
details["tags_artist"] = "artist1";
details["tags_copyright"] = "copyright1 copyright2";
Expand Down Expand Up @@ -842,9 +842,9 @@ TEST_CASE("Filename")

SECTION("FilenameWithMultipleUnderscores")
{
details["file_url"] = "http://test.com/img/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
details["sample_url"] = "http://test.com/sample/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
details["preview_url"] = "http://test.com/preview/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
details["file_url"] = "https://test.com/img/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
details["sample_url"] = "https://test.com/sample/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
details["preview_url"] = "https://test.com/preview/__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2.jpg";
img = ImageFactory::build(site, details, profile);

assertPath(profile, img, "%filename%", "__fubuki_kantai_collection_drawn_by_minosu__23d36b216c1a3f4e219c4642e221e1a2");
Expand Down
42 changes: 21 additions & 21 deletions src/lib/tests/src/functions-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,20 @@ TEST_CASE("Functions")
SECTION("GetExtension")
{
REQUIRE(getExtension(QUrl("")) == QString(""));
REQUIRE(getExtension(QUrl("http://test.com/file")) == QString(""));
REQUIRE(getExtension(QUrl("http://test.com/some.dir/file")) == QString(""));
REQUIRE(getExtension(QUrl("http://test.com/file.jpg")) == QString("jpg"));
REQUIRE(getExtension(QUrl("http://test.com/file.jpg?toto=1")) == QString("jpg"));
REQUIRE(getExtension(QUrl("http://test.com/file.jpg:large")) == QString("jpg"));
REQUIRE(getExtension(QUrl("http://test.com/index.php?image=file.jpg")) == QString("jpg"));
REQUIRE(getExtension(QUrl("https://test.com/file")) == QString(""));
REQUIRE(getExtension(QUrl("https://test.com/some.dir/file")) == QString(""));
REQUIRE(getExtension(QUrl("https://test.com/file.jpg")) == QString("jpg"));
REQUIRE(getExtension(QUrl("https://test.com/file.jpg?toto=1")) == QString("jpg"));
REQUIRE(getExtension(QUrl("https://test.com/file.jpg:large")) == QString("jpg"));
REQUIRE(getExtension(QUrl("https://test.com/index.php?image=file.jpg")) == QString("jpg"));
}
SECTION("SetExtension")
{
REQUIRE(setExtension(QUrl(""), "png") == QUrl(""));
REQUIRE(setExtension(QUrl("http://test.com/file"), "png") == QUrl("http://test.com/file"));
REQUIRE(setExtension(QUrl("http://test.com/file.jpg"), "png") == QUrl("http://test.com/file.png"));
REQUIRE(setExtension(QUrl("http://test.com/file.jpg?toto=1"), "png") == QUrl("http://test.com/file.png?toto=1"));
REQUIRE(setExtension(QUrl("http://test.com/file.jpg:large"), "png") == QUrl("http://test.com/file.png:large"));
REQUIRE(setExtension(QUrl("https://test.com/file"), "png") == QUrl("https://test.com/file"));
REQUIRE(setExtension(QUrl("https://test.com/file.jpg"), "png") == QUrl("https://test.com/file.png"));
REQUIRE(setExtension(QUrl("https://test.com/file.jpg?toto=1"), "png") == QUrl("https://test.com/file.png?toto=1"));
REQUIRE(setExtension(QUrl("https://test.com/file.jpg:large"), "png") == QUrl("https://test.com/file.png:large"));
}

SECTION("Levenshtein")
Expand Down Expand Up @@ -309,20 +309,20 @@ TEST_CASE("Functions")
SECTION("IsUrl")
{
// Valid URLs
REQUIRE(isUrl("http://foo.com/blah_blah"));
REQUIRE(isUrl("http://foo.com/blah_blah_(wikipedia)"));
REQUIRE(isUrl("http://foo.com/blah_(wikipedia)_blah#cite-1"));
REQUIRE(isUrl("http://foo.com/(something)?after=parens"));
REQUIRE(isUrl("http://1337.net"));
REQUIRE(isUrl("http://a.b-c.de"));
REQUIRE(isUrl("http://223.255.255.254"));
REQUIRE(isUrl("https://foo.com/blah_blah"));
REQUIRE(isUrl("https://foo.com/blah_blah_(wikipedia)"));
REQUIRE(isUrl("https://foo.com/blah_(wikipedia)_blah#cite-1"));
REQUIRE(isUrl("https://foo.com/(something)?after=parens"));
REQUIRE(isUrl("https://1337.net"));
REQUIRE(isUrl("https://a.b-c.de"));
REQUIRE(isUrl("https://223.255.255.254"));

// Invalid URLs
REQUIRE(!isUrl("http://"));
REQUIRE(!isUrl("http://."));
REQUIRE(!isUrl("http://?"));
REQUIRE(!isUrl("https://"));
REQUIRE(!isUrl("https://."));
REQUIRE(!isUrl("https://?"));
REQUIRE(!isUrl("//"));
REQUIRE(!isUrl("http:///a"));
REQUIRE(!isUrl("https:///a"));
REQUIRE(!isUrl("foo.com"));
}

Expand Down
14 changes: 7 additions & 7 deletions src/lib/tests/src/models/filtering/post-filter-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ TEST_CASE("PostFilter")
details["has_children"] = "true";
details["has_note"] = "true";
details["has_comments"] = "true";
details["file_url"] = "http://test.com/img/oldfilename.jpg?123456";
details["sample_url"] = "http://test.com/sample/oldfilename.jpg";
details["preview_url"] = "http://test.com/preview/oldfilename.jpg";
details["file_url"] = "https://test.com/img/oldfilename.jpg?123456";
details["sample_url"] = "https://test.com/sample/oldfilename.jpg";
details["preview_url"] = "https://test.com/preview/oldfilename.jpg";
details["page_url"] = "";
details["width"] = "800";
details["height"] = "600";
details["source"] = "http://google.com/toto/toto.jpg";
details["source"] = "https://google.com/toto/toto.jpg";
details["tags_general"] = "tag1 tag2 tag3 ";
details["tags_artist"] = "artist1 ";
details["tags_copyright"] = "copyright1 copyright2 ";
Expand Down Expand Up @@ -88,12 +88,12 @@ TEST_CASE("PostFilter")
QStringList filters;

// No match
filters = PostFilter(QStringList() << "rating:s" << "rating:safe" << "source:http://google.com").match(tokens);
filters = PostFilter(QStringList() << "rating:s" << "rating:safe" << "source:https://google.com").match(tokens);
REQUIRE(filters == QStringList());

// All match
filters = PostFilter(QStringList() << "rating:e" << "rating:explicit" << "source:http://test.com").match(tokens);
REQUIRE(filters == QStringList() << "image is not \"explicit\"" << "image is not \"explicit\"" << "image's source does not starts with \"http://test.com\"");
filters = PostFilter(QStringList() << "rating:e" << "rating:explicit" << "source:https://test.com").match(tokens);
REQUIRE(filters == QStringList() << "image is not \"explicit\"" << "image is not \"explicit\"" << "image's source does not starts with \"https://test.com\"");
}

SECTION("FilterInvert")
Expand Down
10 changes: 5 additions & 5 deletions src/lib/tests/src/models/image-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ TEST_CASE("Image")
details["has_children"] = "true";
details["has_note"] = "true";
details["has_comments"] = "true";
details["file_url"] = "http://test.com/img/oldfilename.jpg?123456";
details["sample_url"] = "http://test.com/sample/oldfilename.jpg";
details["preview_url"] = "http://test.com/preview/oldfilename.jpg";
details["file_url"] = "https://test.com/img/oldfilename.jpg?123456";
details["sample_url"] = "https://test.com/sample/oldfilename.jpg";
details["preview_url"] = "https://test.com/preview/oldfilename.jpg";
details["page_url"] = "/posts/7331";
details["width"] = "800";
details["height"] = "600";
details["source"] = "http://google.com/toto/toto.jpg";
details["source"] = "https://google.com/toto/toto.jpg";
details["tags_general"] = "tag1 tag2 tag3 ";
details["tags_artist"] = "artist1 ";
details["tags_copyright"] = "copyright1 copyright2 ";
Expand Down Expand Up @@ -332,7 +332,7 @@ TEST_CASE("Image")

SECTION("SetUrl")
{
QUrl url("http://google.fr");
QUrl url("https://google.fr");

REQUIRE(img->url() != url);
img->setUrl(url);
Expand Down
6 changes: 3 additions & 3 deletions src/lib/tests/src/models/site-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ TEST_CASE("Site")
}
SECTION("FixUrlRelative")
{
REQUIRE(site->fixUrl("dir/toto.jpg", QUrl("http://test.com/dir/")) == QUrl("http://test.com/dir/dir/toto.jpg"));
REQUIRE(site->fixUrl("toto.jpg", QUrl("http://test.com/dir/file.html")) == QUrl("http://test.com/dir/toto.jpg"));
REQUIRE(site->fixUrl("toto.jpg", QUrl("http://test.com/dir/")) == QUrl("http://test.com/dir/toto.jpg"));
REQUIRE(site->fixUrl("dir/toto.jpg", QUrl("https://test.com/dir/")) == QUrl("https://test.com/dir/dir/toto.jpg"));
REQUIRE(site->fixUrl("toto.jpg", QUrl("https://test.com/dir/file.html")) == QUrl("https://test.com/dir/toto.jpg"));
REQUIRE(site->fixUrl("toto.jpg", QUrl("https://test.com/dir/")) == QUrl("https://test.com/dir/toto.jpg"));
}

SECTION("GetSites")
Expand Down

0 comments on commit 9686adc

Please sign in to comment.