total reorganization: all but the main is now in the browserlib
This commit is contained in:
1 parent
3093bedf3f
commit
0117916b4b
106 files changed
+286
-92
No files matched your search
@@ -1,3 +1,10 @@
|
||||
2015-10-11 13:47 marc
|
||||
|
||||
* ChangeLog, ax_check_qt.m4, ax_init_standard_project.m4,
|
||||
bootstrap.sh, doc/doxyfile.in, resolve-rpmbuilddeps.sh:
|
||||
documentation without search functionfor better redmine
|
||||
integration
|
||||
|
||||
2015-09-10 11:52 marc
|
||||
|
||||
* debian/control.in, debian/swisssurfer-dev.install,
|
||||
|
||||
+24
-6
@@ -103,7 +103,12 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
HAVE_$1=1
|
||||
AC_DEFINE([HAVE_$1])
|
||||
QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
|
||||
QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
|
||||
qt_host_bins=$(${PKG_CONFIG} --variable=host_bins Qt5Core)
|
||||
if test -d "${qt_host_bins}"; then
|
||||
QT_PLUGIN_PATH=${qt_host_bins}/../plugins
|
||||
else
|
||||
QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
|
||||
fi
|
||||
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
|
||||
[$1]_CPPFLAGS="${[$1]5_CFLAGS}"
|
||||
[$1]_CXXFLAGS="${[$1]5_CFLAGS}"
|
||||
@@ -145,7 +150,12 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
HAVE_$1=1
|
||||
AC_DEFINE([HAVE_$1])
|
||||
QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
|
||||
QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
|
||||
qt_host_bins=$(${PKG_CONFIG} --variable=host_bins QtCore)
|
||||
if test -d "${qt_host_bins}"; then
|
||||
QT_PLUGIN_PATH=${qt_host_bins}/../plugins
|
||||
else
|
||||
QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
|
||||
fi
|
||||
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
|
||||
[$1]_CPPFLAGS="${[$1]_CFLAGS}"
|
||||
[$1]_CXXFLAGS="${[$1]_CFLAGS}"
|
||||
@@ -188,6 +198,14 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
if test -n "${MINGW}"; then
|
||||
AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
|
||||
fi
|
||||
if test "$prefix" != '/usr' -a "${QT_PLUGIN_PATH}" != "${QT_PLUGIN_PATH#/usr}"; then
|
||||
QT_PLUGIN_PATH=${prefix}${QT_PLUGIN_PATH#/usr}
|
||||
fi
|
||||
AC_ARG_WITH([qt-plugin-path],
|
||||
[AS_HELP_STRING([--with-qt-plugin-path=PATH],
|
||||
[define a different qt plugin path, current @<:@default=check@:>@])],
|
||||
[QT_PLUGIN_PATH=$with_qt_plugin_path],
|
||||
[])
|
||||
AC_SUBST(QTDIR)
|
||||
AC_SUBST(QT_PLUGIN_PATH)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
@@ -214,10 +232,10 @@ qrc_%.cxx: %.qrc
|
||||
%.qm: %.ts
|
||||
${LRELEASE} $< -qm [$][@]
|
||||
|
||||
#%.ts: ${LANGUAGE_FILES:%=%}
|
||||
# ${LUPDATE} -no-obsolete \
|
||||
# -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \
|
||||
# -ts [$][@] $<
|
||||
%.ts: ${LANGUAGE_FILES:%=%}
|
||||
${LUPDATE} -no-obsolete \
|
||||
-target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \
|
||||
-ts [$][@] $<
|
||||
|
||||
'])
|
||||
|
||||
|
||||
+113
-10
@@ -240,15 +240,29 @@ done
|
||||
|
||||
|
||||
HEADER='## @id '"\$Id\$"'
|
||||
#
|
||||
# This file has been added by '${MY_NAME}' on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
|
||||
# Feel free to change it or even remove and rebuild it, up to your needs
|
||||
#
|
||||
##
|
||||
## This file has been added:
|
||||
## - by '${MY_NAME}'
|
||||
## - on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
|
||||
## Feel free to change it or even remove and rebuild it, up to your needs
|
||||
##
|
||||
## 1 2 3 4 5 6 7 8
|
||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
'
|
||||
|
||||
CHEADER='/** @id '"\$Id\$"'
|
||||
|
||||
This file has been added:
|
||||
- by '${MY_NAME}'
|
||||
- on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
|
||||
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
'
|
||||
|
||||
notice() {
|
||||
echo -e "\e[1;33m$*\e[0m"
|
||||
}
|
||||
@@ -436,12 +450,19 @@ AX_INIT_STANDARD_PROJECT
|
||||
# create output
|
||||
AC_OUTPUT
|
||||
EOF
|
||||
|
||||
PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac)
|
||||
SAVEIFS="$IFS"
|
||||
IFS="-" PackageName=( $PACKAGE_NAME )
|
||||
IFS="$SAVEIFS"
|
||||
PackageName=${PackageName[*]^}
|
||||
PackageName=${PackageName// /}
|
||||
|
||||
if ! testtag "AX_CHECK_QT" configure.ac && \
|
||||
! testtag "AX_REQUIRE_QT" configure.ac; then
|
||||
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \
|
||||
to --condition AX_USE_CXX src/makefile.am
|
||||
else
|
||||
elif ! test -e src/makefile.am; then
|
||||
to --condition AX_USE_CXX src/makefile.am <<EOF
|
||||
${HEADER}bin_PROGRAMS = ${PACKAGE_NAME}
|
||||
|
||||
@@ -475,7 +496,7 @@ ${PACKAGE_NAME//-/_}_UIFILES = ui_${PACKAGE_NAME}.hxx
|
||||
|
||||
## list all %.qrc resource files as qrc_%.cxx
|
||||
## note: if there exists a directory %, the file %.qrc is generated from that
|
||||
${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx qrc_resources.cxx
|
||||
${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx # qrc_resources.cxx
|
||||
|
||||
## list all final translation files, list all supported languages here
|
||||
${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm \\
|
||||
@@ -487,7 +508,7 @@ ${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm \\
|
||||
${PACKAGE_NAME//-/_}_TR_FILES = main.cxx version.cxx
|
||||
|
||||
## automatic assembly, no need to change
|
||||
${PACKAGE_NAME//-/_}_SOURCES = ${swisssign_pin_entry_TR_FILES} ${BUILT_SOURCES}
|
||||
${PACKAGE_NAME//-/_}_SOURCES = \${${PACKAGE_NAME//-/_}_TR_FILES} \${BUILT_SOURCES}
|
||||
|
||||
## automatic assembly, no need to change
|
||||
BUILT_SOURCES = \${${PACKAGE_NAME//-/_}_MOCFILES} \
|
||||
@@ -510,6 +531,89 @@ EXTRA_DIST = \${EXTRA_DIST_TR} \
|
||||
LANGUAGE_FILES = \${EXTRA_DIST_TR} \${${PACKAGE_NAME//-/_}_TR_FILES}
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
to --condition AX_USE_CXX src/main.cxx <<EOF
|
||||
${CHEADER}#include <${PACKAGE_NAME}.hxx>
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char *argv[]) try {
|
||||
QApplication a(argc, argv);
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.process(a);
|
||||
QStringList scripts(parser.positionalArguments());
|
||||
${PackageName} w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
} catch (std::exception &x) {
|
||||
std::cerr<<"**** error: "<<x.what()<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
EOF
|
||||
to --condition AX_USE_CXX src/${PACKAGE_NAME}.hxx <<EOF
|
||||
${CHEADER}#ifndef ${PackageName^^}_HXX
|
||||
#define ${PackageName^^}_HXX
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <ui_${PACKAGE_NAME}.hxx>
|
||||
|
||||
/// Main Window
|
||||
/** Main window for ${PACKAGE_NAME} */
|
||||
class ${PackageName}: public QMainWindow, protected Ui::${PackageName} {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) {
|
||||
setupUi(this);
|
||||
}
|
||||
virtual ~${PackageName}() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
EOF
|
||||
to --condition AX_USE_CXX src/${PACKAGE_NAME}.ui <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>${PackageName}</class>
|
||||
<widget class="QMainWindow" name="${PackageName}">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>${PackageName}</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
EOF
|
||||
to --condition AX_USE_CXX src/languages.qrc <<EOF
|
||||
<RCC>
|
||||
<qresource prefix="/language">
|
||||
<file>${PACKAGE_NAME}_de.qm</file>
|
||||
<file>${PACKAGE_NAME}_fr.qm</file>
|
||||
<file>${PACKAGE_NAME}_it.qm</file>
|
||||
<file>${PACKAGE_NAME}_en.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
EOF
|
||||
fi
|
||||
to --condition AX_USE_CXX src/version.hxx <<EOF
|
||||
@@ -698,12 +802,11 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
|
||||
|
||||
-- @AUTHOR@ @BUILD_DATE@
|
||||
EOF
|
||||
BUILD_DEPENDS="debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
|
||||
to debian/control.in <<EOF
|
||||
Source: @PACKAGE_NAME@
|
||||
Priority: extra
|
||||
Maintainer: @AUTHOR@
|
||||
Build-Depends: ${BUILD-DEPENDS}
|
||||
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)
|
||||
|
||||
Package: @PACKAGE_NAME@
|
||||
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi)
|
||||
@@ -717,7 +820,7 @@ $( if testtag AX_USE_LIBTOOL; then
|
||||
Package: @PACKAGE_NAME@-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD-DEPENDS}
|
||||
Depends: @PACKAGE_NAME@ (= \${binary:Version})
|
||||
Description: @DESCRIPTION@ - Development Package
|
||||
@README_DEB@
|
||||
EOF2
|
||||
|
||||
+4
-3
@@ -39,7 +39,7 @@ AC_ARG_ENABLE(pkcs11-download,
|
||||
fi
|
||||
])
|
||||
|
||||
AX_REQUIRE_QT([QT], [QtCore QtNetwork QtWebKit],
|
||||
AX_REQUIRE_QT([QT], [QtCore QtNetwork QtWebKit QtDesigner],
|
||||
[QtWidgets QtWebKitWidgets QtPrintSupport])
|
||||
AX_QT_NO_KEYWORDS
|
||||
|
||||
@@ -51,8 +51,9 @@ AX_PKG_REQUIRE([proxyface])
|
||||
AX_PKG_REQUIRE([mrwcxx], [mrw-c++])
|
||||
|
||||
AC_CONFIG_FILES([src/languages.qrc])
|
||||
AC_CONFIG_FILES([src/qbrowserlib/languages.qrc src/qbrowserlib/makefile])
|
||||
#src/designer/makefile
|
||||
AC_CONFIG_FILES([src/qbrowserlib/languages.qrc])
|
||||
AC_CONFIG_FILES([src/qbrowserlib/makefile])
|
||||
AC_CONFIG_FILES([src/designer/makefile])
|
||||
|
||||
# create output
|
||||
AC_OUTPUT
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
Source: @PACKAGE_NAME@
|
||||
Priority: extra
|
||||
Maintainer: @AUTHOR@
|
||||
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release , doxygen, graphviz, mscgen, qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, libpcsclite-dev
|
||||
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release , doxygen, graphviz, mscgen, qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, libpcsclite-dev
|
||||
|
||||
Package: @PACKAGE_NAME@
|
||||
Section: web
|
||||
|
||||
@@ -20,5 +20,5 @@ class TestFileWatch: public QObject {
|
||||
qDebug()<<"File has changed: "<<_storage.read().join("; ");
|
||||
}
|
||||
private:
|
||||
FileStorage _storage;
|
||||
qbrowserlib::FileStorage _storage;
|
||||
};
|
||||
@@ -6,28 +6,35 @@
|
||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
|
||||
designerdir=${QT_PLUGIN_PATH}/designer
|
||||
designer_LTLIBRARIES = libqbrowserlib-swisswebview.la \
|
||||
libqbrowserlib-buttonlineedit.la \
|
||||
libqbrowserlib-swisswebwidget.la
|
||||
|
||||
lib_LTLIBRARIES = libqbrowserlib-swisswebview.la \
|
||||
libqbrowserlib-buttonlineedit.la \
|
||||
libqbrowserlib-swisswebwidget.la
|
||||
AM_CPPFLAGS = -I@top_srcdir@/src
|
||||
RESOURCES = qrc_resources.cxx
|
||||
|
||||
libqbrowserlib_swisswebview_la_MOCFILES = moc_webviewwidgetifc.cxx
|
||||
libqbrowserlib_swisswebview_la_SOURCES = webviewwidgetifc.cxx \
|
||||
${libqbrowserlib_swisswebview_la_MOCFILES}
|
||||
libqbrowserlib_swisswebview_la_SOURCES = webviewwidgetifc.cxx ${RESOURCES} \
|
||||
${libqbrowserlib_swisswebview_la_MOCFILES}
|
||||
libqbrowserlib_swisswebview_la_LIBADD = @top_builddir@/src/qbrowserlib/libqbrowserlib.la
|
||||
|
||||
libqbrowserlib_buttonlineedit_la_MOCFILES = moc_buttonlineeditwidgetifc.cxx
|
||||
libqbrowserlib_buttonlineedit_la_SOURCES = buttonlineeditwidgetifc.cxx \
|
||||
libqbrowserlib_buttonlineedit_la_SOURCES = buttonlineeditwidgetifc.cxx ${RESOURCES} \
|
||||
${libqbrowserlib_buttonlineedit_la_MOCFILES}
|
||||
libqbrowserlib_buttonlineedit_la_LIBADD = @top_builddir@/src/qbrowserlib/libqbrowserlib.la
|
||||
|
||||
libqbrowserlib_swisswebwidget_la_MOCFILES = moc_webwidgetifc.cxx
|
||||
libqbrowserlib_swisswebwidget_la_SOURCES = webwidgetifc.cxx \
|
||||
libqbrowserlib_swisswebwidget_la_SOURCES = webwidgetifc.cxx ${RESOURCES} \
|
||||
${libqbrowserlib_swisswebwidget_la_MOCFILES}
|
||||
libqbrowserlib_swisswebwidget_la_LIBADD = @top_builddir@/src/qbrowserlib/libqbrowserlib.la
|
||||
|
||||
BUILT_SOURCES = ${libqbrowserlib_swisswebview_la_MOCFILES} \
|
||||
${libqbrowserlib_buttonlineedit_la_MOCFILES} \
|
||||
${libqbrowserlib_swisswebwidget_la_MOCFILES}
|
||||
${libqbrowserlib_swisswebwidget_la_MOCFILES} \
|
||||
${RESOURCES}
|
||||
|
||||
EXTRA_DIST = buttonlineeditwidgetifc.hxx webviewwidgetifc.hxx \
|
||||
webwidgetifc.hxx
|
||||
webwidgetifc.hxx resources.qrc
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
File renamed without changes.
@@ -13,19 +13,22 @@
|
||||
#include <QDesignerExportWidget>
|
||||
#include <QtDesigner>
|
||||
|
||||
#include <iostream>
|
||||
#undef TRC
|
||||
#define TRC std::cout<<"********>>> "<<__FILE__<<" - "<<__PRETTY_FUNCTION__<<std::endl;
|
||||
|
||||
//! @defgroup designer
|
||||
//! @{
|
||||
|
||||
//! WebView widget for Qt Designer
|
||||
class SwissWebViewWidgetIfc: public QObject,
|
||||
public QDesignerCustomWidgetInterface {
|
||||
Q_OBJECT;
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface);
|
||||
class SwissWebViewWidgetIfc: public QObject, public QDesignerCustomWidgetInterface {
|
||||
Q_OBJECT
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "webviewwidgetifc.json");
|
||||
#endif
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface);
|
||||
public:
|
||||
SwissWebViewWidgetIfc() {}
|
||||
SwissWebViewWidgetIfc(QObject *parent=0): QObject(parent), _initialized(false) {}
|
||||
bool isContainer() const {
|
||||
TRC;
|
||||
return true;
|
||||
@@ -84,10 +87,14 @@ class SwissWebViewWidgetIfc: public QObject,
|
||||
}
|
||||
bool isInitialized() {
|
||||
TRC;
|
||||
return true;
|
||||
return _initialized;
|
||||
}
|
||||
void initialize(QDesignerFormEditorInterface*) {
|
||||
_initialized = true;
|
||||
}
|
||||
private:
|
||||
QNetworkAccessManager _net;
|
||||
bool _initialized;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/language">
|
||||
<file>swisssurfer_de.qm</file>
|
||||
<file>swisssurfer_fr.qm</file>
|
||||
<file>swisssurfer_it.qm</file>
|
||||
<file>swisssurfer_en.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
+6
-7
@@ -9,7 +9,7 @@
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <browser.hxx>
|
||||
#include <qbrowserlib/browser.hxx>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtCore/QTranslator>
|
||||
@@ -46,8 +46,6 @@
|
||||
//! @addtogroup browser
|
||||
//! @{
|
||||
|
||||
QString TMP;
|
||||
|
||||
QMap<QString, QString>& env() {
|
||||
static QStringList l(QProcess::systemEnvironment());
|
||||
static QMap<QString, QString> env;
|
||||
@@ -119,7 +117,7 @@ int main(int argv, char** argc) try {
|
||||
appTranslator.load(":/language/swisssurfer_"+ QLocale().name());
|
||||
app.installTranslator(&appTranslator);
|
||||
//----------------------------------------------------------------------------
|
||||
TMP=QDir::toNativeSeparators(QDir::tempPath());
|
||||
QString tmp(QDir::toNativeSeparators(QDir::tempPath()));
|
||||
QStringList urls;
|
||||
QString actlib
|
||||
#ifdef Q_OS_LINUX
|
||||
@@ -152,7 +150,7 @@ int main(int argv, char** argc) try {
|
||||
} else if (*it=="-d" || *it=="--debug") {
|
||||
qbrowserlib::Log::DEBUG = true;
|
||||
} else if ((*it=="-t" || *it=="--tmp") && ++it!=args.end()) {
|
||||
TMP=*it;
|
||||
tmp=*it;
|
||||
} else if ((*it=="-k" || *it=="--kiosk")) {
|
||||
silent=true;
|
||||
settings.reset();
|
||||
@@ -241,8 +239,9 @@ int main(int argv, char** argc) try {
|
||||
<<"Hostname"<<QNetworkProxy::applicationProxy().hostName()
|
||||
<<"Port"<<QNetworkProxy::applicationProxy().port();
|
||||
//............................................................................
|
||||
Browser browser(actlib, urls, settings.get(), mimetypes, silent,
|
||||
login, quirks, bookmarks);
|
||||
qbrowserlib::Browser browser(actlib, urls, settings.get(), tmp, helptext(),
|
||||
mimetypes, silent,
|
||||
login, quirks, bookmarks);
|
||||
if (editbookmarks) browser.on_actionEditBookmarks_triggered();
|
||||
return app.exec();
|
||||
} catch (std::exception& x) {
|
||||
|
||||
+6
-12
@@ -6,20 +6,14 @@
|
||||
## 1 2 3 4 5 6 7 8
|
||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
SUBDIRS = qbrowserlib #designer
|
||||
SUBDIRS = qbrowserlib designer
|
||||
|
||||
bin_PROGRAMS = swisssurfer
|
||||
LANGUAGE_FILE_BASE = swisssurfer
|
||||
|
||||
swisssurfer_MOCFILES = moc_authentication.cxx moc_certificate.cxx \
|
||||
moc_logincertificate.cxx moc_smartcardauth.cxx \
|
||||
moc_browser.cxx moc_editbookmarks.cxx \
|
||||
moc_pinentry.cxx \
|
||||
moc_sslclientnetworkmanager.cxx
|
||||
swisssurfer_UIFILES = ui_authentication.hxx ui_browser.hxx \
|
||||
ui_certificate.hxx ui_editbookmarks.hxx \
|
||||
ui_logincertificate.hxx ui_pinentry.hxx
|
||||
swisssurfer_RESOURCES = qrc_resources.cxx qrc_languages.cxx
|
||||
swisssurfer_MOCFILES =
|
||||
swisssurfer_UIFILES =
|
||||
swisssurfer_RESOURCES = qrc_languages.cxx
|
||||
swisssurfer_TRANSLATIONS = ${LANGUAGE_FILE_BASE}_en.qm \
|
||||
${LANGUAGE_FILE_BASE}_de.qm \
|
||||
${LANGUAGE_FILE_BASE}_fr.qm \
|
||||
@@ -37,8 +31,8 @@ BUILT_SOURCES = ${nodist_swisssurfer_SOURCES}
|
||||
EXTRA_DIST_TR = ${swisssurfer_MOCFILES:moc_%.cxx=%.hxx} \
|
||||
${swisssurfer_UIFILES:ui_%.hxx=%.ui}
|
||||
|
||||
EXTRA_DIST = ${EXTRA_DIST_TR} resources.qrc languages.qrc.in \
|
||||
${swisssurfer_TRANSLATIONS:%.qm=%.ts} resources
|
||||
EXTRA_DIST = ${EXTRA_DIST_TR} languages.qrc.in \
|
||||
${swisssurfer_TRANSLATIONS:%.qm=%.ts}
|
||||
|
||||
LANGUAGE_FILES = ${EXTRA_DIST_TR} ${swisssurfer_TR_FILES}
|
||||
DISTCLEANFILES = qrc_languages.cxx ${BUILT_SOURCES}
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
#ifndef __AUTHENTICATION_HXX__
|
||||
#define __AUTHENTICATION_HXX__
|
||||
|
||||
#include <ui_authentication.hxx>
|
||||
#include <qbrowserlib/ui_authentication.hxx>
|
||||
#include <QDialog>
|
||||
#include <QtNetwork/QAuthenticator>
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
class Authentication: public QDialog, protected Ui::Authentication {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
@@ -36,5 +38,5 @@ class Authentication: public QDialog, protected Ui::Authentication {
|
||||
private:
|
||||
QAuthenticator* _auth;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
File renamed without changes.
@@ -15,16 +15,16 @@
|
||||
#define BROWSER_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <smartcardauth.hxx>
|
||||
#include <logincertificate.hxx>
|
||||
#include <qbrowserlib/smartcardauth.hxx>
|
||||
#include <qbrowserlib/logincertificate.hxx>
|
||||
#include <qbrowserlib/errorlog.hxx>
|
||||
#include <qbrowserlib/downloadmanager.hxx>
|
||||
#include <authentication.hxx>
|
||||
#include <editbookmarks.hxx>
|
||||
#include <qbrowserlib/authentication.hxx>
|
||||
#include <qbrowserlib/editbookmarks.hxx>
|
||||
#include <proxyface/proxy.hxx>
|
||||
#include <sslclientnetworkmanager.hxx>
|
||||
#include <qbrowserlib/sslclientnetworkmanager.hxx>
|
||||
|
||||
#include <ui_browser.hxx>
|
||||
#include <qbrowserlib/ui_browser.hxx>
|
||||
|
||||
#include <qbrowserlib/buttonlineedit.hxx>
|
||||
#include <qbrowserlib/filestorage.hxx>
|
||||
@@ -54,8 +54,7 @@
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
|
||||
extern QString TMP;
|
||||
QString helptext(); // from main.cxx
|
||||
namespace qbrowserlib {
|
||||
|
||||
//! @addtogroup browser
|
||||
//! @{
|
||||
@@ -67,7 +66,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
public:
|
||||
|
||||
Browser(const QString& actlib, const QStringList& urls = QStringList(),
|
||||
QSettings* settings=0,
|
||||
QSettings* settings=0, QString tmp=QString(), QString helptext=QString(),
|
||||
qbrowserlib::Settings::MimeTypes mimeTypes =
|
||||
qbrowserlib::Settings::MimeTypes(),
|
||||
bool kiosk = false, bool login = true, bool quirks=true,
|
||||
@@ -81,7 +80,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
_startUrl(urls.size()),
|
||||
_quirks(quirks), _search(new qbrowserlib::ButtonLineEdit),
|
||||
_searchEngines(new QComboBox),
|
||||
_bookmarkfile(bookmarkfile) {
|
||||
_bookmarkfile(bookmarkfile), _tmp(tmp), _helptext(helptext) {
|
||||
TRC; LOG<<urls;
|
||||
qbrowserlib::Settings::instance(mimeTypes, this, settings, !kiosk);
|
||||
qbrowserlib::ErrorLog::instance(this);
|
||||
@@ -242,7 +241,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
QMessageBox::critical(this, tr("SSL Not Supported"),
|
||||
tr("SSL is not supported on your system"));
|
||||
// temporary caching of favicons
|
||||
QWebSettings::setIconDatabasePath(TMP);
|
||||
QWebSettings::setIconDatabasePath(_tmp);
|
||||
}
|
||||
|
||||
~Browser() {
|
||||
@@ -842,7 +841,7 @@ 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() {
|
||||
@@ -1566,7 +1565,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
qbrowserlib::ButtonLineEdit* _search;
|
||||
QComboBox* _searchEngines;
|
||||
FileStorage _bookmarkfile;
|
||||
QString _helptext;
|
||||
QString _tmp;
|
||||
};
|
||||
|
||||
//! @}
|
||||
}
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/32x32/swisssurfer.png</normaloff>:/icons/32x32/swisssurfer.png</iconset>
|
||||
<normaloff>:/icons/surfer.png</normaloff>:/icons/surfer.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef CERTIFICATE_HXX
|
||||
#define CERTIFICATE_HXX
|
||||
|
||||
#include <ui_certificate.hxx>
|
||||
#include <qbrowserlib/ui_certificate.hxx>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
@@ -22,6 +22,8 @@ namespace QSsl {
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
class Certificate: public QWidget, protected Ui::Certificate {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
@@ -122,5 +124,5 @@ class Certificate: public QWidget, protected Ui::Certificate {
|
||||
return tr("error", "unknown certificate subject info");
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
File renamed without changes.
@@ -9,6 +9,7 @@
|
||||
#define __DOWNLOAD_MANAGER_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <qbrowserlib/sslclientnetworkmanager.hxx>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtNetwork/QSslError>
|
||||
#include <QtNetwork/QSslConfiguration>
|
||||
@@ -28,6 +29,14 @@ namespace qbrowserlib {
|
||||
|
||||
//! Append a Network Manager
|
||||
DownloadManager& operator+=(QNetworkAccessManager* n) {
|
||||
TRC;
|
||||
SslClientAuthNetworkAccessManager* n2
|
||||
(dynamic_cast<SslClientAuthNetworkAccessManager*>(n));
|
||||
return operator+=(n2);
|
||||
}
|
||||
|
||||
//! Append a Network Manager
|
||||
DownloadManager& operator+=(SslClientAuthNetworkAccessManager* n) {
|
||||
TRC;
|
||||
assert(connect(n, SIGNAL(created(QNetworkReply*)),
|
||||
SLOT(add(QNetworkReply*))));
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
#include <QDialog>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <ui_editbookmarks.hxx>
|
||||
#include <qbrowserlib/ui_editbookmarks.hxx>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
class EditBookmarks: public QDialog, protected Ui::EditBookmarks {
|
||||
Q_OBJECT;
|
||||
Q_SIGNALS:
|
||||
@@ -73,5 +75,5 @@ class EditBookmarks: public QDialog, protected Ui::EditBookmarks {
|
||||
private:
|
||||
QComboBox* _url;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
File renamed without changes.
@@ -4,6 +4,8 @@
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
#ifndef FILESTORAGE_HXX
|
||||
#define FILESTORAGE_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <QtCore/QFile>
|
||||
@@ -16,6 +18,8 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
//! Store string lists.
|
||||
/** Abstract storage interface to string lists, such as bookmarks. */
|
||||
class Storage: public QObject {
|
||||
@@ -111,3 +115,6 @@ class FileStorage: public Storage {
|
||||
QDateTime _modified;
|
||||
QTimer _timer;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -9,7 +9,9 @@
|
||||
#define LOGINCERTIFICATE_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <ui_logincertificate.hxx>
|
||||
#include <qbrowserlib/ui_logincertificate.hxx>
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
class LoginCertificate: public QDialog, protected Ui::LoginCertificate {
|
||||
public:
|
||||
@@ -33,4 +35,5 @@ class LoginCertificate: public QDialog, protected Ui::LoginCertificate {
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="Certificate" name="_cert" native="true">
|
||||
<widget class="qbrowserlib::Certificate" name="_cert" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -41,9 +41,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Certificate</class>
|
||||
<class>qbrowserlib::Certificate</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>certificate.hxx</header>
|
||||
<header>qbrowserlib/certificate.hxx</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
@@ -23,11 +23,20 @@ libqbrowserlib_la_MOCFILES = moc_buttonlineedit.cxx moc_errorlog.cxx \
|
||||
moc_temporaryfile.cxx \
|
||||
moc_downloadmanager.cxx \
|
||||
moc_filestorage.cxx moc_saveorrun.cxx \
|
||||
moc_swisswebview.cxx
|
||||
libqbrowserlib_la_UIFILES = ui_errorlog.hxx ui_log.hxx \
|
||||
ui_saveorrun.hxx ui_settings.hxx \
|
||||
ui_swisswebwidget.hxx
|
||||
libqbrowserlib_la_RESOURCES = qrc_languages.cxx
|
||||
moc_swisswebview.cxx \
|
||||
moc_sslclientnetworkmanager.cxx \
|
||||
moc_authentication.cxx \
|
||||
moc_certificate.cxx \
|
||||
moc_logincertificate.cxx \
|
||||
moc_smartcardauth.cxx moc_browser.cxx \
|
||||
moc_editbookmarks.cxx moc_pinentry.cxx
|
||||
libqbrowserlib_la_UIFILES = ui_errorlog.hxx ui_log.hxx \
|
||||
ui_saveorrun.hxx ui_settings.hxx \
|
||||
ui_swisswebwidget.hxx \
|
||||
ui_authentication.hxx ui_browser.hxx \
|
||||
ui_certificate.hxx ui_editbookmarks.hxx \
|
||||
ui_logincertificate.hxx ui_pinentry.hxx
|
||||
libqbrowserlib_la_RESOURCES = qrc_resources.cxx qrc_languages.cxx
|
||||
libqbrowserlib_la_TRANSLATIONS = ${LANGUAGE_FILE_BASE}_en.qm \
|
||||
${LANGUAGE_FILE_BASE}_de.qm \
|
||||
${LANGUAGE_FILE_BASE}_fr.qm \
|
||||
@@ -44,8 +53,8 @@ BUILT_SOURCES = ${nodist_libqbrowserlib_la_SOURCES}
|
||||
EXTRA_DIST_TR = ${libqbrowserlib_la_MOCFILES:moc_%.cxx=%.hxx} \
|
||||
${libqbrowserlib_la_UIFILES:ui_%.hxx=%.ui}
|
||||
|
||||
EXTRA_DIST = ${EXTRA_DIST_TR} languages.qrc.in \
|
||||
${libqbrowserlib_la_TRANSLATIONS:%.qm=%.ts}
|
||||
EXTRA_DIST = ${EXTRA_DIST_TR} languages.qrc.in resources.qrc \
|
||||
resources ${libqbrowserlib_la_TRANSLATIONS:%.qm=%.ts}
|
||||
|
||||
LANGUAGE_FILES = ${EXTRA_DIST_TR} ${libqbrowserlib_la_TR_FILES}
|
||||
DISTCLEANFILES = qrc_languages.cxx ${BUILT_SOURCES}
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
|
||||
#include <cryptoki.hxx>
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <ui_pinentry.hxx>
|
||||
#include <qbrowserlib/ui_pinentry.hxx>
|
||||
#include <QDialog>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtNetwork/QSslCertificate>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
class PinEntry: public QDialog, public Ui::PinEntry {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
@@ -116,5 +118,6 @@ class PinEntry: public QDialog, public Ui::PinEntry {
|
||||
unsigned long _maxPinLen;
|
||||
unsigned long _minPinLen;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -169,7 +169,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Certificate" name="_cert" native="true">
|
||||
<widget class="qbrowserlib::Certificate" name="_cert" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -192,9 +192,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Certificate</class>
|
||||
<class>qbrowserlib::Certificate</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>certificate.hxx</header>
|
||||
<header>qbrowserlib/certificate.hxx</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
@@ -37,6 +37,7 @@
|
||||
<file alias="addbookmark.svg">resources/icons/addbookmark.svg</file>
|
||||
<file alias="gg.png">resources/icons/gg.png</file>
|
||||
<file alias="error.svg">resources/icons/error.svg</file>
|
||||
<file alias="surfer.png">resources/icons/surfer.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="icons/48x48">
|
||||
<file alias="SW_SwissSurfer_48x48x32.png">resources/icons/48x48/SW_SwissSurfer_48x48x32.png</file>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 106 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user