├── debian ├── compat ├── docs ├── source │ └── format ├── changelog ├── endorphin.menu ├── endorphin.prerm ├── endorphin.postinst ├── control └── rules ├── autotests ├── tabbar │ ├── .gitignore │ └── tabbar.pro ├── xbel │ ├── .gitignore │ ├── xbel.pro │ ├── bad.xbel │ └── all.xbel ├── opensearchreader │ ├── testfile7.xml │ ├── .gitignore │ ├── testfile5.xml │ ├── testfile6.xml │ ├── opensearchreader.qrc │ ├── testfile2.xml │ ├── opensearchreader.pro │ ├── testfile4.xml │ ├── testfile3.xml │ └── testfile1.xml ├── webpage │ ├── .gitignore │ └── webpage.pro ├── autosaver │ ├── .gitignore │ └── autosaver.pro ├── cookiejar │ ├── .gitignore │ └── cookiejar.pro ├── tabwidget │ ├── .gitignore │ └── tabwidget.pro ├── utils │ ├── lineedit │ │ ├── .gitignore │ │ └── lineedit.pro │ ├── editlistview │ │ ├── .gitignore │ │ └── editlistview.pro │ ├── edittreeview │ │ ├── .gitignore │ │ └── edittreeview.pro │ ├── webpageproxy │ │ ├── .gitignore │ │ └── webpageproxy.pro │ ├── languagemanager │ │ ├── .gitignore │ │ └── languagemanager.pro │ ├── networkaccessmanagerproxy │ │ ├── .gitignore │ │ └── networkaccessmanagerproxy.pro │ └── utils.pro ├── bookmarknode │ ├── .gitignore │ └── bookmarknode.pro ├── modeltoolbar │ ├── .gitignore │ └── modeltoolbar.pro ├── adblock │ ├── adblockpage │ │ ├── .gitignore │ │ ├── adblockpage.pro │ │ └── test.html │ ├── adblockrule │ │ ├── .gitignore │ │ └── adblockrule.pro │ ├── adblockmanager │ │ ├── .gitignore │ │ └── adblockmanager.pro │ ├── adblocknetwork │ │ ├── .gitignore │ │ └── adblocknetwork.pro │ ├── adblocksubscription │ │ ├── .gitignore │ │ ├── rules.txt │ │ └── adblocksubscription.pro │ └── adblock.pro ├── downloadmanager │ ├── .gitignore │ └── downloadmanager.pro ├── historymanager │ ├── .gitignore │ └── historymanager.pro ├── opensearchengine │ ├── .gitignore │ ├── opensearchengine.qrc │ ├── opensearchengine.pro │ └── suggestions.txt ├── opensearchwriter │ ├── .gitignore │ ├── opensearchwriter.qrc │ ├── testfile1.xml │ ├── opensearchwriter.pro │ ├── testfile2.xml │ └── testfile3.xml ├── searchlineedit │ ├── .gitignore │ ├── searchlineedit.pro │ └── tst_searchlineedit.cpp ├── webactionmapper │ ├── .gitignore │ └── webactionmapper.pro ├── addbookmarkdialog │ ├── .gitignore │ └── addbookmarkdialog.pro ├── historyfiltermodel │ ├── .gitignore │ └── historyfiltermodel.pro ├── opensearchmanager │ ├── .gitignore │ └── opensearchmanager.pro ├── modeltest │ ├── modeltest.pri │ └── README ├── autotests.pri ├── runTests.sh ├── autotests.pro └── qtest_endorphin.h ├── manualtests ├── history │ ├── .gitignore │ └── history.pro ├── bookmarks │ ├── .gitignore │ ├── bookmarks.pro │ └── main_bookmarks.cpp ├── modelmenu │ ├── .gitignore │ └── modelmenu.pro ├── locationbar │ ├── .gitignore │ └── locationbar.pro ├── utils │ ├── editview │ │ ├── .gitignore │ │ └── editview.pro │ ├── lineedit │ │ ├── .gitignore │ │ ├── rss.png │ │ ├── bookmark.png │ │ ├── siteicon.png │ │ └── lineedit.pro │ ├── squeezelabel │ │ ├── .gitignore │ │ ├── squeezelabel.pro │ │ └── main_squeezelabel.cpp │ ├── singleapplication │ │ ├── .gitignore │ │ └── singleapplication.pro │ ├── treesortfilterproxymodel │ │ ├── .gitignore │ │ ├── treesortfilterproxymodel.pro │ │ ├── treesortfilterproxymodeldialog.ui │ │ └── main_treesortfilterproxymodel.cpp │ └── utils.pro ├── downloadmanager │ ├── .gitignore │ ├── downloadmanager.pro │ └── main_downloadmanager.cpp ├── searchlineedit │ ├── .gitignore │ ├── searchlineedit.pro │ └── main_searchlineedit.cpp ├── webviewsearch │ ├── .gitignore │ └── webviewsearch.pro ├── adblock │ ├── adblockdialog │ │ ├── .gitignore │ │ ├── adblockdialog.pro │ │ └── main_adblockdialog.cpp │ ├── adblockmodel │ │ ├── .gitignore │ │ ├── adblockmodel.pro │ │ └── main_adblockmodel.cpp │ └── adblock.pro ├── manualtests.pri └── manualtests.pro ├── tools ├── htmlToXBel │ ├── .gitignore │ ├── source.qrc │ ├── CMakeLists.txt │ ├── htmlToXBel.pro │ ├── tests │ │ └── opera9-bookmarks.html │ ├── data │ │ └── htmlToXBel.1 │ ├── mainapp.h │ ├── extract.js │ └── mainapp.cpp ├── cacheinfo │ ├── .gitignore │ ├── CMakeLists.txt │ ├── cacheinfo.pro │ └── data │ │ └── endorphin-cacheinfo.1 ├── placesimport │ ├── .gitignore │ ├── placesimport.pro │ ├── CMakeLists.txt │ └── data │ │ └── endorphin-placesimport.1 ├── .qmake.conf ├── tools.pro └── CMakeLists.txt ├── src ├── locale │ ├── .gitattributes │ ├── maintainers │ ├── calculate_completion.sh │ └── locale.pri ├── .qmake.conf ├── browser.rc ├── browser.icns ├── browser.ico ├── data │ ├── 128x128 │ │ ├── run.png │ │ ├── endorphin.png │ │ └── run.license │ ├── 16x16 │ │ └── endorphin.png │ ├── 32x32 │ │ └── endorphin.png │ ├── graphics │ │ ├── addtab.png │ │ ├── history.png │ │ ├── loading.gif │ │ ├── private.png │ │ ├── closetab.png │ │ ├── defaulticon.png │ │ └── graphics.qrc │ ├── 512x512 │ │ └── endorphin.png │ ├── searchengines │ │ ├── searchengines.qrc │ │ ├── Reddit.xml │ │ ├── Yahoo.xml │ │ ├── Google.xml │ │ ├── YouTube.xml │ │ ├── Google_Im_Feeling_Lucky.xml │ │ └── Wikipedia_en.xml │ ├── data.qrc │ ├── defaultbookmarks.xbel │ ├── fetchLinks.js │ ├── endorphin.xml │ ├── parseForms.js │ └── endorphin.1 ├── useragent │ ├── useragents.qrc │ ├── useragent.pri │ └── useragentmenu.h ├── bookmarks │ ├── xbel │ │ └── xbel.pri │ ├── bookmarks.pri │ └── bookmarkstoolbar.h ├── htmls │ ├── htmls.qrc │ ├── notfound.html │ ├── startpage.css │ └── dirlist.html ├── network │ ├── cookiejar │ │ ├── networkcookiejar │ │ │ └── networkcookiejar.pri │ │ └── cookiejar.pri │ ├── network.pri │ ├── schemeaccesshandler.cpp │ ├── schemeaccesshandler.h │ ├── networkproxyfactory.h │ ├── networkproxyfactory.cpp │ ├── fileaccesshandler.h │ └── networkdiskcache.h ├── qwebplugins │ ├── qwebplugins.pri │ ├── webpluginfactory.h │ ├── endorphinwebplugin.cpp │ └── endorphinwebplugin.h ├── locationbar │ ├── locationbar.pri │ ├── privacyindicator.h │ ├── privacyindicator.cpp │ ├── locationbarsiteicon.h │ └── locationbar.h ├── history │ └── history.pri ├── utils │ ├── README │ ├── utils.pri │ ├── lineedit_p.h │ ├── editlistview.h │ ├── edittreeview.h │ ├── edittableview.h │ ├── treesortfilterproxymodel.h │ ├── webpageproxy.h │ ├── squeezelabel.h │ ├── webpageproxy.cpp │ ├── squeezelabel.cpp │ └── treesortfilterproxymodel.cpp ├── opensearch │ ├── opensearch.pri │ ├── opensearchreader.h │ ├── opensearchwriter.h │ ├── opensearchengineaction.h │ ├── opensearchenginedelegate.h │ ├── opensearchdialog.h │ ├── opensearchengineaction.cpp │ └── opensearchenginemodel.h ├── adblock │ ├── adblock.pri │ ├── adblocknetwork.h │ ├── adblockpage.h │ ├── adblockschemeaccesshandler.h │ └── adblockblockednetworkreply.h ├── endorphin.desktop ├── aboutdialog.h ├── main.cpp ├── clearprivatedata.h ├── plaintexteditsearch.h ├── searchbutton.h ├── sourcehighlighter.h ├── webviewsearch.h ├── searchbar.h ├── src.pro ├── sourceviewer.h ├── Info_mac.plist ├── acceptlanguagedialog.h ├── clearbutton.h ├── modeltoolbar.h └── searchlineedit.h ├── install.pri ├── .gitignore ├── CMakeLists.txt ├── git_hooks ├── README.md ├── helper │ └── findstyleerrors.sh └── pre-commit │ └── compile ├── endorphin.pro ├── generateReleaseContributors ├── README.md ├── GPLHEADER ├── generateAuthors ├── webkittrunk.pri └── BUILDING.md /debian/compat: -------------------------------------------------------------------------------- 1 | 11 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /autotests/tabbar/.gitignore: -------------------------------------------------------------------------------- 1 | tabbar 2 | -------------------------------------------------------------------------------- /autotests/xbel/.gitignore: -------------------------------------------------------------------------------- 1 | xbel 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile7.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autotests/webpage/.gitignore: -------------------------------------------------------------------------------- 1 | webpage 2 | -------------------------------------------------------------------------------- /manualtests/history/.gitignore: -------------------------------------------------------------------------------- 1 | history 2 | -------------------------------------------------------------------------------- /tools/htmlToXBel/.gitignore: -------------------------------------------------------------------------------- 1 | htmlToXBel 2 | -------------------------------------------------------------------------------- /autotests/autosaver/.gitignore: -------------------------------------------------------------------------------- 1 | autosaver 2 | -------------------------------------------------------------------------------- /autotests/cookiejar/.gitignore: -------------------------------------------------------------------------------- 1 | cookiejar 2 | -------------------------------------------------------------------------------- /autotests/tabwidget/.gitignore: -------------------------------------------------------------------------------- 1 | tabwidget 2 | -------------------------------------------------------------------------------- /autotests/utils/lineedit/.gitignore: -------------------------------------------------------------------------------- 1 | lineedit 2 | -------------------------------------------------------------------------------- /manualtests/bookmarks/.gitignore: -------------------------------------------------------------------------------- 1 | bookmarks 2 | -------------------------------------------------------------------------------- /manualtests/modelmenu/.gitignore: -------------------------------------------------------------------------------- 1 | modelmenu 2 | -------------------------------------------------------------------------------- /autotests/bookmarknode/.gitignore: -------------------------------------------------------------------------------- 1 | bookmarknode 2 | -------------------------------------------------------------------------------- /autotests/modeltoolbar/.gitignore: -------------------------------------------------------------------------------- 1 | modeltoolbar 2 | -------------------------------------------------------------------------------- /manualtests/locationbar/.gitignore: -------------------------------------------------------------------------------- 1 | locationbar 2 | -------------------------------------------------------------------------------- /manualtests/utils/editview/.gitignore: -------------------------------------------------------------------------------- 1 | editview 2 | -------------------------------------------------------------------------------- /manualtests/utils/lineedit/.gitignore: -------------------------------------------------------------------------------- 1 | lineedit 2 | -------------------------------------------------------------------------------- /src/locale/.gitattributes: -------------------------------------------------------------------------------- 1 | *.ts -crlf -diff -merge 2 | -------------------------------------------------------------------------------- /tools/cacheinfo/.gitignore: -------------------------------------------------------------------------------- 1 | endorphin-cacheinfo 2 | -------------------------------------------------------------------------------- /autotests/adblock/adblockpage/.gitignore: -------------------------------------------------------------------------------- 1 | adblockpage 2 | -------------------------------------------------------------------------------- /autotests/adblock/adblockrule/.gitignore: -------------------------------------------------------------------------------- 1 | adblockrule 2 | -------------------------------------------------------------------------------- /autotests/downloadmanager/.gitignore: -------------------------------------------------------------------------------- 1 | downloadmanager 2 | -------------------------------------------------------------------------------- /autotests/historymanager/.gitignore: -------------------------------------------------------------------------------- 1 | historymanager 2 | -------------------------------------------------------------------------------- /autotests/opensearchengine/.gitignore: -------------------------------------------------------------------------------- 1 | opensearchengine 2 | -------------------------------------------------------------------------------- /autotests/opensearchreader/.gitignore: -------------------------------------------------------------------------------- 1 | opensearchreader 2 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/.gitignore: -------------------------------------------------------------------------------- 1 | opensearchwriter 2 | -------------------------------------------------------------------------------- /autotests/searchlineedit/.gitignore: -------------------------------------------------------------------------------- 1 | searchlineedit 2 | -------------------------------------------------------------------------------- /autotests/utils/editlistview/.gitignore: -------------------------------------------------------------------------------- 1 | editlistview 2 | -------------------------------------------------------------------------------- /autotests/utils/edittreeview/.gitignore: -------------------------------------------------------------------------------- 1 | edittreeview 2 | -------------------------------------------------------------------------------- /autotests/utils/webpageproxy/.gitignore: -------------------------------------------------------------------------------- 1 | webpageproxy 2 | -------------------------------------------------------------------------------- /autotests/webactionmapper/.gitignore: -------------------------------------------------------------------------------- 1 | webactionmapper 2 | -------------------------------------------------------------------------------- /manualtests/downloadmanager/.gitignore: -------------------------------------------------------------------------------- 1 | downloadmanager 2 | -------------------------------------------------------------------------------- /manualtests/searchlineedit/.gitignore: -------------------------------------------------------------------------------- 1 | searchlineedit 2 | -------------------------------------------------------------------------------- /manualtests/utils/squeezelabel/.gitignore: -------------------------------------------------------------------------------- 1 | squeezelabel 2 | -------------------------------------------------------------------------------- /manualtests/webviewsearch/.gitignore: -------------------------------------------------------------------------------- 1 | webviewsearch 2 | -------------------------------------------------------------------------------- /autotests/adblock/adblockmanager/.gitignore: -------------------------------------------------------------------------------- 1 | adblockmanager 2 | -------------------------------------------------------------------------------- /autotests/adblock/adblocknetwork/.gitignore: -------------------------------------------------------------------------------- 1 | adblocknetwork 2 | -------------------------------------------------------------------------------- /autotests/addbookmarkdialog/.gitignore: -------------------------------------------------------------------------------- 1 | addbookmarkdialog 2 | -------------------------------------------------------------------------------- /autotests/historyfiltermodel/.gitignore: -------------------------------------------------------------------------------- 1 | historyfiltermodel 2 | -------------------------------------------------------------------------------- /autotests/opensearchmanager/.gitignore: -------------------------------------------------------------------------------- 1 | opensearchmanager 2 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile5.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autotests/utils/languagemanager/.gitignore: -------------------------------------------------------------------------------- 1 | languagemanager 2 | -------------------------------------------------------------------------------- /manualtests/adblock/adblockdialog/.gitignore: -------------------------------------------------------------------------------- 1 | adblockdialog 2 | -------------------------------------------------------------------------------- /manualtests/adblock/adblockmodel/.gitignore: -------------------------------------------------------------------------------- 1 | adblockmodel 2 | -------------------------------------------------------------------------------- /tools/placesimport/.gitignore: -------------------------------------------------------------------------------- 1 | endorphin-placesimport 2 | 3 | -------------------------------------------------------------------------------- /manualtests/utils/singleapplication/.gitignore: -------------------------------------------------------------------------------- 1 | singleapplication 2 | -------------------------------------------------------------------------------- /autotests/utils/networkaccessmanagerproxy/.gitignore: -------------------------------------------------------------------------------- 1 | networkaccessmanagerproxy 2 | -------------------------------------------------------------------------------- /manualtests/utils/treesortfilterproxymodel/.gitignore: -------------------------------------------------------------------------------- 1 | treesortfilterproxymodel 2 | -------------------------------------------------------------------------------- /autotests/adblock/adblocksubscription/.gitignore: -------------------------------------------------------------------------------- 1 | adblocksubscription 2 | rules2.txt 3 | -------------------------------------------------------------------------------- /src/.qmake.conf: -------------------------------------------------------------------------------- 1 | QMAKEPATH += /usr/local/opt/qtwebkit 2 | QMAKE_MAC_SDK = macosx10.13 3 | -------------------------------------------------------------------------------- /src/browser.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "browser.ico" 2 | 3 | -------------------------------------------------------------------------------- /src/browser.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/browser.icns -------------------------------------------------------------------------------- /src/browser.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/browser.ico -------------------------------------------------------------------------------- /tools/.qmake.conf: -------------------------------------------------------------------------------- 1 | QMAKEPATH += /usr/local/opt/qtwebkit 2 | QMAKE_MAC_SDK = macosx10.13 3 | -------------------------------------------------------------------------------- /src/data/128x128/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/128x128/run.png -------------------------------------------------------------------------------- /autotests/adblock/adblocksubscription/rules.txt: -------------------------------------------------------------------------------- 1 | [Adblock Plus 0.7.1] 2 | http://example.com/ads/* 3 | @@advice 4 | -------------------------------------------------------------------------------- /src/data/16x16/endorphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/16x16/endorphin.png -------------------------------------------------------------------------------- /src/data/32x32/endorphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/32x32/endorphin.png -------------------------------------------------------------------------------- /src/data/graphics/addtab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/addtab.png -------------------------------------------------------------------------------- /src/data/graphics/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/history.png -------------------------------------------------------------------------------- /src/data/graphics/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/loading.gif -------------------------------------------------------------------------------- /src/data/graphics/private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/private.png -------------------------------------------------------------------------------- /tools/tools.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = cacheinfo htmlToXBel placesimport 3 | 4 | CONFIG += ordered 5 | -------------------------------------------------------------------------------- /src/data/128x128/endorphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/128x128/endorphin.png -------------------------------------------------------------------------------- /src/data/512x512/endorphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/512x512/endorphin.png -------------------------------------------------------------------------------- /src/data/graphics/closetab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/closetab.png -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(cacheinfo) 2 | add_subdirectory(htmlToXBel) 3 | add_subdirectory(placesimport) 4 | -------------------------------------------------------------------------------- /manualtests/manualtests.pri: -------------------------------------------------------------------------------- 1 | win32: CONFIG += console 2 | mac:CONFIG -= app_bundle 3 | 4 | include($$PWD/../src/src.pri) 5 | -------------------------------------------------------------------------------- /manualtests/utils/lineedit/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/manualtests/utils/lineedit/rss.png -------------------------------------------------------------------------------- /src/data/graphics/defaulticon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/src/data/graphics/defaulticon.png -------------------------------------------------------------------------------- /manualtests/utils/lineedit/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/manualtests/utils/lineedit/bookmark.png -------------------------------------------------------------------------------- /manualtests/utils/lineedit/siteicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EndorphinBrowser/browser/HEAD/manualtests/utils/lineedit/siteicon.png -------------------------------------------------------------------------------- /manualtests/adblock/adblock.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | adblockdialog \ 4 | adblockmodel 5 | 6 | CONFIG += ordered 7 | -------------------------------------------------------------------------------- /tools/htmlToXBel/source.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | extract.js 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /autotests/modeltest/modeltest.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | SOURCES += $$PWD/modeltest.cpp 4 | HEADERS += $$PWD/modeltest.h 5 | -------------------------------------------------------------------------------- /src/useragent/useragents.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | useragents.xml 4 | 5 | 6 | -------------------------------------------------------------------------------- /autotests/opensearchengine/opensearchengine.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | suggestions.txt 4 | 5 | 6 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | endorphin (0.12.1) buster; urgency=low 2 | 3 | * Initial release 4 | 5 | -- Aaron Dewes Thu, 23 Jul 2020 11:42:42 +0200 6 | -------------------------------------------------------------------------------- /autotests/utils/utils.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | editlistview \ 4 | edittreeview \ 5 | languagemanager \ 6 | lineedit 7 | 8 | CONFIG += ordered 9 | -------------------------------------------------------------------------------- /autotests/modeltoolbar/modeltoolbar.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | SOURCES += \ 9 | tst_modeltoolbar.cpp 10 | -------------------------------------------------------------------------------- /autotests/opensearchmanager/opensearchmanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | SOURCES += \ 9 | tst_opensearchmanager.cpp -------------------------------------------------------------------------------- /autotests/tabbar/tabbar.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_tabbar.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/cookiejar/cookiejar.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_cookiejar.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/searchlineedit/searchlineedit.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_searchlineedit.cpp 10 | -------------------------------------------------------------------------------- /autotests/webpage/webpage.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_webpage.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/tabwidget/tabwidget.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_tabwidget.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /manualtests/modelmenu/modelmenu.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | 8 | # Input 9 | SOURCES += main_modelmenu.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /manualtests/webviewsearch/webviewsearch.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | 8 | SOURCES += main_webviewsearch.cpp 9 | HEADERS += 10 | -------------------------------------------------------------------------------- /src/data/128x128/run.license: -------------------------------------------------------------------------------- 1 | run.png was created by Everaldo Coelho and YellowIcon from the crystal icon set 2 | Crystal icons were posted by the author as LGPL on kde-look under the name (Crystal_Clear_action_run.png) 3 | -------------------------------------------------------------------------------- /autotests/adblock/adblock.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | adblockmanager \ 4 | adblocknetwork \ 5 | adblockpage \ 6 | adblockrule \ 7 | adblocksubscription 8 | 9 | CONFIG += ordered 10 | -------------------------------------------------------------------------------- /autotests/addbookmarkdialog/addbookmarkdialog.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_addbookmarkdialog.cpp 10 | -------------------------------------------------------------------------------- /autotests/historymanager/historymanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_historymanager.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /debian/endorphin.menu: -------------------------------------------------------------------------------- 1 | ?package(endorphin):needs="x11" section="Applications/Network/Web Browsing" \ 2 | title="Endorphin" longtitle="Endorphin Web Browser" \ 3 | command="endorphin" icon="/usr/share/pixmaps/endorphin.xpm" 4 | -------------------------------------------------------------------------------- /manualtests/utils/utils.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | editview \ 4 | lineedit \ 5 | singleapplication \ 6 | squeezelabel \ 7 | treesortfilterproxymodel 8 | 9 | CONFIG += ordered 10 | -------------------------------------------------------------------------------- /autotests/adblock/adblockpage/adblockpage.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_adblockpage.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/adblock/adblockrule/adblockrule.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_adblockrule.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/downloadmanager/downloadmanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_downloadmanager.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/opensearchwriter.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | testfile1.xml 4 | testfile2.xml 5 | testfile3.xml 6 | 7 | 8 | -------------------------------------------------------------------------------- /autotests/webactionmapper/webactionmapper.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_webactionmapper.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /debian/endorphin.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then 5 | update-alternatives --remove x-www-browser /usr/bin/endorphin 6 | fi 7 | 8 | #DEBHELPER# 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /manualtests/locationbar/locationbar.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | 8 | # Input 9 | SOURCES += main_locationbar.cpp 10 | HEADERS += 11 | 12 | -------------------------------------------------------------------------------- /autotests/adblock/adblockmanager/adblockmanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_adblockmanager.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/adblock/adblocknetwork/adblocknetwork.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_adblocknetwork.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /autotests/autosaver/autosaver.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_autosaver.cpp autosaver.cpp 10 | HEADERS = autosaver.h 11 | -------------------------------------------------------------------------------- /src/bookmarks/xbel/xbel.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | xbelreader.h \ 7 | xbelwriter.h 8 | 9 | SOURCES += \ 10 | xbelreader.cpp \ 11 | xbelwriter.cpp 12 | -------------------------------------------------------------------------------- /src/htmls/htmls.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | dirlist.html 4 | notfound.html 5 | startpage.html 6 | startpage.css 7 | 8 | 9 | -------------------------------------------------------------------------------- /autotests/historyfiltermodel/historyfiltermodel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_historyfiltermodel.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /install.pri: -------------------------------------------------------------------------------- 1 | 2 | unix { 3 | isEmpty(PREFIX) { 4 | PREFIX = /usr/local 5 | } 6 | BINDIR = $$PREFIX/bin 7 | 8 | INSTALLS += target 9 | target.path = $$BINDIR 10 | 11 | DATADIR = $$PREFIX/share 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/network/cookiejar/networkcookiejar/networkcookiejar.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += trie_p.h networkcookiejar.h twoleveldomains_p.h networkcookiejar_p.h 6 | SOURCES += networkcookiejar.cpp 7 | -------------------------------------------------------------------------------- /src/useragent/useragent.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | useragentmenu.h 7 | 8 | SOURCES += \ 9 | useragentmenu.cpp 10 | 11 | RESOURCES += \ 12 | useragents.qrc 13 | -------------------------------------------------------------------------------- /autotests/adblock/adblocksubscription/adblocksubscription.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES += tst_adblocksubscription.cpp 10 | HEADERS += 11 | -------------------------------------------------------------------------------- /manualtests/downloadmanager/downloadmanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | 8 | # Input 9 | RESOURCES = 10 | SOURCES += main_downloadmanager.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /manualtests/utils/editview/editview.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | 8 | # Input 9 | FORMS += editview.ui 10 | SOURCES += main_editview.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /src/qwebplugins/qwebplugins.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | endorphinwebplugin.h \ 7 | webpluginfactory.h 8 | 9 | SOURCES += \ 10 | endorphinwebplugin.cpp \ 11 | webpluginfactory.cpp 12 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile6.xml: -------------------------------------------------------------------------------- 1 | 2 | Google 3 | Google Web Search 4 | 5 | -------------------------------------------------------------------------------- /manualtests/history/history.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | include(../../autotests/modeltest/modeltest.pri) 8 | 9 | # Input 10 | SOURCES += main_history.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /manualtests/bookmarks/bookmarks.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | include(../../autotests/modeltest/modeltest.pri) 8 | 9 | # Input 10 | SOURCES += main_bookmarks.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /autotests/utils/lineedit/lineedit.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_lineedit.cpp lineedit.cpp 10 | HEADERS = lineedit.h lineedit_p.h 11 | FORMS = 12 | RESOURCES = 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | endorphin 2 | Endorphin.app 3 | endorphin.exe 4 | Makefile* 5 | .DS_Store 6 | .ui 7 | .moc 8 | .obj 9 | .rcc 10 | .qm 11 | .gdb_history 12 | ui_ 13 | *.exe 14 | *.swp 15 | *~ 16 | *.pdb 17 | *.ilk 18 | massif.out.* 19 | ms_print.* 20 | doc/ 21 | .qmake.stash 22 | build 23 | -------------------------------------------------------------------------------- /autotests/utils/editlistview/editlistview.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_editlistview.cpp editlistview.cpp 10 | HEADERS = editlistview.h 11 | FORMS = 12 | RESOURCES = 13 | -------------------------------------------------------------------------------- /autotests/utils/webpageproxy/webpageproxy.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_webpageproxy.cpp webpageproxy.cpp 10 | HEADERS = webpageproxy.h 11 | FORMS = 12 | RESOURCES = 13 | -------------------------------------------------------------------------------- /debian/endorphin.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | update-alternatives --install \ 5 | /usr/bin/x-www-browser x-www-browser /usr/bin/endorphin 90 \ 6 | --slave /usr/share/man/man1/x-www-browser.1.gz x-www-browser.1.gz /usr/share/man/man1/endorphin.1.gz 7 | 8 | #DEBHELPER# 9 | -------------------------------------------------------------------------------- /autotests/utils/edittreeview/edittreeview.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_edittreeview.cpp edittreeview.cpp 10 | HEADERS = edittreeview.h 11 | FORMS = 12 | RESOURCES = 13 | -------------------------------------------------------------------------------- /manualtests/adblock/adblockdialog/adblockdialog.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | include(../../../autotests/modeltest/modeltest.pri) 8 | 9 | # Input 10 | SOURCES += main_adblockdialog.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /manualtests/adblock/adblockmodel/adblockmodel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | include(../../../autotests/modeltest/modeltest.pri) 8 | 9 | # Input 10 | SOURCES += main_adblockmodel.cpp 11 | HEADERS += 12 | -------------------------------------------------------------------------------- /manualtests/manualtests.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | adblock \ 4 | bookmarks \ 5 | downloadmanager \ 6 | history \ 7 | locationbar \ 8 | modelmenu \ 9 | searchlineedit \ 10 | utils \ 11 | webviewsearch 12 | 13 | CONFIG += ordered 14 | -------------------------------------------------------------------------------- /manualtests/utils/squeezelabel/squeezelabel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | 8 | # Input 9 | RESOURCES = 10 | FORMS = 11 | SOURCES = main_squeezelabel.cpp squeezelabel.cpp 12 | HEADERS = squeezelabel.h 13 | -------------------------------------------------------------------------------- /manualtests/utils/lineedit/lineedit.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | 8 | # Input 9 | RESOURCES = 10 | FORMS = dialog.ui 11 | SOURCES = main_lineedit.cpp lineedit.cpp 12 | HEADERS = lineedit.h lineedit_p.h 13 | -------------------------------------------------------------------------------- /autotests/bookmarknode/bookmarknode.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../autotests.pri) 7 | 8 | QT = core 9 | 10 | # Input 11 | SOURCES = bookmarknode.cpp tst_bookmarknode.cpp 12 | HEADERS = bookmarknode.h 13 | FORMS = 14 | RESOURCE = 15 | -------------------------------------------------------------------------------- /src/locationbar/locationbar.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | locationbar.h \ 7 | locationbarsiteicon.h \ 8 | privacyindicator.h 9 | 10 | SOURCES += \ 11 | locationbar.cpp \ 12 | locationbarsiteicon.cpp \ 13 | privacyindicator.cpp 14 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Endorphin) 2 | cmake_minimum_required(VERSION 3.16) 3 | set(CMAKE_AUTOMOC ON) 4 | set(CMAKE_AUTORCC ON) 5 | set(CMAKE_AUTOUIC ON) 6 | set(CMAKE_BUILD_TYPE Release) 7 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 8 | add_definitions(-Wall) 9 | 10 | add_subdirectory(src) 11 | add_subdirectory(tools) 12 | -------------------------------------------------------------------------------- /manualtests/utils/singleapplication/singleapplication.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | 8 | # Input 9 | RESOURCES = 10 | FORMS = 11 | SOURCES = main_singleapplication.cpp singleapplication.cpp 12 | HEADERS = singleapplication.h 13 | -------------------------------------------------------------------------------- /src/history/history.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | history.h \ 7 | historycompleter.h \ 8 | historymanager.h 9 | 10 | SOURCES += \ 11 | history.cpp \ 12 | historycompleter.cpp \ 13 | historymanager.cpp 14 | 15 | FORMS += \ 16 | history.ui 17 | -------------------------------------------------------------------------------- /src/data/graphics/graphics.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | addtab.png 4 | closetab.png 5 | defaulticon.png 6 | history.png 7 | loading.gif 8 | private.png 9 | 10 | 11 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/testfile1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Foo Bar 4 | Bar Foo 5 | 6 | 7 | -------------------------------------------------------------------------------- /autotests/utils/languagemanager/languagemanager.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . ../ 5 | 6 | include(../../autotests.pri) 7 | include(../../../src/locale/locale.pri) 8 | 9 | # Input 10 | SOURCES = languagemanager.cpp tst_languagemanager.cpp 11 | HEADERS = languagemanager.h 12 | FORMS = 13 | RESOURCES = 14 | -------------------------------------------------------------------------------- /src/data/searchengines/searchengines.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Google.xml 4 | Google_Im_Feeling_Lucky.xml 5 | Yahoo.xml 6 | Wikipedia_en.xml 7 | YouTube.xml 8 | Reddit.xml 9 | 10 | 11 | -------------------------------------------------------------------------------- /autotests/opensearchreader/opensearchreader.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | testfile1.xml 4 | testfile2.xml 5 | testfile3.xml 6 | testfile4.xml 7 | testfile5.xml 8 | testfile6.xml 9 | testfile7.xml 10 | 11 | 12 | -------------------------------------------------------------------------------- /manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../manualtests.pri) 7 | 8 | # Input 9 | SOURCES = main_treesortfilterproxymodel.cpp treesortfilterproxymodel.cpp 10 | HEADERS = treesortfilterproxymodel.h 11 | 12 | FORMS += treesortfilterproxymodeldialog.ui 13 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wikipedia (en) 4 | 5 | http://en.wikipedia.org/favicon.ico 6 | -------------------------------------------------------------------------------- /src/data/data.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 128x128/endorphin.png 4 | 128x128/run.png 5 | endorphin.svg 6 | defaultbookmarks.xbel 7 | fetchLinks.js 8 | parseForms.js 9 | ../../AUTHORS 10 | ../../LICENSE.GPL2 11 | 12 | 13 | -------------------------------------------------------------------------------- /autotests/utils/networkaccessmanagerproxy/networkaccessmanagerproxy.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../../autotests.pri) 7 | 8 | # Input 9 | SOURCES = tst_networkaccessmanagerproxy.cpp networkaccessmanagerproxy.cpp webpageproxy.cpp 10 | HEADERS = networkaccessmanagerproxy.h networkaccessmanagerproxy_p.h webpageproxy.h 11 | FORMS = 12 | RESOURCES = 13 | -------------------------------------------------------------------------------- /manualtests/searchlineedit/searchlineedit.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../manualtests.pri) 7 | 8 | # Input 9 | RESOURCES = 10 | FORMS = 11 | SOURCES = searchbutton.cpp clearbutton.cpp lineedit.cpp searchlineedit.cpp 12 | HEADERS = searchbutton.h clearbutton.h lineedit.h lineedit_p.h searchlineedit.h 13 | 14 | SOURCES += main_searchlineedit.cpp 15 | -------------------------------------------------------------------------------- /git_hooks/README.md: -------------------------------------------------------------------------------- 1 | # Git hooks 2 | 3 | These are various git hooks that are used to help improve the quality of Endorphin. 4 | 5 | They are managed using the [git-hooks tool](https://github.com/AaronDewes/git-hooks). 6 | 7 | To enable them run "git hooks install" 8 | 9 | Some hooks to add: 10 | check for a license in the file commited 11 | check that the author has a copyright statement in the file they are modifing 12 | -------------------------------------------------------------------------------- /autotests/opensearchreader/opensearchreader.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | SOURCES = \ 9 | opensearchengine.cpp \ 10 | opensearchreader.cpp \ 11 | tst_opensearchreader.cpp 12 | 13 | HEADERS = \ 14 | opensearchengine.h \ 15 | opensearchreader.h 16 | 17 | FORMS = 18 | 19 | RESOURCES = \ 20 | opensearchreader.qrc 21 | 22 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/opensearchwriter.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | SOURCES = \ 9 | opensearchengine.cpp \ 10 | opensearchwriter.cpp \ 11 | tst_opensearchwriter.cpp 12 | 13 | HEADERS = \ 14 | opensearchengine.h \ 15 | opensearchwriter.h 16 | 17 | FORMS = 18 | 19 | RESOURCES = \ 20 | opensearchwriter.qrc 21 | 22 | -------------------------------------------------------------------------------- /autotests/xbel/xbel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | # Input 9 | SOURCES = \ 10 | tst_xbel.cpp \ 11 | bookmarks/bookmarknode.cpp \ 12 | bookmarks/xbel/xbelreader.cpp \ 13 | bookmarks/xbel/xbelwriter.cpp 14 | 15 | HEADERS = \ 16 | bookmarks/bookmarknode.h \ 17 | bookmarks/xbel/xbelreader.h \ 18 | bookmarks/xbel/xbelwriter.h 19 | -------------------------------------------------------------------------------- /src/data/searchengines/Reddit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reddit 4 | Reddit Site Search 5 | 6 | http://www.reddit.com/favicon.ico 7 | -------------------------------------------------------------------------------- /autotests/opensearchengine/opensearchengine.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | include(../autotests.pri) 7 | 8 | SOURCES = \ 9 | opensearchengine.cpp \ 10 | opensearchenginedelegate.cpp \ 11 | tst_opensearchengine.cpp 12 | 13 | HEADERS = \ 14 | opensearchengine.h \ 15 | opensearchenginedelegate.h 16 | 17 | FORMS = 18 | 19 | RESOURCES = \ 20 | opensearchengine.qrc 21 | -------------------------------------------------------------------------------- /src/data/defaultbookmarks.xbel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bookmarks Bar 6 | 7 | Endorphin 8 | 9 | 10 | 11 | Bookmarks Menu 12 | 13 | 14 | -------------------------------------------------------------------------------- /tools/cacheinfo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(endorphin-cacheinfo) 2 | find_package(Qt5Widgets REQUIRED) 3 | find_package(Qt5Core REQUIRED) 4 | find_package(Qt5Gui REQUIRED) 5 | find_package(Qt5Network REQUIRED) 6 | add_executable(endorphin-cacheinfo main.cpp) 7 | qt5_use_modules(endorphin-cacheinfo Widgets) 8 | qt5_use_modules(endorphin-cacheinfo Core) 9 | qt5_use_modules(endorphin-cacheinfo Gui) 10 | qt5_use_modules(endorphin-cacheinfo Network) 11 | -------------------------------------------------------------------------------- /autotests/adblock/adblockpage/test.html: -------------------------------------------------------------------------------- 1 | 2 |
Cheapest tofu, only here and now!
3 |
Really cheap tofu, click here!
4 | Only here you get the best tofu! 5 |
tofu!
6 |
Cheapest tofu, only here and now!
7 |
Cheapest tofu, only here and now!
8 |
tofu!
9 | -------------------------------------------------------------------------------- /autotests/autotests.pri: -------------------------------------------------------------------------------- 1 | win32: CONFIG += console 2 | mac:CONFIG -= app_bundle 3 | 4 | CONFIG += qtestlib 5 | 6 | include($$PWD/../src/src.pri) 7 | include($$PWD/modeltest/modeltest.pri) 8 | 9 | HEADERS += qtest_endorphin.h 10 | 11 | DEFINES += AUTOTESTS 12 | 13 | INCLUDEPATH += $$PWD 14 | DEPENDPATH += $$PWD 15 | 16 | RCC_DIR = $$PWD/.rcc 17 | UI_DIR = $$PWD/.ui 18 | MOC_DIR = $$PWD/.moc 19 | OBJECTS_DIR = $$PWD/.obj 20 | 21 | 22 | -------------------------------------------------------------------------------- /autotests/opensearchengine/suggestions.txt: -------------------------------------------------------------------------------- 1 | ["sea", ["sears", "search engines", "search engine", "search", "sears.com", "seattle times"], ["7,390,000 results", "17,900,000 results", "25,700,000 results", "1,220,000,000 results", "1 result", "17,600,000 results"], ["http://example.com?q=sears", "http://example.com?q=search+engines", "http://example.com?q=search+engine", "http://example.com?q=search", "http://example.com?q=sears.com", "http://example.com?q=seattle+times"]] -------------------------------------------------------------------------------- /src/data/searchengines/Yahoo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Yahoo! 4 | Yahoo Web Search 5 | 6 | http://www.yahoo.com/favicon.ico 7 | -------------------------------------------------------------------------------- /endorphin.pro: -------------------------------------------------------------------------------- 1 | lessThan(QT_VERSION, 5.0) { 2 | error("Endorphin requires Qt 5.0 or greater") 3 | } 4 | 5 | TEMPLATE = subdirs 6 | SUBDIRS = src tools 7 | CONFIG += ordered 8 | 9 | unix { 10 | warning("It is recommended to use CMake instead of QMake") 11 | # this is an ugly work around to do .PHONY: doc 12 | doxygen.target = doc dox 13 | doxygen.commands = doxygen Doxyfile 14 | doxygen.depends = Doxyfile 15 | QMAKE_EXTRA_TARGETS += doxygen 16 | } 17 | 18 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/testfile2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Endorphin! 4 | a cross platform web browser built using Qt and WebKit 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: endorphin 2 | Section: web 3 | Priority: extra 4 | Maintainer: Aaron Dewes 5 | Build-Depends: debhelper (>= 5), qtbase5-dev (>= 5.14), cmake (>= 3.16) 6 | Standards-Version: 3.7.3 7 | 8 | Package: endorphin 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends} 11 | Provides: www-browser 12 | Description: Endorphin is an open-source browser project that aims to build a cross-platform 13 | WebKit browser that integrates with every desktop. 14 | -------------------------------------------------------------------------------- /src/data/fetchLinks.js: -------------------------------------------------------------------------------- 1 | (function (){ 2 | var links = new Array; 3 | var it = document.evaluate('/html/head/link', document, null, XPathResult.ANY_TYPE, null); 4 | var link = it.iterateNext(); 5 | while (link) { 6 | var obj = new Object; 7 | obj.rel = link.rel; 8 | obj.type = link.type; 9 | obj.href = link.href; 10 | obj.title = link.title; 11 | links.push(obj); 12 | link = it.iterateNext(); 13 | } 14 | return links; 15 | })(); -------------------------------------------------------------------------------- /src/data/endorphin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Endorphin 7 | endorphin 8 | endorphin %s 9 | endorphin 10 | false 11 | false 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /autotests/runTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for directory in `ls -d */` 4 | do 5 | name=`basename $directory` 6 | 7 | if [ $name == "modeltest" ] 8 | then 9 | continue 10 | fi 11 | 12 | if [ $name == "downloadmanager" ] 13 | then 14 | continue 15 | fi 16 | 17 | cd $name 18 | 19 | if [ ! -f $name ] 20 | then 21 | printf "$name/$name is not compiled.\n" 22 | else 23 | ./$name -silent 24 | fi 25 | 26 | printf "\n" 27 | cd ../ 28 | done -------------------------------------------------------------------------------- /autotests/autotests.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = \ 3 | adblock \ 4 | addbookmarkdialog \ 5 | autosaver \ 6 | bookmarknode \ 7 | cookiejar \ 8 | historyfiltermodel \ 9 | historymanager \ 10 | modeltoolbar \ 11 | opensearchengine \ 12 | opensearchmanager \ 13 | opensearchreader \ 14 | opensearchwriter \ 15 | searchlineedit \ 16 | tabbar \ 17 | tabwidget \ 18 | utils \ 19 | webactionmapper \ 20 | webpage \ 21 | xbel 22 | 23 | CONFIG += ordered 24 | -------------------------------------------------------------------------------- /src/locale/maintainers: -------------------------------------------------------------------------------- 1 | The list of the maintainers for each translation. Patches should be reviewed by them before being merged in. 2 | 3 | cs_CZ - David Kolibáč 4 | es - Miguel Anxo Bouzada 5 | fr_FR - Vincent Rischmann 6 | gl - Miguel Anxo Bouzada 7 | it_IT - Vincenzo Reale 8 | nl_NL - Kristof Bal 9 | pl_PL - Jakub Wieczorek 10 | he_IL - Diego Iastrubni 11 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Google 4 | Google Web Search 5 | 6 | 7 | http://www.google.com/favicon.ico 8 | -------------------------------------------------------------------------------- /src/network/cookiejar/cookiejar.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | cookiedialog.h \ 7 | cookieexceptionsdialog.h \ 8 | cookieexceptionsmodel.h \ 9 | cookiejar.h \ 10 | cookiemodel.h 11 | 12 | SOURCES += \ 13 | cookiedialog.cpp \ 14 | cookieexceptionsmodel.cpp \ 15 | cookiemodel.cpp \ 16 | cookieexceptionsdialog.cpp \ 17 | cookiejar.cpp 18 | 19 | FORMS += \ 20 | cookies.ui \ 21 | cookiesexceptions.ui 22 | 23 | include($$PWD/networkcookiejar/networkcookiejar.pri) 24 | -------------------------------------------------------------------------------- /src/network/network.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | FORMS += \ 6 | passworddialog.ui \ 7 | proxy.ui 8 | 9 | HEADERS += \ 10 | fileaccesshandler.h \ 11 | networkaccessmanager.h \ 12 | networkdiskcache.h \ 13 | networkproxyfactory.h \ 14 | schemeaccesshandler.h 15 | 16 | SOURCES += \ 17 | fileaccesshandler.cpp \ 18 | networkaccessmanager.cpp \ 19 | networkdiskcache.cpp \ 20 | networkproxyfactory.cpp \ 21 | schemeaccesshandler.cpp 22 | 23 | include(cookiejar/cookiejar.pri) 24 | -------------------------------------------------------------------------------- /generateReleaseContributors: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./generateAuthors 0.12.0..HEAD | while read line 3 | do 4 | name=`echo $line | sed -e 's/ [^ ]*@[^ ]*//g'` 5 | email=`echo $line | sed -e 's/.* //g' | tr [A-Z] [a-z]` 6 | echo -n "\"$name\"src=\"https://secure.gravatar.com/avatar/""; 13 | echo " $name $email
" 14 | done 15 | 16 | -------------------------------------------------------------------------------- /tools/htmlToXBel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(htmlToXBel) 2 | find_package(Qt5Widgets REQUIRED) 3 | find_package(Qt5Core REQUIRED) 4 | find_package(Qt5Gui REQUIRED) 5 | find_package(Qt5WebEngine REQUIRED) 6 | find_package(Qt5Network REQUIRED) 7 | find_package(Qt5WebEngineWidgets REQUIRED) 8 | add_executable(htmlToXBel main.cpp mainapp.cpp source.qrc) 9 | qt5_use_modules(htmlToXBel Core) 10 | qt5_use_modules(htmlToXBel Widgets) 11 | qt5_use_modules(htmlToXBel Sql) 12 | qt5_use_modules(htmlToXBel WebEngine) 13 | qt5_use_modules(htmlToXBel Network) 14 | qt5_use_modules(htmlToXBel WebEngineWidgets) 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Endorphin web browser 2 | 3 | Endorphin is a cross platform web browser built using Qt and WebKit. 4 | 5 | This is a fork of the [Arora browser](https://github.com/Arora/arora). 6 | This fork was created by Aaron Dewes. 7 | 8 | ## Contributing 9 | 10 | If you want to contribute, feel free to open an issue or a PR. 11 | 12 | 13 | ### Building 14 | Endorphin uses the cmake build system. If you already have Qt 5.14 or newer on your system building is as easy as running the command 'cmake' and then 'make'. 15 | For more detailed information see the [Building guide](BUILDING.md). 16 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GitHub 4 | Search GitHub 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/data/searchengines/Google.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Google 4 | Google Web Search 5 | 6 | 7 | http://www.google.com/favicon.ico 8 | -------------------------------------------------------------------------------- /src/data/searchengines/YouTube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | YouTube 4 | YouTube 5 | 6 | 7 | http://www.youtube.com/favicon.ico 8 | -------------------------------------------------------------------------------- /src/bookmarks/bookmarks.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | addbookmarkdialog.h \ 7 | bookmarksdialog.h \ 8 | bookmarksmanager.h \ 9 | bookmarksmenu.h \ 10 | bookmarksmodel.h \ 11 | bookmarkstoolbar.h \ 12 | bookmarknode.h 13 | 14 | SOURCES += \ 15 | addbookmarkdialog.cpp \ 16 | bookmarksdialog.cpp \ 17 | bookmarksmanager.cpp \ 18 | bookmarksmenu.cpp \ 19 | bookmarksmodel.cpp \ 20 | bookmarkstoolbar.cpp \ 21 | bookmarknode.cpp 22 | 23 | FORMS += \ 24 | addbookmarkdialog.ui \ 25 | bookmarksdialog.ui 26 | 27 | include(xbel/xbel.pri) 28 | -------------------------------------------------------------------------------- /src/data/searchengines/Google_Im_Feeling_Lucky.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Google (I'm Feeling Lucky) 4 | Google Web Search 5 | 6 | 7 | http://www.google.com/favicon.ico 8 | -------------------------------------------------------------------------------- /src/data/searchengines/Wikipedia_en.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wikipedia (en) 4 | Full text search in the English Wikipedia 5 | 6 | 7 | http://en.wikipedia.org/favicon.ico 8 | -------------------------------------------------------------------------------- /src/utils/README: -------------------------------------------------------------------------------- 1 | The utils directory is a collection of classes: 2 | - They are stand alone classes with no dependency on Endorphin or each other. 3 | - Provide functionality that can not be found in Qt. 4 | - Licensed under the BSD or public domain. 5 | - Have auto tests and or manual tests were applicable. 6 | 7 | The purpose of the utils classes is to provide functionality that is missing from Qt, but not specific to Endorphin. For example the SqueezeLabel provides a QLabel that can take a string larger than the size of the widget and insert "..." in the middle to squeeze the text into the size of the widget. Such a class could be useful for many Qt application and might even be a feature added to Qt one day. 8 | -------------------------------------------------------------------------------- /src/opensearch/opensearch.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | opensearchdialog.h \ 7 | opensearchengine.h \ 8 | opensearchenginedelegate.h \ 9 | opensearchengineaction.h \ 10 | opensearchenginemodel.h \ 11 | opensearchmanager.h \ 12 | opensearchreader.h \ 13 | opensearchwriter.h 14 | 15 | SOURCES += \ 16 | opensearchdialog.cpp \ 17 | opensearchengine.cpp \ 18 | opensearchenginedelegate.cpp \ 19 | opensearchengineaction.cpp \ 20 | opensearchenginemodel.cpp \ 21 | opensearchmanager.cpp \ 22 | opensearchreader.cpp \ 23 | opensearchwriter.cpp 24 | 25 | FORMS += opensearchdialog.ui 26 | 27 | QT += script 28 | -------------------------------------------------------------------------------- /autotests/opensearchreader/testfile1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wikipedia (en) 4 | Full text search in the English Wikipedia 5 | 6 | 7 | 8 | 9 | http://en.wikipedia.org/favicon.ico 10 | -------------------------------------------------------------------------------- /src/adblock/adblock.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | 4 | VPATH += $$PWD 5 | 6 | HEADERS += \ 7 | adblockblockednetworkreply.h \ 8 | adblockdialog.h \ 9 | adblockmanager.h \ 10 | adblockmodel.h \ 11 | adblocknetwork.h \ 12 | adblockpage.h \ 13 | adblockrule.h \ 14 | adblockschemeaccesshandler.h \ 15 | adblocksubscription.h 16 | 17 | SOURCES += \ 18 | adblockblockednetworkreply.cpp \ 19 | adblockdialog.cpp \ 20 | adblockmanager.cpp \ 21 | adblockmodel.cpp \ 22 | adblocknetwork.cpp \ 23 | adblockpage.cpp \ 24 | adblockrule.cpp \ 25 | adblockschemeaccesshandler.cpp \ 26 | adblocksubscription.cpp 27 | 28 | FORMS += \ 29 | adblockdialog.ui 30 | -------------------------------------------------------------------------------- /autotests/opensearchwriter/testfile3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Foo Bar 4 | Bar Foo 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tools/cacheinfo/cacheinfo.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = endorphin-cacheinfo 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | win32|os2: CONFIG += console 7 | mac:CONFIG -= app_bundle 8 | 9 | QT += network 10 | 11 | # Input 12 | SOURCES += main.cpp 13 | 14 | RCC_DIR = $$PWD/.rcc 15 | UI_DIR = $$PWD/.ui 16 | MOC_DIR = $$PWD/.moc 17 | OBJECTS_DIR = $$PWD/.obj 18 | 19 | include(../../install.pri) 20 | 21 | !mac { 22 | unix { 23 | INSTALLS += man man-compress 24 | 25 | man.path = $$DATADIR/man/man1 26 | man.files += data/endorphin-cacheinfo.1 27 | 28 | man-compress.path = $$DATADIR/man/man1 29 | man-compress.extra = "" "gzip -9 -f \$(INSTALL_ROOT)/$$DATADIR/man/man1/endorphin-cacheinfo.1" "" 30 | man-compress.depends = install_man 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /GPLHEADER: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Name 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ -------------------------------------------------------------------------------- /src/locale/calculate_completion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script was written to get some data on how far the various translations are 4 | # compared to each other 5 | # 6 | # This script is donated to the public domain 7 | # 8 | # Klaas van Gend, 2008 9 | 10 | printf "\n translation file %%ready (unfinished/(total-obsolete))\n" 11 | printf '=============================================================\n' 12 | for I in `ls -1 *.ts`; 13 | do 14 | UNFINISHED=`grep 'type="unfinished"' $I | wc -l`; 15 | OBSOLETE=`grep 'obsolete' $I | wc -l`; 16 | MSGLINES=`grep '' $I | wc -l`; 17 | let "REALLINES=$MSGLINES-$OBSOLETE"; 18 | let "PERCENT=(100*$UNFINISHED)/$REALLINES"; 19 | let "FINISHED=100-$PERCENT"; 20 | printf "% 18s : % 4d%% %d/(%d-%d)\n" $I $FINISHED $UNFINISHED $MSGLINES $OBSOLETE ; 21 | done 22 | printf "\n" 23 | 24 | -------------------------------------------------------------------------------- /manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodeldialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TreeSortFilterProxyModelDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/htmlToXBel/htmlToXBel.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = htmlToXBel 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | win32|os2: CONFIG += console 7 | mac:CONFIG -= app_bundle 8 | 9 | QT += network webkit webkitwidgets 10 | 11 | # Input 12 | SOURCES += main.cpp 13 | 14 | RCC_DIR = $$PWD/.rcc 15 | UI_DIR = $$PWD/.ui 16 | MOC_DIR = $$PWD/.moc 17 | OBJECTS_DIR = $$PWD/.obj 18 | 19 | RESOURCES += source.qrc 20 | 21 | include(../../install.pri) 22 | include(../../webkittrunk.pri) 23 | 24 | !mac { 25 | unix { 26 | INSTALLS += man man-compress 27 | 28 | man.path = $$DATADIR/man/man1 29 | man.files += data/htmlToXBel.1 30 | 31 | man-compress.path = $$DATADIR/man/man1 32 | man-compress.extra = "" "gzip -9 -f \$(INSTALL_ROOT)/$$DATADIR/man/man1/htmlToXBel.1" "" 33 | man-compress.depends = install_man 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tools/placesimport/placesimport.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = endorphin-placesimport 3 | DEPENDPATH += . 4 | INCLUDEPATH += . 5 | 6 | win32|os2: CONFIG += console 7 | mac:CONFIG -= app_bundle 8 | 9 | QT += sql 10 | 11 | # Input 12 | SOURCES += main_placesimport.cpp 13 | 14 | include(../../install.pri) 15 | # This can be improved to just include the history manager and utility classes 16 | # once the history classes are separated out into individual files. 17 | include(../../src/src.pri) 18 | 19 | !mac { 20 | unix { 21 | INSTALLS += man man-compress 22 | 23 | man.path = $$DATADIR/man/man1 24 | man.files += data/endorphin-placesimport.1 25 | 26 | man-compress.path = $$DATADIR/man/man1 27 | man-compress.extra = "" "gzip -9 -f \$(INSTALL_ROOT)/$$DATADIR/man/man1/endorphin-placesimport.1" "" 28 | man-compress.depends = install_man 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/utils/utils.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | VPATH += $$PWD 4 | 5 | HEADERS += \ 6 | editlistview.h \ 7 | edittableview.h \ 8 | edittreeview.h \ 9 | languagemanager.h \ 10 | lineedit.h \ 11 | lineedit_p.h \ 12 | networkaccessmanagerproxy.h \ 13 | networkaccessmanagerproxy_p.h \ 14 | singleapplication.h \ 15 | squeezelabel.h \ 16 | treesortfilterproxymodel.h \ 17 | webpageproxy.h 18 | 19 | SOURCES += \ 20 | editlistview.cpp \ 21 | edittableview.cpp \ 22 | edittreeview.cpp \ 23 | languagemanager.cpp \ 24 | lineedit.cpp \ 25 | networkaccessmanagerproxy.cpp \ 26 | singleapplication.cpp \ 27 | squeezelabel.cpp \ 28 | treesortfilterproxymodel.cpp \ 29 | webpageproxy.cpp 30 | 31 | win32 { 32 | HEADERS += explorerstyle.h 33 | SOURCES += explorerstyle.cpp 34 | LIBS += -lgdi32 35 | } 36 | -------------------------------------------------------------------------------- /src/data/parseForms.js: -------------------------------------------------------------------------------- 1 | (function (){ 2 | var forms = new Array; 3 | for (var i = 0; i < document.forms.length; ++i) { 4 | var form = document.forms[i]; 5 | var formObject = new Object; 6 | formObject.name = form.name; 7 | var elements = new Array; 8 | for (var j = 0; j < form.elements.length; ++j) { 9 | var e = form.elements[j]; 10 | var element = new Object; 11 | element.name = e.name; 12 | element.value = e.value; 13 | element.type = e.type; 14 | element.autocomplete = e.attributes.getNamedItem("autocomplete"); 15 | if (element.autocomplete != null) 16 | element.autocomplete = element.autocomplete.value; 17 | elements.push(element); 18 | } 19 | formObject.elements = elements; 20 | forms.push(formObject); 21 | } 22 | return forms; 23 | }()) 24 | -------------------------------------------------------------------------------- /tools/placesimport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(endorphin-placesimport) 2 | find_package(Qt5Core REQUIRED) 3 | find_package(Qt5Widgets REQUIRED) 4 | find_package(Qt5Sql REQUIRED) 5 | find_package(Qt5WebKit REQUIRED) 6 | find_package(Qt5WebKitWidgets REQUIRED) 7 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../src ${CMAKE_CURRENT_SOURCE_DIR}/../../src/history ${CMAKE_CURRENT_SOURCE_DIR}/../../src/utils) 8 | add_definitions(-DNO_BROWSERAPPLICATION) 9 | set(placesimport_SRCS 10 | main_placesimport.cpp 11 | ../../src/autosaver.cpp 12 | ../../src/modelmenu.cpp 13 | ../../src/history/history.cpp 14 | ../../src/history/historymanager.cpp 15 | ../../src/utils/singleapplication.cpp 16 | ) 17 | 18 | add_executable(endorphin-placesimport ${placesimport_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS}) 19 | qt5_use_modules(endorphin-placesimport Core) 20 | qt5_use_modules(endorphin-placesimport Widgets) 21 | qt5_use_modules(endorphin-placesimport Sql) 22 | qt5_use_modules(endorphin-placesimport WebKit) 23 | qt5_use_modules(endorphin-placesimport WebKitWidgets) 24 | -------------------------------------------------------------------------------- /autotests/xbel/bad.xbel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Folder Title 12 | 13 | Title 14 | 15 | 16 | Title 2 17 | 18 | 19 | 20 | 21 | Has SubFolder 22 | 23 | 24 | SubFolder 25 | 26 | Title 27 | 28 | 29 | 30 | Title3 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/network/schemeaccesshandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jonas Gehring 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "schemeaccesshandler.h" 21 | 22 | SchemeAccessHandler::SchemeAccessHandler(QObject *parent) 23 | : QObject(parent) 24 | { 25 | } 26 | 27 | -------------------------------------------------------------------------------- /tools/placesimport/data/endorphin-placesimport.1: -------------------------------------------------------------------------------- 1 | .TH ENDORPHIN-PLACESIMPORT "1" "July 2009" 2 | 3 | .SH NAME 4 | endorphin-placesimport - a tool for importing browser history from Firefox 3 and up 5 | 6 | .SH SYNOPSIS 7 | .B endorphin-placesimport ~/.mozilla/firefox/[profile-dir]/places.sqlite 8 | 9 | .SH DESCRIPTION 10 | .B endorphin-placesimport 11 | is a tool for importing browser history from Firefox 3 and up. 12 | 13 | .SH BUGS 14 | Please report bugs to \fIhttps://github.com/AaronDewes/endorphin-browser/issues\fR. 15 | 16 | .SH AUTHOR 17 | The author of endorphin-placesimport is Aaron Dewes . 18 | .PP 19 | This manual page was written by Aaron Dewes 20 | .PP 21 | Permission is granted to copy, distribute and/or modify this document under the 22 | terms of the 23 | GNU General Public License, Version 2 or any later version published by the Free 24 | Software Foundation. 25 | .PP 26 | On Debian systems, the complete text of the GNU General Public License can be 27 | found in /usr/share/common-licenses/GPL. 28 | -------------------------------------------------------------------------------- /git_hooks/helper/findstyleerrors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Coding style: http://code.google.com/p/arora/wiki/CodingStyle 4 | # 5 | 6 | case "${1}" in 7 | --about ) 8 | echo "Hack of a script to find some common style errors." 9 | exit 0 10 | ;; 11 | esac 12 | 13 | 14 | args=$1 15 | if [ -z "${args}" ] ; then 16 | args="*" 17 | fi 18 | 19 | options="-n --exclude=moc_* --exclude=qrc_* --include=*.cpp --include=*.h -r" 20 | 21 | grep $options '( ' $args 22 | grep $options ' )' $args 23 | grep $options 'if(' $args 24 | grep $options 'for(' $args 25 | grep $options 'while(' $args 26 | grep $options 'switch(' $args 27 | grep $options 'foreach(' $args 28 | grep $options ' $' $args 29 | grep $options '^{ }*{' $args 30 | grep $options '){' $args 31 | grep $options ' ' $args 32 | grep $options ' \*>' $args 33 | grep $options '#include "q' $args 34 | egrep $options '\(.*\* .*\)' $args | grep '::' 35 | grep $options '[a-z]++' $args | grep 'for' 36 | grep $options '[a-z]--' $args | grep 'for' 37 | 38 | # var *name; 39 | grep $options '[^\* \/]\* ' $args 40 | grep $options '[^& ]& ' $args 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /src/htmls/notfound.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %1 5 | 46 | 47 | 48 |
49 | 50 |

