diff --git a/src/browser.hxx b/src/browser.hxx index 1cfe784..cb995f1 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -248,7 +248,7 @@ class Browser: public QMainWindow, protected Ui::Browser { //! Create new empty tab. qbrowserlib::SwissWebView* newTab() { qbrowserlib::SwissWebView* browser - (new qbrowserlib::SwissWebView(&_networkManager, &_executor)); + (new qbrowserlib::SwissWebView(0, &_networkManager, &_executor)); newTab(browser); return browser; } diff --git a/src/designer/webwidgetifc.hxx b/src/designer/webwidgetifc.hxx index afe1540..f127162 100644 --- a/src/designer/webwidgetifc.hxx +++ b/src/designer/webwidgetifc.hxx @@ -5,8 +5,8 @@ // 1 2 3 4 5 6 7 8 // 45678901234567890123456789012345678901234567890123456789012345678901234567890 -#ifndef __SWISSWEBWIDGETWIDGETIFC_HXX -#define __SWISSWEBWIDGETWIDGETIFC_HXX +#ifndef __SWISSWEBWIDGETIFC_HXX +#define __SWISSWEBWIDGETIFC_HXX #include #include @@ -16,8 +16,8 @@ //! @{ //! SwissWebWidget widget for Qt Designer -class SwissWebWidgetWidgetIfc: public QObject, - public QDesignerCustomWidgetInterface { +class SwissWebWidgetIfc: public QObject, + public QDesignerCustomWidgetInterface { Q_OBJECT; Q_INTERFACES(QDesignerCustomWidgetInterface); public: diff --git a/src/qbrowserlib/qbrowserlib_de.ts b/src/qbrowserlib/qbrowserlib_de.ts index da3ef3e..2687208 100644 --- a/src/qbrowserlib/qbrowserlib_de.ts +++ b/src/qbrowserlib/qbrowserlib_de.ts @@ -580,6 +580,55 @@ p, li { white-space: pre-wrap; } + + SwissWebWidget + + + Form + + + + + H + + + + + B + + + + + F + + + + + X + + + + + R + + + + + gg + + + + + status + + + + + + - + + + qbrowserlib::SaveOrRun diff --git a/src/qbrowserlib/qbrowserlib_en.ts b/src/qbrowserlib/qbrowserlib_en.ts index a389eff..e9f3ce9 100644 --- a/src/qbrowserlib/qbrowserlib_en.ts +++ b/src/qbrowserlib/qbrowserlib_en.ts @@ -580,6 +580,55 @@ p, li { white-space: pre-wrap; } + + SwissWebWidget + + + Form + + + + + H + + + + + B + + + + + F + + + + + X + + + + + R + + + + + gg + + + + + status + + + + + + - + + + qbrowserlib::SaveOrRun diff --git a/src/qbrowserlib/qbrowserlib_fr.ts b/src/qbrowserlib/qbrowserlib_fr.ts index bec09eb..7cdf3d2 100644 --- a/src/qbrowserlib/qbrowserlib_fr.ts +++ b/src/qbrowserlib/qbrowserlib_fr.ts @@ -580,6 +580,55 @@ p, li { white-space: pre-wrap; } + + SwissWebWidget + + + Form + + + + + H + + + + + B + + + + + F + + + + + X + + + + + R + + + + + gg + + + + + status + + + + + + - + + + qbrowserlib::SaveOrRun diff --git a/src/qbrowserlib/qbrowserlib_it.ts b/src/qbrowserlib/qbrowserlib_it.ts index 4706abf..bd953e3 100644 --- a/src/qbrowserlib/qbrowserlib_it.ts +++ b/src/qbrowserlib/qbrowserlib_it.ts @@ -580,6 +580,55 @@ p, li { white-space: pre-wrap; } + + SwissWebWidget + + + Form + + + + + H + + + + + B + + + + + F + + + + + X + + + + + R + + + + + gg + + + + + status + + + + + + - + + + qbrowserlib::SaveOrRun diff --git a/src/qbrowserlib/qmake.pro.in b/src/qbrowserlib/qmake.pro.in index ee710d4..3c6faf8 100644 --- a/src/qbrowserlib/qmake.pro.in +++ b/src/qbrowserlib/qmake.pro.in @@ -43,7 +43,8 @@ HEADERS = @srcdir@/log.hxx \ @srcdir@/executor.hxx \ @srcdir@/temporaryfile.hxx -FORMS = @srcdir@/saveorrun.ui @srcdir@/settings.ui @srcdir@/log.ui +FORMS = @srcdir@/saveorrun.ui @srcdir@/settings.ui @srcdir@/log.ui \ + @srcdir@/swisswebwidget.ui RESOURCES = languages.qrc diff --git a/src/qbrowserlib/swisswebview.hxx b/src/qbrowserlib/swisswebview.hxx index 3b50ef1..7bd7d21 100644 --- a/src/qbrowserlib/swisswebview.hxx +++ b/src/qbrowserlib/swisswebview.hxx @@ -37,8 +37,15 @@ namespace qbrowserlib { void newView(qbrowserlib::SwissWebView*); public: //! Default construction, creates new @ref SwissWebView - SwissWebView(QNetworkAccessManager* net, - Executor* executor, QWidget *parent=0): QWebView(parent) { + SwissWebView(QWidget *parent=0, + QNetworkAccessManager* net=0, + Executor* executor=0): QWebView(parent) { + if (!net) net = (_fallbackNetworkAccessManager = + std::auto_ptr + (new QNetworkAccessManager)).get(); + if (!executor) executor = (_fallbackExecutor = + std::auto_ptr + (new Executor)).get(); //! @bugfix, gcc does not yet support constructor calling x(new SwissWebPage(net, executor, this)); } @@ -65,6 +72,11 @@ namespace qbrowserlib { // is not assigned newView(new SwissWebView(p)); } + + private: + + std::auto_ptr _fallbackNetworkAccessManager; + std::auto_ptr _fallbackExecutor; }; } diff --git a/src/qbrowserlib/swisswebwidget.hxx b/src/qbrowserlib/swisswebwidget.hxx index 77ff2ea..c197afd 100644 --- a/src/qbrowserlib/swisswebwidget.hxx +++ b/src/qbrowserlib/swisswebwidget.hxx @@ -5,10 +5,17 @@ // 1 2 3 4 5 6 7 8 // 45678901234567890123456789012345678901234567890123456789012345678901234567890 +#ifndef __SWISSWEBWIDGET_HXX__ +#define __SWISSWEBWIDGET_HXX__ + +#include + +#include + //! @addtogroup qbrowserlib //! @{ -namespace { +namespace qbrowserlib { //! Window Widget for complete page witghin a webbrowser. /*! Contains a toolbar, a status bar and @refs @@ -22,6 +29,9 @@ namespace { } protected: }; + } //! @} + +#endif