diff --git a/ChangeLog b/ChangeLog index 4cf1f6c..642a1da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2015-11-16 12:37 marc + + * doc/doxyfile.in: SVG must not be interactive for embedding in + redmine + +2015-11-12 13:38 marc + + * ax_init_standard_project.m4, bootstrap.sh, configure.ac, + debian/surfer-dev.install, debian/surfer-dev.install.in, + sql-to-dot.sed, surfer.desktop.in: flexible qt plugin path + +2015-11-12 10:45 marc + + * ChangeLog, bootstrap.sh, debian/surfer-dev.install, + sql-to-dot.sed: add designer plugins to installation + +2015-11-11 15:25 marc + + * src/qbrowserlib/downloadmanager.hxx: qt designer crashed when + loading WebViewWidget plugin + +2015-11-10 14:42 marc + + * debian/control.in: libqt4-webkit is named libqtwebkit-dev in + precise + 2015-11-09 13:26 marc * ChangeLog, ax_init_standard_project.m4, bootstrap.sh, diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 79bc715..f60a7fd 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -90,16 +90,19 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [ fi ]) -# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS +# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS and a +# notz only a @name@ replacement, but also a @name_ENCODED@ one to be +# used in code. # - parameters: # $1 = variable name AC_DEFUN([AX_SUBST], [ + [$1]_ENCODED=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,') + [$1]_ENCODED=${[$1]_ENCODED//\"/\\\"} + [$1]_ENCODED=${[$1]_ENCODED//\'/\'\"\'\"\'} + [$1]_ENCODED=${[$1]_ENCODED//#/\\#} + AM_CPPFLAGS+=" '-D$1=\"${[$1]_ENCODED}\"'" AC_SUBST([$1]) - tmp_var=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,') - tmp_var=${tmp_var//\"/\\\"} - tmp_var=${tmp_var//\'/\'\"\'\"\'} - tmp_var=${tmp_var//#/\\#} - AM_CPPFLAGS+=" '-D$1=\"${tmp_var}\"'" + AC_SUBST([$1]_ENCODED) AC_SUBST(AM_CPPFLAGS) ]) @@ -167,16 +170,22 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_SUBST(BUILD_NUMBER) BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z") AX_SUBST(BUILD_DATE) - if test -f "${PACKAGE_NAME}.dektop.in"; then - PACKAGE_DESKTOP="${PACKAGE_NAME}.dektop" + if test -f "${PACKAGE_NAME}.desktop.in"; then + PACKAGE_DESKTOP="${PACKAGE_NAME}.desktop" fi AX_SUBST(PACKAGE_DESKTOP) if test -f "${PACKAGE_NAME}-logo.png"; then PACKAGE_LOGO="${PACKAGE_NAME}-logo.png" fi AX_SUBST(PACKAGE_LOGO) - if test -f "${PACKAGE_NAME}-icon.png"; then + if test -f "${PACKAGE_NAME}-icon.svg"; then + PACKAGE_ICON="${PACKAGE_NAME}-icon.svg" + elif test -f "${PACKAGE_NAME}-icon.png"; then PACKAGE_ICON="${PACKAGE_NAME}-icon.png" + elif test -f "${PACKAGE_NAME}.svg"; then + PACKAGE_ICON="${PACKAGE_NAME}.svg" + elif test -f "${PACKAGE_NAME}.png"; then + PACKAGE_ICON="${PACKAGE_NAME}.png" fi AX_SUBST(PACKAGE_ICON) diff --git a/bootstrap.sh b/bootstrap.sh index 6bd40e1..39e31b7 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -20,7 +20,7 @@ DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/} configure=0 build=0 docker=0 -buildtarget="distcheck" +buildtarget="" overwrite=0 rebuild=0 rebuildfiles=() @@ -28,8 +28,9 @@ while test $# -gt 0; do case "$1" in (--configure|-c) configure=1;; (--docker|-d) docker=1;; - (--build|-b) configure=1; build=1;; - (--target|-t) shift; configure=1; build=1; buildtarget="$1";; + (--build|-b) configure=1; build=1; buildtarget+=" distcheck";; + (--target|-t) shift; configure=1; build=1; buildtarget+=" $1";; + (--clean) shift; configure=1; build=1; buildtarget+=" maintainer-clean";; (--overwrite|-o) overwrite=1;; (--rebuild|-r) rebuild=1;; (--rebuild-file|-f) shift; rebuildfiles+=("$1");; @@ -1043,10 +1044,10 @@ done to makefile.am< use given docker image instead of ${img}" + echo " -t, --targets targets specify build targets, default: ${targets}" + echo " -r, --repo add given apt repository" + echo " -k, --key add public key from url" + echo " -e, --env = set environment variable in docker" + echo " -d, --dir access given directory read only" + echo " -p, --package install extra debian packages" + echo " -c, --cmd execute commands as root in docker" + echo + echo " The options -r -k -e -d -p -c can be repeated several times." + echo + echo " The options -r -p -c allow an if-then-else contruct" + echo " depending on the operating system:" + echo " ::::::" + echo " :::" + echo " Read as: On linux type use else use " + echo " That means: If the distributer ID or codename in lsb_release" + echo " matches regular expression , then is replaced, else is replaced." + echo " The three colons are for splitting from and part." + echo " E.g.: Install package curl on wheezy and npm on olter systems:" + echo " $0 -p Debian|precise:::curl:::npm" + echo + echo "EXAMPLE:" + echo + echo "$0 -i mwaeckerlin/ubuntu:trusty-i386 \\" + echo " -t deb \\" + echo " -e ANDROID_HOME=/opt/local/android \\" + echo " -d /opt/local/android \\" + echo " -r universe \\" + echo " -r https://dev.marc.waeckerlin.org/repository \\" + echo " -k https://dev.marc.waeckerlin.org/repository/PublicKey \\" + echo " -p mrw-c++" + echo + exit 0 + ;; + (-i|--image) shift; + img="$1" + ;; + (-t|--targets) shift; + targets="$1" + ;; + (-r|--repo) shift; + repos+=("$1") + ;; + (-k|--key) shift; + keys+=("$1") + ;; + (-e|--env) shift; + envs+=("-e $1") + ;; + (-d|--dirs) shift; + dirs+=("-v $1:$1:ro") + ;; + (-p|--package) shift; + packages+=("$1") + ;; + (-c|--cmd) shift; + commands+=("$1") + ;; + (*) + echo "**** ERROR: unknown option '$1', try --help" 1>&2 + exit 1 + ;; + esac + if test $# -eq 0; then + echo "**** ERROR: missing value, try --help" 2>61 + exit 1 + fi + shift +done -DOCKER_ID=$(docker run -d -v $(pwd):/workdir -w /workdir ubuntu sleep infinity) -trap "docker rm -f ${DOCKER_ID}" INT TERM EXIT -docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev -docker exec ${DOCKER_ID} apt-add-repository universe -docker exec ${DOCKER_ID} apt-add-repository https://dev.marc.waeckerlin.org/repository -wget -O- https://dev.marc.waeckerlin.org/repository/PublicKey \ - | docker exec -i ${DOCKER_ID} apt-key add - +function traperror() { + set +x + local DOCKER_ID="$1" + local err=($2) # error status + local line="$3" # LINENO + local linecallfunc="$4" + local command="$5" + local funcstack="$6" + for e in ${err[@]}; do + if test -n "$e" -a "$e" != "0"; then + echo "<---" + echo "ERROR: line $line - command '$command' exited with status: $e (${err[@]})" + if [ "${funcstack}" != "main" -o "$linecallfunc" != "0" ]; then + echo -n " ... Error at ${funcstack} " + if [ "$linecallfunc" != "" ]; then + echo -n "called at line $linecallfunc" + fi + echo + fi + echo -n " ... cleanup docker: " + docker rm -f "${DOCKER_ID}" + echo "returning status: $e" + echo "--->" + exit $e + fi + done + echo -n " SUCCESS ... cleanup docker: " + docker rm -f "${DOCKER_ID}" + exit 0 +} + +function ifthenelse() { + arg="$1" + shift + cmd="$*" + if test "${arg/:::/}" = "${arg}"; then + docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${arg}}" + else + os="${arg%%:::*}" + thenpart="${arg#*:::}" + if test "${thenpart/:::/}" = "${thenpart}"; then + docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$(dpkg --print-architecture)" =~ ${os} ]]; then '"${cmd//ARG/${thenpart}}"'; fi' + else + elsepart="${thenpart##*:::}" + thenpart="${thenpart%:::*}" + if test -n "${thenpart}"; then + docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$(dpkg --print-architecture)" =~ ${os} ]]; then '"${cmd//ARG/${thenpart}}"'; else '"${cmd//ARG/${elsepart}}"'; fi' + else + docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$(dpkg --print-architecture)" =~ ${os} ]]; then true; else '"${cmd//ARG/${elsepart}}"'; fi' + fi + fi + fi +} + +set -x + +docker pull $img +DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity) +trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT +docker exec ${DOCKER_ID} apt-get update +docker exec ${DOCKER_ID} apt-get upgrade -y +docker exec ${DOCKER_ID} apt-get install -y python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ + docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev lsb-release || \ + docker exec ${DOCKER_ID} apt-get install -y python-software-properties apt-transport-https dpkg-dev lsb-release; +for repo in "${repos[@]}"; do + ifthenelse "${repo}" "apt-add-repository ARG" +done +for key in "${keys[@]}"; do + wget -O- "$key" \ + | docker exec -i ${DOCKER_ID} apt-key add - +done docker exec ${DOCKER_ID} apt-get update +for package in "${packages[@]}"; do + ifthenelse "${package}" "apt-get install -y --force-yes ARG" +done +for command in "${commands[@]}"; do + ifthenelse "${command}" "ARG" +done docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh docker exec -u $(id -u) ${DOCKER_ID} svn upgrade || true -docker exec -u $(id -u) ${DOCKER_ID} ./bootstrap.sh -t "all check distcheck" +docker exec -u $(id -u) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" diff --git a/makefile.am b/makefile.am index a65b1b9..b080bf4 100644 --- a/makefile.am +++ b/makefile.am @@ -1,13 +1,18 @@ ## @id $Id$ -# -# This file has been added by bootstrap.sh on Wed, 09 September 2015 15:45:15 +0200 -# Feel free to change it or even remove and rebuild it, up to your needs -# +## +## This file has been added: +## - by bootstrap.sh +## - on Mon, 04 January 2016 10:52:26 +0100 +## Feel free to change it or even remove and rebuild it, up to your needs +## ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 SUBDIRS = src doc examples -doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog +desktopdir = ${datadir}/applications +desktop_DATA = @PACKAGE_DESKTOP@ +dist_pkgdata_DATA = @PACKAGE_ICON@ +dist_doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog MAINTAINERCLEANFILES = makefile.in diff --git a/resolve-debbuilddeps.sh b/resolve-debbuilddeps.sh index 5828d1c..ecd5522 100755 --- a/resolve-debbuilddeps.sh +++ b/resolve-debbuilddeps.sh @@ -16,7 +16,11 @@ if test -n "${SCHROOTNAME}"; then SUDO="schroot -c "${SCHROOTNAME}" -u root -d / --" else DO="" - SUDO="sudo" + if grep -q '/docker/' /proc/1/cgroup; then + SUDO="" + else + SUDO="sudo" + fi fi function install() { @@ -31,7 +35,7 @@ TO_INSTALL= if test -e debian/control.in -a ! -e debian/control; then for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do - if test -n "$(${DO} apt-cache policy -q ${f})" && ! ${DO} dpkg -l "${f}"; then + if test -n "$(${DO} apt-cache policy -q ${f})" && ! "$(${DO} apt-cache policy ${f} 2>&1 | grep -q 'N: Unable to locate package')" && ! ${DO} dpkg -l "${f}"; then TO_INSTALL+=" ${f}" fi done @@ -41,7 +45,7 @@ if test -e debian/control.in -a ! -e debian/control; then fi install dpkg-dev -DEPS=$(${DO} dpkg-checkbuilddeps 2>&1 || true) +DEPS=$(LANG= ${DO} dpkg-checkbuilddeps 2>&1 || true) DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}') for pa in ${DEPS}; do diff --git a/src/qbrowserlib/browser.hxx b/src/qbrowserlib/browser.hxx index dc505c4..811e196 100644 --- a/src/qbrowserlib/browser.hxx +++ b/src/qbrowserlib/browser.hxx @@ -91,13 +91,6 @@ class Browser: public QMainWindow, protected Ui::Browser { actionStop->setVisible(false); actionReload->setVisible(false); show(); - try { - _networkManager.scAuth - (new SmartCardAuth(suisseid::Scanner(actlib.toStdString()).scan(), - this, login)); - } catch (const std::exception& x) { - LOG<<"No SmartCard Support:"<addPermanentWidget(_find); _find->add(actionUnFind); _find->add(actionClearFind); @@ -107,10 +100,10 @@ class Browser: public QMainWindow, protected Ui::Browser { sp.setHorizontalPolicy(QSizePolicy::Minimum); _progress->setSizePolicy(sp); QPushButton* btn(0); - statusBar()->addPermanentWidget(btn=new QPushButton("-")); + statusBar()->addPermanentWidget(btn=new QPushButton(QIcon(":/icons/zoom-out"), "")); assert(connect(btn, SIGNAL(clicked(bool)), SLOT(smaller()))); statusBar()->addPermanentWidget(_zoom = new QSlider(Qt::Horizontal)); - statusBar()->addPermanentWidget(btn=new QPushButton("+")); + statusBar()->addPermanentWidget(btn=new QPushButton(QIcon(":/icons/zoom-in"), "")); assert(connect(btn, SIGNAL(clicked(bool)), SLOT(larger()))); sp = _zoom->sizePolicy(); sp.setHorizontalPolicy(QSizePolicy::Minimum); @@ -195,6 +188,7 @@ class Browser: public QMainWindow, protected Ui::Browser { if (!_kiosk) _toolbar->addAction(actionAddBookmark); _toolbar->addAction(actionHome); } + newSettings(); (*_downloadManager)+=&_networkManager; assert(connect(&qbrowserlib::ErrorLog::instance(), SIGNAL(reset()), SLOT(errorReset()))); @@ -212,7 +206,6 @@ class Browser: public QMainWindow, protected Ui::Browser { SLOT(metaDataChanged(QNetworkReply*)))); assert(connect(&qbrowserlib::Settings::instance(), SIGNAL(newSettings()), SLOT(newSettings()))); - newSettings(); on_actionNewTab_triggered(); if (!settings || _kiosk) { @@ -607,6 +600,17 @@ class Browser: public QMainWindow, protected Ui::Browser { _searchEngines->addItem(QIcon(":/icons/gg"), tr("gg"), tr("http://www.google.com/search?hl=%2&q=%1")); _searchEngines->setVisible(_searchEngines->count()>1); + if (qbrowserlib::Settings::instance().flag("SuisseID")) try { + _networkManager.scAuth + (new SmartCardAuth(suisseid::Scanner(qbrowserlib::Settings::instance() + .text("PKCS#11-Path").toStdString()) + .scan(), + this, true)); + } catch (const std::exception& x) { + qbrowserlib::ErrorLog::instance().append(tr("Error Loading SuisseID: %1") + .arg(QString::fromStdString(x.what()))); + statusBar()->showMessage(tr("Error Loading SuisseID")); + } } void on_actionAddBookmark_triggered() { @@ -841,7 +845,8 @@ class Browser: public QMainWindow, protected Ui::Browser { } void on_actionCommandline_triggered() { - QMessageBox::information(this, tr("Commandline Arguments"), _helptext); + QMessageBox::information(this, tr("Commandline Arguments"), + "
"+_helptext+"
"); } void on_actionAbout_triggered() { diff --git a/src/qbrowserlib/browser.ui b/src/qbrowserlib/browser.ui index b60523c..54443bc 100644 --- a/src/qbrowserlib/browser.ui +++ b/src/qbrowserlib/browser.ui @@ -70,7 +70,7 @@ 0 0 1009 - 22 + 20 diff --git a/src/qbrowserlib/errorlog.hxx b/src/qbrowserlib/errorlog.hxx index 9cb4fcd..e66e245 100644 --- a/src/qbrowserlib/errorlog.hxx +++ b/src/qbrowserlib/errorlog.hxx @@ -38,7 +38,7 @@ namespace qbrowserlib { TRC; setupUi(this); } - public: + public Q_SLOTS: void append(QString text) { TRC; LOG<append(text); diff --git a/src/qbrowserlib/resources.qrc b/src/qbrowserlib/resources.qrc index 184a55c..8627ee8 100644 --- a/src/qbrowserlib/resources.qrc +++ b/src/qbrowserlib/resources.qrc @@ -1,5 +1,8 @@ + resources/icons/suisseid.png + resources/icons/PICOL_icon_Zoom_in.svg + resources/icons/PICOL_icon_Zoom_out.svg resources/icons/tel.png resources/icons/wp.png resources/icons/surfer_32x32x32.png @@ -39,52 +42,5 @@ resources/icons/error.svg resources/icons/surfer.png - - resources/icons/48x48/SW_Surfer_48x48x32.png - - - resources/icons/32x32/butt32_02.png - resources/icons/32x32/butt32_05.png - resources/icons/32x32/butt32_09.png - resources/icons/32x32/butt32_09_sw.png - resources/icons/32x32/favicon.ico - resources/icons/32x32/butt32_11.png - resources/icons/32x32/butt32_06.png - resources/icons/32x32/butt32_10_sw.png - resources/icons/32x32/butt32_01.png - resources/icons/32x32/butt32_03.png - resources/icons/32x32/butt32_07.png - resources/icons/32x32/butt32_49.png - resources/icons/32x32/butt32_10.png - resources/icons/32x32/butt32_04.png - resources/icons/32x32/butt32_08.png - resources/icons/32x32/surfer.png - - - resources/icons/16x16/favicon.ico - resources/icons/16x16/butt16_11.png - resources/icons/16x16/butt16_06.png - resources/icons/16x16/butt16_10_sw.png - resources/icons/16x16/butt16_01.png - resources/icons/16x16/butt16_03.png - resources/icons/16x16/butt16_07.png - resources/icons/16x16/butt16_49.png - resources/icons/16x16/butt16_10.png - resources/icons/16x16/butt16_04.png - resources/icons/16x16/butt16_08.png - resources/icons/16x16/surfer.png - resources/icons/16x16/butt16_09_sw.png - resources/icons/16x16/butt16_02.png - resources/icons/16x16/butt16_05.png - resources/icons/16x16/butt16_09.png - - - resources/icons/512x512/SW_Surfer_512x512x32.png - - - resources/icons/128x128/SW_Surfer_128x128x32.png - - - resources/icons/256x256/SW_Surfer_256x256x32.png - + diff --git a/src/qbrowserlib/resources/icons/128x128/SW_Surfer_128x128x32.png b/src/qbrowserlib/resources/icons/128x128/SW_Surfer_128x128x32.png deleted file mode 100755 index 540ed7c..0000000 Binary files a/src/qbrowserlib/resources/icons/128x128/SW_Surfer_128x128x32.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_01.png b/src/qbrowserlib/resources/icons/16x16/butt16_01.png deleted file mode 100644 index e546826..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_01.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_02.png b/src/qbrowserlib/resources/icons/16x16/butt16_02.png deleted file mode 100644 index 4f6dd45..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_02.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_03.png b/src/qbrowserlib/resources/icons/16x16/butt16_03.png deleted file mode 100644 index 8be4efe..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_03.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_04.png b/src/qbrowserlib/resources/icons/16x16/butt16_04.png deleted file mode 100644 index 518d56e..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_04.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_05.png b/src/qbrowserlib/resources/icons/16x16/butt16_05.png deleted file mode 100644 index 880e843..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_05.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_06.png b/src/qbrowserlib/resources/icons/16x16/butt16_06.png deleted file mode 100644 index d241e9e..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_06.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_07.png b/src/qbrowserlib/resources/icons/16x16/butt16_07.png deleted file mode 100644 index 4526e5e..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_07.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_08.png b/src/qbrowserlib/resources/icons/16x16/butt16_08.png deleted file mode 100644 index 00ecf86..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_08.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_09.png b/src/qbrowserlib/resources/icons/16x16/butt16_09.png deleted file mode 100644 index 9d3c7a9..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_09.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_09_sw.png b/src/qbrowserlib/resources/icons/16x16/butt16_09_sw.png deleted file mode 100644 index ab394ee..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_09_sw.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_10.png b/src/qbrowserlib/resources/icons/16x16/butt16_10.png deleted file mode 100644 index dd31931..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_10.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_10_sw.png b/src/qbrowserlib/resources/icons/16x16/butt16_10_sw.png deleted file mode 100644 index 6fc707f..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_10_sw.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_11.png b/src/qbrowserlib/resources/icons/16x16/butt16_11.png deleted file mode 100644 index 7b0e40f..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_11.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/butt16_49.png b/src/qbrowserlib/resources/icons/16x16/butt16_49.png deleted file mode 100644 index b3b9b17..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/butt16_49.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/favicon.ico b/src/qbrowserlib/resources/icons/16x16/favicon.ico deleted file mode 100755 index 3ec5672..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/favicon.ico and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/16x16/surfer.png b/src/qbrowserlib/resources/icons/16x16/surfer.png deleted file mode 100755 index a3b55e6..0000000 Binary files a/src/qbrowserlib/resources/icons/16x16/surfer.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/256x256/SW_Surfer_256x256x32.png b/src/qbrowserlib/resources/icons/256x256/SW_Surfer_256x256x32.png deleted file mode 100755 index c9600f5..0000000 Binary files a/src/qbrowserlib/resources/icons/256x256/SW_Surfer_256x256x32.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_01.png b/src/qbrowserlib/resources/icons/32x32/butt32_01.png deleted file mode 100644 index 794bed1..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_01.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_02.png b/src/qbrowserlib/resources/icons/32x32/butt32_02.png deleted file mode 100644 index 0ffec2c..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_02.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_03.png b/src/qbrowserlib/resources/icons/32x32/butt32_03.png deleted file mode 100644 index bfed101..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_03.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_04.png b/src/qbrowserlib/resources/icons/32x32/butt32_04.png deleted file mode 100644 index 9d522ea..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_04.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_05.png b/src/qbrowserlib/resources/icons/32x32/butt32_05.png deleted file mode 100644 index f5129ef..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_05.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_06.png b/src/qbrowserlib/resources/icons/32x32/butt32_06.png deleted file mode 100644 index 2700370..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_06.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_07.png b/src/qbrowserlib/resources/icons/32x32/butt32_07.png deleted file mode 100644 index a0bb6ab..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_07.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_08.png b/src/qbrowserlib/resources/icons/32x32/butt32_08.png deleted file mode 100644 index 31ce63e..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_08.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_09.png b/src/qbrowserlib/resources/icons/32x32/butt32_09.png deleted file mode 100644 index 537f2f2..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_09.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_09_sw.png b/src/qbrowserlib/resources/icons/32x32/butt32_09_sw.png deleted file mode 100644 index c8d6323..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_09_sw.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_10.png b/src/qbrowserlib/resources/icons/32x32/butt32_10.png deleted file mode 100644 index cf74ae9..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_10.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_10_sw.png b/src/qbrowserlib/resources/icons/32x32/butt32_10_sw.png deleted file mode 100644 index 30069dc..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_10_sw.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_11.png b/src/qbrowserlib/resources/icons/32x32/butt32_11.png deleted file mode 100644 index cb2a888..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_11.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/butt32_49.png b/src/qbrowserlib/resources/icons/32x32/butt32_49.png deleted file mode 100644 index d3254dc..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/butt32_49.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/favicon.ico b/src/qbrowserlib/resources/icons/32x32/favicon.ico deleted file mode 100755 index 17ccb89..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/favicon.ico and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/32x32/surfer.png b/src/qbrowserlib/resources/icons/32x32/surfer.png deleted file mode 100755 index 982b92b..0000000 Binary files a/src/qbrowserlib/resources/icons/32x32/surfer.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/48x48/SW_Surfer_48x48x32.png b/src/qbrowserlib/resources/icons/48x48/SW_Surfer_48x48x32.png deleted file mode 100755 index 3684b00..0000000 Binary files a/src/qbrowserlib/resources/icons/48x48/SW_Surfer_48x48x32.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/512x512/SW_Surfer_512x512x32.png b/src/qbrowserlib/resources/icons/512x512/SW_Surfer_512x512x32.png deleted file mode 100755 index e80f559..0000000 Binary files a/src/qbrowserlib/resources/icons/512x512/SW_Surfer_512x512x32.png and /dev/null differ diff --git a/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_in.svg b/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_in.svg new file mode 100644 index 0000000..5e61008 --- /dev/null +++ b/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_in.svg @@ -0,0 +1,58 @@ + +image/svg+xmlPICOL Icon2009-03-15Melih BilgilCreative Commons BY-SAPICOL - Pictorial Communication Languagehttp://blog.picol.orghttp://blog.picol.orgenPICOLiconiconssignGUIvectorinterfaceThis is one icon out of all PICOL iconsMelih Bilgil (www.lonja.de), Christopher Adjei (www.boffer.net) \ No newline at end of file diff --git a/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_out.svg b/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_out.svg new file mode 100644 index 0000000..8cd737b --- /dev/null +++ b/src/qbrowserlib/resources/icons/PICOL_icon_Zoom_out.svg @@ -0,0 +1,58 @@ + +image/svg+xmlPICOL Icon2009-03-15Melih BilgilCreative Commons BY-SAPICOL - Pictorial Communication Languagehttp://blog.picol.orghttp://blog.picol.orgenPICOLiconiconssignGUIvectorinterfaceThis is one icon out of all PICOL iconsMelih Bilgil (www.lonja.de), Christopher Adjei (www.boffer.net) \ No newline at end of file diff --git a/src/qbrowserlib/resources/surfer.png b/src/qbrowserlib/resources/surfer.png deleted file mode 100755 index 982b92b..0000000 Binary files a/src/qbrowserlib/resources/surfer.png and /dev/null differ diff --git a/src/qbrowserlib/settings.hxx b/src/qbrowserlib/settings.hxx index 87a4775..42dce6f 100644 --- a/src/qbrowserlib/settings.hxx +++ b/src/qbrowserlib/settings.hxx @@ -125,6 +125,12 @@ namespace qbrowserlib { std::make_pair(_saveWindowState, _saveWindowState->isChecked()); _checkboxes["CloseApps"] = std::make_pair(_closeApps, _closeApps->isChecked()); + _checkboxes["SuisseID"] = + std::make_pair(_suisseid, _suisseid->isChecked()); + + // LineEdits + _lineedits["PKCS#11-Path"] = + std::make_pair(_p11path, _p11path->text()); load(!_mimetypes.size()); on__buttons_rejected(); @@ -384,9 +390,28 @@ namespace qbrowserlib { _searchEngineTable->removeRow(begin); } + void on__addSuisseidServer_pressed() { + _suisseidServers->setRowCount(_suisseidServers->rowCount()+1); + _suisseidServers->setItem(_suisseidServers->rowCount()-1, 0, + new QTableWidgetItem); + _suisseidServers->setItem(_suisseidServers->rowCount()-1, 1, + new QTableWidgetItem); + _suisseidServers->setItem(_suisseidServers->rowCount()-1, 2, + new QTableWidgetItem); + } + + void on__removeSuisseidServer_pressed() { + QList ranges + (_suisseidServers->selectedRanges()); + if (ranges.isEmpty()) return; + for (int begin(ranges.at(0).topRow()), count(ranges.at(0).rowCount()); + count; --count) + _suisseidServers->removeRow(begin); + } + private: - typedef std::map Attributes ; + typedef std::map Attributes; Attributes _attributes; typedef std::map > CheckBoxes; CheckBoxes _checkboxes; diff --git a/src/qbrowserlib/settings.ui b/src/qbrowserlib/settings.ui index f60030a..e16860f 100644 --- a/src/qbrowserlib/settings.ui +++ b/src/qbrowserlib/settings.ui @@ -17,7 +17,7 @@ - 0 + 5 @@ -647,7 +647,7 @@ p, li { white-space: pre-wrap; } - save window state when opened withiut URL + save window state when opened without URL @@ -682,6 +682,103 @@ p, li { white-space: pre-wrap; } + + + SuisseID + + + + + + + + Use SuisseID + + + + :/icons/suisseid.png:/icons/suisseid.png + + + + 64 + 32 + + + + + + + + PKCS#11 Library Path: + + + + + + + libcvP11.so + + + + + + + + + true + + + true + + + true + + + + Servers that are allowed to require SuisseID + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + + + + + + + + - + + + + + + + @@ -711,7 +808,6 @@ p, li { white-space: pre-wrap; } _settingPrintElementBackgrounds _settingAcceleratedCompositingEnabled _settingTiledBackingStoreEnabled - tabWidget _settingFrameFlatteningEnabled _settingSiteSpecificQuirksEnabled _settingJavascriptEnabled @@ -726,7 +822,9 @@ p, li { white-space: pre-wrap; } _settingLocalContentCanAccessRemoteUrls _settingLocalContentCanAccessFileUrls - + + + _buttons diff --git a/src/qbrowserlib/smartcardauth.hxx b/src/qbrowserlib/smartcardauth.hxx index c8edd3a..c5eb64c 100644 --- a/src/qbrowserlib/smartcardauth.hxx +++ b/src/qbrowserlib/smartcardauth.hxx @@ -115,15 +115,51 @@ class CryptokiEngine: public QObject, public openssl::Engine { virtual std::string rsaSign(const std::string& in, unsigned int type) try { TRC; LOG<<"log; type="<sign(in, CKM_RSA_PKCS); + return _privateKey->sign(in, algo); } catch (const std::exception& x) { LOG<<"signature failed, reason: "<sign(in, CKM_RSA_PKCS); // try again + return _privateKey->sign(in, algo); // try again } } catch (const std::exception& x) { TRC; LOG<<"rsaSign failed, reason: "<