committed by
Norman Feske
parent
0310c733d5
commit
5af4552511
@@ -1 +0,0 @@
|
||||
e8f003dcdad6f1600c73a046f4306942a557f9bb
|
||||
@@ -1,12 +0,0 @@
|
||||
LICENSE := unknown
|
||||
VERSION := 7c7514d85a22b570fc85b47c010d0615f39e270d
|
||||
DOWNLOADS := arora.archive
|
||||
|
||||
URL(arora) := https://github.com/Arora/arora/archive/$(VERSION).tar.gz
|
||||
SHA(arora) := d625910daebc93ab39769907dbc80b4314d416b2bee8ce49983a2c8eead894f0
|
||||
DIR(arora) := src/app/arora
|
||||
|
||||
PATCHES := $(foreach P,$(shell cat $(REP_DIR)/src/app/arora/patches/series),\
|
||||
src/app/arora/patches/$P)
|
||||
|
||||
PATCH_OPT := -p1 -d src/app/arora
|
||||
@@ -1 +0,0 @@
|
||||
Arora web browser
|
||||
@@ -1,32 +0,0 @@
|
||||
_/raw/qt5_dejavusans
|
||||
_/src/expat
|
||||
_/src/freetype
|
||||
_/src/jpeg
|
||||
_/src/libc
|
||||
_/src/libpng
|
||||
_/src/mesa
|
||||
_/src/qt5_core
|
||||
_/src/qt5_gui
|
||||
_/src/qt5_qjpeg
|
||||
_/src/qt5_qpa_genode
|
||||
_/src/stdcxx
|
||||
_/src/vfs
|
||||
_/src/vfs_pipe
|
||||
_/src/zlib
|
||||
_/raw/arora
|
||||
_/src/arora
|
||||
_/src/icu
|
||||
_/src/libcrypto
|
||||
_/src/libssl
|
||||
_/src/qt5_network
|
||||
_/src/qt5_printsupport
|
||||
_/src/qt5_qgenodeviewwidget
|
||||
_/src/qt5_opengl
|
||||
_/src/qt5_qpluginwidget
|
||||
_/src/qt5_scriptclassic
|
||||
_/src/qt5_sql
|
||||
_/src/qt5_ui_tools
|
||||
_/src/qt5_webkit
|
||||
_/src/qt5_widgets
|
||||
_/src/vfs_jitterentropy
|
||||
_/src/vfs_lxip
|
||||
@@ -1 +0,0 @@
|
||||
2020-07-02 2df48db56cecfbb7455a7e848e32888fd8bf254d
|
||||
@@ -1,65 +0,0 @@
|
||||
<runtime ram="512M" caps="10000" binary="init" config="init.config">
|
||||
|
||||
<requires>
|
||||
<nic/>
|
||||
<gui/>
|
||||
<report label="arora -> shape"/>
|
||||
<rm/>
|
||||
<rtc/>
|
||||
<timer/>
|
||||
</requires>
|
||||
|
||||
<content>
|
||||
|
||||
<!-- common for Qt GUI applications -->
|
||||
|
||||
<rom label="init.config"/>
|
||||
<rom label="egl.lib.so"/>
|
||||
<rom label="egl_swrast.lib.so"/>
|
||||
<rom label="expat.lib.so"/>
|
||||
<rom label="freetype.lib.so"/>
|
||||
<rom label="glapi.lib.so"/>
|
||||
<rom label="jpeg.lib.so"/>
|
||||
<rom label="libc.lib.so"/>
|
||||
<rom label="libm.lib.so"/>
|
||||
<rom label="libpng.lib.so"/>
|
||||
<rom label="mesa.lib.so"/>
|
||||
<rom label="qt5_core.lib.so"/>
|
||||
<rom label="qt5_dejavusans.tar"/>
|
||||
<rom label="qt5_gui.lib.so"/>
|
||||
<rom label="qt5_qjpeg.lib.so"/>
|
||||
<rom label="qt5_qpa_genode.lib.so"/>
|
||||
<rom label="stdcxx.lib.so"/>
|
||||
<rom label="vfs.lib.so"/>
|
||||
<rom label="vfs_pipe.lib.so"/>
|
||||
<rom label="zlib.lib.so"/>
|
||||
|
||||
<!-- application -->
|
||||
|
||||
<rom label="vfs"/>
|
||||
<rom label="arora"/>
|
||||
<rom label="icu.lib.so"/>
|
||||
<rom label="libcrypto.lib.so"/>
|
||||
<rom label="libssl.lib.so"/>
|
||||
<rom label="lxip.lib.so"/>
|
||||
<rom label="qt5_angle.lib.so"/>
|
||||
<rom label="qt5_jscore.lib.so"/>
|
||||
<rom label="qt5_network.lib.so"/>
|
||||
<rom label="qt5_opengl.lib.so"/>
|
||||
<rom label="qt5_printsupport.lib.so"/>
|
||||
<rom label="qt5_qgenodeviewwidget.lib.so"/>
|
||||
<rom label="qt5_qpluginwidget.lib.so"/>
|
||||
<rom label="qt5_scriptclassic.lib.so"/>
|
||||
<rom label="qt5_sql.lib.so"/>
|
||||
<rom label="qt5_ui_tools.lib.so"/>
|
||||
<rom label="qt5_webcore.lib.so"/>
|
||||
<rom label="qt5_webkit.lib.so"/>
|
||||
<rom label="qt5_webkitwidgets.lib.so"/>
|
||||
<rom label="qt5_widgets.lib.so"/>
|
||||
<rom label="qt5_wtf.lib.so"/>
|
||||
<rom label="vfs_jitterentropy.lib.so"/>
|
||||
<rom label="vfs_lxip.lib.so"/>
|
||||
|
||||
</content>
|
||||
|
||||
</runtime>
|
||||
@@ -1,4 +0,0 @@
|
||||
content: init.config
|
||||
|
||||
init.config:
|
||||
cp $(REP_DIR)/recipes/raw/arora/$@ $@
|
||||
@@ -1 +0,0 @@
|
||||
2020-06-21 8e34b047cc7ab47d9575bdb64a38dbcc2b36ad17
|
||||
@@ -1,49 +0,0 @@
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="Nic"/>
|
||||
<service name="Gui"/>
|
||||
<service name="PD"/>
|
||||
<service name="Report"/>
|
||||
<service name="RM"/>
|
||||
<service name="ROM"/>
|
||||
<service name="Rtc"/>
|
||||
<service name="Timer"/>
|
||||
</parent-provides>
|
||||
|
||||
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
|
||||
|
||||
<start name="vfs" caps="250">
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<provides> <service name="File_system"/> </provides>
|
||||
<config>
|
||||
<vfs>
|
||||
<dir name="socket"> <lxip dhcp="yes"/> </dir>
|
||||
</vfs>
|
||||
<default-policy writeable="yes" root="/"/>
|
||||
</config>
|
||||
</start>
|
||||
|
||||
<start name="arora" caps="9750">
|
||||
<resource name="RAM" quantum="480M"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<dir name="dev">
|
||||
<dir name="pipe"> <pipe/> </dir>
|
||||
<jitterentropy name="random"/>
|
||||
<log/>
|
||||
<rtc/>
|
||||
</dir>
|
||||
<fs/>
|
||||
<tar name="qt5_dejavusans.tar"/>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" pipe="/dev/pipe" rtc="/dev/rtc" socket="/socket"/>
|
||||
</config>
|
||||
<route>
|
||||
<service name="File_system"> <child name="vfs"/> </service>
|
||||
<service name="ROM" label="egl_drv.lib.so"> <parent label="egl_swrast.lib.so" /> </service>
|
||||
<any-service> <parent /> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
</config>
|
||||
@@ -1,22 +0,0 @@
|
||||
MIRROR_FROM_PORT_AND_REP_DIR := src/app/arora
|
||||
|
||||
content: $(MIRROR_FROM_PORT_AND_REP_DIR) LICENSE
|
||||
|
||||
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/arora)
|
||||
|
||||
$(MIRROR_FROM_PORT_AND_REP_DIR):
|
||||
mkdir -p $(dir $@)
|
||||
cp -r $(PORT_DIR)/$@ $(dir $@)
|
||||
$(mirror_from_rep_dir)
|
||||
|
||||
MIRROR_FROM_LIBPORTS := src/app/qt5/tmpl/target_defaults.inc \
|
||||
src/app/qt5/tmpl/target_final.inc
|
||||
|
||||
content: $(MIRROR_FROM_LIBPORTS)
|
||||
|
||||
$(MIRROR_FROM_LIBPORTS):
|
||||
mkdir -p $(dir $@)
|
||||
cp -r $(GENODE_DIR)/repos/libports/$@ $(dir $@)
|
||||
|
||||
LICENSE:
|
||||
cp $(PORT_DIR)/src/app/arora/LICENSE.GPL3 $@
|
||||
@@ -1 +0,0 @@
|
||||
2020-06-28 07e518547e24b21378fc36801ebc764c7f86d2d0
|
||||
@@ -1,21 +0,0 @@
|
||||
base
|
||||
framebuffer_session
|
||||
input_session
|
||||
libc
|
||||
loader_session
|
||||
mesa
|
||||
gui_session
|
||||
os
|
||||
qt5_core
|
||||
qt5_gui
|
||||
qt5_printsupport
|
||||
qt5_qjpeg
|
||||
qt5_network
|
||||
qt5_qgenodeviewwidget
|
||||
qt5_qpa_genode
|
||||
qt5_qpluginwidget
|
||||
qt5_scriptclassic
|
||||
qt5_ui_tools
|
||||
qt5_webkit
|
||||
qt5_widgets
|
||||
stdcxx
|
||||
@@ -1,170 +0,0 @@
|
||||
source ${genode_dir}/repos/libports/run/qt5_common.inc
|
||||
|
||||
set feature(Nic) 1
|
||||
|
||||
import_from_depot [depot_user]/src/arora \
|
||||
[depot_user]/src/icu \
|
||||
[depot_user]/src/libcrypto \
|
||||
[depot_user]/src/libssl \
|
||||
[depot_user]/src/qt5_network \
|
||||
[depot_user]/src/qt5_printsupport \
|
||||
[depot_user]/src/qt5_qgenodeviewwidget \
|
||||
[depot_user]/src/qt5_opengl \
|
||||
[depot_user]/src/qt5_qpluginwidget \
|
||||
[depot_user]/src/qt5_scriptclassic \
|
||||
[depot_user]/src/qt5_sql \
|
||||
[depot_user]/src/qt5_ui_tools \
|
||||
[depot_user]/src/qt5_webkit \
|
||||
[depot_user]/src/qt5_widgets \
|
||||
[depot_user]/src/vfs_jitterentropy \
|
||||
[depot_user]/src/vfs_lxip
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
|
||||
append build_components [qt5_build_components feature]
|
||||
|
||||
append build_components {
|
||||
server/clipboard
|
||||
server/loader
|
||||
server/tar_rom
|
||||
server/gui_fb
|
||||
app/launchpad
|
||||
test/nitpicker
|
||||
}
|
||||
|
||||
build $build_components
|
||||
|
||||
#
|
||||
# Generate tar archives with plugin configurations
|
||||
#
|
||||
exec tar cf bin/nitpicker_plugin.tar -C [genode_dir]/repos/ports/src/app/arora/demo/nitpicker_plugin config.plugin
|
||||
|
||||
#
|
||||
# Generate config
|
||||
#
|
||||
|
||||
append config {
|
||||
<config>
|
||||
<parent-provides>}
|
||||
append config [qt5_parent_provides feature]
|
||||
append config {
|
||||
</parent-provides>
|
||||
<default caps="100"/>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>}
|
||||
|
||||
append config [qt5_start_nodes feature]
|
||||
|
||||
append config {
|
||||
|
||||
<start name="clipboard">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides>
|
||||
<service name="ROM"/>
|
||||
<service name="Report"/>
|
||||
</provides>
|
||||
<config>
|
||||
<policy label="arora -> clipboard" domain="default" />
|
||||
</config>
|
||||
<route>
|
||||
<service name="ROM" label="focus"> <child name="wm_report_rom"/> </service>
|
||||
<any-service> <parent/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="loader">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides><service name="Loader"/></provides>
|
||||
<config>
|
||||
<policy label_prefix="arora">
|
||||
<parent-rom name="ld.lib.so"/>
|
||||
<parent-rom name="init"/>
|
||||
<parent-rom name="tar_rom"/>
|
||||
<parent-rom name="gui_fb"/>
|
||||
<parent-rom name="nitpicker"/>
|
||||
<parent-rom name="pointer"/>
|
||||
<parent-rom name="launchpad"/>
|
||||
<parent-rom name="testnit"/>
|
||||
</policy>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Gui"> <child name="wm"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="vfs" caps="250">
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<provides> <service name="File_system"/> </provides>
|
||||
<config>
|
||||
<vfs>
|
||||
<dir name="socket"> <lxip dhcp="yes"/> </dir>
|
||||
</vfs>
|
||||
<default-policy writeable="yes" root="/"/>
|
||||
</config>
|
||||
</start>
|
||||
|
||||
|
||||
<start name="arora" caps="2000">
|
||||
<resource name="RAM" quantum="2G"/>
|
||||
<config clipboard="yes">
|
||||
<vfs>
|
||||
<dir name="dev">
|
||||
<dir name="pipe"> <pipe/> </dir>
|
||||
<log/>
|
||||
<jitterentropy name="random"/>
|
||||
<inline name="rtc">2018-01-01 00:01</inline>
|
||||
</dir>
|
||||
<fs/>
|
||||
<tar name="qt5_dejavusans.tar"/>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" pipe="/dev/pipe" rtc="/dev/rtc" socket="/socket"/>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Gui"> <child name="wm"/> </service>
|
||||
<service name="Report" label="shape">
|
||||
<child name="pointer" label="wm -> arora -> shape"/>
|
||||
</service>
|
||||
<service name="Report"> <child name="clipboard"/> </service>
|
||||
<service name="ROM" label="clipboard"> <child name="clipboard"/> </service>
|
||||
<service name="ROM" label="egl_drv.lib.so"> <parent label="egl_swrast.lib.so" /> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
</config>}
|
||||
|
||||
install_config $config
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
append boot_modules [qt5_boot_modules feature]
|
||||
|
||||
append boot_modules {
|
||||
clipboard
|
||||
loader
|
||||
tar_rom
|
||||
gui_fb
|
||||
launchpad
|
||||
testnit
|
||||
nitpicker_plugin.tar
|
||||
}
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
|
||||
proc qemu_nic_model {} {
|
||||
if [have_spec x86] { return e1000 }
|
||||
if [have_spec lan9118] { return lan9118 }
|
||||
if [have_spec cadence_gem] { return cadence_gem }
|
||||
return nic_model_missing
|
||||
}
|
||||
|
||||
append qemu_args " -netdev user,id=net0 "
|
||||
append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 "
|
||||
|
||||
run_genode_until forever
|
||||
@@ -1,3 +0,0 @@
|
||||
-include $(call select_from_ports,arora)/src/app/arora/src/src.pro
|
||||
|
||||
QT += widgets
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* \brief Entry point for Arora
|
||||
* \author Christian Prochaska
|
||||
* \date 2017-05-22
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <libc/component.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <stdlib.h> /* 'exit' */
|
||||
#include <pthread.h>
|
||||
|
||||
/* Qt includes */
|
||||
#include <qpluginwidget/qpluginwidget.h>
|
||||
|
||||
/* provided by the application */
|
||||
extern "C" int main(int argc, char const **argv);
|
||||
|
||||
extern void initialize_qt_gui(Genode::Env &);
|
||||
|
||||
/*
|
||||
* The main function is called from a dedicated thread, because it sometimes
|
||||
* blocks on a pthread condition variable, which prevents Genode signal
|
||||
* processing with the current implementation.
|
||||
*/
|
||||
void *arora_main(void *)
|
||||
{
|
||||
int argc = 1;
|
||||
char const *argv[] = { "arora", 0 };
|
||||
|
||||
exit(main(argc, argv));
|
||||
}
|
||||
|
||||
void Libc::Component::construct(Libc::Env &env)
|
||||
{
|
||||
Libc::with_libc([&] {
|
||||
|
||||
initialize_qt_gui(env);
|
||||
QPluginWidget::env(env);
|
||||
|
||||
pthread_t main_thread;
|
||||
pthread_create(&main_thread, nullptr, arora_main, nullptr);
|
||||
});
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 521 B |
Binary file not shown.
|
Before Width: | Height: | Size: 676 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,70 +0,0 @@
|
||||
<html><head><title>Genode Web-Browser Demo (3/4)</title></head>
|
||||
<style type="text/css">
|
||||
|
||||
/* backgrounds */
|
||||
body { background-image:url(bg.png); }
|
||||
div#title { background-image:url(title_bg.png); background-color:#ccccdd; }
|
||||
div#bgtop { background-image:url(bg_top.png); }
|
||||
div#content { background-image:url(bg_content.png); background-color:#ddddff; }
|
||||
div#title, div#content, div#bgtop { background-repeat:repeat-x; }
|
||||
div#content { background-position:bottom; }
|
||||
|
||||
/* borders */
|
||||
div#content, div#title { border-style:solid; border-width:1px; border-color:#001122; }
|
||||
|
||||
/* spacing */
|
||||
div#content, div#title {
|
||||
width:680px;
|
||||
padding-left:1em; padding-right:1em; padding-top:0.5em; padding-bottom:0.5em;
|
||||
margin-top:10px; margin-bottom:10px;
|
||||
}
|
||||
span#space { margin:50px; }
|
||||
body { margin:0px; }
|
||||
div#title { padding-top:0px; padding-bottom:0px; }
|
||||
div#content h1 { padding-top: 1em; }
|
||||
|
||||
/* center horizontally */
|
||||
div#content, div#title, table { float: none; margin: auto; }
|
||||
|
||||
div#content { margin-top:1em; }
|
||||
|
||||
/* fonts */
|
||||
a, p, h1 { font: 100% Verdana, Arial, Helvetica, sans-serif; }
|
||||
h1 { color:#000077; font-size:20px; }
|
||||
div#title h1 { font-size:24px; }
|
||||
div#title h1 { color:#000033; }
|
||||
div#content p { font-size:13px; }
|
||||
div#content a { font-size:16px; }
|
||||
|
||||
div.annotation p { font-style:italic; }
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="bgtop"><br/><span id="top"/><div id="title"><h1>Genode Web-Browser Demo (3/4)</h1></div>
|
||||
<div id="content">
|
||||
<p>
|
||||
Because we can start the Linux kernel as a Genode subsystem,
|
||||
you can have fun with Busybox Linux in the web browser:
|
||||
</p>
|
||||
<embed src="rom:///busybox_plugin.tar" args="ram_quota=32M" type="application/x-genode-plugin" width="640px" height="480px"><br>
|
||||
<div class="annotation">
|
||||
<p>
|
||||
Click onto the plugin to pass the keyboard focus to Linux.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
Want to reboot Linux? Just hit the "reload" button. :-)
|
||||
</p>
|
||||
<p>
|
||||
But we can take things still a step further - streaming a block
|
||||
device from a web server.
|
||||
</p>
|
||||
<div class="annotation">
|
||||
<p>
|
||||
Note that the following demo requires an internet connection.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<a href="http://genode.org/files/livecd-10.11/tinycore.html" alt="Continue: Run a Tinycore Linux image, streamed from the web">Continue: Run a Tinycore Linux image, streamed from the web</a>
|
||||
</p>
|
||||
</div></div><br/><span id="space"/></body></html>
|
||||
@@ -1,7 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
demo
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
@@ -1,81 +0,0 @@
|
||||
<html><head><title>Genode Web-Browser Demo (1/4)</title></head>
|
||||
<style type="text/css">
|
||||
|
||||
/* backgrounds */
|
||||
body { background-image:url(bg.png); }
|
||||
div#title { background-image:url(title_bg.png); background-color:#ccccdd; }
|
||||
div#bgtop { background-image:url(bg_top.png); }
|
||||
div#content { background-image:url(bg_content.png); background-color:#ddddff; }
|
||||
div#title, div#content, div#bgtop { background-repeat:repeat-x; }
|
||||
div#content { background-position:bottom; }
|
||||
|
||||
/* borders */
|
||||
div#content, div#title { border-style:solid; border-width:1px; border-color:#001122; }
|
||||
|
||||
/* spacing */
|
||||
div#content, div#title {
|
||||
width:680px;
|
||||
padding-left:1em; padding-right:1em; padding-top:0.5em; padding-bottom:0.5em;
|
||||
margin-top:10px; margin-bottom:10px;
|
||||
}
|
||||
span#space { margin:50px; }
|
||||
body { margin:0px; }
|
||||
div#title { padding-top:0px; padding-bottom:0px; }
|
||||
div#content h1 { padding-top: 1em; }
|
||||
|
||||
/* center horizontally */
|
||||
div#content, div#title, table { float: none; margin: auto; }
|
||||
|
||||
div#content { margin-top:1em; }
|
||||
|
||||
/* fonts */
|
||||
a, p, h1 { font: 100% Verdana, Arial, Helvetica, sans-serif; }
|
||||
h1 { color:#000077; font-size:20px; }
|
||||
div#title h1 { font-size:24px; }
|
||||
div#title h1 { color:#000033; }
|
||||
div#content p { font-size:13px; }
|
||||
div#content a { font-size:16px; }
|
||||
|
||||
div.annotation p { font-style:italic; }
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="bgtop"><br/><span id="top"/><div id="title"><h1>Genode Web-Browser Demo (1/4)</h1></div>
|
||||
<div id="content">
|
||||
<p>
|
||||
Welcome to the web-browser demo, showcasing the Arora web browser with a complete
|
||||
networking stack running natively on a microkernel. Beware, it is a tech demo
|
||||
and may be rough around the edges. But we hope you will recognise the potential
|
||||
that lies in the combination of existing software with Genode's concepts.
|
||||
</p>
|
||||
<p>
|
||||
The demo consists of three parts. The first two parts do not rely on a network
|
||||
connection. All data comes from the Live-CD. So if your network connection
|
||||
does not work, you are still able to test drive the first two experiments. The
|
||||
third demo, however, requires an internet connection.
|
||||
</p>
|
||||
<a name="Why_bringing_Arora_to_Genode?"></a>
|
||||
<h1>Why bringing Arora to Genode?</h1>
|
||||
<p>
|
||||
There were two reasons for porting Arora to the Genode Framework. First,
|
||||
because today's web browsers, including Arora, are extremely complex, porting
|
||||
such a huge software stack to a custom operating system is a great challenge.
|
||||
Arora has become one of our most advanced workloads, stressing the base
|
||||
system, the dynamic linker, the TCP/IP stack, and device drivers.
|
||||
We chose Arora among the available web browsers because we already
|
||||
had Qt running on Genode. Porting Arora seemed an evolutionary step, which
|
||||
actually turned out to be the case.
|
||||
</p>
|
||||
<p>
|
||||
But in addition to the technical challenge, we quickly recognised the potential
|
||||
that lies beyond the plain porting work. Inspired by recent developments
|
||||
of sandboxing techniques for browser plugins as introduced by Google Chrome, we
|
||||
pursued a generalization of these ideas. What we found was, that the recursive
|
||||
structure of Genode and its capability-based security are able to vastly improve
|
||||
the isolation of browser plugins while, at the same time, making the plugins
|
||||
more flexible.
|
||||
</p>
|
||||
<p>
|
||||
<a href="qrc:/demo/nitpicker.html" alt="Continue: Run a complete Genode subsystem as browser plugin">Continue: Run a complete Genode subsystem as browser plugin</a>
|
||||
</p>
|
||||
</div></div><br/><span id="space"/></body></html>
|
||||
@@ -1,142 +0,0 @@
|
||||
<html><head><title>Genode Web-Browser Demo (2/4)</title></head>
|
||||
<style type="text/css">
|
||||
|
||||
/* backgrounds */
|
||||
body { background-image:url(bg.png); }
|
||||
div#title { background-image:url(title_bg.png); background-color:#ccccdd; }
|
||||
div#bgtop { background-image:url(bg_top.png); }
|
||||
div#content { background-image:url(bg_content.png); background-color:#ddddff; }
|
||||
div#title, div#content, div#bgtop { background-repeat:repeat-x; }
|
||||
div#content { background-position:bottom; }
|
||||
|
||||
/* borders */
|
||||
div#content, div#title { border-style:solid; border-width:1px; border-color:#001122; }
|
||||
|
||||
/* spacing */
|
||||
div#content, div#title {
|
||||
width:680px;
|
||||
padding-left:1em; padding-right:1em; padding-top:0.5em; padding-bottom:0.5em;
|
||||
margin-top:10px; margin-bottom:10px;
|
||||
}
|
||||
span#space { margin:50px; }
|
||||
body { margin:0px; }
|
||||
div#title { padding-top:0px; padding-bottom:0px; }
|
||||
div#content h1 { padding-top: 1em; }
|
||||
|
||||
/* center horizontally */
|
||||
div#content, div#title, table { float: none; margin: auto; }
|
||||
|
||||
div#content { margin-top:1em; }
|
||||
|
||||
/* fonts */
|
||||
a, p, h1 { font: 100% Verdana, Arial, Helvetica, sans-serif; }
|
||||
h1 { color:#000077; font-size:20px; }
|
||||
div#title h1 { font-size:24px; }
|
||||
div#title h1 { color:#000033; }
|
||||
div#content p { font-size:13px; }
|
||||
div#content a { font-size:16px; }
|
||||
|
||||
div.annotation p { font-style:italic; }
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="bgtop"><br/><span id="top"/><div id="title"><h1>Genode Web-Browser Demo (2/4)</h1></div>
|
||||
<div id="content">
|
||||
<p>
|
||||
Current-generation web browsers execute browser plugins either as part of the
|
||||
web browser or within a specially tailored execution environment running
|
||||
more-or-less independently from the web browser. Plugins executed in the same
|
||||
process as the browser itself are a stability and security risk, in particular
|
||||
if the plugin code is highly complex third-party binary-only software. So
|
||||
putting this code in a sandbox sounds like a good idea. But it raises a number
|
||||
of questions: Which functionality should the sandboxing mechanism provide? How
|
||||
does the security policy of the sandbox look like? How is it enforced? Who is
|
||||
in charge of configuring this policy? How does the browser interact with the
|
||||
sandboxed plugin in order to realize the visual integration into the website? Where
|
||||
do the resources needed for constructing the sandbox come from?
|
||||
</p>
|
||||
<p>
|
||||
Indeed, many hard questions.
|
||||
</p>
|
||||
<a name="On_Genode,_each_process_lives_in_a_Sandbox"></a>
|
||||
<h1>On Genode, each process lives in a Sandbox</h1>
|
||||
<p>
|
||||
In the domain of web browsers, these questions pop up right now and seek for a
|
||||
solution. However, when replacing "sandbox" by "execution environment" and
|
||||
"plugin" by "program", it becomes apparent that these questions are classical
|
||||
operating-system issues.
|
||||
</p>
|
||||
<p>
|
||||
The Genode architecture solves these issues by design at the OS level.
|
||||
Each process lives in a sandbox, created, paid-for, and controlled by its parent.
|
||||
Access control is denied by default and must be granted explicitly by passing
|
||||
capabilities between processes. Since each process runs in a sandbox anyway,
|
||||
there is no need for a browser-specific solution. We can just run an arbitrary
|
||||
fully-featured Genode subsystem as browser plugin:
|
||||
</p>
|
||||
<embed src="rom:///nitpicker_plugin.tar" args="ram_quota=32M, caps=1000" type="application/x-genode-plugin" width="640px" height="480px"><br>
|
||||
<p>
|
||||
The plugin above consists of multiple processes and uses the same
|
||||
binaries as the Genode system you are running. The most significant advantage of this
|
||||
technique, however, is the degree of isolation between browser and plugin. Even though
|
||||
both are integrated into one GUI, they are executed isolated from each other.
|
||||
Just press the X-Ray key (usually this is <tt>ScrLock</tt>) to reveal their
|
||||
respective identities. The browser window is labeled as "menu -> browser -> arora",
|
||||
which means that "arora" is a child process created as part of the
|
||||
"browser" subsystem, which, in turn, was created by the "menu". In contrast,
|
||||
the plugin is labeled as "loader -> init -> framebuffer". It is a subsystem spawned
|
||||
by a "loader" service running independently from the menu. The following diagram
|
||||
depicts the scenario:
|
||||
</p>
|
||||
<a name="nitpicker_plugin"></a>
|
||||
<table class="captionedimage"><tr><td>
|
||||
<img src="nitpicker_plugin.png">
|
||||
</td></tr></table>
|
||||
<div class="annotation">
|
||||
<p>
|
||||
The solid lines are parent-child relationships, the dotted lines are
|
||||
client-server relationships as routed through the process hierarchy.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
The browser downloads the plugin and hands it over to the loader service,
|
||||
accompanied with the (memory) resources the loader needs to execute the new plugin
|
||||
subsystem. Because the plugin is executed by the loader, not by the browser
|
||||
directly, the browser has no direct power over the plugin. It can tell the
|
||||
loader about the position on screen, where the plugin should be presented, but
|
||||
it can neither interfere with the execution and data of the plugin, nor observe
|
||||
user input referring to the plugin. The plugin, in turn, does not even know
|
||||
about the existence of the browser. In the extreme case, if either of the two
|
||||
crashes, the other remains unaffected.
|
||||
</p>
|
||||
<div class="annotation">
|
||||
<p>
|
||||
For a test demonstrating that both subsystems are really independent, you may
|
||||
lock out the browser from the GUI by force using the kill key (<tt>Print</tt>). Scroll
|
||||
up to make the plugin visible and hit the kill key. After the screen
|
||||
turns reddish, click onto the browser (outside the plugin). You will see
|
||||
that the plugin will remain intact. However, to proceed with the demo,
|
||||
you will need to stop and restart the browser demo from the main menu.
|
||||
</p>
|
||||
</div>
|
||||
<a name="Pretty_geeky,_but_is_it_useful_in_practice?"></a>
|
||||
<h1>Pretty geeky, but is it useful in practice?</h1>
|
||||
<p>
|
||||
Think of a trusted service provider such as a bank. When performing online
|
||||
banking via a normal web application, you type in your PIN and TAN numbers into
|
||||
the browser which relies on <b>millions of lines of code</b> - an enormous
|
||||
attack surface for malware such as trojan horses. In contrast, if the trusted
|
||||
service provider offered a Genode subsystem as plugin, most of this complexity
|
||||
including the whole browser would be removed from the critical path. A plugin
|
||||
started by Genode's loader relies on <b>35K lines of code</b> only (the microkernel
|
||||
plus the Genode base system). By delivering the (trusted) client application each
|
||||
time the user visits the web site, the service provider can always deliver the
|
||||
latest version. The plugin can be a single program or a complete subsystem. It
|
||||
can even bring along its own TCP/IP stack connected to the network via Genode's
|
||||
low-level network bridge. This way, the plugin will actually use a distinct IP
|
||||
address as if it was executed on a separate machine.
|
||||
</p>
|
||||
<p>
|
||||
<a href="qrc:/demo/busybox.html" alt="Continue: Booting a Linux kernel in the browser">Continue: Booting a Linux kernel in the browser</a>
|
||||
</p>
|
||||
</div></div><br/><span id="space"/></body></html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 94 KiB |
@@ -1,46 +0,0 @@
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="Timer"/>
|
||||
<service name="Gui"/>
|
||||
</parent-provides>
|
||||
<default-route> <any-service> <any-child/> <parent/> </any-service> </default-route>
|
||||
<start name="framebuffer" caps="100">
|
||||
<binary name="gui_fb"/>
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides>
|
||||
<service name="Framebuffer"/>
|
||||
<service name="Input"/>
|
||||
</provides>
|
||||
<route> <any-service> <parent/> </any-service> </route>
|
||||
<config xpos="0" ypos="0" width="640" height="480"/>
|
||||
</start>
|
||||
<start name="nitpicker" caps="100">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Gui"/> </provides>
|
||||
<config>
|
||||
<domain name="pointer" layer="1" label="no" content="client" xray="no" origin="pointer" />
|
||||
<domain name="default" layer="2" label="no" content="client" hover="always" focus="click" />
|
||||
<policy label_prefix="pointer" domain="pointer"/>
|
||||
<default-policy domain="default"/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="pointer" caps="100">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
</start>
|
||||
<start name="launchpad" caps="400">
|
||||
<resource name="RAM" quantum="2G"/>
|
||||
<config xpos="50" ypos="10" width="400" height="400">
|
||||
<launcher name="testnit" ram_quota="1M" caps="100" />
|
||||
<launcher name="launchpad" ram_quota="6M" caps="200">
|
||||
<config xpos="90" ypos="50" width="400" height="400">
|
||||
<launcher name="testnit" ram_quota="512K" caps="100" />
|
||||
</config>
|
||||
</launcher>
|
||||
</config>
|
||||
</start>
|
||||
</config>
|
||||
@@ -1,15 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p>
|
||||
<!-- <embed src="http://10.0.0.31/testnit" args="ram_quota=4M" type="application/x-genode-plugin">-->
|
||||
<embed src="rom:///tetrix_plugin.tar" args="ram_quota=32M" type="application/x-genode-plugin" width="800px" height="600px"><br>
|
||||
<!-- <embed src="rom:///config.tar" args="ram_quota=32M" type="application/x-genode-plugin"><br>-->
|
||||
<!-- <embed src="rom:///testnit" args="ram_quota=4M" type="application/x-genode-plugin">-->
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,120 +0,0 @@
|
||||
<html><head><title>Genode Web-Browser Demo (4/4)</title></head>
|
||||
<style type="text/css">
|
||||
|
||||
/* backgrounds */
|
||||
body { background-image:url(bg.png); }
|
||||
div#title { background-image:url(title_bg.png); background-color:#ccccdd; }
|
||||
div#bgtop { background-image:url(bg_top.png); }
|
||||
div#content { background-image:url(bg_content.png); background-color:#ddddff; }
|
||||
div#title, div#content, div#bgtop { background-repeat:repeat-x; }
|
||||
div#content { background-position:bottom; }
|
||||
|
||||
/* borders */
|
||||
div#content, div#title { border-style:solid; border-width:1px; border-color:#001122; }
|
||||
|
||||
/* spacing */
|
||||
div#content, div#title {
|
||||
width:680px;
|
||||
padding-left:1em; padding-right:1em; padding-top:0.5em; padding-bottom:0.5em;
|
||||
margin-top:10px; margin-bottom:10px;
|
||||
}
|
||||
span#space { margin:50px; }
|
||||
body { margin:0px; }
|
||||
div#title { padding-top:0px; padding-bottom:0px; }
|
||||
div#content h1 { padding-top: 1em; }
|
||||
|
||||
/* center horizontally */
|
||||
div#content, div#title, table { float: none; margin: auto; }
|
||||
|
||||
div#content { margin-top:1em; }
|
||||
|
||||
/* fonts */
|
||||
a, p, h1 { font: 100% Verdana, Arial, Helvetica, sans-serif; }
|
||||
h1 { color:#000077; font-size:20px; }
|
||||
div#title h1 { font-size:24px; }
|
||||
div#title h1 { color:#000033; }
|
||||
div#content p { font-size:13px; }
|
||||
div#content a { font-size:16px; }
|
||||
|
||||
div.annotation p { font-style:italic; }
|
||||
div.annotation a { font-style:italic; }
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="bgtop"><br/><span id="top"/><div id="title"><h1>Genode Web-Browser Demo (4/4)</h1></div>
|
||||
<div id="content">
|
||||
<p>
|
||||
On Genode, each device driver is a normal program communicating with its client
|
||||
via inter-process communication. Apart from the benefits regarding fault
|
||||
isolation, this allows for having multiple implementations of the same
|
||||
device-driver interface. For an application using such an interface, the
|
||||
implementation of the interface is completely transparent. As an example, we can
|
||||
provide a custom block device driver to the Linux kernel. But our driver does not
|
||||
access any real block device but instead fetches data via HTTP from a
|
||||
web server.
|
||||
</p>
|
||||
<p>
|
||||
This enables us to stream a boot image of a complete Linux distribution on demand
|
||||
via the internet. Of course the boot time depends on the speed of the internet
|
||||
connection and on the performance of the web server providing the image.
|
||||
</p>
|
||||
<embed src="http://genode.org/files/livecd-10.11/tinycore_plugin.tar.gz" args="ram_quota=128M" type="application/x-genode-plugin" width="640px" height="480px"><br>
|
||||
<div class="annotation">
|
||||
<p>
|
||||
Click onto the plugin to pass the keyboard focus to Linux. Maybe you like to watch
|
||||
a short movie streamed from <a href="http://www.blender.org/">blender.org</a>? Just
|
||||
type in play_movie.sh and press enter.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
In the case of the plugin above, the subsystem consists of a Linux kernel, a
|
||||
small <tt>initrd</tt>, and the HTTP-block device driver including a TCP/IP stack. The Linux
|
||||
system is able to access the network via a distinct IP address.
|
||||
</p>
|
||||
<a name="http_block"></a>
|
||||
<table class="captionedimage"><tr><td>
|
||||
<img src="http_block.png">
|
||||
</td></tr></table>
|
||||
<p>
|
||||
The figure illustrates the use of the network bridge by the web
|
||||
browser, the HTTP-based block driver, and the Linux kernel. Even though the
|
||||
plugin is executed as an isolated subsystem, it can interact with
|
||||
system components outside the subsystem if permission is granted by the
|
||||
loader. The loader may base this decision on a static policy (as used for
|
||||
the demo), or it could further take plugin-provided information into account,
|
||||
for example a cryptographic signature proofing the origin of the
|
||||
plugin.
|
||||
</p>
|
||||
<a name="Have_fun_with_the_other_demos!"></a>
|
||||
<h1>Have fun with the other demos!</h1>
|
||||
<p>
|
||||
Thank you for viewing the web browser demo.
|
||||
You can learn more about this framework or get the source code at:
|
||||
</p>
|
||||
<div><dl>
|
||||
<dt><a href="http://genode.org" alt="http://genode.org">http://genode.org</a></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Genode OS Framework project website
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
To get in touch, subscribe to our mailing list or simply drop us a note via
|
||||
</p>
|
||||
<pre>
|
||||
info@genode.org
|
||||
</pre>
|
||||
<p>
|
||||
To learn more about the company behind the framework, visit our company's
|
||||
website:
|
||||
</p>
|
||||
<div><dl>
|
||||
<dt><a href="http://www.genode-labs.com" alt="http://www.genode-labs.com">http://www.genode-labs.com</a></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Genode Labs company
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div></div><br/><span id="space"/></body></html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 785 B |
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>demo/intro.html</file>
|
||||
<file>demo/busybox.html</file>
|
||||
<file>demo/tinycore.html</file>
|
||||
<file>demo/nitpicker.html</file>
|
||||
<file>demo/bg_content.png</file>
|
||||
<file>demo/bg.png</file>
|
||||
<file>demo/bg_top.png</file>
|
||||
<file>demo/title_bg.png</file>
|
||||
<file>demo/nitpicker_plugin.png</file>
|
||||
<file>demo/http_block.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,28 +0,0 @@
|
||||
arora_bookmarks.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/data/defaultbookmarks.xbel | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/data/defaultbookmarks.xbel b/src/data/defaultbookmarks.xbel
|
||||
index 5869929..3bde5f1 100644
|
||||
--- a/src/data/defaultbookmarks.xbel
|
||||
+++ b/src/data/defaultbookmarks.xbel
|
||||
@@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xbel>
|
||||
<xbel version="1.0">
|
||||
+
|
||||
+ <bookmark href="https://www.genode-labs.com"> <title>Genode Labs Company Website</title> </bookmark>
|
||||
+ <bookmark href="https://reddit.com/r/genode"> <title>Genode on Reddit</title> </bookmark>
|
||||
+ <bookmark href="https://lists.genode.org/pipermail/users/"> <title>Genode Mailing List</title> </bookmark>
|
||||
+ <bookmark href="https://github.com/genodelabs/genode"> <title>Genode GitHub Repository</title> </bookmark>
|
||||
+ <bookmark href="https://genode.org"> <title>Genode.org Project Website</title> </bookmark>
|
||||
+ <bookmark href="https://genodians.org"> <title>Genodians.org - Stories around the Genode Operating System</title> </bookmark>
|
||||
+
|
||||
<folder folded="yes">
|
||||
<title>Bookmarks Bar</title>
|
||||
<bookmark href="http://arora-browser.org/">
|
||||
@@ -1,53 +0,0 @@
|
||||
arora_disable_adblock.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/adblock/adblockmanager.cpp | 26 ++++++++++++++------------
|
||||
1 file changed, 14 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
|
||||
index 959f880..964e988 100644
|
||||
--- a/src/adblock/adblockmanager.cpp
|
||||
+++ b/src/adblock/adblockmanager.cpp
|
||||
@@ -48,7 +48,7 @@ AdBlockManager *AdBlockManager::s_adBlockManager = 0;
|
||||
AdBlockManager::AdBlockManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_loaded(false)
|
||||
- , m_enabled(true)
|
||||
+ , m_enabled(false)
|
||||
, m_saveTimer(new AutoSaver(this))
|
||||
, m_adBlockDialog(0)
|
||||
, m_adBlockNetwork(0)
|
||||
@@ -203,17 +203,19 @@ void AdBlockManager::load()
|
||||
settings.beginGroup(QLatin1String("AdBlock"));
|
||||
m_enabled = settings.value(QLatin1String("enabled"), m_enabled).toBool();
|
||||
|
||||
- QStringList defaultSubscriptions;
|
||||
- defaultSubscriptions.append(QString::fromUtf8(customSubscriptionUrl().toEncoded()));
|
||||
- defaultSubscriptions.append(QLatin1String("abp:subscribe?location=http://adblockplus.mozdev.org/easylist/easylist.txt&title=EasyList"));
|
||||
-
|
||||
- QStringList subscriptions = settings.value(QLatin1String("subscriptions"), defaultSubscriptions).toStringList();
|
||||
- foreach (const QString &subscription, subscriptions) {
|
||||
- QUrl url = QUrl::fromEncoded(subscription.toUtf8());
|
||||
- AdBlockSubscription *adBlockSubscription = new AdBlockSubscription(url, this);
|
||||
- connect(adBlockSubscription, SIGNAL(rulesChanged()), this, SIGNAL(rulesChanged()));
|
||||
- connect(adBlockSubscription, SIGNAL(changed()), this, SIGNAL(rulesChanged()));
|
||||
- m_subscriptions.append(adBlockSubscription);
|
||||
+ if (m_enabled) {
|
||||
+ QStringList defaultSubscriptions;
|
||||
+ defaultSubscriptions.append(QString::fromUtf8(customSubscriptionUrl().toEncoded()));
|
||||
+ defaultSubscriptions.append(QLatin1String("abp:subscribe?location=http://adblockplus.mozdev.org/easylist/easylist.txt&title=EasyList"));
|
||||
+
|
||||
+ QStringList subscriptions = settings.value(QLatin1String("subscriptions"), defaultSubscriptions).toStringList();
|
||||
+ foreach (const QString &subscription, subscriptions) {
|
||||
+ QUrl url = QUrl::fromEncoded(subscription.toUtf8());
|
||||
+ AdBlockSubscription *adBlockSubscription = new AdBlockSubscription(url, this);
|
||||
+ connect(adBlockSubscription, SIGNAL(rulesChanged()), this, SIGNAL(rulesChanged()));
|
||||
+ connect(adBlockSubscription, SIGNAL(changed()), this, SIGNAL(rulesChanged()));
|
||||
+ m_subscriptions.append(adBlockSubscription);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
arora_disable_qprocess.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/bookmarks/bookmarksmanager.cpp | 3 +++
|
||||
src/downloadmanager.cpp | 4 ++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
|
||||
index d3a21e2..3ddaa4a 100644
|
||||
--- a/src/bookmarks/bookmarksmanager.cpp
|
||||
+++ b/src/bookmarks/bookmarksmanager.cpp
|
||||
@@ -286,6 +286,8 @@ BookmarksModel *BookmarksManager::bookmarksModel()
|
||||
|
||||
void BookmarksManager::importBookmarks()
|
||||
{
|
||||
+ /* QProcess is not available on Genode */
|
||||
+#if 0
|
||||
QStringList supportedFormats;
|
||||
supportedFormats << tr("XBEL bookmarks").append(QLatin1String("(*.xbel *.xml)"));
|
||||
supportedFormats << tr("HTML Netscape bookmarks").append(QLatin1String("(*.html)"));
|
||||
@@ -330,6 +332,7 @@ void BookmarksManager::importBookmarks()
|
||||
importRootNode->setType(BookmarkNode::Folder);
|
||||
importRootNode->title = (tr("Imported %1").arg(QDate::currentDate().toString(Qt::SystemLocaleShortDate)));
|
||||
addBookmark(menu(), importRootNode);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void BookmarksManager::exportBookmarks()
|
||||
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
|
||||
index b0da144..e7b6000 100644
|
||||
--- a/src/downloadmanager.cpp
|
||||
+++ b/src/downloadmanager.cpp
|
||||
@@ -525,6 +525,9 @@ bool DownloadManager::allowQuit()
|
||||
|
||||
bool DownloadManager::externalDownload(const QUrl &url)
|
||||
{
|
||||
+ /* QProcess is not available on Genode */
|
||||
+ return false;
|
||||
+#if 0
|
||||
QSettings settings;
|
||||
settings.beginGroup(QLatin1String("downloadmanager"));
|
||||
if (!settings.value(QLatin1String("external"), false).toBool())
|
||||
@@ -543,6 +546,7 @@ bool DownloadManager::externalDownload(const QUrl &url)
|
||||
return false;
|
||||
|
||||
return QProcess::startDetached(args.takeFirst(), args << QString::fromUtf8(url.toEncoded()));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void DownloadManager::download(const QNetworkRequest &request, bool requestFileName)
|
||||
@@ -1,47 +0,0 @@
|
||||
arora_disable_ssl_message_boxes.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/network/networkaccessmanager.cpp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/network/networkaccessmanager.cpp b/src/network/networkaccessmanager.cpp
|
||||
index 9253a8e..45e9786 100644
|
||||
--- a/src/network/networkaccessmanager.cpp
|
||||
+++ b/src/network/networkaccessmanager.cpp
|
||||
@@ -316,6 +316,7 @@ void NetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError
|
||||
}
|
||||
|
||||
QString errors = errorStrings.join(QLatin1String("</li><li>"));
|
||||
+#if 0
|
||||
int ret = QMessageBox::warning(mainWindow,
|
||||
QCoreApplication::applicationName() + tr(" - SSL Errors"),
|
||||
tr("<qt>SSL Errors:"
|
||||
@@ -324,18 +325,25 @@ void NetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError
|
||||
"Do you want to ignore these errors?</qt>").arg(reply->url().toString()).arg(errors),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
+#else
|
||||
+ int ret = QMessageBox::Yes;
|
||||
+#endif
|
||||
|
||||
if (ret == QMessageBox::Yes) {
|
||||
if (ca_new.count() > 0) {
|
||||
QStringList certinfos;
|
||||
for (int i = 0; i < ca_new.count(); ++i)
|
||||
certinfos += certToFormattedString(ca_new.at(i));
|
||||
+#if 0
|
||||
ret = QMessageBox::question(mainWindow, QCoreApplication::applicationName(),
|
||||
tr("<qt>Certificates:<br/>"
|
||||
"%1<br/>"
|
||||
"Do you want to accept all these certificates?</qt>")
|
||||
.arg(certinfos.join(QString())),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
+#else
|
||||
+ ret = QMessageBox::Yes;
|
||||
+#endif
|
||||
if (ret == QMessageBox::Yes) {
|
||||
ca_merge += ca_new;
|
||||
|
||||
@@ -1,445 +0,0 @@
|
||||
arora_genode.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/adblock/adblock.pri | 2 +
|
||||
src/bookmarks/bookmarks.pri | 4 +
|
||||
src/bookmarks/xbel/xbel.pri | 2 +
|
||||
src/browserapplication.cpp | 2 +
|
||||
src/browsermainwindow.cpp | 6 ++
|
||||
src/history/history.pri | 2 +
|
||||
src/locationbar/locationbar.pri | 2 +
|
||||
src/main.cpp | 3 +
|
||||
src/network/cookiejar/cookiejar.pri | 5 +
|
||||
.../networkcookiejar/networkcookiejar.pri | 2 +
|
||||
src/network/network.pri | 4 +
|
||||
src/opensearch/opensearch.pri | 4 +
|
||||
src/qwebplugins/clicktoflash/clicktoflash.pri | 2 +
|
||||
src/qwebplugins/qwebplugins.pri | 4 +
|
||||
src/src.pri | 69 +++++---------------
|
||||
src/src.pro | 53 +--------------
|
||||
src/useragent/useragent.pri | 2 +
|
||||
src/utils/utils.pri | 9 +--
|
||||
18 files changed, 63 insertions(+), 114 deletions(-)
|
||||
|
||||
diff --git a/src/adblock/adblock.pri b/src/adblock/adblock.pri
|
||||
index c373a68..ce18643 100644
|
||||
--- a/src/adblock/adblock.pri
|
||||
+++ b/src/adblock/adblock.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/adblock
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/bookmarks/bookmarks.pri b/src/bookmarks/bookmarks.pri
|
||||
index ee03def..0debe73 100644
|
||||
--- a/src/bookmarks/bookmarks.pri
|
||||
+++ b/src/bookmarks/bookmarks.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/bookmarks
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -23,4 +25,4 @@ FORMS += \
|
||||
addbookmarkdialog.ui \
|
||||
bookmarksdialog.ui
|
||||
|
||||
-include(xbel/xbel.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/bookmarks/xbel/xbel.pri
|
||||
diff --git a/src/bookmarks/xbel/xbel.pri b/src/bookmarks/xbel/xbel.pri
|
||||
index 02b0258..ffd181d 100644
|
||||
--- a/src/bookmarks/xbel/xbel.pri
|
||||
+++ b/src/bookmarks/xbel/xbel.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/bookmarks/xbel
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/browserapplication.cpp b/src/browserapplication.cpp
|
||||
index 75e9954..08a8e65 100644
|
||||
--- a/src/browserapplication.cpp
|
||||
+++ b/src/browserapplication.cpp
|
||||
@@ -129,10 +129,12 @@ BrowserApplication::BrowserApplication(int &argc, char **argv)
|
||||
qDebug() << "BrowserApplication::" << __FUNCTION__ << "I am the only arora";
|
||||
#endif
|
||||
|
||||
+#ifndef Q_OS_GENODE
|
||||
// not sure what else to do...
|
||||
if (!startSingleServer())
|
||||
return;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(Q_WS_MAC)
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
diff --git a/src/browsermainwindow.cpp b/src/browsermainwindow.cpp
|
||||
index ffcb8b8..de787a6 100644
|
||||
--- a/src/browsermainwindow.cpp
|
||||
+++ b/src/browsermainwindow.cpp
|
||||
@@ -1218,12 +1218,15 @@ void BrowserMainWindow::fileOpen()
|
||||
|
||||
void BrowserMainWindow::filePrintPreview()
|
||||
{
|
||||
+/* QPrintPreviewDialog is currently not supported in Genode's Qt */
|
||||
+#ifndef Q_OS_GENODE
|
||||
if (!currentTab())
|
||||
return;
|
||||
QPrintPreviewDialog dialog(this);
|
||||
connect(&dialog, SIGNAL(paintRequested(QPrinter *)),
|
||||
currentTab(), SLOT(print(QPrinter *)));
|
||||
dialog.exec();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void BrowserMainWindow::filePrint()
|
||||
@@ -1235,12 +1238,15 @@ void BrowserMainWindow::filePrint()
|
||||
|
||||
void BrowserMainWindow::printRequested(QWebFrame *frame)
|
||||
{
|
||||
+/* QPrinter is currently not supported in Genode's Qt */
|
||||
+#ifndef Q_OS_GENODE
|
||||
QPrinter printer;
|
||||
QPrintDialog dialog(&printer, this);
|
||||
dialog.setWindowTitle(tr("Print Document"));
|
||||
if (dialog.exec() != QDialog::Accepted)
|
||||
return;
|
||||
frame->print(&printer);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void BrowserMainWindow::privateBrowsing()
|
||||
diff --git a/src/history/history.pri b/src/history/history.pri
|
||||
index 6ee163d..a3616e2 100644
|
||||
--- a/src/history/history.pri
|
||||
+++ b/src/history/history.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/history
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/locationbar/locationbar.pri b/src/locationbar/locationbar.pri
|
||||
index ba33005..cace42b 100644
|
||||
--- a/src/locationbar/locationbar.pri
|
||||
+++ b/src/locationbar/locationbar.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/locationbar
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index a5405d5..1d4d531 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -17,6 +17,7 @@
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#include <QtCore>
|
||||
#include "browserapplication.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -31,8 +32,10 @@ int main(int argc, char **argv)
|
||||
QApplication::setGraphicsSystem(QString::fromLatin1("raster"));
|
||||
#endif
|
||||
BrowserApplication application(argc, argv);
|
||||
+#ifndef Q_OS_GENODE
|
||||
if (!application.isRunning())
|
||||
return 0;
|
||||
+#endif
|
||||
#ifdef Q_OS_WIN
|
||||
application.setStyle(new ExplorerStyle);
|
||||
#endif
|
||||
diff --git a/src/network/cookiejar/cookiejar.pri b/src/network/cookiejar/cookiejar.pri
|
||||
index 8ecf533..4781160 100644
|
||||
--- a/src/network/cookiejar/cookiejar.pri
|
||||
+++ b/src/network/cookiejar/cookiejar.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/network/cookiejar
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -19,5 +21,6 @@ FORMS += \
|
||||
cookies.ui \
|
||||
cookiesexceptions.ui
|
||||
|
||||
-include($$PWD/networkcookiejar/networkcookiejar.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/network/cookiejar/networkcookiejar/networkcookiejar.pri
|
||||
+
|
||||
|
||||
diff --git a/src/network/cookiejar/networkcookiejar/networkcookiejar.pri b/src/network/cookiejar/networkcookiejar/networkcookiejar.pri
|
||||
index 78ac273..f6ae783 100644
|
||||
--- a/src/network/cookiejar/networkcookiejar/networkcookiejar.pri
|
||||
+++ b/src/network/cookiejar/networkcookiejar/networkcookiejar.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/network/cookiejar/networkcookiejar
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/network/network.pri b/src/network/network.pri
|
||||
index 5c912f4..ca3bdbf 100644
|
||||
--- a/src/network/network.pri
|
||||
+++ b/src/network/network.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/network
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -19,4 +21,4 @@ SOURCES += \
|
||||
networkproxyfactory.cpp \
|
||||
schemeaccesshandler.cpp
|
||||
|
||||
-include(cookiejar/cookiejar.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/network/cookiejar/cookiejar.pri
|
||||
diff --git a/src/opensearch/opensearch.pri b/src/opensearch/opensearch.pri
|
||||
index dbace74..427cf2a 100644
|
||||
--- a/src/opensearch/opensearch.pri
|
||||
+++ b/src/opensearch/opensearch.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/opensearch
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -23,4 +25,4 @@ SOURCES += \
|
||||
|
||||
FORMS += opensearchdialog.ui
|
||||
|
||||
-QT += script
|
||||
+QT += scriptclassic
|
||||
diff --git a/src/qwebplugins/clicktoflash/clicktoflash.pri b/src/qwebplugins/clicktoflash/clicktoflash.pri
|
||||
index 2033e59..193cc82 100644
|
||||
--- a/src/qwebplugins/clicktoflash/clicktoflash.pri
|
||||
+++ b/src/qwebplugins/clicktoflash/clicktoflash.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/qwebplugins/clicktoflash
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/qwebplugins/qwebplugins.pri b/src/qwebplugins/qwebplugins.pri
|
||||
index d3d9cb7..26b19db 100644
|
||||
--- a/src/qwebplugins/qwebplugins.pri
|
||||
+++ b/src/qwebplugins/qwebplugins.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/qwebplugins
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -9,5 +11,5 @@ SOURCES += \
|
||||
arorawebplugin.cpp \
|
||||
webpluginfactory.cpp
|
||||
|
||||
-include(clicktoflash/clicktoflash.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/qwebplugins/clicktoflash/clicktoflash.pri
|
||||
|
||||
diff --git a/src/src.pri b/src/src.pri
|
||||
index 7c1a0e3..5812c05 100644
|
||||
--- a/src/src.pri
|
||||
+++ b/src/src.pri
|
||||
@@ -1,8 +1,9 @@
|
||||
-CONFIG += qt warn_on
|
||||
-contains(QT_BUILD_PARTS, tools): CONFIG += uitools
|
||||
-else : DEFINES += QT_NO_UITOOLS
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src
|
||||
+
|
||||
+CC_CXX_OPT += -DGITVERSION=\"\\\"0\\\"\" -DGITCHANGENUMBER=\"\\\"0\\\"\" -include qhash.h -include quiloader.h
|
||||
|
||||
-win32|os2 : Debug : CONFIG += console
|
||||
+CONFIG += qt warn_on
|
||||
+CONFIG += uitools
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
@@ -15,15 +16,6 @@ UI_DIR = $$PWD/.ui
|
||||
MOC_DIR = $$PWD/.moc
|
||||
OBJECTS_DIR = $$PWD/.obj
|
||||
|
||||
-exists(../.git/HEAD) {
|
||||
- GITVERSION=$$system(git log -n1 --pretty=format:%h)
|
||||
- !isEmpty(GITVERSION) {
|
||||
- GITCHANGENUMBER=$$system(git log --pretty=format:%h | wc -l)
|
||||
- DEFINES += GITVERSION=\"\\\"$$GITVERSION\\\"\"
|
||||
- DEFINES += GITCHANGENUMBER=\"\\\"$$GITCHANGENUMBER\\\"\"
|
||||
- }
|
||||
-}
|
||||
-
|
||||
FORMS += \
|
||||
aboutdialog.ui \
|
||||
autofilldialog.ui \
|
||||
@@ -89,49 +81,24 @@ SOURCES += \
|
||||
webview.cpp \
|
||||
webviewsearch.cpp
|
||||
|
||||
-include(adblock/adblock.pri)
|
||||
-include(bookmarks/bookmarks.pri)
|
||||
-include(history/history.pri)
|
||||
-include(locationbar/locationbar.pri)
|
||||
-include(network/network.pri)
|
||||
-include(opensearch/opensearch.pri)
|
||||
-include(qwebplugins/qwebplugins.pri)
|
||||
-include(utils/utils.pri)
|
||||
-include(useragent/useragent.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/adblock/adblock.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/bookmarks/bookmarks.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/history/history.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/locationbar/locationbar.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/network/network.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/opensearch/opensearch.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/qwebplugins/qwebplugins.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/utils/utils.pri
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/useragent/useragent.pri
|
||||
|
||||
RESOURCES += \
|
||||
- $$PWD/data/data.qrc \
|
||||
- $$PWD/data/graphics/graphics.qrc \
|
||||
- $$PWD/data/searchengines/searchengines.qrc \
|
||||
- $$PWD/htmls/htmls.qrc
|
||||
+ data.qrc \
|
||||
+ graphics.qrc \
|
||||
+ searchengines.qrc \
|
||||
+ htmls.qrc
|
||||
|
||||
DISTFILES += ../AUTHORS \
|
||||
../ChangeLog \
|
||||
../LICENSE.GPL2 \
|
||||
../LICENSE.GPL3 \
|
||||
../README
|
||||
-
|
||||
-win32 {
|
||||
- RC_FILE = $$PWD/browser.rc
|
||||
- LIBS += -luser32
|
||||
-}
|
||||
-
|
||||
-os2 {
|
||||
- RC_FILE = $$PWD/browser_os2.rc
|
||||
-}
|
||||
-
|
||||
-mac {
|
||||
- ICON = browser.icns
|
||||
- QMAKE_INFO_PLIST = Info_mac.plist
|
||||
-}
|
||||
-
|
||||
-include(../webkittrunk.pri)
|
||||
-
|
||||
-unix {
|
||||
- PKGDATADIR = $$DATADIR/arora
|
||||
- DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
||||
-}
|
||||
-
|
||||
-win32 {
|
||||
- LIBS += -ladvapi32
|
||||
-}
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index dab73ff..8460fd4 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -1,65 +1,16 @@
|
||||
TEMPLATE = app
|
||||
|
||||
TARGET = arora
|
||||
-mac {
|
||||
- TARGET = Arora
|
||||
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
|
||||
-}
|
||||
|
||||
DEFINES += \
|
||||
QT_NO_CAST_FROM_ASCII \
|
||||
QT_NO_CAST_TO_ASCII \
|
||||
QT_STRICT_ITERATORS \
|
||||
|
||||
-include(../install.pri)
|
||||
-
|
||||
-include(src.pri)
|
||||
+include $(call select_from_ports,arora)/src/app/arora/src/src.pri
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
DESTDIR = ../
|
||||
|
||||
-include(locale/locale.pri)
|
||||
-
|
||||
-!mac {
|
||||
-unix {
|
||||
- INSTALLS += translations desktop iconxpm iconsvg icon16 icon32 icon128 man man-compress
|
||||
-
|
||||
- translations.path = $$PKGDATADIR
|
||||
- translations.files += .qm/locale
|
||||
-
|
||||
- desktop.path = $$DATADIR/applications
|
||||
- desktop.files += arora.desktop
|
||||
-
|
||||
- iconxpm.path = $$DATADIR/pixmaps
|
||||
- iconxpm.files += data/arora.xpm
|
||||
-
|
||||
- iconsvg.path = $$DATADIR/icons/hicolor/scalable/apps
|
||||
- iconsvg.files += data/arora.svg
|
||||
-
|
||||
- icon16.path = $$DATADIR/icons/hicolor/16x16/apps
|
||||
- icon16.files += data/16x16/arora.png
|
||||
-
|
||||
- icon32.path = $$DATADIR/icons/hicolor/32x32/apps
|
||||
- icon32.files += data/32x32/arora.png
|
||||
-
|
||||
- icon128.path = $$DATADIR/icons/hicolor/128x128/apps
|
||||
- icon128.files += data/128x128/arora.png
|
||||
-
|
||||
- man.path = $$DATADIR/man/man1
|
||||
- man.files += data/arora.1
|
||||
-
|
||||
- man-compress.path = $$DATADIR/man/man1
|
||||
- man-compress.extra = "" "gzip -9 -f \$(INSTALL_ROOT)/$$DATADIR/man/man1/arora.1" ""
|
||||
- man-compress.depends = install_man
|
||||
-
|
||||
- GNOME_DEFAULT_APPS_PATH = $$system(pkg-config --variable=defappsdir gnome-default-applications)
|
||||
-
|
||||
- !isEmpty(GNOME_DEFAULT_APPS_PATH) {
|
||||
- INSTALLS += gnome-default-app
|
||||
-
|
||||
- gnome-default-app.path = $$GNOME_DEFAULT_APPS_PATH
|
||||
- gnome-default-app.files = data/arora.xml
|
||||
- }
|
||||
-}
|
||||
-}
|
||||
+QT_PLUGIN += qgif qjpeg
|
||||
diff --git a/src/useragent/useragent.pri b/src/useragent/useragent.pri
|
||||
index 78f1c48..50f6e1e 100644
|
||||
--- a/src/useragent/useragent.pri
|
||||
+++ b/src/useragent/useragent.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/useragent
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
diff --git a/src/utils/utils.pri b/src/utils/utils.pri
|
||||
index fb10c55..489a51d 100644
|
||||
--- a/src/utils/utils.pri
|
||||
+++ b/src/utils/utils.pri
|
||||
@@ -1,3 +1,5 @@
|
||||
+INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/utils
|
||||
+
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
@@ -26,10 +28,3 @@ SOURCES += \
|
||||
squeezelabel.cpp \
|
||||
treesortfilterproxymodel.cpp \
|
||||
webpageproxy.cpp
|
||||
-
|
||||
-win32 {
|
||||
- HEADERS += explorerstyle.h
|
||||
- SOURCES += explorerstyle.cpp
|
||||
- LIBS += -lgdi32
|
||||
-}
|
||||
-
|
||||
@@ -1,24 +0,0 @@
|
||||
arora_move_window.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/browserapplication.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/browserapplication.cpp b/src/browserapplication.cpp
|
||||
index 08a8e65..cb3a872 100644
|
||||
--- a/src/browserapplication.cpp
|
||||
+++ b/src/browserapplication.cpp
|
||||
@@ -559,6 +559,10 @@ BrowserMainWindow *BrowserApplication::newMainWindow()
|
||||
if (!m_mainWindows.isEmpty())
|
||||
mainWindow()->m_autoSaver->saveIfNeccessary();
|
||||
BrowserMainWindow *browser = new BrowserMainWindow();
|
||||
+
|
||||
+ browser->resize(790, 705);
|
||||
+ browser->move(215, 6);
|
||||
+
|
||||
m_mainWindows.prepend(browser);
|
||||
connect(this, SIGNAL(privacyChanged(bool)),
|
||||
browser, SLOT(privacyChanged(bool)));
|
||||
@@ -1,40 +0,0 @@
|
||||
arora_nitpicker_plugin.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/qwebplugins/qwebplugins.pri | 2 +-
|
||||
src/qwebplugins/webpluginfactory.cpp | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qwebplugins/qwebplugins.pri b/src/qwebplugins/qwebplugins.pri
|
||||
index 26b19db..cc54090 100644
|
||||
--- a/src/qwebplugins/qwebplugins.pri
|
||||
+++ b/src/qwebplugins/qwebplugins.pri
|
||||
@@ -12,4 +12,4 @@ SOURCES += \
|
||||
webpluginfactory.cpp
|
||||
|
||||
include $(call select_from_ports,arora)/src/app/arora/src/qwebplugins/clicktoflash/clicktoflash.pri
|
||||
-
|
||||
+include $(REP_DIR)/src/app/arora/qwebplugins/nitpicker/nitpicker.pri
|
||||
diff --git a/src/qwebplugins/webpluginfactory.cpp b/src/qwebplugins/webpluginfactory.cpp
|
||||
index c12fe72..2e09f69 100644
|
||||
--- a/src/qwebplugins/webpluginfactory.cpp
|
||||
+++ b/src/qwebplugins/webpluginfactory.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "webpluginfactory.h"
|
||||
|
||||
#include "clicktoflashplugin.h"
|
||||
+#include "nitpickerplugin.h"
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qurl.h>
|
||||
@@ -88,6 +89,7 @@ void WebPluginFactory::init() const
|
||||
qDeleteAll(m_plugins);
|
||||
m_plugins.clear();
|
||||
m_plugins.append(new ClickToFlashPlugin);
|
||||
+ m_plugins.append(new NitpickerPlugin);
|
||||
foreach (AroraWebPlugin *plugin, m_plugins) {
|
||||
foreach (const QWebPluginFactory::MimeType &pluginMimeType, plugin->metaPlugin().mimeTypes)
|
||||
m_pluginsCache.insert(pluginMimeType.name, plugin);
|
||||
@@ -1,894 +0,0 @@
|
||||
arora_qt5_cpp.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/aboutdialog.cpp | 4 +-
|
||||
src/adblock/adblockmodel.cpp | 13 +++++
|
||||
src/adblock/adblocksubscription.cpp | 13 +++++
|
||||
src/autofilldialog.cpp | 5 ++
|
||||
src/autofillmanager.cpp | 14 ++++++
|
||||
src/bookmarks/bookmarksmanager.cpp | 8 +++
|
||||
src/bookmarks/bookmarksmodel.cpp | 2 +
|
||||
src/browserapplication.cpp | 14 +++++-
|
||||
src/downloadmanager.cpp | 8 ++-
|
||||
src/history/history.cpp | 49 +++++++++++++++++++-
|
||||
src/locationbar/locationbar.cpp | 2 +
|
||||
src/locationbar/locationbarsiteicon.cpp | 3 +
|
||||
src/modelmenu.cpp | 5 ++
|
||||
src/modeltoolbar.cpp | 3 +
|
||||
src/network/cookiejar/cookieexceptionsmodel.cpp | 5 ++
|
||||
src/network/cookiejar/cookiejar.cpp | 3 +
|
||||
src/network/cookiejar/cookiemodel.cpp | 5 ++
|
||||
.../networkcookiejar/networkcookiejar.cpp | 2 +
|
||||
.../cookiejar/networkcookiejar/networkcookiejar.h | 2 +
|
||||
.../networkcookiejar/networkcookiejar_p.h | 2 +
|
||||
src/network/networkaccessmanager.cpp | 16 +++++++
|
||||
src/network/networkdiskcache.cpp | 5 ++
|
||||
src/opensearch/opensearchengine.cpp | 8 +++
|
||||
src/opensearch/opensearchenginemodel.cpp | 5 ++
|
||||
src/opensearch/opensearchmanager.cpp | 4 ++
|
||||
src/settings.cpp | 8 ++-
|
||||
src/tabbar.cpp | 3 +
|
||||
src/tabwidget.cpp | 2 -
|
||||
src/utils/networkaccessmanagerproxy_p.h | 2 +
|
||||
src/webview.cpp | 14 ++++--
|
||||
tools/cacheinfo/main.cpp | 5 ++
|
||||
tools/htmlToXBel/main.cpp | 5 ++
|
||||
32 files changed, 225 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp
|
||||
index 42e1c81..ce70df2 100644
|
||||
--- a/src/aboutdialog.cpp
|
||||
+++ b/src/aboutdialog.cpp
|
||||
@@ -27,7 +27,9 @@
|
||||
#include <qtextedit.h>
|
||||
#include <qtextstream.h>
|
||||
|
||||
-#if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)
|
||||
+#if QT_VERSION >= 0x050000 || defined(WEBKIT_TRUNK)
|
||||
+#include <qwebkitglobal.h>
|
||||
+#elif QT_VERSION >= 0x040600
|
||||
#include <qwebkitversion.h>
|
||||
#endif
|
||||
|
||||
diff --git a/src/adblock/adblockmodel.cpp b/src/adblock/adblockmodel.cpp
|
||||
index 1b5ba2d..f17e2a0 100644
|
||||
--- a/src/adblock/adblockmodel.cpp
|
||||
+++ b/src/adblock/adblockmodel.cpp
|
||||
@@ -41,7 +41,12 @@ AdBlockModel::AdBlockModel(QObject *parent)
|
||||
|
||||
void AdBlockModel::rulesChanged()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
const AdBlockRule AdBlockModel::rule(const QModelIndex &index) const
|
||||
@@ -67,7 +72,11 @@ QModelIndex AdBlockModel::index(AdBlockSubscription *subscription)
|
||||
int row = m_manager->subscriptions().indexOf(subscription);
|
||||
if (row < 0 || row >= m_manager->subscriptions().count())
|
||||
return QModelIndex();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return createIndex(row, 0);
|
||||
+#else
|
||||
return createIndex(row, 0, 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
QVariant AdBlockModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
@@ -159,7 +168,11 @@ QModelIndex AdBlockModel::parent(const QModelIndex &index) const
|
||||
return QModelIndex();
|
||||
|
||||
int parentRow = m_manager->subscriptions().indexOf(parent);
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return createIndex(parentRow, 0);
|
||||
+#else
|
||||
return createIndex(parentRow, 0, 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
Qt::ItemFlags AdBlockModel::flags(const QModelIndex &index) const
|
||||
diff --git a/src/adblock/adblocksubscription.cpp b/src/adblock/adblocksubscription.cpp
|
||||
index d28c590..539a9d2 100644
|
||||
--- a/src/adblock/adblocksubscription.cpp
|
||||
+++ b/src/adblock/adblocksubscription.cpp
|
||||
@@ -37,6 +37,10 @@
|
||||
#include <qnetworkreply.h>
|
||||
#include <qtextstream.h>
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+#include <QUrlQuery>
|
||||
+#endif
|
||||
+
|
||||
// #define ADBLOCKSUBSCRIPTION_DEBUG
|
||||
|
||||
AdBlockSubscription::AdBlockSubscription(const QUrl &url, QObject *parent)
|
||||
@@ -58,10 +62,17 @@ void AdBlockSubscription::parseUrl(const QUrl &url)
|
||||
if (url.path() != QLatin1String("subscribe"))
|
||||
return;
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ m_title = QUrlQuery(url).queryItemValue(QLatin1String("title"));
|
||||
+ m_enabled = QUrlQuery(url).queryItemValue(QLatin1String("enabled")) != QLatin1String("false");
|
||||
+ m_location = QUrlQuery(url).queryItemValue(QLatin1String("location")).toUtf8();
|
||||
+ QByteArray lastUpdateByteArray = QUrlQuery(url).queryItemValue(QLatin1String("lastUpdate")).toLatin1();
|
||||
+#else
|
||||
m_title = QUrl::fromPercentEncoding(url.encodedQueryItemValue("title"));
|
||||
m_enabled = QUrl::fromPercentEncoding(url.encodedQueryItemValue("enabled")) != QLatin1String("false");
|
||||
m_location = QUrl::fromPercentEncoding(url.encodedQueryItemValue("location")).toUtf8();
|
||||
QByteArray lastUpdateByteArray = url.encodedQueryItemValue("lastUpdate");
|
||||
+#endif
|
||||
QString lastUpdateString = QUrl::fromPercentEncoding(lastUpdateByteArray);
|
||||
m_lastUpdate = QDateTime::fromString(lastUpdateString, Qt::ISODate);
|
||||
loadRules();
|
||||
@@ -82,7 +93,9 @@ QUrl AdBlockSubscription::url() const
|
||||
queryItems.append(Query(QLatin1String("enabled"), QLatin1String("false")));
|
||||
if (m_lastUpdate.isValid())
|
||||
queryItems.append(Query(QLatin1String("lastUpdate"), m_lastUpdate.toString(Qt::ISODate)));
|
||||
+#if !(QT_VERSION >= 0x050000)
|
||||
url.setQueryItems(queryItems);
|
||||
+#endif
|
||||
return url;
|
||||
}
|
||||
|
||||
diff --git a/src/autofilldialog.cpp b/src/autofilldialog.cpp
|
||||
index 7e1acd1..d3cb89c 100644
|
||||
--- a/src/autofilldialog.cpp
|
||||
+++ b/src/autofilldialog.cpp
|
||||
@@ -46,7 +46,12 @@ void AutoFillModel::autoFillChanged()
|
||||
{
|
||||
AutoFillManager *manager = BrowserApplication::instance()->autoFillManager();
|
||||
m_forms = manager->forms();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
QVariant AutoFillModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
diff --git a/src/autofillmanager.cpp b/src/autofillmanager.cpp
|
||||
index b4c713e..03cf2f5 100644
|
||||
--- a/src/autofillmanager.cpp
|
||||
+++ b/src/autofillmanager.cpp
|
||||
@@ -44,6 +44,10 @@
|
||||
#include <qwebpage.h>
|
||||
#include <qwebsettings.h>
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+#include <QUrlQuery>
|
||||
+#endif
|
||||
+
|
||||
#include <qdebug.h>
|
||||
|
||||
// #define AUTOFILL_DEBUG
|
||||
@@ -91,7 +95,11 @@ void AutoFillManager::loadSettings()
|
||||
|
||||
QString AutoFillManager::autoFillDataFile()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString fileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
+#else
|
||||
QString fileName = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
+#endif
|
||||
fileName += QLatin1String("/autofill.dat");
|
||||
return fileName;
|
||||
}
|
||||
@@ -227,7 +235,11 @@ AutoFillManager::Form AutoFillManager::findForm(QWebPage *webPage, const QByteAr
|
||||
{
|
||||
Form form;
|
||||
QUrl argsUrl = QUrl::fromEncoded(QByteArray("foo://bar.com/?" + outgoingData));
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QList<QPair<QString, QString> > encodedArgs = QUrlQuery(argsUrl).queryItems();
|
||||
+#else
|
||||
QList<QPair<QString, QString> > encodedArgs = argsUrl.queryItems();
|
||||
+#endif
|
||||
QSet<QPair<QString, QString> > args;
|
||||
// XXX Is there a Qt function to do this? (unencode '+' to ' ')
|
||||
for (int i = 0; i < encodedArgs.count(); ++i) {
|
||||
@@ -293,7 +305,9 @@ AutoFillManager::Form AutoFillManager::findForm(QWebPage *webPage, const QByteAr
|
||||
QUrl AutoFillManager::stripUrl(const QUrl &url)
|
||||
{
|
||||
QUrl cleanUrl = url;
|
||||
+#if !(QT_VERSION >= 0x050000)
|
||||
cleanUrl.setQueryItems(QList<QPair<QString, QString> >());
|
||||
+#endif
|
||||
cleanUrl.setFragment(QString());
|
||||
cleanUrl.setUserInfo(QString());
|
||||
return cleanUrl;
|
||||
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
|
||||
index 8db5abf..d3a21e2 100644
|
||||
--- a/src/bookmarks/bookmarksmanager.cpp
|
||||
+++ b/src/bookmarks/bookmarksmanager.cpp
|
||||
@@ -123,7 +123,11 @@ void BookmarksManager::load()
|
||||
return;
|
||||
m_loaded = true;
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString dir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
+#else
|
||||
QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
+#endif
|
||||
QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
|
||||
if (!QFile::exists(bookmarkFile))
|
||||
bookmarkFile = QLatin1String(":defaultbookmarks.xbel");
|
||||
@@ -184,7 +188,11 @@ void BookmarksManager::save() const
|
||||
return;
|
||||
|
||||
XbelWriter writer;
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString dir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
+#else
|
||||
QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
+#endif
|
||||
QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
|
||||
// Save root folder titles in English (i.e. not localized)
|
||||
m_menu->title = QLatin1String(BOOKMARKMENU);
|
||||
diff --git a/src/bookmarks/bookmarksmodel.cpp b/src/bookmarks/bookmarksmodel.cpp
|
||||
index b6f2869..d137dc5 100644
|
||||
--- a/src/bookmarks/bookmarksmodel.cpp
|
||||
+++ b/src/bookmarks/bookmarksmodel.cpp
|
||||
@@ -72,6 +72,8 @@
|
||||
#include <qbuffer.h>
|
||||
#include <qevent.h>
|
||||
|
||||
+#include <QMimeData>
|
||||
+
|
||||
BookmarksModel::BookmarksModel(BookmarksManager *bookmarkManager, QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
, m_endMacro(false)
|
||||
diff --git a/src/browserapplication.cpp b/src/browserapplication.cpp
|
||||
index 4514a80..f0187fe 100644
|
||||
--- a/src/browserapplication.cpp
|
||||
+++ b/src/browserapplication.cpp
|
||||
@@ -303,9 +303,15 @@ void BrowserApplication::quitBrowser()
|
||||
*/
|
||||
void BrowserApplication::postLaunch()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QStandardPaths::StandardLocation location;
|
||||
+ location = QStandardPaths::CacheLocation;
|
||||
+ QString directory = QStandardPaths::writableLocation(location);
|
||||
+#else
|
||||
QDesktopServices::StandardLocation location;
|
||||
location = QDesktopServices::CacheLocation;
|
||||
QString directory = QDesktopServices::storageLocation(location);
|
||||
+#endif
|
||||
if (directory.isEmpty())
|
||||
directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
|
||||
QWebSettings::setIconDatabasePath(directory);
|
||||
@@ -356,7 +362,7 @@ void BrowserApplication::loadSettings()
|
||||
QString standardFontFamily = defaultSettings->fontFamily(QWebSettings::StandardFont);
|
||||
int standardFontSize = defaultSettings->fontSize(QWebSettings::DefaultFontSize);
|
||||
QFont standardFont = QFont(standardFontFamily, standardFontSize);
|
||||
- standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
|
||||
+ standardFont = qvariant_cast<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
|
||||
defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
|
||||
defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
|
||||
int minimumFontSize = settings.value(QLatin1String("minimumFontSize"),
|
||||
@@ -366,7 +372,7 @@ void BrowserApplication::loadSettings()
|
||||
QString fixedFontFamily = defaultSettings->fontFamily(QWebSettings::FixedFont);
|
||||
int fixedFontSize = defaultSettings->fontSize(QWebSettings::DefaultFixedFontSize);
|
||||
QFont fixedFont = QFont(fixedFontFamily, fixedFontSize);
|
||||
- fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
|
||||
+ fixedFont = qvariant_cast<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
|
||||
defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
|
||||
defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());
|
||||
|
||||
@@ -658,7 +664,11 @@ QString BrowserApplication::installedDataDirectory()
|
||||
|
||||
QString BrowserApplication::dataFilePath(const QString &fileName)
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString directory = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
+#else
|
||||
QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
+#endif
|
||||
if (directory.isEmpty())
|
||||
directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
|
||||
if (!QFile::exists(directory)) {
|
||||
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
|
||||
index 8196353..b0da144 100644
|
||||
--- a/src/downloadmanager.cpp
|
||||
+++ b/src/downloadmanager.cpp
|
||||
@@ -471,7 +471,11 @@ DownloadManager::DownloadManager(QWidget *parent)
|
||||
|
||||
QSettings settings;
|
||||
settings.beginGroup(QLatin1String("downloadmanager"));
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString defaultLocation = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||
+#else
|
||||
QString defaultLocation = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
|
||||
+#endif
|
||||
setDownloadDirectory(settings.value(QLatin1String("downloadDirectory"), defaultLocation).toString());
|
||||
|
||||
downloadsView->setShowGrid(false);
|
||||
@@ -601,9 +605,9 @@ void DownloadManager::updateActiveItemCount()
|
||||
{
|
||||
int acCount = activeDownloads();
|
||||
if (acCount > 0) {
|
||||
- setWindowTitle(QApplication::translate("DownloadDialog", "Downloading %1", 0, QApplication::UnicodeUTF8).arg(acCount));
|
||||
+ setWindowTitle(QApplication::translate("DownloadDialog", "Downloading %1", 0).arg(acCount));
|
||||
} else {
|
||||
- setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", 0, QApplication::UnicodeUTF8));
|
||||
+ setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", 0));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/history/history.cpp b/src/history/history.cpp
|
||||
index 7419cf0..6f976b1 100644
|
||||
--- a/src/history/history.cpp
|
||||
+++ b/src/history/history.cpp
|
||||
@@ -104,7 +104,12 @@ HistoryModel::HistoryModel(HistoryManager *history, QObject *parent)
|
||||
|
||||
void HistoryModel::historyReset()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void HistoryModel::entryAdded()
|
||||
@@ -558,7 +563,12 @@ void HistoryFilterModel::recalculateFrecencies()
|
||||
void HistoryFilterModel::sourceReset()
|
||||
{
|
||||
m_loaded = false;
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
int HistoryFilterModel::rowCount(const QModelIndex &parent) const
|
||||
@@ -694,7 +704,14 @@ bool HistoryFilterModel::removeRows(int row, int count, const QModelIndex &paren
|
||||
this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
|
||||
m_loaded = false;
|
||||
if (oldCount - count != rowCount())
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ {
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+ }
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -838,7 +855,11 @@ QModelIndex HistoryTreeModel::index(int row, int column, const QModelIndex &pare
|
||||
return QModelIndex();
|
||||
|
||||
if (!parent.isValid())
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return createIndex(row, column);
|
||||
+#else
|
||||
return createIndex(row, column, 0);
|
||||
+#endif
|
||||
return createIndex(row, column, parent.row() + 1);
|
||||
}
|
||||
|
||||
@@ -847,7 +868,11 @@ QModelIndex HistoryTreeModel::parent(const QModelIndex &index) const
|
||||
int offset = index.internalId();
|
||||
if (offset == 0 || !index.isValid())
|
||||
return QModelIndex();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return createIndex(offset - 1, 0);
|
||||
+#else
|
||||
return createIndex(offset - 1, 0, 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool HistoryTreeModel::hasChildren(const QModelIndex &parent) const
|
||||
@@ -887,13 +912,23 @@ void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel)
|
||||
this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
|
||||
}
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void HistoryTreeModel::sourceReset()
|
||||
{
|
||||
m_sourceRowCache.clear();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void HistoryTreeModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)
|
||||
@@ -902,7 +937,12 @@ void HistoryTreeModel::sourceRowsInserted(const QModelIndex &parent, int start,
|
||||
Q_ASSERT(!parent.isValid());
|
||||
if (start != 0 || start != end) {
|
||||
m_sourceRowCache.clear();
|
||||
- reset();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
+ reset();
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -964,7 +1004,12 @@ bool HistoryTreeModel::removeRows(int row, int count, const QModelIndex &parent)
|
||||
void HistoryTreeModel::sourceRowsRemoved(const QModelIndex &parent, int start, int end)
|
||||
{
|
||||
if (!removingDown) {
|
||||
- reset();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
+ reset();
|
||||
+#endif
|
||||
m_sourceRowCache.clear();
|
||||
return;
|
||||
}
|
||||
diff --git a/src/locationbar/locationbar.cpp b/src/locationbar/locationbar.cpp
|
||||
index c9f5335..3124797 100644
|
||||
--- a/src/locationbar/locationbar.cpp
|
||||
+++ b/src/locationbar/locationbar.cpp
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <qpainter.h>
|
||||
#include <qstyleoption.h>
|
||||
|
||||
+#include <QMimeData>
|
||||
+
|
||||
#include <qdebug.h>
|
||||
|
||||
LocationBar::LocationBar(QWidget *parent)
|
||||
diff --git a/src/locationbar/locationbarsiteicon.cpp b/src/locationbar/locationbarsiteicon.cpp
|
||||
index f594700..49b2f55 100644
|
||||
--- a/src/locationbar/locationbarsiteicon.cpp
|
||||
+++ b/src/locationbar/locationbarsiteicon.cpp
|
||||
@@ -22,6 +22,9 @@
|
||||
#include <qevent.h>
|
||||
#include <qurl.h>
|
||||
|
||||
+#include <QDrag>
|
||||
+#include <QMimeData>
|
||||
+
|
||||
#include "browserapplication.h"
|
||||
#include "webview.h"
|
||||
|
||||
diff --git a/src/modelmenu.cpp b/src/modelmenu.cpp
|
||||
index 4f95d09..0f052c3 100644
|
||||
--- a/src/modelmenu.cpp
|
||||
+++ b/src/modelmenu.cpp
|
||||
@@ -69,6 +69,9 @@
|
||||
#include <qapplication.h>
|
||||
#include <qevent.h>
|
||||
|
||||
+#include <QDrag>
|
||||
+#include <QMimeData>
|
||||
+
|
||||
#include <qdebug.h>
|
||||
|
||||
ModelMenu::ModelMenu(QWidget *parent)
|
||||
@@ -344,7 +347,7 @@ void ModelMenu::mouseMoveEvent(QMouseEvent *event)
|
||||
if (drag->exec() == Qt::MoveAction) {
|
||||
m_model->removeRow(idx.row(), m_root);
|
||||
|
||||
- if (!this->isAncestorOf(drag->target()))
|
||||
+ if (!this->isAncestorOf(qobject_cast<QWidget*>(drag->target())))
|
||||
close();
|
||||
else
|
||||
aboutToShow();
|
||||
diff --git a/src/modeltoolbar.cpp b/src/modeltoolbar.cpp
|
||||
index 12b77b9..800cd75 100644
|
||||
--- a/src/modeltoolbar.cpp
|
||||
+++ b/src/modeltoolbar.cpp
|
||||
@@ -25,6 +25,9 @@
|
||||
#include <qevent.h>
|
||||
#include <qtoolbutton.h>
|
||||
|
||||
+#include <QDrag>
|
||||
+#include <QMimeData>
|
||||
+
|
||||
ModelToolBar::ModelToolBar(QWidget *parent)
|
||||
: QToolBar(parent)
|
||||
, m_model(0)
|
||||
diff --git a/src/network/cookiejar/cookieexceptionsmodel.cpp b/src/network/cookiejar/cookieexceptionsmodel.cpp
|
||||
index 6e45d2a..93abbca 100644
|
||||
--- a/src/network/cookiejar/cookieexceptionsmodel.cpp
|
||||
+++ b/src/network/cookiejar/cookieexceptionsmodel.cpp
|
||||
@@ -217,6 +217,11 @@ void CookieExceptionsModel::addHost(QString host, QStringList &add, QStringList
|
||||
add.removeOne(otherRule);
|
||||
remove1.removeOne(otherRule);
|
||||
remove2.removeOne(otherRule);
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
diff --git a/src/network/cookiejar/cookiejar.cpp b/src/network/cookiejar/cookiejar.cpp
|
||||
index 532600a..f95dfb2 100644
|
||||
--- a/src/network/cookiejar/cookiejar.cpp
|
||||
+++ b/src/network/cookiejar/cookiejar.cpp
|
||||
@@ -71,6 +71,9 @@
|
||||
#include <qsettings.h>
|
||||
#include <qurl.h>
|
||||
|
||||
+#include <QDataStream>
|
||||
+#include <QNetworkCookie>
|
||||
+
|
||||
#include <qdebug.h>
|
||||
|
||||
static const unsigned int JAR_VERSION = 23;
|
||||
diff --git a/src/network/cookiejar/cookiemodel.cpp b/src/network/cookiejar/cookiemodel.cpp
|
||||
index 391e2cc..318af47 100644
|
||||
--- a/src/network/cookiejar/cookiemodel.cpp
|
||||
+++ b/src/network/cookiejar/cookiemodel.cpp
|
||||
@@ -196,5 +196,10 @@ void CookieModel::cookiesChanged()
|
||||
{
|
||||
if (m_cookieJar)
|
||||
m_cookies = m_cookieJar->cookies();
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ beginResetModel();
|
||||
+ endResetModel();
|
||||
+#else
|
||||
reset();
|
||||
+#endif
|
||||
}
|
||||
diff --git a/src/network/cookiejar/networkcookiejar/networkcookiejar.cpp b/src/network/cookiejar/networkcookiejar/networkcookiejar.cpp
|
||||
index 940269d..e542d79 100644
|
||||
--- a/src/network/cookiejar/networkcookiejar/networkcookiejar.cpp
|
||||
+++ b/src/network/cookiejar/networkcookiejar/networkcookiejar.cpp
|
||||
@@ -47,6 +47,8 @@
|
||||
#include <qdebug.h>
|
||||
#endif
|
||||
|
||||
+#include <QDataStream>
|
||||
+
|
||||
#include <qurl.h>
|
||||
#include <qdatetime.h>
|
||||
|
||||
diff --git a/src/network/cookiejar/networkcookiejar/networkcookiejar.h b/src/network/cookiejar/networkcookiejar/networkcookiejar.h
|
||||
index 365b4a3..52d9c6e 100644
|
||||
--- a/src/network/cookiejar/networkcookiejar/networkcookiejar.h
|
||||
+++ b/src/network/cookiejar/networkcookiejar/networkcookiejar.h
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include <qnetworkcookie.h>
|
||||
|
||||
+#include <QNetworkCookieJar>
|
||||
+
|
||||
class NetworkCookieJarPrivate;
|
||||
class NetworkCookieJar : public QNetworkCookieJar {
|
||||
Q_OBJECT
|
||||
diff --git a/src/network/cookiejar/networkcookiejar/networkcookiejar_p.h b/src/network/cookiejar/networkcookiejar/networkcookiejar_p.h
|
||||
index ea35737..bb19aa1 100644
|
||||
--- a/src/network/cookiejar/networkcookiejar/networkcookiejar_p.h
|
||||
+++ b/src/network/cookiejar/networkcookiejar/networkcookiejar_p.h
|
||||
@@ -37,6 +37,8 @@
|
||||
#ifndef NETWORKCOOKIEJARPRIVATE_H
|
||||
#define NETWORKCOOKIEJARPRIVATE_H
|
||||
|
||||
+#include <QNetworkCookie>
|
||||
+
|
||||
#include "trie_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
diff --git a/src/network/networkaccessmanager.cpp b/src/network/networkaccessmanager.cpp
|
||||
index 56fb343..576957b 100644
|
||||
--- a/src/network/networkaccessmanager.cpp
|
||||
+++ b/src/network/networkaccessmanager.cpp
|
||||
@@ -213,7 +213,11 @@ void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthent
|
||||
passwordDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
|
||||
|
||||
QString introMessage = tr("<qt>Enter username and password for \"%1\" at %2</qt>");
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ introMessage = introMessage.arg(auth->realm().toHtmlEscaped()).arg(reply->url().toString().toHtmlEscaped());
|
||||
+#else
|
||||
introMessage = introMessage.arg(Qt::escape(auth->realm())).arg(Qt::escape(reply->url().toString()));
|
||||
+#endif
|
||||
passwordDialog.introLabel->setText(introMessage);
|
||||
passwordDialog.introLabel->setWordWrap(true);
|
||||
|
||||
@@ -240,7 +244,11 @@ void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &prox
|
||||
proxyDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
|
||||
|
||||
QString introMessage = tr("<qt>Connect to proxy \"%1\" using:</qt>");
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ introMessage = introMessage.arg(proxy.hostName().toHtmlEscaped());
|
||||
+#else
|
||||
introMessage = introMessage.arg(Qt::escape(proxy.hostName()));
|
||||
+#endif
|
||||
proxyDialog.introLabel->setText(introMessage);
|
||||
proxyDialog.introLabel->setWordWrap(true);
|
||||
|
||||
@@ -255,11 +263,19 @@ QString NetworkAccessManager::certToFormattedString(QSslCertificate cert)
|
||||
{
|
||||
QStringList message;
|
||||
message << cert.subjectInfo(QSslCertificate::CommonName);
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ /* TODO */
|
||||
+#else
|
||||
message << tr("Issuer: %1").arg(cert.issuerInfo(QSslCertificate::CommonName));
|
||||
+#endif
|
||||
message << tr("Not valid before: %1").arg(cert.effectiveDate().toString());
|
||||
message << tr("Valid until: %1").arg(cert.expiryDate().toString());
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QMultiMap<QSsl::AlternativeNameEntryType, QString> names = cert.subjectAlternativeNames();
|
||||
+#else
|
||||
QMultiMap<QSsl::AlternateNameEntryType, QString> names = cert.alternateSubjectNames();
|
||||
+#endif
|
||||
if (names.count() > 0) {
|
||||
QString list;
|
||||
list += QLatin1String("<br />");
|
||||
diff --git a/src/network/networkdiskcache.cpp b/src/network/networkdiskcache.cpp
|
||||
index cfd0d77..adb5d92 100644
|
||||
--- a/src/network/networkdiskcache.cpp
|
||||
+++ b/src/network/networkdiskcache.cpp
|
||||
@@ -37,8 +37,13 @@ NetworkDiskCache::NetworkDiskCache(QObject *parent)
|
||||
: QNetworkDiskCache(parent)
|
||||
, m_private(false)
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString diskCacheDirectory = QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
|
||||
+ + QLatin1String("/browser");
|
||||
+#else
|
||||
QString diskCacheDirectory = QDesktopServices::storageLocation(QDesktopServices::CacheLocation)
|
||||
+ QLatin1String("/browser");
|
||||
+#endif
|
||||
setCacheDirectory(diskCacheDirectory);
|
||||
connect(BrowserApplication::instance(), SIGNAL(privacyChanged(bool)),
|
||||
this, SLOT(privacyChanged(bool)));
|
||||
diff --git a/src/opensearch/opensearchengine.cpp b/src/opensearch/opensearchengine.cpp
|
||||
index 0332fc1..10058d1 100644
|
||||
--- a/src/opensearch/opensearchengine.cpp
|
||||
+++ b/src/opensearch/opensearchengine.cpp
|
||||
@@ -202,6 +202,9 @@ void OpenSearchEngine::setSearchUrlTemplate(const QString &searchUrlTemplate)
|
||||
*/
|
||||
QUrl OpenSearchEngine::searchUrl(const QString &searchTerm) const
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return QUrl();
|
||||
+#else
|
||||
if (m_searchUrlTemplate.isEmpty())
|
||||
return QUrl();
|
||||
|
||||
@@ -215,6 +218,7 @@ QUrl OpenSearchEngine::searchUrl(const QString &searchTerm) const
|
||||
}
|
||||
|
||||
return retVal;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -254,6 +258,9 @@ void OpenSearchEngine::setSuggestionsUrlTemplate(const QString &suggestionsUrlTe
|
||||
*/
|
||||
QUrl OpenSearchEngine::suggestionsUrl(const QString &searchTerm) const
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return QUrl();
|
||||
+#else
|
||||
if (m_suggestionsUrlTemplate.isEmpty())
|
||||
return QUrl();
|
||||
|
||||
@@ -267,6 +274,7 @@ QUrl OpenSearchEngine::suggestionsUrl(const QString &searchTerm) const
|
||||
}
|
||||
|
||||
return retVal;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
diff --git a/src/opensearch/opensearchenginemodel.cpp b/src/opensearch/opensearchenginemodel.cpp
|
||||
index a35f1bb..8a2e2d6 100644
|
||||
--- a/src/opensearch/opensearchenginemodel.cpp
|
||||
+++ b/src/opensearch/opensearchenginemodel.cpp
|
||||
@@ -172,6 +172,11 @@ QVariant OpenSearchEngineModel::headerData(int section, Qt::Orientation orientat
|
||||
|
||||
void OpenSearchEngineModel::enginesChanged()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QAbstractTableModel::beginResetModel();
|
||||
+ QAbstractTableModel::endResetModel();
|
||||
+#else
|
||||
QAbstractTableModel::reset();
|
||||
+#endif
|
||||
}
|
||||
|
||||
diff --git a/src/opensearch/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp
|
||||
index d9bb0a2..9641ac8 100644
|
||||
--- a/src/opensearch/opensearchmanager.cpp
|
||||
+++ b/src/opensearch/opensearchmanager.cpp
|
||||
@@ -297,7 +297,11 @@ void OpenSearchManager::restoreDefaults()
|
||||
|
||||
QString OpenSearchManager::enginesDirectory() const
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QDir directory(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
|
||||
+#else
|
||||
QDir directory(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
||||
+#endif
|
||||
return directory.filePath(QLatin1String("searchengines"));
|
||||
}
|
||||
|
||||
diff --git a/src/settings.cpp b/src/settings.cpp
|
||||
index 3cbe7e8..8f5e46e 100644
|
||||
--- a/src/settings.cpp
|
||||
+++ b/src/settings.cpp
|
||||
@@ -123,7 +123,11 @@ void SettingsDialog::loadDefaults()
|
||||
m_fixedFont = QFont(fixedFontFamily, fixedFontSize);
|
||||
fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(m_fixedFont.family()).arg(m_fixedFont.pointSize()));
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ downloadsLocation->setText(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
|
||||
+#else
|
||||
downloadsLocation->setText(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation));
|
||||
+#endif
|
||||
|
||||
blockPopupWindows->setChecked(!defaultSettings->testAttribute(QWebSettings::JavascriptCanOpenWindows));
|
||||
enableJavascript->setChecked(defaultSettings->testAttribute(QWebSettings::JavascriptEnabled));
|
||||
@@ -185,8 +189,8 @@ void SettingsDialog::loadFromSettings()
|
||||
|
||||
// Appearance
|
||||
settings.beginGroup(QLatin1String("websettings"));
|
||||
- m_fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), m_fixedFont));
|
||||
- m_standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), m_standardFont));
|
||||
+ m_fixedFont = qvariant_cast<QFont>(settings.value(QLatin1String("fixedFont"), m_fixedFont));
|
||||
+ m_standardFont = qvariant_cast<QFont>(settings.value(QLatin1String("standardFont"), m_standardFont));
|
||||
|
||||
standardLabel->setText(QString(QLatin1String("%1 %2")).arg(m_standardFont.family()).arg(m_standardFont.pointSize()));
|
||||
fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(m_fixedFont.family()).arg(m_fixedFont.pointSize()));
|
||||
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
|
||||
index b684be1..4e809cf 100644
|
||||
--- a/src/tabbar.cpp
|
||||
+++ b/src/tabbar.cpp
|
||||
@@ -72,6 +72,9 @@
|
||||
#include <qstyle.h>
|
||||
#include <qurl.h>
|
||||
|
||||
+#include <QDrag>
|
||||
+#include <QMimeData>
|
||||
+
|
||||
#include <qdebug.h>
|
||||
|
||||
TabShortcut::TabShortcut(int tab, const QKeySequence &key, QWidget *parent)
|
||||
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
|
||||
index 7e5b0bf..060f513 100644
|
||||
--- a/src/tabwidget.cpp
|
||||
+++ b/src/tabwidget.cpp
|
||||
@@ -389,7 +389,7 @@ WebView *TabWidget::makeNewTab(bool makeCurrent)
|
||||
m_locationBars->setSizePolicy(locationBar->sizePolicy());
|
||||
|
||||
#ifndef AUTOTESTS
|
||||
- QWidget::setTabOrder(locationBar, qFindChild<ToolbarSearch*>(BrowserMainWindow::parentWindow(this)));
|
||||
+ QWidget::setTabOrder(locationBar, BrowserMainWindow::parentWindow(this)->findChild<ToolbarSearch*>());
|
||||
#endif
|
||||
|
||||
// webview
|
||||
diff --git a/src/utils/networkaccessmanagerproxy_p.h b/src/utils/networkaccessmanagerproxy_p.h
|
||||
index 3779019..ad8e27e 100644
|
||||
--- a/src/utils/networkaccessmanagerproxy_p.h
|
||||
+++ b/src/utils/networkaccessmanagerproxy_p.h
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <qnetworkcookie.h>
|
||||
|
||||
+#include <QNetworkCookieJar>
|
||||
+
|
||||
#include "networkaccessmanagerproxy.h"
|
||||
|
||||
class NetworkCookieJarProxy : public QNetworkCookieJar
|
||||
diff --git a/src/webview.cpp b/src/webview.cpp
|
||||
index 43eeeb9..ee45475 100644
|
||||
--- a/src/webview.cpp
|
||||
+++ b/src/webview.cpp
|
||||
@@ -87,7 +87,7 @@
|
||||
#include <qwebframe.h>
|
||||
|
||||
#if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)
|
||||
-#if !defined(QTWEBKIT_VERSION) || QTWEBKIT_VERSION < 0x020000
|
||||
+#if (!defined(QTWEBKIT_VERSION) || QTWEBKIT_VERSION < 0x020000) && QT_VERSION < 0x050000
|
||||
Q_DECLARE_METATYPE(QWebElement)
|
||||
#endif
|
||||
#include <qinputdialog.h>
|
||||
@@ -96,8 +96,12 @@ Q_DECLARE_METATYPE(QWebElement)
|
||||
#include <qsettings.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwebelement.h>
|
||||
+#if !(QT_VERSION >= 0x050000)
|
||||
#include <qwindowsstyle.h>
|
||||
#endif
|
||||
+#endif
|
||||
+
|
||||
+#include <QMimeData>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
@@ -112,7 +116,7 @@ WebView::WebView(QWidget *parent)
|
||||
#endif
|
||||
{
|
||||
setPage(m_page);
|
||||
-#if QT_VERSION >= 0x040600
|
||||
+#if (QT_VERSION >= 0x040600) && (QT_VERSION < 0x050000)
|
||||
QPalette p;
|
||||
if (p.color(QPalette::Window) != Qt::white) {
|
||||
QWindowsStyle s;
|
||||
@@ -418,6 +422,9 @@ void WebView::searchRequested(QAction *action)
|
||||
#if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)
|
||||
void WebView::addSearchEngine()
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ return;
|
||||
+#else
|
||||
QAction *action = qobject_cast<QAction*>(sender());
|
||||
if (!action)
|
||||
return;
|
||||
@@ -506,6 +513,7 @@ void WebView::addSearchEngine()
|
||||
engine->setImage(icon().pixmap(16, 16).toImage());
|
||||
|
||||
ToolbarSearch::openSearchManager()->addEngine(engine);
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -580,7 +588,7 @@ void WebView::loadFinished()
|
||||
void WebView::loadUrl(const QUrl &url, const QString &title)
|
||||
{
|
||||
if (url.scheme() == QLatin1String("javascript")) {
|
||||
- QString scriptSource = QUrl::fromPercentEncoding(url.toString(Q_FLAGS(QUrl::TolerantMode|QUrl::RemoveScheme)).toAscii());
|
||||
+ QString scriptSource = QUrl::fromPercentEncoding(url.toString(Q_FLAGS(QUrl::TolerantMode|QUrl::RemoveScheme)).toLatin1());
|
||||
QVariant result = page()->mainFrame()->evaluateJavaScript(scriptSource);
|
||||
return;
|
||||
}
|
||||
diff --git a/tools/cacheinfo/main.cpp b/tools/cacheinfo/main.cpp
|
||||
index 5e88ebc..46bb048 100644
|
||||
--- a/tools/cacheinfo/main.cpp
|
||||
+++ b/tools/cacheinfo/main.cpp
|
||||
@@ -44,8 +44,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
NetworkDiskCache diskCache;
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QString location = QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
|
||||
+ + QLatin1String("/browser/");
|
||||
+#else
|
||||
QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation)
|
||||
+ QLatin1String("/browser/");
|
||||
+#endif
|
||||
diskCache.setCacheDirectory(location);
|
||||
|
||||
QNetworkCacheMetaData metaData;
|
||||
diff --git a/tools/htmlToXBel/main.cpp b/tools/htmlToXBel/main.cpp
|
||||
index 15c2ea5..40b6b00 100644
|
||||
--- a/tools/htmlToXBel/main.cpp
|
||||
+++ b/tools/htmlToXBel/main.cpp
|
||||
@@ -20,6 +20,11 @@
|
||||
#include <QtGui/QtGui>
|
||||
#include <QtWebKit/QtWebKit>
|
||||
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+#include <QtWidgets/QtWidgets>
|
||||
+#include <QtWebKitWidgets/QtWebKitWidgets>
|
||||
+#endif
|
||||
+
|
||||
/*!
|
||||
A tool to convert html bookmark files into the xbel format.
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
arora_startpage.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
src/tabwidget.cpp | 2 +-
|
||||
src/webpage.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
|
||||
index 060f513..2c6a82a 100644
|
||||
--- a/src/tabwidget.cpp
|
||||
+++ b/src/tabwidget.cpp
|
||||
@@ -829,7 +829,7 @@ QUrl TabWidget::guessUrlFromString(const QString &string)
|
||||
|
||||
if (url.scheme() == QLatin1String("about")
|
||||
&& url.path() == QLatin1String("home"))
|
||||
- url = QUrl(QLatin1String("qrc:/startpage.html"));
|
||||
+ url = QUrl(QLatin1String("qrc:/demo/intro.html"));
|
||||
|
||||
// QUrl::isValid() is too much tolerant.
|
||||
// We actually want to check if the url conforms to the RFC, which QUrl::isValid() doesn't state.
|
||||
diff --git a/src/webpage.cpp b/src/webpage.cpp
|
||||
index 42daf7a..e2e7265 100644
|
||||
--- a/src/webpage.cpp
|
||||
+++ b/src/webpage.cpp
|
||||
@@ -211,7 +211,7 @@ void WebPage::addExternalBinding(QWebFrame *frame)
|
||||
frame = qobject_cast<QWebFrame*>(sender());
|
||||
|
||||
if (frame->url().scheme() == QLatin1String("qrc")
|
||||
- && frame->url().path() == QLatin1String("/startpage.html")) {
|
||||
+ && frame->url().path() == QLatin1String("/demo/intro.html")) {
|
||||
|
||||
if (!m_javaScriptAroraObject)
|
||||
m_javaScriptAroraObject = new JavaScriptAroraObject(this);
|
||||
@@ -1,9 +0,0 @@
|
||||
arora_qt5_cpp.patch
|
||||
arora_genode.patch
|
||||
arora_nitpicker_plugin.patch
|
||||
arora_move_window.patch
|
||||
arora_disable_adblock.patch
|
||||
arora_bookmarks.patch
|
||||
arora_startpage.patch
|
||||
arora_disable_ssl_messageboxes.patch
|
||||
arora_disable_qprocess.patch
|
||||
@@ -1,13 +0,0 @@
|
||||
INC_DIR += $(PRG_DIR)/qwebplugins/nitpicker
|
||||
INC_DIR += $(call select_from_ports,arora)/src/app/arora/src/qwebplugins/nitpicker
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
nitpickerpluginwidget.h \
|
||||
nitpickerplugin.h
|
||||
|
||||
SOURCES += \
|
||||
nitpickerpluginwidget.cpp \
|
||||
nitpickerplugin.cpp
|
||||
@@ -1,76 +0,0 @@
|
||||
#include "nitpickerplugin.h"
|
||||
|
||||
#include "nitpickerpluginwidget.h"
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
NitpickerPlugin::NitpickerPlugin()
|
||||
: m_loaded(false)
|
||||
, m_enabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
void NitpickerPlugin::load()
|
||||
{
|
||||
if (m_loaded)
|
||||
return;
|
||||
m_loaded = true;
|
||||
QSettings settings;
|
||||
settings.beginGroup(QLatin1String("webplugin/nitpicker"));
|
||||
settings.endGroup();
|
||||
settings.beginGroup(QLatin1String("websettings"));
|
||||
// m_enabled = settings.value(QLatin1String("enableNitpicker"), false).toBool();
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
void NitpickerPlugin::save()
|
||||
{
|
||||
}
|
||||
|
||||
QWidget *NitpickerPlugin::create(const QString &mimeType, const QUrl &url,
|
||||
const QStringList &argumentNames, const QStringList &argumentValues)
|
||||
{
|
||||
load();
|
||||
if (!m_enabled)
|
||||
return 0;
|
||||
Q_UNUSED(mimeType);
|
||||
|
||||
QString args_string = argumentNames.indexOf("args") > 0 ?
|
||||
argumentValues[argumentNames.indexOf("args")] :
|
||||
QString();
|
||||
|
||||
QString max_width_string = argumentNames.indexOf("width") > 0 ?
|
||||
argumentValues[argumentNames.indexOf("width")] :
|
||||
QString("-1");
|
||||
int max_width = max_width_string.remove("px").toInt();
|
||||
|
||||
QString max_height_string = argumentNames.indexOf("height") > 0 ?
|
||||
argumentValues[argumentNames.indexOf("height")] :
|
||||
QString("-1");
|
||||
int max_height = max_height_string.remove("px").toInt();
|
||||
|
||||
NitpickerPluginWidget *m_widget = new NitpickerPluginWidget(this, url, args_string, max_width, max_height);
|
||||
m_widget->url = url;
|
||||
m_widget->argumentNames = argumentNames;
|
||||
m_widget->argumentValues = argumentValues;
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
QWebPluginFactory::Plugin NitpickerPlugin::metaPlugin()
|
||||
{
|
||||
QWebPluginFactory::Plugin plugin;
|
||||
plugin.name = QLatin1String("NitpickerPlugin");
|
||||
QWebPluginFactory::MimeType mimeType;
|
||||
mimeType.name = QLatin1String("application/x-genode-plugin");
|
||||
plugin.mimeTypes.append(mimeType);
|
||||
return plugin;
|
||||
}
|
||||
|
||||
void NitpickerPlugin::configure()
|
||||
{
|
||||
}
|
||||
|
||||
bool NitpickerPlugin::isAnonymous() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef NITPICKERPLUGIN_H
|
||||
#define NITPICKERPLUGIN_H
|
||||
|
||||
#include "arorawebplugin.h"
|
||||
|
||||
class NitpickerPlugin : public AroraWebPlugin
|
||||
{
|
||||
|
||||
public:
|
||||
NitpickerPlugin();
|
||||
|
||||
QWebPluginFactory::Plugin metaPlugin();
|
||||
QWidget *create(const QString &mimeType, const QUrl &url,
|
||||
const QStringList &argumentNames, const QStringList &argumentValues);
|
||||
void configure();
|
||||
bool isAnonymous() const;
|
||||
|
||||
private:
|
||||
void load();
|
||||
void save();
|
||||
|
||||
bool m_loaded;
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
#endif // NITPICKERPLUGIN_H
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
#include "nitpickerpluginwidget.h"
|
||||
|
||||
#include <qfile.h>
|
||||
#include <qmenu.h>
|
||||
#include <qwebframe.h>
|
||||
#include <qwebview.h>
|
||||
#include <qwebelement.h>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
NitpickerPluginWidget::NitpickerPluginWidget(NitpickerPlugin *plugin, QUrl plugin_url, QString &args,
|
||||
int max_width, int max_height, QWidget *parent)
|
||||
: QPluginWidget(parent, plugin_url, args, max_width, max_height)
|
||||
, m_swapping(false)
|
||||
, m_plugin(plugin)
|
||||
{
|
||||
}
|
||||
|
||||
void NitpickerPluginWidget::configure()
|
||||
{
|
||||
m_plugin->configure();
|
||||
}
|
||||
|
||||
void NitpickerPluginWidget::loadAll()
|
||||
{
|
||||
load(true);
|
||||
}
|
||||
|
||||
void NitpickerPluginWidget::load(bool loadAll)
|
||||
{
|
||||
QWidget *parent = parentWidget();
|
||||
QWebView *view = 0;
|
||||
while (parent) {
|
||||
if (QWebView *aView = qobject_cast<QWebView*>(parent)) {
|
||||
view = aView;
|
||||
break;
|
||||
}
|
||||
parent = parent->parentWidget();
|
||||
}
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
const QString selector = QLatin1String("%1[type=\"application/x-genode-plugin\"]");
|
||||
const QString mime = QLatin1String("application/x-genode-plugin");
|
||||
|
||||
hide();
|
||||
m_swapping = true;
|
||||
QList<QWebFrame*> frames;
|
||||
frames.append(view->page()->mainFrame());
|
||||
while (!frames.isEmpty()) {
|
||||
QWebFrame *frame = frames.takeFirst();
|
||||
QWebElement docElement = frame->documentElement();
|
||||
|
||||
QWebElementCollection elements;
|
||||
elements.append(docElement.findAll(selector.arg(QLatin1String("object"))));
|
||||
elements.append(docElement.findAll(selector.arg(QLatin1String("embed"))));
|
||||
|
||||
QWebElement element;
|
||||
foreach (element, elements) {
|
||||
if (!loadAll) {
|
||||
if (!element.evaluateJavaScript(QLatin1String("this.swapping")).toBool())
|
||||
continue;
|
||||
}
|
||||
|
||||
QWebElement substitute = element.clone();
|
||||
substitute.setAttribute(QLatin1String("type"), mime);
|
||||
element.replace(substitute);
|
||||
}
|
||||
|
||||
frames += frame->childFrames();
|
||||
}
|
||||
m_swapping = false;
|
||||
}
|
||||
|
||||
|
||||
void NitpickerPluginWidget::deleteLater()
|
||||
{
|
||||
cleanup();
|
||||
QObject::deleteLater();
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
#ifndef NITPICKERPLUGINWIDGET_H
|
||||
#define NITPICKERPLUGINWIDGET_H
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "nitpickerplugin.h"
|
||||
|
||||
#include <qpluginwidget/qpluginwidget.h>
|
||||
|
||||
#include <qurl.h>
|
||||
|
||||
class NitpickerPluginWidget : public QPluginWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool swapping READ swapping)
|
||||
|
||||
public:
|
||||
NitpickerPluginWidget(NitpickerPlugin *plugin, QUrl plugin_url, QString &args,
|
||||
int max_width, int max_height, QWidget *parent = 0);
|
||||
QUrl url;
|
||||
QStringList argumentNames;
|
||||
QStringList argumentValues;
|
||||
bool swapping() const { return m_swapping; }
|
||||
|
||||
public slots:
|
||||
void deleteLater();
|
||||
|
||||
private slots:
|
||||
void configure();
|
||||
void loadAll();
|
||||
void load(bool loadAll = false);
|
||||
|
||||
private:
|
||||
bool m_swapping;
|
||||
NitpickerPlugin *m_plugin;
|
||||
};
|
||||
|
||||
#endif // NITPICKERPLUGINWIDGET_H
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
ARORA = arora-0.11.0
|
||||
|
||||
QT_TMPL_DIR = $(call select_from_repositories,src/app/qt5/tmpl)
|
||||
|
||||
ifneq ($(QT_TMPL_DIR),)
|
||||
LIBS += qt5_printsupport qt5_qpluginwidget qt5_qgenodeviewwidget
|
||||
else
|
||||
REQUIRES += qt5
|
||||
endif
|
||||
|
||||
include $(QT_TMPL_DIR)/target_defaults.inc
|
||||
|
||||
HEADERS_FILTER_OUT = \
|
||||
adblockschemeaccesshandler.h \
|
||||
adblockrule.h \
|
||||
arorawebplugin.h \
|
||||
bookmarknode.h \
|
||||
clicktoflashplugin.h \
|
||||
networkcookiejar_p.h \
|
||||
nitpickerplugin.h \
|
||||
networkproxyfactory.h \
|
||||
opensearchenginedelegate.h \
|
||||
opensearchreader.h \
|
||||
opensearchwriter.h \
|
||||
schemeaccesshandler.h \
|
||||
twoleveldomains_p.h \
|
||||
trie_p.h \
|
||||
xbelreader.h \
|
||||
xbelwriter.h
|
||||
|
||||
SRC_CC += arora_component.cc
|
||||
|
||||
LIBS += libm
|
||||
|
||||
RESOURCES += demo_html.qrc
|
||||
|
||||
#
|
||||
# Prevent contrib code from causing warnings with our tool chain
|
||||
#
|
||||
CC_WARN += -Wno-unused-but-set-variable
|
||||
|
||||
vpath % $(PRG_DIR)
|
||||
vpath % $(PRG_DIR)/adblock
|
||||
vpath % $(PRG_DIR)/bookmarks
|
||||
vpath % $(PRG_DIR)/bookmarks/xbel
|
||||
vpath % $(PRG_DIR)/network
|
||||
vpath % $(PRG_DIR)/network/cookiejar
|
||||
vpath % $(PRG_DIR)/network/cookiejar/networkcookiejar
|
||||
vpath % $(PRG_DIR)/data
|
||||
vpath % $(PRG_DIR)/data/graphics
|
||||
vpath % $(PRG_DIR)/data/searchengines
|
||||
vpath % $(PRG_DIR)/history
|
||||
vpath % $(PRG_DIR)/htmls
|
||||
vpath % $(PRG_DIR)/locationbar
|
||||
vpath % $(PRG_DIR)/opensearch
|
||||
vpath % $(PRG_DIR)/qwebplugins
|
||||
vpath % $(PRG_DIR)/qwebplugins/clicktoflash
|
||||
vpath % $(PRG_DIR)/qwebplugins/nitpicker
|
||||
vpath % $(PRG_DIR)/useragent
|
||||
vpath % $(PRG_DIR)/utils
|
||||
|
||||
ARORA_PORT_DIR := $(call select_from_ports,arora)
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/adblock
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/bookmarks
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/bookmarks/xbel
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/network
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/network/cookiejar
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/network/cookiejar/networkcookiejar
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/data
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/data/graphics
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/data/searchengines
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/history
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/htmls
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/locationbar
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/opensearch
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/qwebplugins
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/qwebplugins/clicktoflash
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/qwebplugins/nitpicker
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/useragent
|
||||
vpath % $(ARORA_PORT_DIR)/src/app/arora/src/utils
|
||||
|
||||
include $(QT_TMPL_DIR)/target_final.inc
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
Reference in New Issue
Block a user