From ae7ac6a017bce310a160bb9152062635fdc72188 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 10:50:22 +0200 Subject: Some fixes and warning on webview createWindow --- src/mainwindow.cpp | 7 +++++++ src/mainwindow.h | 12 +++++++----- src/webview.cpp | 7 ++++--- 3 files changed, 18 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 56ae108e..87129528 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -152,6 +152,8 @@ MainWindow::MainWindow() // setting up toolbars to NOT have context menu enabled setContextMenuPolicy(Qt::DefaultContextMenu); + + QTimer::singleShot(0, this, SLOT(postLaunch())); } @@ -161,6 +163,11 @@ MainWindow::~MainWindow() } +void MainWindow::postLaunch() +{ +} + + QSize MainWindow::sizeHint() const { QRect desktopRect = QApplication::desktop()->screenGeometry(); diff --git a/src/mainwindow.h b/src/mainwindow.h index aedf049d..045287cb 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -84,6 +84,7 @@ protected: bool queryClose(); private slots: + void postLaunch(); void slotUpdateConfiguration(); void slotLoadProgress(int); void slotUpdateStatusbar(const QString &string); @@ -127,8 +128,14 @@ private slots: void slotPreferences(); private: + MainView *m_view; + FindBar *m_findBar; + SearchBar *m_searchBar; + SidePanel *m_sidePanel; + KMenu *m_historyBackMenu; KMenu *m_windowMenu; + KActionMenu *m_historyActionMenu; KAction *m_stopReloadAction; KAction *m_stopAction; @@ -138,11 +145,6 @@ private: QString m_lastSearch; QString m_homePage; - - MainView *m_view; - FindBar *m_findBar; - SearchBar *m_searchBar; - SidePanel *m_sidePanel; }; #endif // MAINWINDOW_H diff --git a/src/webview.cpp b/src/webview.cpp index 61eb051a..1320f38a 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -165,9 +165,10 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type) // added to manage web modal dialogs if (type == QWebPage::WebModalDialog) { - // FIXME - kWarning() << "trying QWebView here ---------------------------------------"; + // FIXME : need a "real" implementation.. + kWarning() << "Modal Dialog ---------------------------------------"; QWebView *w = new QWebView(); + w->show(); return w->page(); } @@ -179,7 +180,7 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type) if (m_openInNewTab) { m_openInNewTab = false; - return Application::instance()->mainWindow()->mainView()->newWebView()->page(); + return Application::instance()->newWebView()->page(); } MainWindow *mainWindow = Application::instance()->mainWindow(); -- cgit v1.2.1