%2

51 |

%3

52 |
    53 |
  • %4
  • 54 |
  • %5
  • 55 |
  • %6
  • 56 |
57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /autotests/xbel/all.xbel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Folder Title 12 | 13 | Title 14 | 15 | 16 | Title 2 17 | 18 | 19 | Title 3 20 | 21 | 22 | 23 | 24 | Has SubFolder 25 | 26 | 27 | SubFolder 28 | 29 | Title 30 | 31 | 32 | 33 | Title3 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tools/htmlToXBel/tests/opera9-bookmarks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Bookmarks 7 |

Bookmarks

8 |

9 |

Opera

10 |

11 |

Download Opera 12 |
Opera Community 13 |
Opera Web Mail 14 |
Support Desk 15 |

16 |

Download.com 17 |
Amazon.com 18 |
eBay 19 |
Yahoo! 20 |

21 | -------------------------------------------------------------------------------- /src/locationbar/privacyindicator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2010 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef PRIVACYINDICATOR_H 21 | #define PRIVACYINDICATOR_H 22 | 23 | #include 24 | 25 | class PrivacyIndicator : public QLabel 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | PrivacyIndicator(QWidget *parent = 0); 31 | 32 | protected: 33 | void mousePressEvent(QMouseEvent *event); 34 | 35 | }; 36 | 37 | #endif // PRIVACYINDICATOR_H 38 | 39 | -------------------------------------------------------------------------------- /manualtests/downloadmanager/main_downloadmanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "downloadmanager.h" 21 | 22 | int main(int argc, char **argv) 23 | { 24 | QApplication application(argc, argv); 25 | 26 | DownloadManager manager; 27 | QUrl url("http://10.0.0.3/~ben/distccKNOPPIX-1.3-2004-08-20-gcc-3.3.iso"); 28 | manager.download(url); 29 | manager.show(); 30 | 31 | return application.exec(); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/opensearch/opensearchreader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jakub Wieczorek 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef OPENSEARCHREADER_H 21 | #define OPENSEARCHREADER_H 22 | 23 | #include 24 | 25 | class OpenSearchEngine; 26 | 27 | class OpenSearchReader : public QXmlStreamReader 28 | { 29 | public: 30 | OpenSearchReader(); 31 | 32 | OpenSearchEngine *read(QIODevice *device); 33 | 34 | private: 35 | OpenSearchEngine *read(); 36 | 37 | }; 38 | 39 | #endif // OPENSEARCHREADER_H 40 | 41 | -------------------------------------------------------------------------------- /tools/htmlToXBel/data/htmlToXBel.1: -------------------------------------------------------------------------------- 1 | .TH HTMLTOXBEL "1" "July 2009" 2 | 3 | .SH NAME 4 | htmlToXBel - a tool to convert bookmarks stored in the html format into the xbel format. 5 | 6 | .SH SYNOPSIS 7 | .B htmlToXBel [stdin|htmlfile] [stdout|-o outFile] 8 | 9 | .SH DESCRIPTION 10 | .B htmlToXBel 11 | is a tool to convert bookmarks stored in the html format into the xbel format. Many browser have the ability to export their bookmarks as a html file. htmlToXBel takes that file as an input and will output those bookmarks in the XML Bookmark Exchange Language (XBEL) format. 12 | 13 | .SH OPTIONS 14 | .TP 15 | .B -o outFile 16 | Write the resulting XBEL to the file \fBoutFile\fR 17 | .TP 18 | 19 | .SH BUGS 20 | Please report bugs to \fIhttps://github.com/AaronDewes/endorphin-browser/issues\fR. 21 | 22 | .SH AUTHOR 23 | The author of htmlToXBel is Aaron Dewes . 24 | .PP 25 | This manual page was written by Aaron Dewes 26 | .PP 27 | Permission is granted to copy, distribute and/or modify this document under the 28 | terms of the 29 | GNU General Public License, Version 2 or any later version published by the Free 30 | Software Foundation. 31 | .PP 32 | On Debian systems, the complete text of the GNU General Public License can be 33 | found in /usr/share/common-licenses/GPL. 34 | -------------------------------------------------------------------------------- /src/opensearch/opensearchwriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jakub Wieczorek 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef OPENSEARCHWRITER_H 21 | #define OPENSEARCHWRITER_H 22 | 23 | #include 24 | 25 | class OpenSearchEngine; 26 | 27 | class OpenSearchWriter : public QXmlStreamWriter 28 | { 29 | public: 30 | OpenSearchWriter(); 31 | 32 | bool write(QIODevice *device, OpenSearchEngine *engine); 33 | 34 | private: 35 | void write(OpenSearchEngine *engine); 36 | 37 | }; 38 | 39 | #endif // OPENSEARCHWRITER_H 40 | 41 | -------------------------------------------------------------------------------- /src/endorphin.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Endorphin 3 | Name[en_US]=Endorphin 4 | Name[es]=Endorphin 5 | Name[gl]=Endorphin 6 | Name[sr]=Endorphin 7 | Name[sr@latin]=Endorphin 8 | Comment=Browse the World Wide Web 9 | Comment[ast]=Restola pola World Wide Web 10 | Comment[es]=Navegar por internet 11 | Comment[fr_FR]=Surfer sur le web 12 | Comment[gl]=Navegar pola internet 13 | Comment[nl]=Surfen op het wereldwijde web 14 | Comment[nl_NL]=Surfen op het wereldwijde web 15 | Comment[sr]=Крстарите интернетом 16 | Comment[sr@latin]=Krstarite Internetom 17 | Comment[ja_JP]=Webを閲覧します 18 | GenericName=Web Browser 19 | GenericName[ast]=Restolador web 20 | GenericName[cs_CZ]=Webový prohlížeč 21 | GenericName[en_US]=Web Browser 22 | GenericName[es]=Navegador web 23 | GenericName[fr_FR]=Navigateur web 24 | GenericName[gl]=Navegador web 25 | GenericName[nl]=Webbrowser 26 | GenericName[nl_NL]=Webbrowser 27 | GenericName[pl]=Przeglądarka WWW 28 | GenericName[sr]=Веб прегледач 29 | GenericName[sr@latin]=Web pregledač 30 | GenericName[nb_NO]=Nettleser 31 | GenericName[ja_JP]=Webブラウザ 32 | Exec=endorphin %u 33 | Terminal=false 34 | Type=Application 35 | Icon=endorphin 36 | Categories=Application;Qt;Network;WebBrowser; 37 | MimeType=text/html;text/xml;application/xhtml+xml;application/xml;image/gif;image/jpeg;image/png; 38 | StartupNotify=true 39 | -------------------------------------------------------------------------------- /tools/htmlToXBel/mainapp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef MAINAPP_H 21 | #define MAINAPP_H 22 | 23 | #include 24 | #include 25 | 26 | class QWebEngineView; 27 | class QPushButton; 28 | 29 | class MainApp : public QObject 30 | { 31 | Q_OBJECT 32 | public: 33 | MainApp(QObject *parent = nullptr); 34 | QString get(QString &input); 35 | void ranJavaScript(QString &value); 36 | 37 | Q_SIGNALS: 38 | void notifyRanJavaScript(); 39 | 40 | }; 41 | 42 | #endif // MAINAPP_H -------------------------------------------------------------------------------- /src/locale/locale.pri: -------------------------------------------------------------------------------- 1 | 2 | INCLUDEPATH += $$PWD 3 | DEPENDPATH += $$PWD 4 | VPATH += $$PWD 5 | 6 | TRANSLATIONS += \ 7 | ast.ts \ 8 | ca.ts \ 9 | cs_CZ.ts \ 10 | da_DK.ts \ 11 | de_DE.ts \ 12 | el_GR.ts \ 13 | es.ts \ 14 | es_CR.ts \ 15 | et_EE.ts \ 16 | fi_FI.ts \ 17 | fr_CA.ts \ 18 | fr_FR.ts \ 19 | gl.ts \ 20 | he_IL.ts \ 21 | hu_HU.ts \ 22 | it_IT.ts \ 23 | ja_JP.ts \ 24 | ko_KR.ts \ 25 | ms.ts \ 26 | nb_NO.ts \ 27 | nl.ts \ 28 | pl_PL.ts \ 29 | pt_PT.ts \ 30 | pt_BR.ts \ 31 | ru_RU.ts \ 32 | sk_SK.ts \ 33 | sr_RS.ts \ 34 | sr_RS@latin.ts \ 35 | tr_TR.ts \ 36 | uk.ts \ 37 | zh_CN.ts \ 38 | zh_TW.ts 39 | 40 | isEmpty(QMAKE_LRELEASE) { 41 | win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe 42 | else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease 43 | unix { 44 | !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 } 45 | } else { 46 | !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease } 47 | } 48 | } 49 | 50 | updateqm.input = TRANSLATIONS 51 | updateqm.output = .qm/locale/${QMAKE_FILE_BASE}.qm 52 | updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm .qm/locale/${QMAKE_FILE_BASE}.qm 53 | updateqm.CONFIG += no_link target_predeps 54 | QMAKE_EXTRA_COMPILERS += updateqm 55 | -------------------------------------------------------------------------------- /src/opensearch/opensearchengineaction.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef OPENSEARCHENGINEACTION_H 21 | #define OPENSEARCHENGINEACTION_H 22 | 23 | #include 24 | 25 | class OpenSearchEngine; 26 | class OpenSearchEngineAction : public QAction 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | OpenSearchEngineAction(OpenSearchEngine *engine, QObject *parent = 0); 32 | 33 | private slots: 34 | void imageChanged(); 35 | 36 | private: 37 | OpenSearchEngine *m_engine; 38 | }; 39 | 40 | #endif // OPENSEARCHENGINEACTION_H 41 | 42 | -------------------------------------------------------------------------------- /src/aboutdialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef ABOUTDIALOG_H 21 | #define ABOUTDIALOG_H 22 | 23 | #include 24 | #include "ui_aboutdialog.h" 25 | 26 | class AboutDialog : public QDialog, private Ui_AboutDialog 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | AboutDialog(QWidget *parent = 0); 32 | 33 | private slots: 34 | void authorsButtonClicked(); 35 | void licenseButtonClicked(); 36 | 37 | private: 38 | void displayFile(const QString &fileName, const QString &title); 39 | }; 40 | 41 | #endif // ABOUTDIALOG_H 42 | -------------------------------------------------------------------------------- /autotests/qtest_endorphin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef QTEST_ENDORPHIN_H 21 | #define QTEST_ENDORPHIN_H 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "qtry.h" 28 | 29 | #undef QTEST_MAIN 30 | 31 | #define QTEST_MAIN(TestObject) \ 32 | int main(int argc, char *argv[]) \ 33 | { \ 34 | Q_INIT_RESOURCE(htmls); \ 35 | Q_INIT_RESOURCE(data); \ 36 | BrowserApplication app(argc, argv); \ 37 | TestObject tc; \ 38 | return QTest::qExec(&tc, argc, argv); \ 39 | } 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /src/network/schemeaccesshandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jonas Gehring 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef SCHEMEACCESSHANDLER_H 21 | #define SCHEMEACCESSHANDLER_H 22 | 23 | #include 24 | 25 | #include 26 | 27 | class QNetworkReply; 28 | class SchemeAccessHandler : public QObject 29 | { 30 | public: 31 | SchemeAccessHandler(QObject *parent = 0); 32 | 33 | virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0) = 0; 34 | }; 35 | 36 | #endif // SCHEMEACCESSHANDLER_H 37 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "browserapplication.h" 21 | 22 | int main(int argc, char **argv) 23 | { 24 | Q_INIT_RESOURCE(htmls); 25 | Q_INIT_RESOURCE(data); 26 | #ifdef Q_WS_X11 27 | QApplication::setGraphicsSystem(QString::fromLatin1("raster")); 28 | #endif 29 | BrowserApplication application(argc, argv); 30 | if (!application.isRunning()) 31 | return 0; 32 | #ifdef Q_OS_WIN 33 | application.setStyle(new ExplorerStyle); 34 | #endif 35 | application.newMainWindow(); 36 | return application.exec(); 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/htmls/startpage.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | font-family: "DejaVu Sans"; 5 | } 6 | 7 | body { 8 | background: linear-gradient(90deg, #ccc, #fff 50%); 9 | margin-top: 100px; 10 | } 11 | 12 | #header, #search, #footer { 13 | width: 500px; 14 | margin: 10px auto; 15 | } 16 | 17 | #header, #search { 18 | border-radius: 0.8em; 19 | padding: 25px; 20 | } 21 | 22 | #header { 23 | background: linear-gradient(0deg, #228, #66a 90%,#668); 24 | height: 20px; 25 | } 26 | 27 | #header h1 { 28 | display: inline; 29 | font-size: 1.7em; 30 | color: #fff; 31 | font-weight: bold; 32 | } 33 | 34 | #header img { 35 | display: inline; 36 | float: right; 37 | height: 150px; 38 | margin-top: -80px; 39 | } 40 | 41 | #search { 42 | background: linear-gradient(90deg, #cdf, #eff 50%, #cdf); 43 | height: 50px; 44 | color: #000; 45 | text-align: center; 46 | padding-top: 40px !important; 47 | } 48 | 49 | #search fieldset { 50 | border: 0; 51 | } 52 | 53 | #search input[type=text] { 54 | width: 65%; 55 | } 56 | 57 | #search input[type=submit] { 58 | width: 25%; 59 | } 60 | 61 | #footer { 62 | text-align: center; 63 | color: #999; 64 | } 65 | 66 | #footer a { 67 | color: #555; 68 | text-decoration: none; 69 | } 70 | 71 | #footer a:hover { 72 | text-decoration: underline; 73 | } 74 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | builddir: 14 | mkdir -p builddir 15 | 16 | builddir/Makefile: builddir 17 | cd builddir && cmake .. 18 | 19 | build: build-stamp 20 | 21 | build-stamp: builddir/Makefile 22 | dh_testdir 23 | cd builddir && $(MAKE) 24 | touch $@ 25 | 26 | clean: 27 | dh_testdir 28 | dh_testroot 29 | rm -rf builddir 30 | dh_clean build-stamp 31 | 32 | install: build 33 | dh_testdir 34 | dh_testroot 35 | dh_clean -k 36 | cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/endorphin install 37 | 38 | binary-indep: build install 39 | 40 | binary-arch: build install 41 | dh_testdir 42 | dh_testroot 43 | dh_installchangelogs ChangeLog 44 | dh_installdocs 45 | dh_link 46 | dh_strip 47 | dh_compress 48 | dh_fixperms 49 | dh_installdeb 50 | dh_shlibdeps 51 | dh_gencontrol 52 | dh_md5sums 53 | dh_builddeb 54 | 55 | binary: binary-indep binary-arch 56 | .PHONY: build clean binary-indep binary-arch binary install configure 57 | -------------------------------------------------------------------------------- /manualtests/utils/squeezelabel/main_squeezelabel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include 21 | 22 | #include "squeezelabel.h" 23 | 24 | int main(int argc, char **argv) 25 | { 26 | QApplication application(argc, argv); 27 | 28 | SqueezeLabel label; 29 | if (application.arguments().count() > 1) 30 | label.setText(application.arguments().value(1)); 31 | else 32 | label.setText("This is one long sentence that I will have to ponder the meaning of"); 33 | label.show(); 34 | label.resize(100, label.height()); 35 | 36 | return application.exec(); 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/clearprivatedata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Jason A. Donenfeld 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef CLEARPRIVATEDATA_H 21 | #define CLEARPRIVATEDATA_H 22 | 23 | #include 24 | 25 | class QCheckBox; 26 | 27 | class ClearPrivateData : public QDialog 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | ClearPrivateData(QWidget *parent = 0); 33 | 34 | public slots: 35 | void accept(); 36 | 37 | private: 38 | QCheckBox *m_browsingHistory; 39 | QCheckBox *m_downloadHistory; 40 | QCheckBox *m_searchHistory; 41 | QCheckBox *m_cookies; 42 | QCheckBox *m_cache; 43 | QCheckBox *m_favIcons; 44 | }; 45 | 46 | #endif // CLEARPRIVATEDATA_H 47 | 48 | -------------------------------------------------------------------------------- /src/network/networkproxyfactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Benjamin K. Stuhl 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef NETWORKPROXYFACTORY_H 21 | #define NETWORKPROXYFACTORY_H 22 | 23 | #include 24 | 25 | class NetworkProxyFactory : public QNetworkProxyFactory 26 | { 27 | public: 28 | NetworkProxyFactory(); 29 | 30 | void setHttpProxy(const QNetworkProxy &proxy); 31 | void setGlobalProxy(const QNetworkProxy &proxy); 32 | 33 | virtual QList queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); 34 | 35 | private: 36 | QNetworkProxy m_httpProxy; 37 | QNetworkProxy m_globalProxy; 38 | }; 39 | 40 | #endif // NETWORKPROXYFACTORY_H 41 | -------------------------------------------------------------------------------- /src/opensearch/opensearchenginedelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jakub Wieczorek 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef OPENSEARCHENGINEDELEGATE_H 21 | #define OPENSEARCHENGINEDELEGATE_H 22 | 23 | #include 24 | #include 25 | 26 | class OpenSearchEngineDelegate 27 | { 28 | public: 29 | OpenSearchEngineDelegate(); 30 | virtual ~OpenSearchEngineDelegate(); 31 | 32 | virtual void performSearchRequest(const QNetworkRequest &request, 33 | QNetworkAccessManager::Operation operation, 34 | const QByteArray &data) = 0; 35 | }; 36 | 37 | #endif // OPENSEARCHENGINEDELEGATE_H 38 | -------------------------------------------------------------------------------- /src/plaintexteditsearch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ChriChristian Franke > 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef PLAINTEXTEDITSEARCH_H 21 | #define PLAINTEXTEDITSEARCH_H 22 | 23 | #include "searchbar.h" 24 | 25 | #include 26 | 27 | class QPlainTextEdit; 28 | class PlainTextEditSearch : public SearchBar 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | PlainTextEditSearch(QPlainTextEdit *plainTextEdit, QWidget *parent = 0); 34 | 35 | public slots: 36 | void findNext(); 37 | void findPrevious(); 38 | 39 | private: 40 | void find(QTextDocument::FindFlags flags); 41 | QPlainTextEdit *m_edit; 42 | QString m_lastSearchTerm; 43 | }; 44 | 45 | #endif // PLAINTEXTEDITSEARCH_H 46 | 47 | -------------------------------------------------------------------------------- /src/searchbutton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef SEARCHBUTTON_H 21 | #define SEARCHBUTTON_H 22 | 23 | #include 24 | 25 | class QCompleter; 26 | class SearchButton : public QAbstractButton 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | SearchButton(QWidget *parent = 0); 32 | void setImage(const QImage &image); 33 | void setShowMenuTriangle(bool show); 34 | bool showMenuTriangle() const; 35 | void paintEvent(QPaintEvent *event); 36 | QSize sizeHint() const; 37 | 38 | private: 39 | QImage generateSearchImage(bool dropDown); 40 | QImage m_cache; 41 | bool m_showMenuTriangle; 42 | }; 43 | 44 | #endif // SEARCHBUTTON_H 45 | 46 | -------------------------------------------------------------------------------- /src/locationbar/privacyindicator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2010 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "privacyindicator.h" 21 | 22 | #include "browserapplication.h" 23 | 24 | PrivacyIndicator::PrivacyIndicator(QWidget *parent) 25 | : QLabel(parent) 26 | { 27 | setPixmap(QPixmap(QLatin1String(":graphics/private.png"))); 28 | connect(BrowserApplication::instance(), SIGNAL(privacyChanged(bool)), 29 | this, SLOT(setVisible(bool))); 30 | setCursor(Qt::ArrowCursor); 31 | setVisible(BrowserApplication::isPrivate()); 32 | } 33 | 34 | void PrivacyIndicator::mousePressEvent(QMouseEvent *event) 35 | { 36 | Q_UNUSED(event) 37 | BrowserApplication::instance()->setPrivate(false); 38 | } 39 | -------------------------------------------------------------------------------- /src/locationbar/locationbarsiteicon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef LOCATIONBARSITEICON_H 21 | #define LOCATIONBARSITEICON_H 22 | 23 | #include 24 | 25 | class WebView; 26 | class LocationBarSiteIcon : public QLabel 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | LocationBarSiteIcon(QWidget *parent = 0); 32 | void setWebView(WebView *webView); 33 | 34 | protected: 35 | void mousePressEvent(QMouseEvent *event); 36 | void mouseMoveEvent(QMouseEvent *event); 37 | 38 | private slots: 39 | void webViewSiteIconChanged(); 40 | 41 | private: 42 | WebView *m_webView; 43 | QPoint m_dragStartPos; 44 | 45 | }; 46 | 47 | #endif // LOCATIONBARSITEICON_H 48 | 49 | -------------------------------------------------------------------------------- /generateAuthors: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Generate a list of everyone who has contributed to the project merging those who commited under two names or email addresses. 4 | # 5 | # To can pass an arg (which goes to git log) 6 | # Example: to see everyone who contributed between tag 0.6 and now 7 | # ./generateAuthors 0.6..HEAD 8 | # 9 | # Currently this is sorted based on # of commits, sorting contributions is not a simple topic 10 | # as pointed out in this article http://lwn.net/Articles/222773/ 11 | # 12 | git log --pretty="format:%an %ae" $1 \ 13 | | sed -e 's/smart2128 /Vincenzo Reale /g' \ 14 | | sed -e 's/buster\.xtense\.dyndns\.org/ts2server\.com/g' \ 15 | | sed -e 's/^cfchris6 /Christian Franke /g' \ 16 | | sed -e 's/^faw /Jakub Wieczorek /g' \ 17 | | sed -e 's/^LEW21 /Janusz Lewandowski /g' \ 18 | | sed -e 's/lew21@pecet.(none)$/lew21st@gmail.com/g' \ 19 | | sed -e 's/adam\.treat@torchmobile\.com/treat@kde\.org/g' \ 20 | | sed -e 's/torarnv@gmail\.com/tavestbo@trolltech\.com/g' \ 21 | | sed -e 's/bks@coldkeck2\.colorado\.edu/bks24@cornell\.edu/g' \ 22 | | sed -e 's/porphyr /Mark Reiche /g' \ 23 | | sed -e 's/vinx@zulu\.(none)/smart2128@baslug\.org/g' \ 24 | | sed -e 's/Matvey Kozhev/Maia Kozheva/g' \ 25 | | sed -e 's/kristof@localhost.(none)/kristof.bal@gmail.com/g' \ 26 | | sed -e 's/tavestbo@trolltech.com/tor.arne.vestbo@nokia.com/g' \ 27 | | sed -e 's/ariya.hidayat@trolltech.com/ariya.hidayat@gmail.com/g' \ 28 | | sort | uniq -c | sort -n -r | sed -e 's/^ *[0-9]* //g' 29 | -------------------------------------------------------------------------------- /src/opensearch/opensearchdialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Christian Franke 3 | * Copyright 2009 Jakub Wieczorek 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef OPENSEARCHDIALOG_H 22 | #define OPENSEARCHDIALOG_H 23 | 24 | #include 25 | 26 | #include "ui_opensearchdialog.h" 27 | 28 | class OpenSearchEngineModel; 29 | 30 | class OpenSearchDialog : public QDialog, public Ui_OpenSearchDialog 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | OpenSearchDialog(QWidget *parent = 0); 36 | 37 | protected slots: 38 | void addButtonClicked(); 39 | void deleteButtonClicked(); 40 | void restoreButtonClicked(); 41 | 42 | private: 43 | OpenSearchEngineModel *m_model; 44 | }; 45 | 46 | #endif //OPENSEARCHDIALOG_H 47 | 48 | -------------------------------------------------------------------------------- /autotests/modeltest/README: -------------------------------------------------------------------------------- 1 | ModelTest provides a way to check for common errors in implementations of http://doc.trolltech.com/4/qabstractitemmodel.html. 2 | 3 | 4 | ModelTest continuously checks a model as it changes, helping to verify the state and catching many common errors the moment they show up such as: 5 |

    6 |
  • Verifing X number of rows have been inserted in the correct place after the signal rowsAboutToBeInserted() says X rows will be inserted.
  • 7 |
  • The parent of the first index of the first row is a QModelIndex()
  • 8 |
  • Calling index() twice in a row with the same values will return the same QModelIndex
  • 9 |
  • If rowCount() says there are X number of rows, model test will verify that is true. 10 |
  • Many possible off by one bugs
  • 11 |
  • hasChildren() returns true if rowCount() is greater then zero.
  • 12 |
  • and many more...
  • 13 |
