diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index d2fad04b..f1cde27b 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -1,39 +1,65 @@ include(ECMMarkAsTest) set(falkon_autotests_SRCS ) qt5_add_resources(falkon_autotests_SRCS autotests.qrc) macro(falkon_tests) foreach(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp ${falkon_autotests_SRCS}) target_link_libraries(${_testname} Qt5::Test FalkonPrivate) add_test(NAME falkon-${_testname} COMMAND ${_testname}) ecm_mark_as_test(${_testname}) set_tests_properties(falkon-${_testname} PROPERTIES RUN_SERIAL TRUE) endforeach(_testname) endmacro() falkon_tests( qztoolstest cookiestest adblocktest updatertest locationbartest webviewtest webtabtest sqldatabasetest ) set(falkon_autotests_SRCS ${CMAKE_SOURCE_DIR}/tests/modeltest/modeltest.cpp) include_directories(${CMAKE_SOURCE_DIR}/tests/modeltest) falkon_tests( tabmodeltest ) set(falkon_autotests_SRCS passwordbackendtest.cpp) include_directories(${OPENSSL_INCLUDE_DIR}) falkon_tests( databasepasswordbackendtest databaseencryptedpasswordbackendtest ) + +set(falkon_autotests_SRCS + qml/qmltestitem.cpp + qml/qmltesthelper.cpp +) + +macro(falkon_qml_tests) + foreach(_testname ${ARGN}) + add_executable(${_testname} qml/${_testname}.cpp ${falkon_autotests_SRCS}) + target_link_libraries(${_testname} Qt5::Test FalkonPrivate) + add_test(NAME falkon-qml-${_testname} COMMAND ${_testname}) + ecm_mark_as_test(${_testname}) + set_tests_properties(falkon-qml-${_testname} PROPERTIES RUN_SERIAL TRUE) + endforeach(_testname) +endmacro() + +falkon_qml_tests( + qmlbookmarksapitest + qmltopsitesapitest + qmlhistoryapitest + qmlcookiesapitest + qmlclipboardapitest + qmltabsapitest + qmlwindowsapitest + qmluserscriptapitest +) diff --git a/autotests/qml/qmlbookmarksapitest.cpp b/autotests/qml/qmlbookmarksapitest.cpp new file mode 100644 index 00000000..315555de --- /dev/null +++ b/autotests/qml/qmlbookmarksapitest.cpp @@ -0,0 +1,162 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmlbookmarksapitest.h" +#include "autotests.h" +#include "mainapplication.h" +#include "bookmarks.h" +#include "bookmarkitem.h" +#include "qml/api/bookmarks/qmlbookmarktreenode.h" + +void QmlBookmarksApiTest::initTestCase() +{ +} + +void QmlBookmarksApiTest::cleanupTestCase() +{ +} + +void QmlBookmarksApiTest::testBookmarkTreeNodeType() +{ + auto type = BookmarkItem::Type(m_testHelper.evaluate("Falkon.Bookmarks.rootItem().type").toInt()); + QCOMPARE(mApp->bookmarks()->rootItem()->type(), type); + + type = BookmarkItem::Type(m_testHelper.evaluate("Falkon.Bookmarks.toolbarFolder().type").toInt()); + QCOMPARE(mApp->bookmarks()->toolbarFolder()->type(), type); +} + +void QmlBookmarksApiTest::testBookmarkTreeNode() +{ + QObject *bookmark = m_testHelper.evaluateQObject("Falkon.Bookmarks.toolbarFolder()"); + QVERIFY(bookmark); + auto toolbarFolder = mApp->bookmarks()->toolbarFolder(); + + QCOMPARE(toolbarFolder->title(), bookmark->property("title").toString()); + QCOMPARE(toolbarFolder->urlString(), bookmark->property("url").toString()); + QCOMPARE(toolbarFolder->description(), bookmark->property("description").toString()); + QCOMPARE(!mApp->bookmarks()->canBeModified(toolbarFolder), bookmark->property("unmodifiable").toBool()); + QObject* parent = qvariant_cast(bookmark->property("parent")); + QVERIFY(parent); + QCOMPARE(mApp->bookmarks()->rootItem()->title(), parent->property("title").toString()); +} + +void QmlBookmarksApiTest::testBookmarksCreation() +{ + auto item = new BookmarkItem(BookmarkItem::Url); + item->setTitle("Example Domain"); + item->setUrl(QUrl("https://example.com/")); + item->setDescription("Testing bookmark description"); + + QObject *qmlBookmarks = m_testHelper.evaluateQObject("Falkon.Bookmarks"); + QVERIFY(qmlBookmarks); + + QSignalSpy qmlBookmarksSpy(qmlBookmarks, SIGNAL(created(QmlBookmarkTreeNode*))); + mApp->bookmarks()->addBookmark(mApp->bookmarks()->rootItem(), item); + + QCOMPARE(qmlBookmarksSpy.count(), 1); + + QObject *created = qvariant_cast(qmlBookmarksSpy.at(0).at(0)); + QVERIFY(created); + QCOMPARE(item->title(), created->property("title").toString()); + + qRegisterMetaType(); + QSignalSpy bookmarksSpy(mApp->bookmarks(), &Bookmarks::bookmarkAdded); + + auto out = m_testHelper.evaluate("Falkon.Bookmarks.create({" + " parent: Falkon.Bookmarks.toolbarFolder()," + " title: 'Example Plugin'," + " url: 'https://another-example.com'" + "});"); + QVERIFY(out.toBool()); + + QCOMPARE(bookmarksSpy.count(), 1); + BookmarkItem* createdItem = qvariant_cast(bookmarksSpy.at(0).at(0)); + QVERIFY(createdItem); + QCOMPARE(createdItem->title(), QString("Example Plugin")); +} + +void QmlBookmarksApiTest::testBookmarksExistence() +{ + // in continuation from testBookmarksCreation + + auto result = m_testHelper.evaluate("Falkon.Bookmarks.isBookmarked('https://example.com/')").toBool(); + QVERIFY(result); + QCOMPARE(mApp->bookmarks()->isBookmarked(QUrl("https://example.com/")), result); +} + +void QmlBookmarksApiTest::testBookmarksModification() +{ + // in continuation from testBookmarksExistence + + QObject *qmlBookmarks = m_testHelper.evaluateQObject("Falkon.Bookmarks"); + QVERIFY(qmlBookmarks); + + QSignalSpy qmlBookmarksSpy(qmlBookmarks, SIGNAL(changed(QmlBookmarkTreeNode*))); + BookmarkItem* item = mApp->bookmarks()->searchBookmarks("https://example.com/").at(0); + item->setTitle("Modified Example Domain"); + mApp->bookmarks()->changeBookmark(item); + + QCOMPARE(qmlBookmarksSpy.count(), 1); + + QObject *modified = qvariant_cast(qmlBookmarksSpy.at(0).at(0)); + QVERIFY(modified); + QCOMPARE(modified->property("title").toString(), QString("Modified Example Domain")); + + qRegisterMetaType(); + QSignalSpy bookmarksSpy(mApp->bookmarks(), &Bookmarks::bookmarkChanged); + + auto out = m_testHelper.evaluate("Falkon.Bookmarks.update(Falkon.Bookmarks.get('https://another-example.com'),{" + " title: 'Modified Example Plugin'" + "})"); + QVERIFY(out.toBool()); + + QCOMPARE(bookmarksSpy.count(), 1); + BookmarkItem* modifiedItem = qvariant_cast(bookmarksSpy.at(0).at(0)); + QVERIFY(modifiedItem); + QCOMPARE(modifiedItem->title(), QString("Modified Example Plugin")); +} + +void QmlBookmarksApiTest::testBookmarksRemoval() +{ + // in continuation from testBookmarksModification + + QObject *qmlBookmarks = m_testHelper.evaluateQObject("Falkon.Bookmarks"); + QVERIFY(qmlBookmarks); + + QSignalSpy qmlBookmarksSpy(qmlBookmarks, SIGNAL(removed(QmlBookmarkTreeNode*))); + BookmarkItem* item = mApp->bookmarks()->searchBookmarks("https://example.com/").at(0); + mApp->bookmarks()->removeBookmark(item); + + QCOMPARE(qmlBookmarksSpy.count(), 1); + + QObject *removed = qvariant_cast(qmlBookmarksSpy.at(0).at(0)); + QVERIFY(removed); + QCOMPARE(removed->property("title").toString(), QString("Modified Example Domain")); + + qRegisterMetaType(); + QSignalSpy bookmarksSpy(mApp->bookmarks(), &Bookmarks::bookmarkRemoved); + + auto out = m_testHelper.evaluate("Falkon.Bookmarks.remove(Falkon.Bookmarks.get('https://another-example.com'))"); + QVERIFY(out.toBool()); + + QCOMPARE(bookmarksSpy.count(), 1); + BookmarkItem* removedItem = qvariant_cast(bookmarksSpy.at(0).at(0)); + QVERIFY(removedItem); + QCOMPARE(removedItem->title(), QString("Modified Example Plugin")); +} + +FALKONTEST_MAIN(QmlBookmarksApiTest) diff --git a/autotests/qml/qmlbookmarksapitest.h b/autotests/qml/qmlbookmarksapitest.h new file mode 100644 index 00000000..17a90207 --- /dev/null +++ b/autotests/qml/qmlbookmarksapitest.h @@ -0,0 +1,43 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include + +#include "bookmarkitem.h" +#include "qmltesthelper.h" + +class QmlBookmarksApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testBookmarkTreeNodeType(); + void testBookmarkTreeNode(); + + void testBookmarksCreation(); + void testBookmarksExistence(); + void testBookmarksModification(); + void testBookmarksRemoval(); +}; + +Q_DECLARE_METATYPE(BookmarkItem *) diff --git a/autotests/qml/qmlclipboardapitest.cpp b/autotests/qml/qmlclipboardapitest.cpp new file mode 100644 index 00000000..88fb0a2e --- /dev/null +++ b/autotests/qml/qmlclipboardapitest.cpp @@ -0,0 +1,38 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmlclipboardapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include + +void QmlClipboardApiTest::initTestCase() +{ +} + +void QmlClipboardApiTest::cleanupTestCase() +{ +} + +void QmlClipboardApiTest::testClipboard() +{ + m_testHelper.evaluate("Falkon.Clipboard.copy('this text is copied')"); + QCOMPARE(mApp->clipboard()->text(), "this text is copied"); +} + +FALKONTEST_MAIN(QmlClipboardApiTest) diff --git a/autotests/qml/qmlclipboardapitest.h b/autotests/qml/qmlclipboardapitest.h new file mode 100644 index 00000000..f86e953e --- /dev/null +++ b/autotests/qml/qmlclipboardapitest.h @@ -0,0 +1,33 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlClipboardApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testClipboard(); +}; diff --git a/autotests/qml/qmlcookiesapitest.cpp b/autotests/qml/qmlcookiesapitest.cpp new file mode 100644 index 00000000..0270d0d4 --- /dev/null +++ b/autotests/qml/qmlcookiesapitest.cpp @@ -0,0 +1,117 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmlcookiesapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include "cookiejar.h" +#include "qml/api/cookies/qmlcookie.h" +#include + +void QmlCookiesApiTest::initTestCase() +{ +} + +void QmlCookiesApiTest::cleanupTestCase() +{ +} + +void QmlCookiesApiTest::testCookieAdditionRemoval() +{ + QSignalSpy cookieAddSpy(mApp->cookieJar(), &CookieJar::cookieAdded); + m_testHelper.evaluate("Falkon.Cookies.set({" + " name: 'Example'," + " url: '.example.com'," + " expirationDate: Date.now() + 60*1000" + "})"); + QTRY_COMPARE(cookieAddSpy.count(), 1); + QNetworkCookie netCookie = qvariant_cast(cookieAddSpy.at(0).at(0)); + QCOMPARE(netCookie.name(), "Example"); + QObject *object = m_testHelper.evaluateQObject("Falkon.Cookies"); + QVERIFY(object); + QSignalSpy qmlCookieSpy(object, SIGNAL(changed(QVariantMap))); + QNetworkCookie anotherNetCookie; + anotherNetCookie.setName(QString("Hello").toLocal8Bit()); + anotherNetCookie.setDomain(".mydomain.com"); + anotherNetCookie.setExpirationDate(QDateTime::currentDateTime().addSecs(60)); + mApp->webProfile()->cookieStore()->setCookie(anotherNetCookie); + QTRY_COMPARE(qmlCookieSpy.count(), 1); + QVariantMap addedQmlCookieMap = QVariant(qmlCookieSpy.at(0).at(0)).toMap(); + QObject *addedQmlCookie = qvariant_cast(addedQmlCookieMap.value("cookie")); + bool removed = addedQmlCookieMap.value("removed").toBool(); + QCOMPARE(addedQmlCookie->property("name").toString(), "Hello"); + QCOMPARE(removed, false); + + mApp->webProfile()->cookieStore()->deleteCookie(netCookie); + QTRY_COMPARE(qmlCookieSpy.count(), 2); + QVariantMap removedQmlCookieMap = QVariant(qmlCookieSpy.at(1).at(0)).toMap(); + QObject *removedQmlCookie = qvariant_cast(removedQmlCookieMap.value("cookie")); + removed = removedQmlCookieMap.value("removed").toBool(); + QCOMPARE(removedQmlCookie->property("name").toString(), "Example"); + QCOMPARE(removed, true); + + QSignalSpy cookieRemoveSpy(mApp->cookieJar(), &CookieJar::cookieRemoved); + m_testHelper.evaluate("Falkon.Cookies.remove({" + " name: 'Hello'," + " url: '.mydomain.com'," + "})"); + QTRY_COMPARE(cookieRemoveSpy.count(), 1); + netCookie = qvariant_cast(cookieRemoveSpy.at(0).at(0)); + QCOMPARE(netCookie.name(), "Hello"); +} + +void QmlCookiesApiTest::testCookieGet() +{ + QDateTime current = QDateTime::currentDateTime(); + QSignalSpy cookieAddSpy(mApp->cookieJar(), &CookieJar::cookieAdded); + + QNetworkCookie netCookie_1; + netCookie_1.setName(QString("Apple").toLocal8Bit()); + netCookie_1.setDomain(".apple-domain.com"); + netCookie_1.setExpirationDate(current.addSecs(60)); + mApp->webProfile()->cookieStore()->setCookie(netCookie_1); + + QNetworkCookie netCookie_2; + netCookie_2.setName(QString("Mango").toLocal8Bit()); + netCookie_2.setDomain(".mango-domain.com"); + netCookie_2.setExpirationDate(current.addSecs(120)); + mApp->webProfile()->cookieStore()->setCookie(netCookie_2); + + QNetworkCookie netCookie_3; + netCookie_3.setName(QString("Mango").toLocal8Bit()); + netCookie_3.setDomain(".yet-another-mango-domain.com"); + netCookie_3.setExpirationDate(current.addSecs(180)); + mApp->webProfile()->cookieStore()->setCookie(netCookie_3); + + QTRY_COMPARE(cookieAddSpy.count(), 3); + + QObject *mangoCookie = m_testHelper.evaluateQObject("Falkon.Cookies.get({" + " name: 'Mango'," + " url: '.mango-domain.com'" + "})"); + QVERIFY(mangoCookie); + QCOMPARE(mangoCookie->property("name").toString(), "Mango"); + // FIXME: Here current.addSecs differes from expirationDate by some ms + // a solution is to convert both to string, but this is not the best solution + QCOMPARE(mangoCookie->property("expirationDate").toDateTime().toString(), current.addSecs(120).toString()); + + QList mangoCookies = m_testHelper.evaluate("Falkon.Cookies.getAll({name: 'Mango'})").toVariant().toList(); + QCOMPARE(mangoCookies.length(), 2); +} + +FALKONTEST_MAIN(QmlCookiesApiTest) diff --git a/autotests/qml/qmlcookiesapitest.h b/autotests/qml/qmlcookiesapitest.h new file mode 100644 index 00000000..9bf6e985 --- /dev/null +++ b/autotests/qml/qmlcookiesapitest.h @@ -0,0 +1,34 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlCookiesApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testCookieAdditionRemoval(); + void testCookieGet(); +}; diff --git a/autotests/qml/qmlhistoryapitest.cpp b/autotests/qml/qmlhistoryapitest.cpp new file mode 100644 index 00000000..02c5d26a --- /dev/null +++ b/autotests/qml/qmlhistoryapitest.cpp @@ -0,0 +1,89 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmlhistoryapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include "history.h" +#include "qml/api/history/qmlhistoryitem.h" +#include "qml/api/history/qmlhistory.h" + +Q_DECLARE_METATYPE(HistoryEntry) + +void QmlHistoryApiTest::initTestCase() +{ +} + +void QmlHistoryApiTest::cleanupTestCase() +{ +} + +void QmlHistoryApiTest::testAddition() +{ + qRegisterMetaType(); + QSignalSpy historySpy(mApp->history(), &History::historyEntryAdded); + m_testHelper.evaluate("Falkon.History.addUrl({" + " url: 'https://example.com'," + " title: 'Example Domain'" + "})"); + QTRY_COMPARE(historySpy.count(), 1); + HistoryEntry entry = qvariant_cast(historySpy.at(0).at(0)); + QCOMPARE(entry.title, "Example Domain"); + + auto object = m_testHelper.evaluateQObject("Falkon.History"); + QSignalSpy qmlHistorySpy(object, SIGNAL(visited(QmlHistoryItem*))); + mApp->history()->addHistoryEntry(QUrl("https://sample.com"), "Sample Domain"); + QTRY_COMPARE(qmlHistorySpy.count(), 1); + mApp->history()->clearHistory(); +} + +void QmlHistoryApiTest::testSearch() +{ + QSignalSpy historySpy(mApp->history(), &History::historyEntryAdded); + mApp->history()->addHistoryEntry(QUrl("https://example.com"), "Example Domain"); + mApp->history()->addHistoryEntry(QUrl("https://another-example.com"), "Another Example Domain"); + mApp->history()->addHistoryEntry(QUrl("https://sample.com"), "Sample Domain"); + QTRY_COMPARE(historySpy.count(), 3); + auto list = m_testHelper.evaluate("Falkon.History.search('example')").toVariant().toList(); + QCOMPARE(list.length(), 2); +} + +void QmlHistoryApiTest::testVisits() +{ + int visits = m_testHelper.evaluate("Falkon.History.getVisits('https://sample.com')").toInt(); + QCOMPARE(visits, 1); + QSignalSpy historySpy(mApp->history(), &History::historyEntryEdited); + mApp->history()->addHistoryEntry(QUrl("https://sample.com"), "Sample Domain"); + QTRY_COMPARE(historySpy.count(), 1); + visits = m_testHelper.evaluate("Falkon.History.getVisits('https://sample.com')").toInt(); + QCOMPARE(visits, 2); +} + +void QmlHistoryApiTest::testRemoval() +{ + QSignalSpy historySpy(mApp->history(), &History::historyEntryDeleted); + m_testHelper.evaluate("Falkon.History.deleteUrl('https://sample.com')"); + QTRY_COMPARE(historySpy.count(), 1); + + auto object = m_testHelper.evaluateQObject("Falkon.History"); + QSignalSpy qmlHistorySpy(object, SIGNAL(visitRemoved(QmlHistoryItem*))); + mApp->history()->deleteHistoryEntry("https://example.com", "Example Domain"); + QTRY_COMPARE(qmlHistorySpy.count(), 1); +} + +FALKONTEST_MAIN(QmlHistoryApiTest) diff --git a/autotests/qml/qmlhistoryapitest.h b/autotests/qml/qmlhistoryapitest.h new file mode 100644 index 00000000..da3e336e --- /dev/null +++ b/autotests/qml/qmlhistoryapitest.h @@ -0,0 +1,36 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlHistoryApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testAddition(); + void testSearch(); + void testVisits(); + void testRemoval(); +}; diff --git a/autotests/qml/qmltabsapitest.cpp b/autotests/qml/qmltabsapitest.cpp new file mode 100644 index 00000000..486c6b1b --- /dev/null +++ b/autotests/qml/qmltabsapitest.cpp @@ -0,0 +1,114 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmltabsapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include "tabwidget.h" + +void QmlTabsApiTest::initTestCase() +{ +} + +void QmlTabsApiTest::cleanupTestCase() +{ +} + +void QmlTabsApiTest::testInitWindowCount() +{ + QCOMPARE(mApp->windowCount(), 1); + QCOMPARE(mApp->getWindow()->tabCount(), 0); +} + +void QmlTabsApiTest::testTabsAPI() +{ + // Tab Insertion + QObject *qmlTabsObject = m_testHelper.evaluateQObject("Falkon.Tabs"); + QVERIFY(qmlTabsObject); + QSignalSpy qmlTabsInsertedSpy(qmlTabsObject, SIGNAL(tabInserted(QVariantMap))); + m_testHelper.evaluate("Falkon.Tabs.addTab({" + " url: 'https://example.com/'" + "})"); + QCOMPARE(qmlTabsInsertedSpy.count(), 1); + QVariantMap retMap1 = QVariant(qmlTabsInsertedSpy.at(0).at(0)).toMap(); + int index1 = retMap1.value(QSL("index"), -1).toInt(); + int windowId1 = retMap1.value(QSL("windowId"), -1).toInt(); + QCOMPARE(index1, 0); + QCOMPARE(windowId1, 0); + + QObject *qmlTabObject1 = m_testHelper.evaluateQObject("Falkon.Tabs.get({index: 0})"); + QVERIFY(qmlTabObject1); + QCOMPARE(qmlTabObject1->property("url").toString(), "https://example.com/"); + QCOMPARE(qmlTabObject1->property("index").toInt(), 0); + QCOMPARE(qmlTabObject1->property("pinned").toBool(), false); + + m_testHelper.evaluate("Falkon.Tabs.addTab({" + " url: 'https://another-example.com/'," + "})"); + QCOMPARE(qmlTabsInsertedSpy.count(), 2); + QVariantMap retMap2 = QVariant(qmlTabsInsertedSpy.at(1).at(0)).toMap(); + int index2 = retMap2.value(QSL("index"), -1).toInt(); + int windowId2 = retMap2.value(QSL("windowId"), -1).toInt(); + QCOMPARE(index2, 1); + QCOMPARE(windowId2, 0); + + bool pinnedTab = m_testHelper.evaluate("Falkon.Tabs.pinTab({index: 1})").toBool(); + QVERIFY(pinnedTab); + QObject *qmlTabObject2 = m_testHelper.evaluateQObject("Falkon.Tabs.get({index: 0})"); + QVERIFY(qmlTabObject2); + QCOMPARE(qmlTabObject2->property("url").toString(), "https://another-example.com/"); + QCOMPARE(qmlTabObject2->property("index").toInt(), 0); + QCOMPARE(qmlTabObject2->property("pinned").toBool(), true); + + bool unpinnedTab = m_testHelper.evaluate("Falkon.Tabs.unpinTab({index: 0})").toBool(); + QVERIFY(unpinnedTab); + QObject *qmlTabObject3 = m_testHelper.evaluateQObject("Falkon.Tabs.get({index: 0})"); + QVERIFY(qmlTabObject3); + QCOMPARE(qmlTabObject3->property("url").toString(), "https://another-example.com/"); + QCOMPARE(qmlTabObject3->property("index").toInt(), 0); + QCOMPARE(qmlTabObject3->property("pinned").toBool(), false); + + // Next-Previous-Current + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 0); + m_testHelper.evaluate("Falkon.Tabs.nextTab()"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 1); + m_testHelper.evaluate("Falkon.Tabs.nextTab()"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 0); + m_testHelper.evaluate("Falkon.Tabs.previousTab()"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 1); + m_testHelper.evaluate("Falkon.Tabs.previousTab()"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 0); + m_testHelper.evaluate("Falkon.Tabs.setCurrentIndex({index: 1})"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 1); + m_testHelper.evaluate("Falkon.Tabs.setCurrentIndex({index: 0})"); + QCOMPARE(mApp->getWindow()->tabWidget()->currentIndex(), 0); + + // Move Tab + QSignalSpy qmlTabsMovedSpy(qmlTabsObject, SIGNAL(tabMoved(QVariantMap))); + m_testHelper.evaluate("Falkon.Tabs.moveTab({from: 0, to:1, windowId: 0})"); + QCOMPARE(qmlTabsMovedSpy.count(), 1); + + // Tab Removal + QCOMPARE(mApp->getWindow()->tabCount(), 2); + QSignalSpy qmlTabsRemovedSpy(qmlTabsObject, SIGNAL(tabRemoved(QVariantMap))); + m_testHelper.evaluate("Falkon.Tabs.closeTab({index: 0})"); + QCOMPARE(qmlTabsRemovedSpy.count(), 1); + QCOMPARE(mApp->getWindow()->tabCount(), 1); +} + +FALKONTEST_MAIN(QmlTabsApiTest) diff --git a/autotests/qml/qmltabsapitest.h b/autotests/qml/qmltabsapitest.h new file mode 100644 index 00000000..eba8c915 --- /dev/null +++ b/autotests/qml/qmltabsapitest.h @@ -0,0 +1,34 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlTabsApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testInitWindowCount(); + void testTabsAPI(); +}; diff --git a/autotests/qml/qmltesthelper.cpp b/autotests/qml/qmltesthelper.cpp new file mode 100644 index 00000000..3fb9911b --- /dev/null +++ b/autotests/qml/qmltesthelper.cpp @@ -0,0 +1,57 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmltesthelper.h" +#include "qml/qmlplugins.h" +#include +#include + +QmlTestHelper::QmlTestHelper() +{ + QmlPlugins::registerQmlTypes(); + qmlRegisterType("org.kde.falkon.test", 1, 0, "TestItem"); + QQmlComponent component(&engine); + component.setData("import org.kde.falkon 1.0 as Falkon\n" + "import org.kde.falkon.test 1.0 as FalkonTest\n" + "import QtQuick 2.7\n" + "FalkonTest.TestItem {" + " evalFunc: function(source) {" + " return eval(source);" + " }" + "}" + , QUrl()); + testItem = qobject_cast(component.create()); + Q_ASSERT(testItem); +} + +QJSValue QmlTestHelper::evaluate(const QString &source) +{ + auto out = testItem->evaluate(source); + if (out.isError()) { + qWarning() << "Error:" << out.toString(); + } + return out; +} + +QObject *QmlTestHelper::evaluateQObject(const QString &source) +{ + auto out = evaluate(source); + if (out.isQObject()) { + return out.toQObject(); + } + return out.toVariant().value(); +} diff --git a/autotests/qml/qmltesthelper.h b/autotests/qml/qmltesthelper.h new file mode 100644 index 00000000..ab263885 --- /dev/null +++ b/autotests/qml/qmltesthelper.h @@ -0,0 +1,31 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include "qmltestitem.h" +#include + +class QmlTestHelper +{ +public: + explicit QmlTestHelper(); + QJSValue evaluate(const QString &source); + QObject *evaluateQObject(const QString &source); + QQmlEngine engine; + QmlTestItem *testItem; +}; diff --git a/autotests/qml/qmltestitem.cpp b/autotests/qml/qmltestitem.cpp new file mode 100644 index 00000000..630af20f --- /dev/null +++ b/autotests/qml/qmltestitem.cpp @@ -0,0 +1,39 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmltestitem.h" + +QmlTestItem::QmlTestItem(QObject *parent) : + QObject(parent) +{ +} + +QJSValue QmlTestItem::evalFunc() +{ + return m_evalFunc; +} + +void QmlTestItem::setEvalFunc(const QJSValue &func) +{ + m_evalFunc = func; +} + +QJSValue QmlTestItem::evaluate(const QString &source) +{ + Q_ASSERT(m_evalFunc.isCallable()); + return m_evalFunc.call({source}); +} diff --git a/autotests/qml/qmltestitem.h b/autotests/qml/qmltestitem.h new file mode 100644 index 00000000..daa1033b --- /dev/null +++ b/autotests/qml/qmltestitem.h @@ -0,0 +1,36 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include + +class QmlTestItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(QJSValue evalFunc READ evalFunc WRITE setEvalFunc) + +public: + explicit QmlTestItem(QObject *parent = nullptr); + QJSValue evalFunc(); + void setEvalFunc(const QJSValue &func); + QJSValue evaluate(const QString &source); + +private: + QJSValue m_evalFunc; +}; diff --git a/autotests/qml/qmltopsitesapitest.cpp b/autotests/qml/qmltopsitesapitest.cpp new file mode 100644 index 00000000..8ca0c750 --- /dev/null +++ b/autotests/qml/qmltopsitesapitest.cpp @@ -0,0 +1,44 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmltopsitesapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include "pluginproxy.h" +#include "speeddial.h" + +void QmlTopSitesApiTest::initTestCase() +{ +} + +void QmlTopSitesApiTest::cleanupTestCase() +{ +} + +void QmlTopSitesApiTest::testTopSites() +{ + mApp->plugins()->speedDial()->addPage(QUrl("https://example.com"), "Example Domain"); + auto list = m_testHelper.evaluate("Falkon.TopSites.get()").toVariant().toList(); + QCOMPARE(list.length(), 1); + QObject* object = qvariant_cast(list.at(0)); + QVERIFY(object); + QCOMPARE(object->property("title").toString(), "Example Domain"); + QCOMPARE(object->property("url").toString(), "https://example.com"); +} + +FALKONTEST_MAIN(QmlTopSitesApiTest) diff --git a/autotests/qml/qmltopsitesapitest.h b/autotests/qml/qmltopsitesapitest.h new file mode 100644 index 00000000..1e5dbe87 --- /dev/null +++ b/autotests/qml/qmltopsitesapitest.h @@ -0,0 +1,33 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlTopSitesApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testTopSites(); +}; diff --git a/autotests/qml/qmluserscriptapitest.cpp b/autotests/qml/qmluserscriptapitest.cpp new file mode 100644 index 00000000..2f4c56d2 --- /dev/null +++ b/autotests/qml/qmluserscriptapitest.cpp @@ -0,0 +1,98 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmluserscriptapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include +#include +#include +#include "qml/api/userscript/qmluserscript.h" +#include "qml/api/userscript/qmluserscripts.h" + +void QmlUserScriptApiTest::initTestCase() +{ +} + +void QmlUserScriptApiTest::cleanupTestCase() +{ +} + +void QmlUserScriptApiTest::testCount() +{ + int count = m_testHelper.evaluate("Falkon.UserScripts.count").toInt(); + QCOMPARE(count, mApp->webProfile()->scripts()->count()); +} + +void QmlUserScriptApiTest::testSize() +{ + int size = m_testHelper.evaluate("Falkon.UserScripts.size").toInt(); + QCOMPARE(size, mApp->webProfile()->scripts()->size()); +} + +void QmlUserScriptApiTest::testEmpty() +{ + bool empty = m_testHelper.evaluate("Falkon.UserScripts.empty").toBool(); + QCOMPARE(empty, mApp->webProfile()->scripts()->isEmpty()); +} + +void QmlUserScriptApiTest::testContains() +{ + QWebEngineScript script = mApp->webProfile()->scripts()->toList().at(0); + QObject *object = m_testHelper.evaluateQObject("Falkon.UserScripts"); + QmlUserScripts *userScripts = dynamic_cast(object); + QVERIFY(userScripts); + QmlUserScript *userScript = new QmlUserScript(); + userScript->setWebEngineScript(script); + bool contains = userScripts->contains(userScript); + QCOMPARE(contains, true); +} + +void QmlUserScriptApiTest::testFind() +{ + QWebEngineScript script = mApp->webProfile()->scripts()->toList().at(0); + QObject *object = m_testHelper.evaluateQObject("Falkon.UserScripts"); + QmlUserScripts *userScripts = dynamic_cast(object); + QVERIFY(userScripts); + QObject *scriptFound = userScripts->findScript(script.name()); + QVERIFY(scriptFound); + QCOMPARE(scriptFound->property("name").toString(), script.name()); +} + +void QmlUserScriptApiTest::testInsertRemove() +{ + int initialCount = m_testHelper.evaluate("Falkon.UserScripts.count").toInt(); + QObject *object = m_testHelper.evaluateQObject("Falkon.UserScripts"); + QmlUserScripts *userScripts = dynamic_cast(object); + QVERIFY(userScripts); + QmlUserScript *userScript = new QmlUserScript(); + userScript->setProperty("name", "Hello World"); + userScript->setProperty("sourceCode", "(function() {" + " alert('Hello World')" + "})()"); + userScripts->insert(userScript); + int finalCount = m_testHelper.evaluate("Falkon.UserScripts.count").toInt(); + QCOMPARE(finalCount, initialCount + 1); + + userScripts->remove(userScript); + + int ultimateCount = m_testHelper.evaluate("Falkon.UserScripts.count").toInt(); + QCOMPARE(ultimateCount, initialCount); +} + +FALKONTEST_MAIN(QmlUserScriptApiTest) diff --git a/autotests/qml/qmluserscriptapitest.h b/autotests/qml/qmluserscriptapitest.h new file mode 100644 index 00000000..b40b0761 --- /dev/null +++ b/autotests/qml/qmluserscriptapitest.h @@ -0,0 +1,38 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlUserScriptApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testCount(); + void testSize(); + void testEmpty(); + void testContains(); + void testFind(); + void testInsertRemove(); +}; diff --git a/autotests/qml/qmlwindowsapitest.cpp b/autotests/qml/qmlwindowsapitest.cpp new file mode 100644 index 00000000..1b39b7e7 --- /dev/null +++ b/autotests/qml/qmlwindowsapitest.cpp @@ -0,0 +1,67 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#include "qmlwindowsapitest.h" +#include "autotests.h" +#include "qmltesthelper.h" +#include "mainapplication.h" +#include "qml/api/windows/qmlwindow.h" +#include "pluginproxy.h" +#include "browserwindow.h" + +void QmlWindowsApiTest::initTestCase() +{ +} + +void QmlWindowsApiTest::cleanupTestCase() +{ +} + +void QmlWindowsApiTest::testWindowsAPI() +{ + QObject *currentWindowObject = m_testHelper.evaluateQObject("Falkon.Windows.getCurrent()"); + QVERIFY(currentWindowObject); + QCOMPARE(currentWindowObject->property("title").toString(), mApp->getWindow()->windowTitle()); + QCOMPARE(currentWindowObject->property("type").toInt(), (int)mApp->getWindow()->windowType()); + QCOMPARE(currentWindowObject->property("tabs").toList().length(), mApp->getWindow()->tabCount()); + + QObject *windowObject = m_testHelper.evaluateQObject("Falkon.Windows"); + QVERIFY(windowObject); + QSignalSpy qmlWindowCreatedSignal(windowObject, SIGNAL(created(QmlWindow*))); + qRegisterMetaType(); + QSignalSpy windowCreatedSingal(mApp->plugins(), SIGNAL(mainWindowCreated(BrowserWindow*))); + QObject *newQmlWindow = m_testHelper.evaluateQObject("Falkon.Windows.create({})"); + QVERIFY(newQmlWindow); + QCOMPARE(mApp->windowCount(), 2); + // FIXME: signal is emitted 2 times here - + // 1st for the initial window, 2nd for the created window + QTRY_COMPARE(qmlWindowCreatedSignal.count(), 2); + QTRY_COMPARE(windowCreatedSingal.count(), 2); + QObject *newQmlSignalWindow = qvariant_cast(qmlWindowCreatedSignal.at(1).at(0)); + QVERIFY(newQmlSignalWindow); + QCOMPARE(newQmlWindow->property("id").toInt(), newQmlSignalWindow->property("id").toInt()); + + int qmlWindowCount = m_testHelper.evaluate("Falkon.Windows.getAll().length").toInt(); + QCOMPARE(qmlWindowCount, mApp->windowCount()); + + QSignalSpy qmlWindowRemovedSignal(windowObject, SIGNAL(removed(QmlWindow*))); + int newQmlWindowId = newQmlSignalWindow->property("id").toInt(); + m_testHelper.evaluate(QString("Falkon.Windows.remove(%1)").arg(newQmlWindowId)); + QTRY_COMPARE(qmlWindowRemovedSignal.count(), 1); +} + +FALKONTEST_MAIN(QmlWindowsApiTest) diff --git a/autotests/qml/qmlwindowsapitest.h b/autotests/qml/qmlwindowsapitest.h new file mode 100644 index 00000000..09ce244c --- /dev/null +++ b/autotests/qml/qmlwindowsapitest.h @@ -0,0 +1,33 @@ +/* ============================================================ +* Falkon - Qt web browser +* Copyright (C) 2018 Anmol Gautam +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* ============================================================ */ +#pragma once + +#include +#include "qmltesthelper.h" + +class QmlWindowsApiTest : public QObject +{ + Q_OBJECT + QmlTestHelper m_testHelper; + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + + void testWindowsAPI(); +}; diff --git a/src/lib/adblock/metadata.desktop b/src/lib/adblock/metadata.desktop index 95dd3edd..b0993da9 100644 --- a/src/lib/adblock/metadata.desktop +++ b/src/lib/adblock/metadata.desktop @@ -1,52 +1,53 @@ [Desktop Entry] Name=AdBlock Name[ca]=AdBlock Name[ca@valencia]=AdBlock Name[cs]=AdBlock Name[da]=AdBlock Name[de]=AdBlock Name[en_GB]=AdBlock Name[es]=AdBlock Name[fi]=Mainosesto Name[fr]=AdBlock Name[gl]=Bloqueador de publicidade Name[id]=AdBlock Name[it]=Adblock Name[nl]=AdBlock Name[nn]=Reklamefilter Name[pl]=AdBlock Name[pt]=AdBlock Name[pt_BR]=AdBlock Name[sv]=Reklamblockering Name[uk]=Блокування реклами Name[x-test]=xxAdBlockxx Name[zh_CN]=AdBlock Comment=Blocks unwanted web content Comment[ca]=Bloqueja el contingut web no desitjat Comment[ca@valencia]=Bloqueja el contingut web no desitjat Comment[cs]=Blokovat nevyžádaný obsah Comment[da]=Blokerer uønskede webindhold Comment[de]=Blockiert unerwünschte Web-Inhalte Comment[en_GB]=Blocks unwanted web content Comment[es]=Bloquea contenido web no deseado Comment[fi]=Estää epätoivotun verkkosisällön Comment[fr]=Blocage des contenus Web indésirables Comment[gl]=Bloquea contenido web non desexado Comment[id]=Memblokir konten web yang tak diinginkan Comment[it]=Blocca i contenuti web non desiderati Comment[nl]=Blokkeert niet-gewilde webinhoud Comment[nn]=Blokkerer uønskt vevinnhald Comment[pl]=Blokuje niechciane treści z sieci Comment[pt]=Bloqueia o conteúdo Web indesejado +Comment[pt_BR]=Bloqueie conteúdos web indesejados Comment[sv]=Blockerar oönskat webbinnehåll Comment[uk]=Блокує небажані інтернет-дані Comment[x-test]=xxBlocks unwanted web contentxx Comment[zh_CN]=阻止不需要的网络内容 Icon=:adblock/data/adblock.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=1.1.0 X-Falkon-Settings=true diff --git a/src/lib/data/breeze-fallback/index.theme b/src/lib/data/breeze-fallback/index.theme index e6c6cb32..f8562f95 100644 --- a/src/lib/data/breeze-fallback/index.theme +++ b/src/lib/data/breeze-fallback/index.theme @@ -1,61 +1,62 @@ [Icon Theme] Name=Breeze Name[ar]=نسيم Name[ast]=Breeze Name[ca]=Brisa Name[ca@valencia]=Brisa Name[cs]=Breeze Name[da]=Breeze Name[de]=Breeze Name[en_GB]=Breeze Name[es]=Brisa Name[fi]=Breeze Name[fr]=Breeze Name[gl]=Breeze Name[id]=Breeze Name[it]=Brezza Name[nl]=Breeze Name[nn]=Breeze Name[pl]=Bryza Name[pt]=Brisa Name[pt_BR]=Breeze Name[sk]=Vánok Name[sv]=Breeze Name[uk]=Breeze Name[x-test]=xxBreezexx Name[zh_CN]=微风 Comment=Breeze Team Comment[ar]=فريق نسيم Comment[ast]=L'equipu de Breeze Comment[ca]=L'equip «Breeze» Comment[ca@valencia]=L'equip «Breeze» Comment[cs]=Team Breeze Comment[da]=Breeze-tema Comment[de]=Breeze-Team Comment[en_GB]=Breeze Team Comment[es]=Equipo de Brisa Comment[fi]=Breeze-työryhmä Comment[fr]=L'équipe de Breeze Comment[gl]=Equipo de Breeze Comment[id]=Tim Breeze Comment[it]=La squadra di Brezza Comment[nl]=Breeze-team Comment[nn]=Breeze-laget Comment[pl]=Zespół Bryzy Comment[pt]=Equipa do Brisa +Comment[pt_BR]=Equipe Breeze Comment[sv]=Breeze-gruppen Comment[uk]=Команда Breeze Comment[x-test]=xxBreeze Teamxx Comment[zh_CN]=微风团队 DisplayDepth=32 Inherits=default Directories=16x16,22x22,32x32 [16x16] Size=16 [22x22] Size=22 [32x32] Size=32 diff --git a/src/plugins/AutoScroll/metadata.desktop b/src/plugins/AutoScroll/metadata.desktop index 676ad7b9..dab0038c 100644 --- a/src/plugins/AutoScroll/metadata.desktop +++ b/src/plugins/AutoScroll/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=AutoScroll Name[ca]=Desplaçament automàtic Name[ca@valencia]=Desplaçament automàtic Name[cs]=Automatické posouvání Name[da]=Autorul Name[de]=Automatischer Bildlauf Name[en_GB]=AutoScroll Name[es]=Desplazamiento automático Name[fi]=Automaattivieritys Name[fr]=AutoScroll Name[gl]=Desprazamento automático Name[id]=AutoScroll Name[it]=Scorrimento automatico Name[nl]=Auto-schuiven Name[nn]=Autorulling Name[pl]=Samoprzewijanie Name[pt]=Deslocamento Automático +Name[pt_BR]=AutoScroll Name[sv]=Rulla automatiskt Name[uk]=Автогортання Name[x-test]=xxAutoScrollxx Name[zh_CN]=自动滚动 Comment=Provides support for autoscroll with middle mouse button Comment[ca]=Proporciona suport per al desplaçament automàtic amb el botó del mig del ratolí Comment[ca@valencia]=Proporciona suport per al desplaçament automàtic amb el botó del mig del ratolí Comment[cs]=Poskytuje podporu pro automatický posun pomocí prostředního tlačítka Comment[da]=Giver understøttelse af autorul med den midterste museknap Comment[en_GB]=Provides support for autoscroll with middle mouse button Comment[es]=Implementa ell desplazamiento automático con el botón medio del ratón Comment[fi]=Tarjoaa automaattivieritystuen hiiren keskipainikkeelle Comment[fr]=Prise en charge du défilement automatique à l'aide du bouton central de la souris Comment[gl]=Fornece a funcionalidade de desprazamento automático co botón central Comment[id]=Menyediakan dukungan untuk gulir otomatis dengan tombol tengah mouse Comment[it]=Fornisce il supporto allo scorrimento automatico con il pulsante centrale del mouse Comment[nl]=Bied ondersteuning voor auto-schuiven met middelste muisknop Comment[nn]=Gjev støtte for autorulling med midtknappen på musa Comment[pl]=Zapewnia obsługę samoprzewijania na środkowy przycisk myszy Comment[pt]=Oferece o suporte para o deslocamento automático com o botão do meio do rato +Comment[pt_BR]=Fornece suporte para rolagem automática com o botão do meio do mouse Comment[sv]=Tillhandahåller stöd för automatisk rullning med musens mittenknapp Comment[uk]=Забезпечує підтримку автогортання середньою кнопкою миші Comment[x-test]=xxProvides support for autoscroll with middle mouse buttonxx Comment[zh_CN]=为鼠标中键滚动提供支持 Icon=:autoscroll/data/scroll_all.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=1.0.1 X-Falkon-Settings=true diff --git a/src/plugins/GnomeKeyringPasswords/metadata.desktop b/src/plugins/GnomeKeyringPasswords/metadata.desktop index ea30e016..09001ab5 100644 --- a/src/plugins/GnomeKeyringPasswords/metadata.desktop +++ b/src/plugins/GnomeKeyringPasswords/metadata.desktop @@ -1,49 +1,51 @@ [Desktop Entry] Name=Gnome Keyring Passwords Name[ca]=Contrasenyes a l'anell de claus de Gnome Name[ca@valencia]=Contrasenyes a l'anell de claus de Gnome Name[cs]=Hesla z klíčenky Gnome Name[da]=Adgangskoder til Gnome-nøglering Name[en_GB]=Gnome Keyring Passwords Name[es]=Anillo de contraseñas de Gnome Name[fi]=Gnomen avainrenkaan salasankaat Name[fr]=Trousseau de clés de GNOME Name[gl]=Contrasinais do chaveiro de Gnome Name[id]=Gnome Keyring Passwords Name[it]=Portachiavi per le chiavi di Gnome Name[nl]=GNOME-sleutelbos wachtwoorden Name[nn]=Passord for Gnome-nøkkelring Name[pl]=Hasła pęku kluczy Gnome Name[pt]=Senhas no Porta-Chaves do Gnome +Name[pt_BR]=Senhas do chaveiro do Gnome Name[sv]=Gnome-nyckelring lösenord Name[uk]=Паролі сховища ключів Gnome Name[x-test]=xxGnome Keyring Passwordsxx Name[zh_CN]=Gnome 钥匙链密码 Comment=Provides support for storing passwords in gnome-keyring Comment[ca]=Proporciona suport per emmagatzemar les contrasenyes a l'anell de claus de Gnome Comment[ca@valencia]=Proporciona suport per emmagatzemar les contrasenyes a l'anell de claus de Gnome Comment[cs]=Poskytuje podporu pro ukládání hesel pomocí gnome-keyring Comment[da]=Giver understøttelse af lagring af adgangskoder i gnome-nøglring Comment[en_GB]=Provides support for storing passwords in gnome-keyring Comment[es]=Implementa el almacenamiento de contraseñas en el anillo de claves de Gnome Comment[fi]=Tarjoaa tuen salasanojen tallentamiseksi Gnomen avainrenkaaseen Comment[fr]=Prise en charge de l'enregistrement de mots de passe au sein de gnome-keyring Comment[gl]=Permite almacenar contrasinais en gnome-keyring Comment[id]=Menyediakan dukungan untuk menyimpan sandi dalam gnome-keyring Comment[it]=Fornisce un supporto all'immagazzinamento delle password nel portachiavi di Gnome Comment[nl]=Biedt ondersteuning voor opslaan van GNOME-sleutelbos wachtwoorden Comment[nn]=Gjev støtte for lagring av passord i Gnome-nøkkelringen Comment[pl]=Zapewnia obsługę przechowywania haseł w pęku kluczy gnome Comment[pt]=Oferece o suporte para gravar as senhas no 'gnome-keyring' +Comment[pt_BR]=Fornece suporte para armazenar senhas no gnome-keyring Comment[sv]=Tillhandahåller stöd för att lagra lösenord i Gnome-nyckelring Comment[uk]=Забезпечує підтримку зберігання паролів у gnome-keyring Comment[x-test]=xxProvides support for storing passwords in gnome-keyringxx Comment[zh_CN]=提供在 gnome-keyring 中保存密码的支持 Icon=:gkp/data/icon.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.1.0 X-Falkon-Settings=false diff --git a/src/plugins/GreaseMonkey/metadata.desktop b/src/plugins/GreaseMonkey/metadata.desktop index 5db920dd..238d6c22 100644 --- a/src/plugins/GreaseMonkey/metadata.desktop +++ b/src/plugins/GreaseMonkey/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=GreaseMonkey Name[ca]=GreaseMonkey Name[ca@valencia]=GreaseMonkey Name[cs]=GreaseMonkey Name[da]=GreaseMonkey Name[de]=GreaseMonkey Name[en_GB]=GreaseMonkey Name[es]=GreaseMonkey Name[fi]=GreaseMonkey Name[fr]=GreaseMonkey Name[gl]=GreaseMonkey Name[id]=GreaseMonkey Name[it]=GreaseMonkey Name[nl]=GreaseMonkey Name[nn]=GreaseMonkey Name[pl]=GreaseMonkey Name[pt]=GreaseMonkey +Name[pt_BR]=GreaseMonkey Name[sv]=GreaseMonkey Name[uk]=GreaseMonkey Name[x-test]=xxGreaseMonkeyxx Name[zh_CN]=油猴 Comment=Provides support for userscripts Comment[ca]=Proporciona suport per als scripts d'usuari Comment[ca@valencia]=Proporciona suport per als scripts d'usuari Comment[cs]=Poskytuje podporu pro uživatelské skripty Comment[da]=Giver understøttelse af brugerscripts Comment[en_GB]=Provides support for userscripts Comment[es]=Implementa guiones de usuario Comment[fi]=Tarjoaa käyttäjäskriptien tuen Comment[fr]=Prise en charge des scripts utilisateur. Comment[gl]=Permite scripts de usuario Comment[id]=Menyediakan dukungan untuk skrip pengguna Comment[it]=Fornisce un supporto agli script utente Comment[nl]=Biedt ondersteuning voor scripts van gebruikers Comment[nn]=Gjev støtte for brukarskript Comment[pl]=Zapewnia obsługę dla skryptów użytkownika Comment[pt]=Oferece o suporte para programas do utilizador +Comment[pt_BR]=Fornece suporte para scripts do usuário Comment[sv]=Tillhandahåller stöd för användarskript Comment[uk]=Забезпечує підтримку скриптів користувача Comment[x-test]=xxProvides support for userscriptsxx Comment[zh_CN]=为用户脚本提供支持 Icon=:gm/data/icon.svg Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.9.4 X-Falkon-Settings=true diff --git a/src/plugins/MouseGestures/metadata.desktop b/src/plugins/MouseGestures/metadata.desktop index 35de44da..ab58be7a 100644 --- a/src/plugins/MouseGestures/metadata.desktop +++ b/src/plugins/MouseGestures/metadata.desktop @@ -1,51 +1,53 @@ [Desktop Entry] Name=Mouse Gestures Name[ca]=Gestos del ratolí Name[ca@valencia]=Gestos del ratolí Name[cs]=Gesta myší Name[da]=Musebevægelser Name[de]=Mausgesten Name[en_GB]=Mouse Gestures Name[es]=Gestos de ratón Name[fi]=Hiirieleet Name[fr]=Mouvements de souris Name[gl]=Xestos do rato Name[id]=Mouse Gestures Name[it]=Gesti del mouse Name[nl]=Muisgebaren Name[nn]=Muserørsler Name[pl]=Gesty myszy Name[pt]=Gestos do Rato +Name[pt_BR]=Gestos do mouse Name[sv]=Musgester Name[uk]=Керування мишею Name[x-test]=xxMouse Gesturesxx Name[zh_CN]=鼠标手势 Comment=Provides support for navigating in webpages by mouse gestures Comment[ca]=Proporciona suport per a navegar per les pàgines web amb els gestos del ratolí Comment[ca@valencia]=Proporciona suport per a navegar per les pàgines web amb els gestos del ratolí Comment[cs]=Poskytuje podporu pro procházení webových stránek pomocí gest myší Comment[da]=Giver understøttelse af navigering på websider med musebevægelser Comment[de]=Unterstützung für die Navigation auf Webseiten durch Mausgesten Comment[en_GB]=Provides support for navigating in webpages by mouse gestures Comment[es]=Implementa la navegación en páginas web mediante gestos de ratón Comment[fi]=Tarjoaa tuen verkkosivujen selaamiseksi hiirielein Comment[fr]=Prise en charge de la navigation Internet à l'aide de mouvements de la souris Comment[gl]=Permite navegar por páxinas web con acenos co rato Comment[id]=Menyediakan dukungan untuk menavigasi dalam halaman web dengan pergerakan mouse Comment[it]=Fornisce un supporto alla navigazione nelle pagine web per mezzo di gesti del mouse Comment[nl]=Biedt ondersteuning voor navigeren in webpagina's door muisgebaren Comment[nn]=Gjev støtte for muserørsler for nettsidenavigering Comment[pl]=Zapewnia obsługę poruszania się po stronach przy użyciu gestów myszy Comment[pt]=Oferece o suporte para navegar nas páginas Web com gestos do rato +Comment[pt_BR]=Fornece suporte para navegação em sites usando gestos do mouse Comment[sv]=Tillhandahåller stöd för att navigera på webbsidor med musgester Comment[uk]=Забезпечує підтримку навігації сторінками за допомогою жестів вказівником миші Comment[x-test]=xxProvides support for navigating in webpages by mouse gesturesxx Comment[zh_CN]=提供使用鼠标笔势在网页中导航的支持 Icon=:mousegestures/data/icon.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.5.0 X-Falkon-Settings=true diff --git a/src/plugins/PIM/metadata.desktop b/src/plugins/PIM/metadata.desktop index 01698801..1df73f48 100644 --- a/src/plugins/PIM/metadata.desktop +++ b/src/plugins/PIM/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=PIM Name[ca]=PIM Name[ca@valencia]=PIM Name[cs]=PIM Name[da]=PIM Name[de]=PIM Name[en_GB]=PIM Name[es]=PIM Name[fi]=Henkilökohtainen ajanhallinta Name[fr]=PIM Name[gl]=PIM Name[id]=PIM Name[it]=PIM Name[nl]=PIM Name[nn]=PIM Name[pl]=ZIO Name[pt]=PIM +Name[pt_BR]=PIM Name[sv]=Personlig information Name[uk]=Керування інформацією Name[x-test]=xxPIMxx Name[zh_CN]=个人信息管理 Comment=Adds ability for Falkon to store some personal data Comment[ca]=Afegeix la possibilitat que el Falkon emmagatzemi diverses dades personals Comment[ca@valencia]=Afig la possibilitat que el Falkon emmagatzeme diverses dades personals Comment[cs]=Přidává Falkonu schopnost ukládat nějaká osobní data Comment[da]=Tilføjer mulighed for at Falkon kan lagre nogle personlige data Comment[en_GB]=Adds ability for Falkon to store some personal data Comment[es]=Añade a Falkon la facultad de guardar datos personales Comment[fi]=Lisää Falkoniin kyvyn tallentaa henkilökohtaista tietoa Comment[fr]=Ajout d'une capacité de stockage de certaines données personnelles par Falkon Comment[gl]=Permite a Falkon almacenar algúns datos persoais Comment[id]=Menambah kemampuan terhadap Falkon untuk menyimpan beberapa data pribadi Comment[it]=Aggiunge a Falkon la capacità di immagazzinare alcuni dati personali Comment[nl]=Biedt mogelijkheid voor Falkon om enige persoonlijke gegevens op te slaan Comment[nn]=Gjer det mogleg for Falkon å lagra nokre persondata Comment[pl]=Dodaje możliwość przechowywania pewnych danych osobistych Comment[pt]=Adiciona ao Falkon a capacidade de guardar alguns dados pessoais +Comment[pt_BR]=Adiciona a habilitade ao Falkon para armazenar alguns dados pessoais Comment[sv]=Lägger till möjlighet för Falkon att lagra viss personlig information Comment[uk]=Додає у Falkon можливість зберігати особисті дані Comment[x-test]=xxAdds ability for Falkon to store some personal dataxx Comment[zh_CN]=增加 Falkon 存储某些个人数据的能力 Icon=:PIM/data/PIM.png Type=Service X-Falkon-Author=Mladen Pejaković X-Falkon-Email=pejakm@autistici.org X-Falkon-Version=0.2.0 X-Falkon-Settings=true diff --git a/src/plugins/StatusBarIcons/metadata.desktop b/src/plugins/StatusBarIcons/metadata.desktop index f94c077b..5af58133 100644 --- a/src/plugins/StatusBarIcons/metadata.desktop +++ b/src/plugins/StatusBarIcons/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=StatusBar Icons Name[ca]=Icones de la barra d'estat Name[ca@valencia]=Icones de la barra d'estat Name[cs]=Ikony stavové lišty Name[da]=Statuslinjeikoner Name[de]=Statusleisten-Symbole Name[en_GB]=StatusBar Icons Name[es]=Iconos de la barra de tareas Name[fi]=Tilarivin kuvakkeet Name[fr]=Icônes de la barre d'état Name[gl]=Iconas da barra de estado Name[id]=Ikon BilahStatus Name[it]=Icone della barra di stato Name[nl]=Pictogrammen op de statusbalk Name[nn]=Statuslinje-ikon Name[pl]=Ikony paska stanu Name[pt]=Ícones da Barra de Estado +Name[pt_BR]=Ícones da barra de status Name[sv]=Ikoner i statusraden Name[uk]=Піктограми смужки стану Name[x-test]=xxStatusBar Iconsxx Name[zh_CN]=状态栏图标 Comment=Adds additional icons and zoom widget to statusbar Comment[ca]=Afegeix icones addicionals i un estri de zoom a la barra d'estat Comment[ca@valencia]=Afig icones addicionals i un estri de zoom a la barra d'estat Comment[cs]=Přidává dodatečné ikony a přibližovací widget do stavové lišty Comment[da]=Tilføjer yderligere ikoner og zoomwidget til statuslinje Comment[en_GB]=Adds additional icons and zoom widget to statusbar Comment[es]=Añade iconos adicionales y control de zum a la barra de estado Comment[fi]=Lisää tilariville kuvakkeita ja lähennyssovelman Comment[fr]=Ajout d'icônes supplémentaires et d'un composant graphique de zoom à la barre d'état Comment[gl]=Engade iconas adicionais e un trebello de ampliación á barra de estado Comment[id]=Menambah tambahan ikon dan perbesaran widget untuk bilah status Comment[it]=Aggiunge alla barra di stato alcune icone aggiuntive ed uno strumento di ingrandimento Comment[nl]=Voegt extra pictogrammen en zoomwidget toe aan de statusbalk Comment[nn]=Leggjer til fleire ikon og sideforstørring via statuslinja Comment[pl]=Dodaje dodatkowe ikony i element do powiększania na pasku stanu Comment[pt]=Adiciona ícones extra e um item de ampliação à barra de estado +Comment[pt_BR]=Adiciona ícones adicionais e widget de zoom na barra de status Comment[sv]=Lägger till ytterligare ikoner och en zoomkomponent i statusraden Comment[uk]=Додає піктограми і віджет масштабування на смужку стану Comment[x-test]=xxAdds additional icons and zoom widget to statusbarxx Comment[zh_CN]=向状态栏添加其他图标和缩放小部件 Icon=:sbi/data/icon.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.2.0 X-Falkon-Settings=true diff --git a/src/plugins/TabManager/metadata.desktop b/src/plugins/TabManager/metadata.desktop index 00b8dddf..fff4f053 100644 --- a/src/plugins/TabManager/metadata.desktop +++ b/src/plugins/TabManager/metadata.desktop @@ -1,51 +1,53 @@ [Desktop Entry] Name=Tab Manager Name[ca]=Gestor de pestanyes Name[ca@valencia]=Gestor de pestanyes Name[cs]=Správce karet Name[da]=Fanebladshåndtering Name[de]=Unterfensterverwaltung Name[en_GB]=Tab Manager Name[es]=Gestor de pestañas Name[fi]=Välilehtien hallinta Name[fr]=Gestionnaire d'onglets Name[gl]=Xestor de lapelas Name[id]=Pengelola Tab Name[it]=Gestore delle schede Name[nl]=Tabbladbeheerder Name[nn]=Fanehandsamar Name[pl]=Zarządzanie kartami Name[pt]=Gestor de Páginas +Name[pt_BR]=Gerenciador de abas Name[sv]=Flikhanterare Name[uk]=Керування вкладками Name[x-test]=xxTab Managerxx Name[zh_CN]=标签页管理器 Comment=Adds ability to managing tabs and windows Comment[ca]=Afegeix la possibilitat de gestionar les pestanyes i finestres Comment[ca@valencia]=Afig la possibilitat de gestionar les pestanyes i finestres Comment[cs]=Přidává schopnost správy karet a oken Comment[da]=Tilføjer mulighed for at håndtere faneblade og vinduer Comment[de]=Verwaltung von Unterfenstern und Fenstern Comment[en_GB]=Adds ability to managing tabs and windows Comment[es]=Añade la posibilidad de gestionar pestañas y ventanas Comment[fi]=Lisää kyvyn hallita välilehtiä ja ikkunoita Comment[fr]=Ajout d'une capacité de gestion des onglets et des fenêtres Comment[gl]=Permite xestionar lapelas e xanelas Comment[id]=Menambah kemampuan untuk mengelola tab dan jendela Comment[it]=Aggiunge la capacità di gestione delle schede e delle finestre Comment[nl]=Voegt mogelijkheid toe om tabbladen en vensters te beheren Comment[nn]=Gjer det mogleg å handtera faner og vindauge Comment[pl]=Dodaje możliwość zarządzania kartami i oknami Comment[pt]=Adiciona a capacidade para gerir páginas e janelas +Comment[pt_BR]=Adiciona a habilidade de gerenciar abas e janelas Comment[sv]=Lägger till möjlighet att hantera flikar och fönster Comment[uk]=Додає можливість керування вкладками і вікнами Comment[x-test]=xxAdds ability to managing tabs and windowsxx Comment[zh_CN]=添加管理标签页和窗口的功能 Icon=:tabmanager/data/tabmanager.png Type=Service X-Falkon-Author=Razi Alavizadeh X-Falkon-Email=s.r.alavizadeh@gmail.com X-Falkon-Version=0.8.0 X-Falkon-Settings=true diff --git a/src/plugins/TestPlugin/metadata.desktop b/src/plugins/TestPlugin/metadata.desktop index 09cf08e6..87e8c57f 100644 --- a/src/plugins/TestPlugin/metadata.desktop +++ b/src/plugins/TestPlugin/metadata.desktop @@ -1,51 +1,53 @@ [Desktop Entry] Name=Example Plugin Name[ca]=Connector d'exemple Name[ca@valencia]=Connector d'exemple Name[cs]=Ukázkový modul Name[da]=Eksempel plugin Name[de]=Beispielmodul Name[en_GB]=Example Plugin Name[es]=Complemento de ejemplo Name[fi]=Esimerkkiliitännäinen Name[fr]=Module externe d'exemple Name[gl]=Complemento de exemplo Name[id]=Contoh Plugin Name[it]=Estensione di esempio Name[nl]=Voorbeeld plug-in Name[nn]=Eksempel-tillegg Name[pl]=Przykładowa wtyczka Name[pt]='Plugin' de Exemplo +Name[pt_BR]=Plugin de exemplo Name[sv]=Exempelinsticksprogram Name[uk]=Приклад додатка Name[x-test]=xxExample Pluginxx Name[zh_CN]=示例插件 Comment=Very simple minimal plugin example Comment[ca]=Exemple molt senzill d'un connector mínim Comment[ca@valencia]=Exemple molt senzill d'un connector mínim Comment[cs]=Jednoduchá ukázka modulu Comment[da]=Meget simpelt minimalt plugin eksempel Comment[de]=Einfaches minimales Beispielmodul Comment[en_GB]=Very simple minimal plugin example Comment[es]=Complemento de ejemplo mínimo, muy sencillo Comment[fi]=Hyvin yksinkertainen esimerkki minimaalisesta liitännäisestä Comment[fr]=Exemple de module externe minimaliste très simple Comment[gl]=Exemplo de complemento mínimo moi simple Comment[id]=Contoh plugin minimal yang sangat sederhana Comment[it]=Estensione di esempio molto semplice e minimale Comment[nl]=Zeer eenvoudige minimaal voorbeeld voor plug-in Comment[nn]=Veldig enkelt og lite eksempel-tillegg Comment[pl]=Bardzo prosty minimalny przykład wtyczki Comment[pt]='Plugin' de exemplo muito simples e minimalista +Comment[pt_BR]=Um exemplo de plugin mínimo e simples Comment[sv]=Mycket enkelt minimalt exempel på ett insticksprogram Comment[uk]=Дуже простий мінімальний приклад додатка Comment[x-test]=xxVery simple minimal plugin examplexx Comment[zh_CN]=非常简单的最小化插件示范 Icon=configure Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.1.7 X-Falkon-Settings=true diff --git a/src/plugins/VerticalTabs/metadata.desktop b/src/plugins/VerticalTabs/metadata.desktop index 49fc4104..bb7d37d3 100644 --- a/src/plugins/VerticalTabs/metadata.desktop +++ b/src/plugins/VerticalTabs/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=Vertical Tabs Name[ca]=Pestanyes verticals Name[ca@valencia]=Pestanyes verticals Name[cs]=Svislé karty Name[da]=Lodrette faneblade Name[de]=Senkrechte Unterfenster Name[en_GB]=Vertical Tabs Name[es]=Pestañas verticales Name[fi]=Pystyvälilehdet Name[fr]=Onglets verticaux Name[gl]=Lapelas verticais Name[id]=Tab Tegak Name[it]=Schede verticali Name[nl]=Verticale tabbladen Name[nn]=Loddrette faner Name[pl]=Pionowe karty Name[pt]=Páginas Verticais +Name[pt_BR]=Abas verticais Name[sv]=Vertikala flikar Name[uk]=Вертикальні вкладки Name[x-test]=xxVertical Tabsxx Name[zh_CN]=垂直标签页 Comment=Adds ability to show tabs in sidebar Comment[ca]=Afegeix la possibilitat de mostrar les pestanyes a la barra lateral Comment[ca@valencia]=Afig la possibilitat de mostrar les pestanyes a la barra lateral Comment[cs]=Přidává schopnost zobrazit karty v postranní liště Comment[da]=Tilføjer mulighed for at vise faneblade i sidepanel Comment[en_GB]=Adds ability to show tabs in sidebar Comment[es]=Añade la posibilidad de mostrar pestañas en la barra lateral Comment[fi]=Lisää kyvyn näyttää välilehdet sivupalkissa Comment[fr]=Prise en charge de l'affichage des onglets dans le panneau latéral Comment[gl]=Permite mostrar lapelas na barra lateral Comment[id]=Menambah kemampuan untuk menampilkan tab dalam bilah sisi Comment[it]=Aggiunge la capacità di mostrare le schede nella barra laterale Comment[nl]=Voegt mogelijkheid toe om tabbladen in de zijbalk te tonen Comment[nn]=Gjer det mogleg å visa faner i sidestolpen Comment[pl]=Dodaje możliwość pokazywania kart na pasku bocznym Comment[pt]=Adiciona a capacidade de mostrar as páginas na barra lateral +Comment[pt_BR]=Adiciona a habilidade de mostrar abas na barra lateral Comment[sv]=Lägger till möjlighet att visa flikar i sidorader Comment[uk]=Додає можливість показу вкладок на бічній панелі Comment[x-test]=xxAdds ability to show tabs in sidebarxx Comment[zh_CN]=添加在边栏中显示标签页的功能 Icon=:verticaltabs/data/icon.svg Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.1.0 X-Falkon-Settings=true diff --git a/src/scripts/hellopython/metadata.desktop b/src/scripts/hellopython/metadata.desktop index 3c808835..1c3a16f8 100644 --- a/src/scripts/hellopython/metadata.desktop +++ b/src/scripts/hellopython/metadata.desktop @@ -1,51 +1,53 @@ [Desktop Entry] Name=Hello Python Name[ca]=Hola Python Name[ca@valencia]=Hola Python Name[cs]=Hello Python Name[da]=Hallo Python Name[de]=Hallo-Python Name[en_GB]=Hello Python Name[es]=Hola Python Name[fi]=Hei Python Name[fr]=Hello Python Name[gl]=Ola, Python! Name[id]=Hello Python Name[it]=Hello Python Name[nl]=Hallo Python Name[nn]=Hei-Python Name[pl]=Witaj Python Name[pt]=Olá em Python +Name[pt_BR]=Olá Python Name[sv]=Hej Python Name[uk]=Привіт, Python Name[x-test]=xxHello Pythonxx Name[zh_CN]=Hello Python Comment=Example Python extension Comment[ca]=Exemple d'una extensió en Python Comment[ca@valencia]=Exemple d'una extensió en Python Comment[cs]=Ukázkové rozšíření v Pythonu Comment[da]=Eksempel Python-udvidelse Comment[de]=Beispiel eines Python-Moduls Comment[en_GB]=Example Python extension Comment[es]=Ejemplo de extensión de Python Comment[fi]=Esimerkinomainen Python-laajennus Comment[fr]=Exemple d'extension Python Comment[gl]=Extensión de Python de exemplo Comment[id]=Contoh ekstensi Python Comment[it]=Estensione di esempio in Python Comment[nl]=Voorbeeld Python-extensie Comment[nn]=Eksempel på Python-tillegg Comment[pl]=Przykładowe rozszerzenie Python Comment[pt]=Extensão de exemplo em Python +Comment[pt_BR]=Exemplo de extensão python Comment[sv]=Exempel på Python-utökning Comment[uk]=Приклад розширення мовою Python Comment[x-test]=xxExample Python extensionxx Comment[zh_CN]=Python 扩展示例 Icon= Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-Version=0.1.0 X-Falkon-Settings=true diff --git a/themes/chrome/metadata.desktop b/themes/chrome/metadata.desktop index 1d5ab8db..e9f281f9 100644 --- a/themes/chrome/metadata.desktop +++ b/themes/chrome/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=Chrome Name[ca]=Chrome Name[ca@valencia]=Chrome Name[cs]=Chrome Name[da]=Chrome Name[de]=Chrome Name[en_GB]=Chrome Name[es]=Chrome Name[fi]=Chrome Name[fr]=Chrome Name[gl]=Chrome Name[id]=Chrome Name[it]=Chrome Name[nl]=Chrome Name[nn]=Chrome Name[pl]=Chrome Name[pt]=Chrome +Name[pt_BR]=Chrome Name[sv]=Chrome Name[uk]=Хромування Name[x-test]=xxChromexx Name[zh_CN]=Chrome Comment=Chrome like theme for Falkon based on Firefox Chromifox theme Comment[ca]=Tema semblant al Chrome pel Falkon, basat en el tema Chromifox del Firefox Comment[ca@valencia]=Tema semblant al Chrome pel Falkon, basat en el tema Chromifox del Firefox Comment[cs]=Motiv pro Falkon podobný Chrome založený na motivu Firefox Chromifox Comment[da]=Chrome-lignende tema til Falkon baseret på Firefox Chromifox-tema Comment[de]=Chrome ähnliches Design für Falkon auf der Basis des Chromifox-Designs von Firefox Comment[en_GB]=Chrome like theme for Falkon based on Firefox Chromifox theme Comment[es]=Tema estilo Chrome para Falkon basado en el tema Firefox Chromifox Comment[fi]=Firefoxin Chromifox-teemaan pohjautuva Chromen kaltainen Falkon-teema Comment[fr]=Thème Chrome pour Falkon inspiré du thème Chromifox de Firefox Comment[gl]=Tema parecido a Chrome para Falkon baseado no tema Chromifox de Firefox Comment[id]=Tema seperti Chrome untuk Falkon berdasarkan pada tema Firefox Chromifox Comment[it]=Tema di tipo Chrome per Falkon, basato sul tema Chromifox di Firefox Comment[nl]=Op Chrome lijkend thema voor Falkon gebaseerd op Firefox Chromifox thema Comment[nn]=Chrome-liknande tema for Falkon, basert på Firefox Chromifox-temaet Comment[pl]=Wygląd przypominający Chrome dla Falkona oparty na wyglądzie Firefox Chromifox Comment[pt]=Tema semelhante ao Chrome para o Falkon, baseado no tema Chromifox do Firefox +Comment[pt_BR]=Tema parecido com o Chrome para o Falkon, baseado no tema Chromifox do Firefox Comment[sv]=Chrome-liknande tema för Falkon baserat på Firefox Chromifox-tema Comment[uk]=Chrome-подібна тема для Falkon, заснована на темі Chromifox для Firefox Comment[x-test]=xxChrome like theme for Falkon based on Firefox Chromifox themexx Comment[zh_CN]=基于火狐 Chromifox 主题的类似于 Chrome 的 Falkon 主题 Icon=theme.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-License=license.txt diff --git a/themes/linux/metadata.desktop b/themes/linux/metadata.desktop index 6623416c..147b7553 100644 --- a/themes/linux/metadata.desktop +++ b/themes/linux/metadata.desktop @@ -1,49 +1,51 @@ [Desktop Entry] Name=Linux Name[ca]=Linux Name[ca@valencia]=Linux Name[cs]=Linux Name[da]=Linux Name[de]=Linux Name[en_GB]=Linux Name[es]=Linux Name[fi]=Linux Name[fr]=Linux Name[gl]=Linux Name[id]=Linux Name[it]=Linux Name[nl]=Linux Name[nn]=Linux Name[pl]=Linux Name[pt]=Linux +Name[pt_BR]=Linux Name[sv]=Linux Name[uk]=Linux Name[x-test]=xxLinuxxx Name[zh_CN]=Linux Comment=Default simple theme for Linux using native widget style and some basic icons from desktop icon set Comment[ca]=Tema senzill predeterminat per a Linux, usant l'estil natiu dels estris i diverses icones bàsiques del conjunt d'icones de l'escriptori Comment[ca@valencia]=Tema senzill predeterminat per a Linux, usant l'estil natiu dels estris i diverses icones bàsiques del conjunt d'icones de l'escriptori Comment[cs]=Výchozí jednoduchý motiv pro Linux používající nativní styl widgetu style a nějaké základní ikony ze sady ikon pracovní plochy Comment[da]=Standard simpelt tema til Linux som bruger systemets widgetstil og nogle basisikoner fra skrivebordets ikonsæt Comment[en_GB]=Default simple theme for Linux using native widget style and some basic icons from desktop icon set Comment[es]=Tema sencillo predeterminado para Linux usando un estilo de controles nativo y algunos iconos básicos desde el conjunto de iconos de escritorio Comment[fi]=Yksinkertainen natiivia elementtityyliä käyttävä Linux-teema sekä joitakin kuvakkeita työpöytäkuvakejoukosta Comment[fr]=Thème simple par défaut pour Linux utilisant les styles de composants graphiques natifs et quelques icônes simples du jeu d'icônes du bureau Comment[gl]=Tema predeterminado simple para Linux que usa o estilo de trebellos nativo e algunhas iconas básicas do grupo de iconas do escritorio Comment[id]=Tema sederhana baku untuk Linux menggunakan gaya widget bawaan dan beberapa ikon dasar dari set ikon desktop Comment[it]=Semplice tema predefinito per Linux, che usa lo stile nativo degli oggetti ed alcune icone di base dall'insieme di icone del desktop Comment[nl]=Standaard eenvoudig thema voor Linux met inheemse widgetstijl en enige basis pictogrammen uit set pictogrammen voor bureaublad Comment[nn]=Standardtema for Linux, som brukar systemutsjånad på skjermelement og nokre ikon frå skrivebordsikontemaet Comment[pl]=Domyślny prosty wygląd dla Linuksa używający natywnego wyglądu elementów interfejsu i podstawowych ikon z zestawu ikon dla pulpitu Comment[pt]=Tema predefinido simples para o Linux, usando o estilo gráfico nativo e alguns ícones básicos do conjunto de ícones do ambiente de trabalho +Comment[pt_BR]=Tema simples padrão para o Linux usando estilo de widgets nativos e alguns ícones básicos do conjunto de ícones da área de trabalho Comment[sv]=Enkelt standardtema för Linux som använder inbyggd komponentstil och några grundläggande ikoner från skrivbordets ikonuppsättning Comment[uk]=Типова проста тема для Linux із використанням природного стилю віджетів і декількох базових піктограм із набору піктограм стільниці Comment[x-test]=xxDefault simple theme for Linux using native widget style and some basic icons from desktop icon setxx Comment[zh_CN]=给 Linux 设计的使用原生控件的默认简易主题,图标来自于桌面图标集 Icon=theme.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-License=GPLv3 diff --git a/themes/mac/metadata.desktop b/themes/mac/metadata.desktop index 0e5bc279..39f1e4d5 100644 --- a/themes/mac/metadata.desktop +++ b/themes/mac/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=Mac Name[ca]=Mac Name[ca@valencia]=Mac Name[cs]=Mac Name[da]=Mac Name[de]=Mac Name[en_GB]=Mac Name[es]=Mac Name[fi]=Mac Name[fr]=Mac Name[gl]=Mac Name[id]=Mac Name[it]=Mac Name[nl]=Mac Name[nn]=Mac Name[pl]=Mac Name[pt]=Mac +Name[pt_BR]=Mac Name[sv]=Mac Name[uk]=Mac Name[x-test]=xxMacxx Name[zh_CN]=Mac Comment=Mac like theme for Falkon based on Firefox Mac OS X theme Comment[ca]=Tema semblant al Mac pel Falkon, basat en el tema Mac OS X del Firefox Comment[ca@valencia]=Tema semblant al Mac pel Falkon, basat en el tema Mac OS X del Firefox Comment[cs]=Motiv pro Falkon podobný Macu založený na motivu Firefox Mac OS X Comment[da]=Mac-lignende tema til Falkon baseret på Firefox Mac OS X-tema Comment[de]=Mac ähnliches Design für Falkon auf der Basis des „Mac OS X“-Designs von Firefox Comment[en_GB]=Mac like theme for Falkon based on Firefox Mac OS X theme Comment[es]=Tema estilo Mac para Falkon basado en el tema Firefox Mac OS X Comment[fi]=Firefoxin Mac OS X -teemaan pohjautuva Macin kaltainen Falkon-teema Comment[fr]=Thème Mac pour Falkon inspiré du thème Mac OS X de Firefox Comment[gl]=Tema parecido a Mac para Falkon baseado no tema de Mac OS X de Firefox Comment[id]=Tema seperti Mac untuk Falkon berdasarkan pada tema Firefox Mac OS X Comment[it]=Tema di tipo Mac per Falkon, basato sul tema Mac OS X di Firefox Comment[nl]=Op Mac lijkend thema voor Falkon gebaseerd op Firefox Mac OS X thema Comment[nn]=Mac-liknande tema for Falkon, basert på Firefox Mac OS X-temaet Comment[pl]=Wygląd przypominający Maka dla Falkona oparty na wyglądzie Firefox Mac OS X Comment[pt]=Tema semelhante ao Mac para o Falkon, baseado no tema Mac OS X do Firefox +Comment[pt_BR]=Tema estilo Mac para o Falkon baseado no tema Mac OS X do Firefox Comment[sv]=Mac-liknande tema för Falkon baserat på Firefox Mac OS X-tema Comment[uk]=Mac-подібна тема для Falkon, заснована на темі Mac OS X для Firefox Comment[x-test]=xxMac like theme for Falkon based on Firefox Mac OS X themexx Comment[zh_CN]=基于 Firefox Mac OS X 主题的类 Mac 主题 Icon=theme.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-License=license.txt diff --git a/themes/windows/metadata.desktop b/themes/windows/metadata.desktop index 5b818fe5..f63f413e 100644 --- a/themes/windows/metadata.desktop +++ b/themes/windows/metadata.desktop @@ -1,50 +1,52 @@ [Desktop Entry] Name=Windows Name[ca]=Windows Name[ca@valencia]=Windows Name[cs]=Windows Name[da]=Windows Name[de]=Windows Name[en_GB]=Windows Name[es]=Windows Name[fi]=Windows Name[fr]=Windows Name[gl]=Xanelas Name[id]=Windows Name[it]=Windows Name[nl]=Windows Name[nn]=Windows Name[pl]=Windows Name[pt]=Windows +Name[pt_BR]=Windows Name[sv]=Windows Name[uk]=Windows Name[x-test]=xxWindowsxx Name[zh_CN]=Windows Comment=Windows like theme based on Material design Comment[ca]=Tema semblant al Windows, basat en el «Material design» Comment[ca@valencia]=Tema semblant al Windows, basat en el «Material design» Comment[cs]=Motiv podobný Windows založený na designu Material Comment[da]=Windows-lignende tema baseret på Material design Comment[de]=Windows ähnliches Design auf der Basis des Designs Material Comment[en_GB]=Windows like theme based on Material design Comment[es]=Tema estilo Windows basado en el diseño Material Comment[fi]=Material-designiin pohjautuva Windowsin kaltainen teema Comment[fr]=Thème Windows inspiré par Material Comment[gl]=Tema parecido a Windows baseado no deseño material Comment[id]=Tema seperti Windows berdasarkan pada desain Material Comment[it]=Tema di tipo Windows, basato sul design Material Comment[nl]=Op Windows lijkend thema gebaseerd op Material ontwerp Comment[nn]=Windows-liknande tema, basert på Material-stilen Comment[pl]=Wygląd przypominający Windowsa dla Falkona oparty na wyglądzie Material Comment[pt]=Tema semelhante ao Windows, baseado no 'material design' +Comment[pt_BR]=Tema estilo Windows baseado no Material design Comment[sv]=Windows-liknande tema baserat på Material design Comment[uk]=Windows-подібна тема, заснована на дизайні Material Comment[x-test]=xxWindows like theme based on Material designxx Comment[zh_CN]=基于材料设置的类 Windows 主题 Icon=theme.png Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com X-Falkon-License=GPLv3