14 | 15 | --- 16 | 17 | To Use the model test do the following: 18 | 19 | 1) Include the pri file at the end of your project pro file using the include() command like so: 20 | 21 | include(../path/to/dir/modeltest.pri) 22 | 23 | 2) Then in your source include "modeltest.h" and instantiate ModelTest with your model so the test can live for the lifetime of your model. For example: 24 | 25 | #include 26 | 27 | QDirModel *model = new QDirModel(this); 28 | new ModelTest(model, this); 29 | 30 | 3) That is it. When the test finds a problem it will assert. modeltest.cpp contains some hints on how to fix problems that the test finds. 31 | -------------------------------------------------------------------------------- /src/network/networkproxyfactory.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Benjamin K. Stuhl 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "networkproxyfactory.h" 21 | 22 | NetworkProxyFactory::NetworkProxyFactory() 23 | : QNetworkProxyFactory() 24 | { 25 | } 26 | 27 | void NetworkProxyFactory::setHttpProxy(const QNetworkProxy &proxy) 28 | { 29 | m_httpProxy = proxy; 30 | } 31 | 32 | void NetworkProxyFactory::setGlobalProxy(const QNetworkProxy &proxy) 33 | { 34 | m_globalProxy = proxy; 35 | } 36 | 37 | QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) 38 | { 39 | QList ret; 40 | 41 | if (query.protocolTag() == QLatin1String("http") && m_httpProxy.type() != QNetworkProxy::DefaultProxy) 42 | ret << m_httpProxy; 43 | ret << m_globalProxy; 44 | 45 | return ret; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /tools/cacheinfo/data/endorphin-cacheinfo.1: -------------------------------------------------------------------------------- 1 | .TH ENDORPHIN-CACHEINFO "1" "July 2009" 2 | 3 | .SH NAME 4 | endorphin-cacheinfo - a tool for extracting files and metadata out of Endorphin cache files. 5 | 6 | .SH SYNOPSIS 7 | .B endorphin-cacheinfo [-o cachefile] [file | url] 8 | 9 | .SH DESCRIPTION 10 | .B Endorphin-cacheinfo 11 | is a tool for extracting files and displaying metadata out of an Endorphin cache files that are stored on the disk. Every cache file contains both the cached file (sometimes compressed) and metadata associated with it such as expiration date. Cache files names always include the md5sum of the url and passing a url to endorphin-cacheinfo will automatically determine the correct matching cache file name. 12 | 13 | .SH OPTIONS 14 | .TP 15 | .B -o cachefile 16 | Write the cached file if it exists to \fBcachefile\fR 17 | .TP 18 | .B file 19 | Specify the file to read from. 20 | .TP 21 | .B url 22 | Specify the url from which to compute the file to read from. 23 | .TP 24 | 25 | .SH BUGS 26 | Please report bugs to \fIhttps://github.com/AaronDewes/endorphin-browser/issues\fR. 27 | 28 | .SH AUTHOR 29 | The author of endorphin-cacheinfo is Aaron Dewes . 30 | .PP 31 | This manual page was written by Aaron Dewes 32 | .PP 33 | Permission is granted to copy, distribute and/or modify this document under the 34 | terms of the 35 | GNU General Public License, Version 2 or any later version published by the Free 36 | Software Foundation. 37 | .PP 38 | On Debian systems, the complete text of the GNU General Public License can be 39 | found in /usr/share/common-licenses/GPL. 40 | -------------------------------------------------------------------------------- /webkittrunk.pri: -------------------------------------------------------------------------------- 1 | # To build Endorphin against WebKit trunk: 2 | # export QT_WEBKIT=webkit_trunk 3 | # export WEBKITDIR=$HOME/dev/webkit 4 | # 5 | # Optional: 6 | # export WEBKITOUTPUTDIR=$HOME/build/webkit 7 | # export WEBKITBRANCH=some_cool_git_branch_of_webkit 8 | # 9 | CONFIG += $$(QT_WEBKIT) 10 | webkit_trunk { 11 | WEBKITDIR = $$(WEBKITDIR) 12 | isEmpty(WEBKITDIR): error(Please point WEBKITDIR at the root of your WebKit source tree) 13 | 14 | OUTPUT_DIR = $$(WEBKITOUTPUTDIR) 15 | isEmpty(OUTPUT_DIR): OUTPUT_DIR = $$WEBKITDIR/WebKitBuild 16 | 17 | WEBKITBRANCH = $$(WEBKITBRANCH) 18 | !isEmpty(WEBKITBRANCH) { 19 | OUTPUT_DIR = $$OUTPUT_DIR/$$WEBKITBRANCH 20 | } 21 | 22 | # When building in debug try to link to the debug version of webkit 23 | # and vice versa in release, but when they can not be paired up 24 | # because webkit only has release or debug libs fall back to the other one 25 | CONFIG(debug) { 26 | exists($$OUTPUT_DIR/Debug) { 27 | OUTPUT_DIR = $$OUTPUT_DIR/Debug 28 | } else { 29 | OUTPUT_DIR = $$OUTPUT_DIR/Release 30 | } 31 | } else:CONFIG(release) { 32 | exists($$OUTPUT_DIR/Release) { 33 | OUTPUT_DIR = $$OUTPUT_DIR/Release 34 | } else { 35 | OUTPUT_DIR = $$OUTPUT_DIR/Debug 36 | } 37 | } 38 | 39 | message(Using WebKit Trunk at $$WEBKITDIR) 40 | message(Using WebKit Build at $$OUTPUT_DIR) 41 | 42 | QT -= webkit 43 | DEFINES += WEBKIT_TRUNK 44 | include($$WEBKITDIR/WebKit.pri) 45 | QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/sourcehighlighter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Christian Franke 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef SOURCEHIGHLIGHTER_H 21 | #define SOURCEHIGHLIGHTER_H 22 | 23 | #include 24 | 25 | class SourceHighlighter : public QSyntaxHighlighter 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | enum Construct { 31 | Entity, 32 | Tag, 33 | Comment, 34 | Attribute, 35 | LastConstruct = Attribute 36 | }; 37 | SourceHighlighter(QTextDocument *document); 38 | 39 | QTextCharFormat getFormatFor(Construct construct); 40 | void setFormatFor(Construct construct, QTextCharFormat &format); 41 | 42 | protected: 43 | enum State { 44 | Normal = -1, 45 | InComment, 46 | InTag, 47 | InAttribute 48 | }; 49 | void highlightBlock(const QString &text); 50 | 51 | private: 52 | QTextCharFormat formats[LastConstruct + 1]; 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/qwebplugins/webpluginfactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef WEBPLUGINFACTORY_H 21 | #define WEBPLUGINFACTORY_H 22 | 23 | #include 24 | #include 25 | 26 | #include "endorphinwebplugin.h" 27 | 28 | class WebPluginFactory : public QWebPluginFactory 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | WebPluginFactory(QObject *parent = 0); 34 | ~WebPluginFactory(); 35 | 36 | QObject *create(const QString &mimeType, const QUrl &url, 37 | const QStringList &argumentNames, const QStringList &argumentValues) const; 38 | QList plugins() const; 39 | void refreshPlugins(); 40 | 41 | private: 42 | void init() const; 43 | mutable bool m_loaded; 44 | mutable QList m_plugins; 45 | mutable QHash m_pluginsCache; 46 | }; 47 | 48 | #endif // WEBPLUGINFACTORY_H 49 | 50 | -------------------------------------------------------------------------------- /src/webviewsearch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef WEBVIEWSEARCH_H 21 | #define WEBVIEWSEARCH_H 22 | 23 | #include "searchbar.h" 24 | 25 | #include 26 | 27 | QT_BEGIN_NAMESPACE 28 | class QWebView; 29 | QT_END_NAMESPACE 30 | 31 | class WebViewSearch : public SearchBar 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | WebViewSearch(QWebView *webView, QWidget *parent = 0); 37 | 38 | public slots: 39 | void findNext(); 40 | void findPrevious(); 41 | void highlightAll(); 42 | 43 | private: 44 | void find(QWebPage::FindFlags flags); 45 | QWebView *webView() const; 46 | }; 47 | 48 | #include "webview.h" 49 | 50 | class WebViewWithSearch : public QWidget 51 | { 52 | Q_OBJECT 53 | 54 | public: 55 | WebViewWithSearch(WebView *webView, QWidget *parent = 0); 56 | WebView *m_webView; 57 | WebViewSearch *m_webViewSearch; 58 | }; 59 | 60 | 61 | #endif // WEBVIEWSEARCH_H 62 | 63 | -------------------------------------------------------------------------------- /tools/htmlToXBel/extract.js: -------------------------------------------------------------------------------- 1 | 2 | function walk() { 3 | var parent = arguments[0]; 4 | var indent = arguments[1]; 5 | 6 | var result = ""; 7 | var children = parent.childNodes; 8 | var folderName = ""; 9 | var folded = ""; 10 | for (var i = 0; i < children.length; i++) { 11 | var object = children.item(i); 12 | if (object.nodeName == "HR") { 13 | result += indent + "\n"; 14 | } 15 | if (object.nodeName == "H3") { 16 | folderName = object.innerHTML; 17 | folded = object.folded; 18 | if (object.folded == undefined) 19 | folded = "false"; 20 | else 21 | folded = "true"; 22 | } 23 | if (object.nodeName == "A") { 24 | result += indent + "\n"; 25 | result += indent + indent + "" + object.innerHTML + "\n"; 26 | result += indent + "\n"; 27 | } 28 | 29 | var currentIndent = indent; 30 | if (object.nodeName == "DL") { 31 | result += indent + "\n"; 32 | indent += " "; 33 | result += indent + "" + folderName + "\n"; 34 | } 35 | result += walk(object, indent); 36 | if (object.nodeName == "DL") { 37 | result += currentIndent + "\n"; 38 | } 39 | } 40 | return result; 41 | } 42 | var xbel = walk(document, " "); 43 | 44 | if (xbel != "") { 45 | xbel = "\n\n\n" + xbel + "\n"; 46 | } 47 | 48 | xbel; 49 | -------------------------------------------------------------------------------- /BUILDING.md: -------------------------------------------------------------------------------- 1 | # Step-by-Step Instructions to Run the latest Endorphin 2 | 3 | Endorphin is still in development, which means that there are no compiled installable packages yet. To try the latest code, follow this guide. 4 | 5 | ### Step 1: Make sure git is installed. 6 | To see if git is installed, open up a terminal window and type `git`. If it is not installed, the terminal will report back command not found. If it is installed, you'll receive the git help text. To install git: [Windows](https://gitforwindows.org/), [Mac](https://git-scm.com/download/mac), and for Linux, use your distro's package manager. 7 | 8 | ### Step 2: Download and install Qt 5.14 or greater. 9 | If you already have **Qt 5.14** or greater installed, you can skip this step. 10 | To install Qt 5.14, visit the [Download Page](https://www.qt.io/download) or use your distro's package manager on Linux. Be sure to add the correct PATH variable if required in the official install instructions. When you're done, skip the alternative method section, and move onto Step 3. 11 | 12 | ### Step 3: Download and compile the latest Endorphin. 13 | Now we will download the latest tree of Endorphin. Issue these commands: 14 | ``` 15 | $ git clone git://github.com/EndorphinBrowser/browser.git 16 | $ cd browser 17 | $ mkdir build && cd build 18 | $ cmake .. 19 | $ make -j$(nproc) 20 | ``` 21 | Endorphin is now compiled. To run endorphin, simply run `./endorphin` from the current directory. 22 | 23 | _**Optional**_: To update to the latest Endorphin in the future, you can issue these commands: 24 | ``` 25 | $ cd browser 26 | $ git pull 27 | $ cd build 28 | $ make -j$(nproc) 29 | ``` 30 | 31 | If you are looking for an IDE to develop Endorphin in you can checkout the free IDE Qt Creator that is available with Qt. 32 | -------------------------------------------------------------------------------- /src/opensearch/opensearchengineaction.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "opensearchengineaction.h" 21 | 22 | #include "browserapplication.h" 23 | #include "networkaccessmanager.h" 24 | #include "opensearchengine.h" 25 | 26 | OpenSearchEngineAction::OpenSearchEngineAction(OpenSearchEngine *engine, QObject *parent) 27 | : QAction(parent) 28 | , m_engine(engine) 29 | { 30 | if (!engine->networkAccessManager()) 31 | engine->setNetworkAccessManager(BrowserApplication::networkAccessManager()); 32 | 33 | setText(engine->name()); 34 | imageChanged(); 35 | connect(engine, SIGNAL(imageChanged()), this, SLOT(imageChanged())); 36 | } 37 | 38 | void OpenSearchEngineAction::imageChanged() 39 | { 40 | QImage image = m_engine->image(); 41 | if (image.isNull()) 42 | setIcon(BrowserApplication::icon(m_engine->imageUrl())); 43 | else 44 | setIcon(QIcon(QPixmap::fromImage(image))); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/searchbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef SEARCHBAR_H 21 | #define SEARCHBAR_H 22 | 23 | #include 24 | 25 | #include "ui_searchbanner.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | class QTimeLine; 29 | QT_END_NAMESPACE 30 | 31 | class SearchBar : public QWidget 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | SearchBar(QWidget *parent = 0); 37 | void setSearchObject(QObject *object); 38 | QObject *searchObject() const; 39 | 40 | public slots: 41 | void animateHide(); 42 | void clear(); 43 | void showFind(); 44 | virtual void findNext() = 0; 45 | virtual void findPrevious() = 0; 46 | 47 | protected: 48 | void resizeEvent(QResizeEvent *event); 49 | Ui_SearchBanner ui; 50 | 51 | private slots: 52 | void frameChanged(int frame); 53 | 54 | private: 55 | void initializeSearchWidget(); 56 | QObject *m_object; 57 | QWidget *m_widget; 58 | QTimeLine *m_timeLine; 59 | }; 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /src/htmls/dirlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %1 5 | 74 | 80 | 81 | 82 |
83 |

%2

84 |
85 | %5 86 |
87 | 88 | %4 89 |
90 |
91 | 92 | 93 | -------------------------------------------------------------------------------- /src/src.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | TARGET = endorphin 4 | mac { 5 | TARGET = Endorphin 6 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10 7 | } 8 | 9 | DEFINES += \ 10 | QT_STRICT_ITERATORS \ 11 | 12 | include(../install.pri) 13 | 14 | include(src.pri) 15 | 16 | SOURCES += main.cpp 17 | 18 | DESTDIR = ../ 19 | 20 | include(locale/locale.pri) 21 | 22 | !mac { 23 | unix { 24 | INSTALLS += translations desktop iconxpm iconsvg icon16 icon32 icon128 man man-compress 25 | 26 | translations.path = $$PKGDATADIR 27 | translations.files += .qm/locale 28 | 29 | desktop.path = $$DATADIR/applications 30 | desktop.files += endorphin.desktop 31 | 32 | iconxpm.path = $$DATADIR/pixmaps 33 | iconxpm.files += data/endorphin.xpm 34 | 35 | iconsvg.path = $$DATADIR/icons/hicolor/scalable/apps 36 | iconsvg.files += data/endorphin.svg 37 | 38 | icon16.path = $$DATADIR/icons/hicolor/16x16/apps 39 | icon16.files += data/16x16/endorphin.png 40 | 41 | icon32.path = $$DATADIR/icons/hicolor/32x32/apps 42 | icon32.files += data/32x32/endorphin.png 43 | 44 | icon128.path = $$DATADIR/icons/hicolor/128x128/apps 45 | icon128.files += data/128x128/endorphin.png 46 | 47 | man.path = $$DATADIR/man/man1 48 | man.files += data/endorphin.1 49 | 50 | man-compress.path = $$DATADIR/man/man1 51 | man-compress.extra = "" "gzip -9 -f \$(INSTALL_ROOT)/$$DATADIR/man/man1/endorphin.1" "" 52 | man-compress.depends = install_man 53 | 54 | GNOME_DEFAULT_APPS_PATH = $$system(pkg-config --variable=defappsdir gnome-default-applications) 55 | 56 | !isEmpty(GNOME_DEFAULT_APPS_PATH) { 57 | INSTALLS += gnome-default-app 58 | 59 | gnome-default-app.path = $$GNOME_DEFAULT_APPS_PATH 60 | gnome-default-app.files = data/endorphin.xml 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /manualtests/utils/treesortfilterproxymodel/main_treesortfilterproxymodel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "treesortfilterproxymodel.h" 21 | #include "ui_treesortfilterproxymodeldialog.h" 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | int main(int argc, char **argv) 28 | { 29 | QApplication application(argc, argv); 30 | 31 | QDialog dialog; 32 | Ui_TreeSortFilterProxyModelDialog ui; 33 | ui.setupUi(&dialog); 34 | 35 | TreeSortFilterProxyModel *proxy = new TreeSortFilterProxyModel(&dialog); 36 | dialog.connect(ui.search, SIGNAL(textChanged(const QString &)), 37 | proxy, SLOT(setFilterRegExp(const QString &))); 38 | QDirModel *dirModel = new QDirModel(&dialog); 39 | proxy->setSourceModel(dirModel); 40 | ui.treeView->setModel(proxy); 41 | ui.treeView->setRootIndex(proxy->mapFromSource(dirModel->index(QDir::homePath()))); 42 | dialog.show(); 43 | 44 | return application.exec(); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/sourceviewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Christian Franke 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef SOURCEVIEWER_H 21 | #define SOURCEVIEWER_H 22 | 23 | #include 24 | 25 | class QVBoxLayout; 26 | class SourceHighlighter; 27 | class PlainTextEditSearch; 28 | class QPlainTextEdit; 29 | class QMenuBar; 30 | class QMenu; 31 | class QUrl; 32 | class QAction; 33 | class QNetworkReply; 34 | class SourceViewer : public QDialog 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | SourceViewer(const QString &source, const QString &title, 40 | const QUrl &url, QWidget *parent = 0); 41 | ~SourceViewer(); 42 | 43 | private: 44 | QPlainTextEdit *m_edit; 45 | SourceHighlighter *m_highlighter; 46 | PlainTextEditSearch *m_plainTextEditSearch; 47 | QVBoxLayout *m_layout; 48 | QMenuBar *m_menuBar; 49 | QMenu *m_editMenu; 50 | QAction *m_findAction; 51 | QMenu *m_viewMenu; 52 | QNetworkReply *m_reply; 53 | QString m_source; 54 | 55 | private slots: 56 | void loadingFinished(); 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/data/endorphin.1: -------------------------------------------------------------------------------- 1 | .TH ENDORPHIN "1" "May 2008" 2 | 3 | .SH NAME 4 | Endorphin - Lightweight web browser based on Qt and WebKit 5 | 6 | .SH SYNOPSIS 7 | .B endorphin [Qt options] [url] 8 | 9 | .SH DESCRIPTION 10 | .B Endorphin 11 | is a lightweight, cross-platform web browser using the Qt 5.x port of the WebKit 12 | layout engine. It is based on the demo browser application shipped with Qt 13 | demos. 14 | 15 | .SH OPTIONS 16 | .SS Common Qt Options 17 | .TP 18 | .B -style style, -style=style 19 | Specify the Qt widget style to use (examples: plastique, cleanlooks). 20 | .TP 21 | .B -stylesheet stylesheet, -stylesheet=stylesheet 22 | Specify the user stylesheet to use when rendering widgets. 23 | .TP 24 | .B -session session, -session=session 25 | Restore the application from an earlier \fBsession\fR. 26 | .TP 27 | .B -widgetcount 28 | Print a debug message at the end about the number of widgets left undestroyed 29 | and the maximum number of widgets that existed at the same time. 30 | .TP 31 | .B -reverse 32 | Sets the application's layout direction to right-to-left. 33 | 34 | .SS Options Specific to Endorphin 35 | .TP 36 | .B url 37 | The URL address to open in the browser. 38 | 39 | .SH BUGS 40 | Please report bugs to \fIhttps://github.com/AaronDewes/endorphin-browser/issues\fR. 41 | 42 | .SH AUTHOR 43 | The author of Endorphin is Aaron Dewes . 44 | Endorphin is based on Arora by Aaron Dewes . 45 | .PP 46 | This manual page was written by Matvey Kozhev . 47 | .PP 48 | Permission is granted to copy, distribute and/or modify this document under the 49 | terms of the 50 | GNU General Public License, Version 2 or any later version published by the Free 51 | Software Foundation. 52 | .PP 53 | On Debian systems, the complete text of the GNU General Public License can be 54 | found in /usr/share/common-licenses/GPL. 55 | -------------------------------------------------------------------------------- /src/Info_mac.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIconFile 6 | @ICON@ 7 | CFBundlePackageType 8 | APPL 9 | CFBundleGetInfoString 10 | Created by Qt/QMake 11 | CFBundleIdentifier 12 | com.endorphin.Endorphin 13 | CFBundleSignature 14 | ttxt 15 | CFBundleExecutable 16 | @EXECUTABLE@ 17 | CFBundleDocumentTypes 18 | 19 | 20 | CFBundleTypeExtensions 21 | 22 | html 23 | htm 24 | shtml 25 | xht 26 | xhtml 27 | 28 | CFBundleTypeIconFile 29 | @ICON@ 30 | CFBundleTypeName 31 | HTML Document 32 | CFBundleTypeOSTypes 33 | 34 | HTML 35 | 36 | CFBundleTypeRole 37 | Viewer 38 | 39 | 40 | NOTE 41 | Endorphin Browser by the Endorphin team 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/locationbar/locationbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef LOCATIONBAR_H 21 | #define LOCATIONBAR_H 22 | 23 | #include "lineedit.h" 24 | 25 | #include 26 | #include 27 | 28 | class WebView; 29 | class LocationBarSiteIcon; 30 | class PrivacyIndicator; 31 | class LocationBar : public LineEdit 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | LocationBar(QWidget *parent = 0); 37 | void setWebView(WebView *webView); 38 | WebView *webView() const; 39 | 40 | protected: 41 | void paintEvent(QPaintEvent *event); 42 | void focusOutEvent(QFocusEvent *event); 43 | void mouseDoubleClickEvent(QMouseEvent *event); 44 | void keyPressEvent(QKeyEvent *event); 45 | void dragEnterEvent(QDragEnterEvent *event); 46 | void dropEvent(QDropEvent *event); 47 | 48 | private slots: 49 | void webViewUrlChanged(const QUrl &url); 50 | 51 | private: 52 | QPointer m_webView; 53 | 54 | LocationBarSiteIcon *m_siteIcon; 55 | PrivacyIndicator *m_privacyIndicator; 56 | }; 57 | 58 | #endif // LOCATIONBAR_H 59 | 60 | -------------------------------------------------------------------------------- /src/network/fileaccesshandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jonas Gehring 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef FILEACCESSHANDLER_H 21 | #define FILEACCESSHANDLER_H 22 | 23 | #include "schemeaccesshandler.h" 24 | 25 | #include 26 | #include 27 | 28 | class FileAccessHandler : public SchemeAccessHandler 29 | { 30 | public: 31 | FileAccessHandler(QObject *parent = 0); 32 | 33 | virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0); 34 | }; 35 | 36 | class FileAccessReply : public QNetworkReply 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | FileAccessReply(const QNetworkRequest &request, QObject *parent = 0); 42 | ~FileAccessReply(); 43 | 44 | virtual qint64 bytesAvailable() const; 45 | virtual void abort() { }; 46 | virtual void close(); 47 | 48 | protected: 49 | virtual qint64 readData(char *data, qint64 maxSize); 50 | 51 | private slots: 52 | void listDirectory(); 53 | 54 | private: 55 | QBuffer buffer; 56 | }; 57 | 58 | #endif // FILEACCESSHANDLER_H 59 | -------------------------------------------------------------------------------- /src/acceptlanguagedialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef ACCEPTLANGUAGEDIALOG_H 21 | #define ACCEPTLANGUAGEDIALOG_H 22 | 23 | #include 24 | #include "ui_acceptlanguagedialog.h" 25 | 26 | #include 27 | 28 | class AcceptLanguageDialog : public QDialog, public Ui_AcceptLanguage 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | AcceptLanguageDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); 34 | void accept(); 35 | static QByteArray httpString(const QStringList &list); 36 | static QStringList defaultAcceptList(); 37 | 38 | private slots: 39 | void load(); 40 | void save(); 41 | 42 | void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); 43 | void moveLanguageUp(); 44 | void moveLanguageDown(); 45 | void removeLanguage(); 46 | void addLanguage(); 47 | 48 | private: 49 | static QStringList expand(const QLocale::Language language); 50 | QStringListModel m_allLanguagesModel; 51 | QStringListModel m_model; 52 | 53 | }; 54 | 55 | #endif // ACCEPTLANGUAGEDIALOG_H 56 | 57 | -------------------------------------------------------------------------------- /src/qwebplugins/endorphinwebplugin.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include "endorphinwebplugin.h" 30 | 31 | EndorphinWebPlugin::EndorphinWebPlugin() 32 | { 33 | } 34 | 35 | EndorphinWebPlugin::~EndorphinWebPlugin() 36 | { 37 | } 38 | 39 | bool EndorphinWebPlugin::isAnonymous() const 40 | { 41 | return false; 42 | } 43 | -------------------------------------------------------------------------------- /tools/htmlToXBel/mainapp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "mainapp.h" 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | MainApp::MainApp(QObject *parent) : QObject(parent) 28 | { 29 | } 30 | 31 | QString result; 32 | 33 | QString MainApp::get(QString &input) 34 | { 35 | QWebEnginePage webPage; 36 | QEventLoop loop; 37 | connect(&webPage, &QWebEnginePage::loadFinished, &loop, &QEventLoop::quit); 38 | webPage.setHtml(input); 39 | loop.exec(); 40 | QEventLoop loop2; 41 | QObject::connect(this, SIGNAL(notifyRanJavaScript()), &loop2, SLOT(quit())); 42 | QFile jsFile(":/extract.js"); 43 | if (!jsFile.open(QFile::ReadOnly)) { 44 | qWarning() << "Unable to load javascript to extract bookmarks."; 45 | exit(1); 46 | } 47 | webPage.runJavaScript(jsFile.readAll(), [this](const QVariant &v) 48 | { 49 | QString tmp = v.toString(); 50 | this->ranJavaScript(tmp); 51 | }); 52 | loop2.exec(); 53 | return result; 54 | } 55 | 56 | void MainApp::ranJavaScript(QString &value) 57 | { 58 | result = value; 59 | emit notifyRanJavaScript(); 60 | } -------------------------------------------------------------------------------- /manualtests/adblock/adblockdialog/main_adblockdialog.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "adblockdialog.h" 33 | #include "modeltest.h" 34 | 35 | int main(int argc, char **argv) 36 | { 37 | QApplication app(argc, argv); 38 | 39 | AdBlockDialog dialog; 40 | new ModelTest(dialog.treeView->model()); 41 | dialog.show(); 42 | return app.exec(); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/utils/lineedit_p.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2008 - 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef LINEEDIT_P_H 30 | #define LINEEDIT_P_H 31 | 32 | #include 33 | 34 | class SideWidget : public QWidget 35 | { 36 | Q_OBJECT 37 | 38 | signals: 39 | void sizeHintChanged(); 40 | 41 | public: 42 | SideWidget(QWidget *parent = 0); 43 | 44 | protected: 45 | bool event(QEvent *event); 46 | 47 | }; 48 | 49 | #endif // LINEEDIT_P_H 50 | 51 | -------------------------------------------------------------------------------- /manualtests/bookmarks/main_bookmarks.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include 21 | 22 | #include "addbookmarkdialog.h" 23 | #include "bookmarksdialog.h" 24 | #include "bookmarksmanager.h" 25 | #include "bookmarksmodel.h" 26 | #include "browserapplication.h" 27 | #include "modeltest.h" 28 | 29 | int main(int argc, char *argv[]) 30 | { 31 | QApplication app(argc, argv); 32 | 33 | QCoreApplication::setApplicationName(QLatin1String("endorphin")); 34 | QCoreApplication::setApplicationVersion(QLatin1String("0.1")); 35 | 36 | new ModelTest(BrowserApplication::bookmarksManager()->bookmarksModel()); 37 | BookmarksDialog *dialog = new BookmarksDialog; 38 | dialog->show(); 39 | 40 | QString url("http://www.reddit.com"); 41 | AddBookmarkDialog adddialog; 42 | adddialog.setTitle(QString("Reddit.com: a time drain")); 43 | adddialog.setUrl(url); 44 | //adddialog.show(); 45 | 46 | QMenuBar bar; 47 | QMenu *edit = bar.addMenu(("&Edit")); 48 | edit->addAction(BrowserApplication::bookmarksManager()->undoRedoStack()->createUndoAction(edit)); 49 | edit->addAction(BrowserApplication::bookmarksManager()->undoRedoStack()->createRedoAction(edit)); 50 | return app.exec(); 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/utils/editlistview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Jakub Wieczorek 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef EDITLISTVIEW_H 30 | #define EDITLISTVIEW_H 31 | 32 | #include 33 | 34 | class EditListView : public QListView 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | EditListView(QWidget *parent = 0); 40 | void keyPressEvent(QKeyEvent *event); 41 | 42 | public slots: 43 | void removeSelected(); 44 | void removeAll(); 45 | }; 46 | 47 | #endif // EDITLISTVIEW_H 48 | 49 | -------------------------------------------------------------------------------- /src/adblock/adblocknetwork.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef ADBLOCKNETWORK_H 30 | #define ADBLOCKNETWORK_H 31 | 32 | #include 33 | 34 | class QNetworkRequest; 35 | class QNetworkReply; 36 | class AdBlockNetwork : public QObject 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | AdBlockNetwork(QObject *parent = 0); 42 | 43 | QNetworkReply *block(const QNetworkRequest &request); 44 | 45 | }; 46 | 47 | #endif // ADBLOCKNETWORK_H 48 | 49 | -------------------------------------------------------------------------------- /manualtests/searchlineedit/main_searchlineedit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "searchlineedit.h" 28 | #include "searchbutton.h" 29 | 30 | int main(int argc, char **argv) 31 | { 32 | QApplication application(argc, argv); 33 | 34 | QDialog window; 35 | QPushButton *button1 = new QPushButton("One"); 36 | SearchLineEdit *s1 = new SearchLineEdit(&window); 37 | SearchLineEdit *s2 = new SearchLineEdit(&window); 38 | QCompleter *completer = new QCompleter(&window); 39 | s2->setCompleter(completer); 40 | s2->searchButton()->setShowMenuTriangle(true); 41 | QObject::connect(s2->searchButton(), SIGNAL(clicked()), 42 | completer, SLOT(complete())); 43 | QStringList list; 44 | list << "a" << "b" << "c"; 45 | s2->completer()->setModel(new QStringListModel(list)); 46 | 47 | QVBoxLayout *layout = new QVBoxLayout; 48 | layout->addWidget(s1); 49 | layout->addWidget(s2); 50 | layout->addWidget(button1); 51 | 52 | window.setLayout(layout); 53 | window.show(); 54 | return application.exec(); 55 | } 56 | 57 | -------------------------------------------------------------------------------- /manualtests/adblock/adblockmodel/main_adblockmodel.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | #include "adblockmodel.h" 33 | #include "modeltest.h" 34 | 35 | int main(int argc, char **argv) 36 | { 37 | QApplication app(argc, argv); 38 | 39 | QTreeView view; 40 | AdBlockModel *model = new AdBlockModel; 41 | new ModelTest(model); 42 | view.setModel(model); 43 | view.show(); 44 | return app.exec(); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/bookmarks/bookmarkstoolbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2009 Aaron Dewes 3 | * Copyright 2009 Jakub Wieczorek 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef BOOKMARKSTOOLBAR_H 22 | #define BOOKMARKSTOOLBAR_H 23 | 24 | #include "modeltoolbar.h" 25 | 26 | #include "tabwidget.h" 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | class BookmarksModel; 33 | class BookmarksToolBar : public ModelToolBar 34 | { 35 | Q_OBJECT 36 | 37 | signals: 38 | void openUrl(const QUrl &url, const QString &title); 39 | void openUrl(const QUrl &url, TabWidget::OpenUrlIn tab, const QString &title); 40 | 41 | public: 42 | BookmarksToolBar(BookmarksModel *model, QWidget *parent = 0); 43 | 44 | protected: 45 | virtual ModelMenu *createMenu(); 46 | 47 | private slots: 48 | void contextMenuRequested(const QPoint &position); 49 | 50 | protected slots: 51 | void openBookmark(); 52 | void openBookmarkInCurrentTab(); 53 | void openBookmarkInNewTab(); 54 | void removeBookmark(); 55 | void newBookmark(); 56 | void newFolder(); 57 | void bookmarkActivated(const QModelIndex &); 58 | 59 | private: 60 | BookmarksModel *m_bookmarksModel; 61 | 62 | QPoint m_dragStartPosition; 63 | }; 64 | 65 | #endif // BOOKMARKSTOOLBAR_H 66 | -------------------------------------------------------------------------------- /src/opensearch/opensearchenginemodel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Christian Franke 3 | * Copyright 2009 Jakub Wieczorek 4 | * Copyright 2009 Christopher Eby 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef OPENSEARCHENGINEMODEL_H 23 | #define OPENSEARCHENGINEMODEL_H 24 | 25 | #include 26 | 27 | class OpenSearchEngine; 28 | class OpenSearchManager; 29 | 30 | class OpenSearchEngineModel : public QAbstractTableModel 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | OpenSearchEngineModel(OpenSearchManager *manager, QObject *parent = 0); 36 | bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); 37 | int rowCount(const QModelIndex &parent = QModelIndex()) const; 38 | int columnCount(const QModelIndex &parent = QModelIndex()) const; 39 | Qt::ItemFlags flags(const QModelIndex &index) const; 40 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; 41 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); 42 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 43 | 44 | protected slots: 45 | void enginesChanged(); 46 | 47 | private: 48 | OpenSearchManager *m_manager; 49 | }; 50 | 51 | #endif //OPENSEARCHENGINEMODEL_H 52 | 53 | -------------------------------------------------------------------------------- /src/clearbutton.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef CLEARBUTTON_H 30 | #define CLEARBUTTON_H 31 | 32 | #include 33 | 34 | class ClearButton : public QAbstractButton 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | ClearButton(QWidget *parent = 0); 40 | 41 | public slots: 42 | void textChanged(const QString &text); 43 | 44 | protected: 45 | void paintEvent(QPaintEvent *event); 46 | 47 | private: 48 | QImage m_styleImage; 49 | }; 50 | 51 | #endif // CLEARBUTTON_H 52 | 53 | -------------------------------------------------------------------------------- /src/adblock/adblockpage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef ADBLOCKPAGE_H 30 | #define ADBLOCKPAGE_H 31 | 32 | #include 33 | 34 | class AdBlockRule; 35 | class QWebPage; 36 | class AdBlockPage : public QObject 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | AdBlockPage(QObject *parent = 0); 42 | 43 | void applyRulesToPage(QWebPage *page); 44 | 45 | private: 46 | void checkRule(const AdBlockRule *rule, QWebPage *page, const QString &host); 47 | }; 48 | 49 | #endif // ADBLOCKPAGE_H 50 | 51 | -------------------------------------------------------------------------------- /src/utils/edittreeview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2008, Aaron Dewes 3 | * Copyright (c) 2009, Jakub Wieczorek 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef EDITTREEVIEW_H 31 | #define EDITTREEVIEW_H 32 | 33 | #include 34 | 35 | class EditTreeView : public QTreeView 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | EditTreeView(QWidget *parent = 0); 41 | void keyPressEvent(QKeyEvent *event); 42 | 43 | public slots: 44 | void removeSelected(); 45 | void removeAll(); 46 | 47 | }; 48 | 49 | #endif // EDITTREEVIEW_H 50 | 51 | -------------------------------------------------------------------------------- /src/utils/edittableview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2008, Aaron Dewes 3 | * Copyright (c) 2009, Jakub Wieczorek 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef EDITTABLEVIEW_H 31 | #define EDITTABLEVIEW_H 32 | 33 | #include 34 | 35 | class EditTableView : public QTableView 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | EditTableView(QWidget *parent = 0); 41 | void keyPressEvent(QKeyEvent *event); 42 | 43 | public slots: 44 | void removeSelected(); 45 | void removeAll(); 46 | }; 47 | 48 | #endif // EDITTABLEVIEW_H 49 | 50 | -------------------------------------------------------------------------------- /src/utils/treesortfilterproxymodel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef TREESORTFILTERPROXYMODEL_H 30 | #define TREESORTFILTERPROXYMODEL_H 31 | 32 | #include 33 | 34 | class TreeSortFilterProxyModel : public QSortFilterProxyModel 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | TreeSortFilterProxyModel(QObject *parent = 0); 40 | 41 | protected: 42 | bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; 43 | 44 | }; 45 | 46 | #endif // TREESORTFILTERPROXYMODEL_H 47 | 48 | -------------------------------------------------------------------------------- /src/adblock/adblockschemeaccesshandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef ADBLOCKSCHEMEACCESSHANDLER_H 30 | #define ADBLOCKSCHEMEACCESSHANDLER_H 31 | 32 | #include "schemeaccesshandler.h" 33 | 34 | class AdBlockSchemeAccessHandler : public SchemeAccessHandler 35 | { 36 | public: 37 | AdBlockSchemeAccessHandler(QObject *parent = 0); 38 | 39 | virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0); 40 | }; 41 | 42 | #endif // ADBLOCKSCHEMEACCESSHANDLER_H 43 | -------------------------------------------------------------------------------- /src/utils/webpageproxy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef WEBPAGEPROXY_H 30 | #define WEBPAGEPROXY_H 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | class WebPageProxy : public QWebPage 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | WebPageProxy(QObject *parent = 0); 42 | static int pageAttributeId(); 43 | 44 | protected: 45 | friend class NetworkAccessManagerProxy; 46 | virtual void populateNetworkRequest(QNetworkRequest &request); 47 | }; 48 | 49 | #endif // WEBPAGEPROXY_H 50 | -------------------------------------------------------------------------------- /src/modeltoolbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Jakub Wieczorek 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef MODELTOOLBAR_H 21 | #define MODELTOOLBAR_H 22 | 23 | #include 24 | 25 | #include 26 | 27 | Q_DECLARE_METATYPE(QModelIndex) 28 | 29 | class QEvent; 30 | class ModelMenu; 31 | class ModelToolBar : public QToolBar 32 | { 33 | Q_OBJECT 34 | 35 | signals: 36 | void activated(const QModelIndex &index); 37 | 38 | public: 39 | ModelToolBar(QWidget *parent = 0); 40 | ModelToolBar(const QString &title, QWidget *parent = 0); 41 | 42 | void setModel(QAbstractItemModel *model); 43 | QAbstractItemModel *model() const; 44 | 45 | void setRootIndex(const QModelIndex &index); 46 | QModelIndex rootIndex() const; 47 | 48 | static QModelIndex index(QAction *action); 49 | 50 | protected: 51 | virtual ModelMenu *createMenu(); 52 | 53 | bool eventFilter(QObject *object, QEvent *event); 54 | 55 | void hideEvent(QHideEvent *event); 56 | void showEvent(QShowEvent *event); 57 | void dragEnterEvent(QDragEnterEvent *event); 58 | void dropEvent(QDropEvent *event); 59 | void mouseMoveEvent(QMouseEvent *event); 60 | 61 | protected slots: 62 | void build(); 63 | 64 | private: 65 | QAbstractItemModel *m_model; 66 | QPersistentModelIndex m_rootIndex; 67 | QPoint m_dragStartPos; 68 | }; 69 | 70 | #endif // MODELTOOLBAR_H 71 | -------------------------------------------------------------------------------- /src/searchlineedit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef SEARCHLINEEDIT_H 30 | #define SEARCHLINEEDIT_H 31 | 32 | #include "lineedit.h" 33 | 34 | class ClearButton; 35 | class SearchButton; 36 | class SearchLineEdit : public LineEdit 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | SearchLineEdit(QWidget *parent = 0); 42 | 43 | ClearButton *clearButton() const; 44 | SearchButton *searchButton() const; 45 | 46 | private: 47 | void init(); 48 | ClearButton *m_clearButton; 49 | SearchButton *m_searchButton; 50 | 51 | }; 52 | 53 | #endif // SEARCHLINEEDIT_H 54 | 55 | -------------------------------------------------------------------------------- /git_hooks/pre-commit/compile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2010, Aaron Dewes 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 1. Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # 3. Neither the name of the project nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY 18 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | function compile { 30 | unset GIT_DIR 31 | echo "--Attempting to build in $PWD--" 32 | if [ -f Makefile ] ; then 33 | make --quiet 34 | if [ $? != 0 ] ; then 35 | echo "--Build failed, fix failure before commiting--"; 36 | exit 1 37 | fi 38 | fi 39 | echo "--Attempting to build pass--" 40 | } 41 | 42 | case "${1}" in 43 | --about ) 44 | echo "Wherever you are make sure something compiles". 45 | ;; 46 | * ) 47 | compile 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /src/network/networkdiskcache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef NETWORKDISKCACHE_H 30 | #define NETWORKDISKCACHE_H 31 | 32 | #include 33 | 34 | class NetworkDiskCache : public QNetworkDiskCache 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | NetworkDiskCache(QObject *parent = 0); 40 | 41 | void loadSettings(); 42 | 43 | QIODevice *prepare(const QNetworkCacheMetaData &metaData); 44 | 45 | private slots: 46 | void privacyChanged(bool isPrivate); 47 | 48 | private: 49 | bool m_private; 50 | }; 51 | 52 | #endif // NETWORKDISKCACHE_H 53 | 54 | -------------------------------------------------------------------------------- /src/utils/squeezelabel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef SQUEEZELABEL_H 30 | #define SQUEEZELABEL_H 31 | 32 | #include 33 | 34 | /* 35 | A label that will squeeze the set text to fit within the size of the 36 | widget. The text will be elided in the middle. 37 | */ 38 | class SqueezeLabel : public QLabel 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | SqueezeLabel(QWidget *parent = 0); 44 | 45 | protected: 46 | void paintEvent(QPaintEvent *event); 47 | 48 | private: 49 | QString m_SqueezedTextCache; 50 | }; 51 | 52 | #endif // SQUEEZELABEL_H 53 | 54 | -------------------------------------------------------------------------------- /src/useragent/useragentmenu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010, William C. Witt 3 | * Copyright (c) 2010, Aaron Dewes 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Endorphin nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef USERAGENTMENU_H 31 | #define USERAGENTMENU_H 32 | 33 | #include 34 | 35 | class UserAgentMenu : public QMenu 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | UserAgentMenu(QWidget *parent = 0); 41 | 42 | private slots: 43 | void populateMenu(); 44 | void changeUserAgent(); 45 | void switchToDefaultUserAgent(); 46 | void switchToOtherUserAgent(); 47 | 48 | private: 49 | void addActionsFromFile(const QString &fileName); 50 | 51 | }; 52 | 53 | #endif // USERAGENTMENU_H 54 | -------------------------------------------------------------------------------- /src/utils/webpageproxy.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include "webpageproxy.h" 30 | 31 | #include 32 | #include 33 | 34 | #define ATTRIBUTE_ID QNetworkRequest::User + 100 35 | 36 | WebPageProxy::WebPageProxy(QObject *parent) 37 | : QWebPage(parent) 38 | { 39 | } 40 | 41 | int WebPageProxy::pageAttributeId() 42 | { 43 | return ATTRIBUTE_ID; 44 | } 45 | 46 | void WebPageProxy::populateNetworkRequest(QNetworkRequest &request) 47 | { 48 | QVariant variant = QVariant::fromValue((void *) this); 49 | request.setAttribute((QNetworkRequest::Attribute)(pageAttributeId()), variant); 50 | } 51 | 52 | -------------------------------------------------------------------------------- /src/utils/squeezelabel.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include "squeezelabel.h" 30 | 31 | SqueezeLabel::SqueezeLabel(QWidget *parent) 32 | : QLabel(parent) 33 | { 34 | } 35 | 36 | void SqueezeLabel::paintEvent(QPaintEvent *event) 37 | { 38 | if (m_SqueezedTextCache != text()) { 39 | m_SqueezedTextCache = text(); 40 | QFontMetrics fm = fontMetrics(); 41 | if (fm.horizontalAdvance(m_SqueezedTextCache) > contentsRect().width()) { 42 | QString elided = fm.elidedText(text(), Qt::ElideMiddle, width()); 43 | setText(elided); 44 | } 45 | } 46 | QLabel::paintEvent(event); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/utils/treesortfilterproxymodel.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #include "treesortfilterproxymodel.h" 30 | 31 | TreeSortFilterProxyModel::TreeSortFilterProxyModel(QObject *parent) 32 | : QSortFilterProxyModel(parent) 33 | { 34 | setFilterCaseSensitivity(Qt::CaseInsensitive); 35 | } 36 | 37 | bool TreeSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const 38 | { 39 | QModelIndex idx = sourceModel()->index(source_row, 0, source_parent); 40 | if (sourceModel()->hasChildren(idx)) 41 | return true; 42 | return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/adblock/adblockblockednetworkreply.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef ADBLOCKBLOCKEDNETWORKREPLY_H 30 | #define ADBLOCKBLOCKEDNETWORKREPLY_H 31 | 32 | #include 33 | 34 | class AdBlockRule; 35 | class AdBlockBlockedNetworkReply : public QNetworkReply 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | AdBlockBlockedNetworkReply(const QNetworkRequest &request, const AdBlockRule *rule, QObject *parent = 0); 41 | void abort() {}; 42 | 43 | protected: 44 | qint64 readData(char *data, qint64 maxSize); 45 | 46 | private slots: 47 | void delayedFinished(); 48 | 49 | }; 50 | 51 | #endif // ADBLOCKBLOCKEDNETWORKREPLY_H 52 | 53 | -------------------------------------------------------------------------------- /src/qwebplugins/endorphinwebplugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Aaron Dewes 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. Neither the name of the Aaron Dewes nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | * SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef ENDORPHINWEBPLUGIN_H 30 | #define ENDORPHINWEBPLUGIN_H 31 | 32 | #include 33 | 34 | class EndorphinWebPlugin 35 | { 36 | 37 | public: 38 | EndorphinWebPlugin(); 39 | virtual ~EndorphinWebPlugin(); 40 | 41 | virtual QWebPluginFactory::Plugin metaPlugin() = 0; 42 | virtual QWidget *create(const QString &mimeType, const QUrl &url, 43 | const QStringList &argumentNames, const QStringList &argumentValues) = 0; 44 | virtual void configure() = 0; 45 | virtual bool isAnonymous() const; 46 | }; 47 | 48 | #endif // ENDORPHINWEBPLUGIN_H 49 | 50 | -------------------------------------------------------------------------------- /autotests/searchlineedit/tst_searchlineedit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Aaron Dewes 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | class tst_SearchLineEdit : public QObject 24 | { 25 | Q_OBJECT 26 | 27 | public slots: 28 | void initTestCase(); 29 | void cleanupTestCase(); 30 | void init(); 31 | void cleanup(); 32 | 33 | private slots: 34 | void searchlineedit_data(); 35 | void searchlineedit(); 36 | }; 37 | 38 | // Subclass that exposes the protected functions. 39 | class SubSearchLineEdit : public SearchLineEdit 40 | { 41 | public:}; 42 | 43 | // This will be called before the first test function is executed. 44 | // It is only called once. 45 | void tst_SearchLineEdit::initTestCase() 46 | { 47 | } 48 | 49 | // This will be called after the last test function is executed. 50 | // It is only called once. 51 | void tst_SearchLineEdit::cleanupTestCase() 52 | { 53 | } 54 | 55 | // This will be called before each test function is executed. 56 | void tst_SearchLineEdit::init() 57 | { 58 | } 59 | 60 | // This will be called after every test function. 61 | void tst_SearchLineEdit::cleanup() 62 | { 63 | } 64 | 65 | void tst_SearchLineEdit::searchlineedit_data() 66 | { 67 | } 68 | 69 | void tst_SearchLineEdit::searchlineedit() 70 | { 71 | SubSearchLineEdit edit; 72 | QVERIFY(edit.clearButton() != 0); 73 | QVERIFY(edit.searchButton() != 0); 74 | } 75 | 76 | QTEST_MAIN(tst_SearchLineEdit) 77 | #include "tst_searchlineedit.moc" 78 | 79 | --------------------------------------------------------------------------------