From f6af24273de66c1f36dcd6ddcd97d45ed7e6f474 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 8 Nov 2008 12:05:58 +0100 Subject: Ported menubar to KDE --- src/browserapplication.cpp | 69 +----------- src/browserapplication.h | 8 -- src/browsermainwindow.cpp | 261 ++++++++++++++++++++++----------------------- src/browsermainwindow.h | 5 +- src/tabwidget.cpp | 4 +- 5 files changed, 138 insertions(+), 209 deletions(-) diff --git a/src/browserapplication.cpp b/src/browserapplication.cpp index 71da13eb..2a487143 100644 --- a/src/browserapplication.cpp +++ b/src/browserapplication.cpp @@ -74,18 +74,15 @@ BrowserApplication::BrowserApplication(KCmdLineArgs *args, const QString &server return; } -#if defined(Q_WS_MAC) - KApplication::setQuitOnLastWindowClosed(false); -#else KApplication::setQuitOnLastWindowClosed(true); -#endif m_localServer = new QLocalServer(this); - connect(m_localServer, SIGNAL(newConnection()), - this, SLOT(newLocalSocketConnection())); - if (!m_localServer->listen(serverName)) { + connect(m_localServer, SIGNAL(newConnection()), this, SLOT(newLocalSocketConnection())); + if (!m_localServer->listen(serverName)) + { if (m_localServer->serverError() == QAbstractSocket::AddressInUseError - && QFile::exists(m_localServer->serverName())) { + && QFile::exists(m_localServer->serverName())) + { QFile::remove(m_localServer->serverName()); m_localServer->listen(serverName); } @@ -101,11 +98,6 @@ BrowserApplication::BrowserApplication(KCmdLineArgs *args, const QString &server m_lastSession = settings.value(QLatin1String("lastSession")).toByteArray(); settings.endGroup(); -#if defined(Q_WS_MAC) - connect(this, SIGNAL(lastWindowClosed()), - this, SLOT(lastWindowClosed())); -#endif - QTimer::singleShot(0, this, SLOT(postLaunch())); } @@ -141,31 +133,6 @@ BrowserApplication *BrowserApplication::instance() -#if defined(Q_WS_MAC) -#include -void BrowserApplication::quitBrowser() -{ - clean(); - int tabCount = 0; - for (int i = 0; i < m_mainWindows.count(); ++i) { - tabCount =+ m_mainWindows.at(i)->tabWidget()->count(); - } - - if (tabCount > 1) { - int ret = QMessageBox::warning(mainWindow(), QString(), - i18n("There are ") + QString( m_mainWindows.count() ) + i18n(" windows and ") + QString(tabCount) + i18n("tabs open\n"), - QMessageBox::Yes | QMessageBox::No, - QMessageBox::No); - if (ret == QMessageBox::No) - return; - } - - exit(0); -} -#endif - - - /*! Any actions that can be delayed until the window is visible @@ -326,32 +293,6 @@ void BrowserApplication::installTranslator(const QString &name) KApplication::installTranslator(translator); } -#if defined(Q_WS_MAC) -bool BrowserApplication::event(QEvent* event) -{ - switch (event->type()) { - case QEvent::ApplicationActivate: { - clean(); - if (!m_mainWindows.isEmpty()) { - BrowserMainWindow *mw = mainWindow(); - if (mw && !mw->isMinimized()) { - mainWindow()->show(); - } - return true; - } - } - case QEvent::FileOpen: - if (!m_mainWindows.isEmpty()) { - mainWindow()->loadPage(static_cast(event)->file()); - return true; - } - default: - break; - } - return KApplication::event(event); -} -#endif - void BrowserApplication::openUrl(const QUrl &url) diff --git a/src/browserapplication.h b/src/browserapplication.h index c5b5c901..95b93218 100644 --- a/src/browserapplication.h +++ b/src/browserapplication.h @@ -64,17 +64,9 @@ public: static NetworkAccessManager *networkAccessManager(); static BookmarksManager *bookmarksManager(); -#if defined(Q_WS_MAC) - bool event(QEvent *event); -#endif - public slots: BrowserMainWindow *newMainWindow(); void restoreLastSession(); -#if defined(Q_WS_MAC) - void lastWindowClosed(); - void quitBrowser(); -#endif private slots: void postLaunch(); diff --git a/src/browsermainwindow.cpp b/src/browsermainwindow.cpp index c67310ae..49b357c0 100644 --- a/src/browsermainwindow.cpp +++ b/src/browsermainwindow.cpp @@ -35,6 +35,10 @@ #include #include #include +#include +#include +#include + #include #include @@ -72,11 +76,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags) QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(0); layout->setMargin(0); -#if defined(Q_WS_MAC) - layout->addWidget(new QWidget); // <- OS X tab widget style bug -#else addToolBarBreak(); -#endif layout->addWidget(m_tabWidget); centralWidget->setLayout(layout); setCentralWidget(centralWidget); @@ -91,19 +91,15 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags) connect(m_tabWidget, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)), menuBar(), SLOT(setVisible(bool))); connect(m_tabWidget, SIGNAL(statusBarVisibilityChangeRequested(bool)), statusBar(), SLOT(setVisible(bool))); - connect(m_tabWidget, SIGNAL(toolBarVisibilityChangeRequested(bool)), m_navigationBar, SLOT(setVisible(bool))); -#if defined(Q_WS_MAC) - connect(m_tabWidget, SIGNAL(lastTabClosed()), this, SLOT(close())); -#else +// connect(m_tabWidget, SIGNAL(toolBarVisibilityChangeRequested(bool)), m_navigationBar, SLOT(setVisible(bool))); connect(m_tabWidget, SIGNAL(lastTabClosed()), m_tabWidget, SLOT(newTab())); -#endif slotUpdateWindowTitle(); loadDefaultState(); m_tabWidget->newTab(); int size = m_tabWidget->lineEditStack()->sizeHint().height(); - m_navigationBar->setIconSize(QSize(size, size)); +// m_navigationBar->setIconSize(QSize(size, size)); // FIXME re-enable me } @@ -118,11 +114,11 @@ BrowserMainWindow::~BrowserMainWindow() void BrowserMainWindow::loadDefaultState() { - QSettings settings; - settings.beginGroup(QLatin1String("BrowserMainWindow")); - QByteArray data = settings.value(QLatin1String("defaultState")).toByteArray(); - restoreState(data); - settings.endGroup(); +// QSettings settings; +// settings.beginGroup(QLatin1String("BrowserMainWindow")); +// QByteArray data = settings.value(QLatin1String("defaultState")).toByteArray(); +// // restoreState(data); // FIXME re-enable me! +// settings.endGroup(); } @@ -218,110 +214,108 @@ bool BrowserMainWindow::restoreState(const QByteArray &state) void BrowserMainWindow::setupMenu() { -// new QShortcut(QKeySequence(Qt::Key_F6), this, SLOT(slotSwapFocus())); -// // ------------------------------------------------------------- FILE -------------------------------------------------------------------------------------------------- - KMenu *fileMenu = menuBar()->addMenu( i18n("&File") ); + KMenu *fileMenu = (KMenu *) menuBar()->addMenu( i18n("&File") ); - fileMenu->addAction( i18n("&New Window"), this, SLOT(slotFileNew()), QKeySequence::New); - fileMenu->addAction(m_tabWidget->newTabAction()); - fileMenu->addAction(i18n("&Open File..."), this, SLOT(slotFileOpen()), QKeySequence::Open); - fileMenu->addAction(i18n("Open &Location..."), this, SLOT(slotSelectLineEdit()), QKeySequence(Qt::ControlModifier + Qt::Key_L)); + fileMenu->addAction( KStandardAction::openNew(this, SLOT( slotFileNew() ) , this ) ); + fileMenu->addAction( KStandardAction::open( this, SLOT( slotFileOpen() ), this ) ); + fileMenu->addAction( i18n("Open Location"), this, SLOT( slotSelectLineEdit() ) ); fileMenu->addSeparator(); - fileMenu->addAction(m_tabWidget->closeTabAction()); + fileMenu->addAction( m_tabWidget->closeTabAction() ); fileMenu->addSeparator(); - fileMenu->addAction(i18n("&Save As..."), this, SLOT(slotFileSaveAs()), QKeySequence(QKeySequence::Save)); + fileMenu->addAction( KStandardAction::saveAs( this, SLOT( slotFileSaveAs() ), this ) ); fileMenu->addSeparator(); - fileMenu->addAction(i18n("P&rint Preview..."), this, SLOT(slotFilePrintPreview())); - fileMenu->addAction(i18n("&Print..."), this, SLOT(slotFilePrint()), QKeySequence::Print); + fileMenu->addAction( KStandardAction::printPreview( this, SLOT( slotFilePrintPreview() ), this ) ); + fileMenu->addAction( KStandardAction::print( this, SLOT(slotFilePrint()), this) ); fileMenu->addSeparator(); - QAction *action = fileMenu->addAction(i18n("Private &Browsing..."), this, SLOT(slotPrivateBrowsing())); + QAction *action = fileMenu->addAction( i18n("Private &Browsing..."), this, SLOT( slotPrivateBrowsing() ) ); action->setCheckable(true); fileMenu->addSeparator(); - fileMenu->addAction( i18n("&Quit"), this, SLOT(close()), QKeySequence(Qt::CTRL | Qt::Key_Q)); + fileMenu->addAction( KStandardAction::close( this , SLOT( close() ), this ) ); -// // ------------------------------------------------------------- EDIT -------------------------------------------------------------------------------------------------- -// QMenu *editMenu = menuBar()->addMenu(i18n("&Edit")); -// -// QAction *m_undo = editMenu->addAction(i18n("&Undo")); -// m_undo->setShortcuts(QKeySequence::Undo); -// m_tabWidget->addWebAction(m_undo, QWebPage::Undo); -// -// QAction *m_redo = editMenu->addAction(i18n("&Redo")); -// m_redo->setShortcuts(QKeySequence::Redo); -// m_tabWidget->addWebAction(m_redo, QWebPage::Redo); -// -// editMenu->addSeparator(); -// -// QAction *m_cut = editMenu->addAction(i18n("Cu&t")); -// m_cut->setShortcuts(QKeySequence::Cut); -// m_tabWidget->addWebAction(m_cut, QWebPage::Cut); -// -// QAction *m_copy = editMenu->addAction(i18n("&Copy")); -// m_copy->setShortcuts(QKeySequence::Copy); -// m_tabWidget->addWebAction(m_copy, QWebPage::Copy); -// -// QAction *m_paste = editMenu->addAction(i18n("&Paste")); -// m_paste->setShortcuts(QKeySequence::Paste); -// m_tabWidget->addWebAction(m_paste, QWebPage::Paste); -// -// editMenu->addSeparator(); -// -// QAction *m_find = editMenu->addAction(i18n("&Find")); -// m_find->setShortcuts(QKeySequence::Find); -// connect(m_find, SIGNAL(triggered()), this, SLOT(slotEditFind())); -// new QShortcut(QKeySequence(Qt::Key_Slash), this, SLOT(slotEditFind())); -// -// QAction *m_findNext = editMenu->addAction( i18n("&Find Next")); -// m_findNext->setShortcuts(QKeySequence::FindNext); -// connect(m_findNext, SIGNAL(triggered()), this, SLOT(slotEditFindNext())); -// -// QAction *m_findPrevious = editMenu->addAction( i18n("&Find Previous")); -// m_findPrevious->setShortcuts(QKeySequence::FindPrevious); -// connect(m_findPrevious, SIGNAL(triggered()), this, SLOT(slotEditFindPrevious())); -// -// editMenu->addSeparator(); -// editMenu->addAction( i18n("&Preferences"), this, SLOT(slotPreferences()), i18n("Ctrl+,")); -// -// -// // ------------------------------------------------------------- VIEW ------------------------------------------------------------------------------------------------- -// QMenu *viewMenu = menuBar()->addMenu( i18n("&View") ); -// -// m_viewStatusbar = new KAction(this); -// updateStatusbarActionText(true); -// m_viewStatusbar->setShortcut( i18n("Ctrl+/") ); -// connect(m_viewStatusbar, SIGNAL(triggered()), this, SLOT(slotViewStatusbar())); -// viewMenu->addAction(m_viewStatusbar); -// -// viewMenu->addSeparator(); -// -// m_stop = viewMenu->addAction( i18n("&Stop") ); -// QList shortcuts; -// shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Period)); -// shortcuts.append(Qt::Key_Escape); -// m_stop->setShortcuts(shortcuts); -// m_tabWidget->addWebAction(m_stop, QWebPage::Stop); -// -// m_reload = viewMenu->addAction( i18n("Reload Page") ); -// m_reload->setShortcuts(QKeySequence::Refresh); -// m_tabWidget->addWebAction(m_reload, QWebPage::Reload); -// -// viewMenu->addAction( i18n("&Make Text Bigger"), this, SLOT(slotViewTextBigger()), QKeySequence(Qt::CTRL | Qt::Key_Plus)); -// viewMenu->addAction( i18n("&Make Text Normal"), this, SLOT(slotViewTextNormal()), QKeySequence(Qt::CTRL | Qt::Key_0)); -// viewMenu->addAction( i18n("&Make Text Smaller"), this, SLOT(slotViewTextSmaller()), QKeySequence(Qt::CTRL | Qt::Key_Minus)); -// -// viewMenu->addSeparator(); -// viewMenu->addAction( i18n("Page S&ource"), this, SLOT(slotViewPageSource()), i18n("Ctrl+Alt+U")); -// QAction *a = viewMenu->addAction( i18n("&Full Screen"), this, SLOT(slotViewFullScreen(bool)), Qt::Key_F11); -// a->setCheckable(true); -// -// -// // ------------------------------------------------------------- HISTORY -------------------------------------------------------------------------------------------------- + // ------------------------------------------------------------- EDIT -------------------------------------------------------------------------------------------------- + KMenu *editMenu = (KMenu *) menuBar()->addMenu( i18n("&Edit") ); + + QAction *m_undo = editMenu->addAction(i18n("&Undo")); + m_undo->setShortcuts(QKeySequence::Undo); + m_tabWidget->addWebAction(m_undo, QWebPage::Undo); + + QAction *m_redo = editMenu->addAction(i18n("&Redo")); + m_redo->setShortcuts(QKeySequence::Redo); + m_tabWidget->addWebAction(m_redo, QWebPage::Redo); + + editMenu->addSeparator(); + + QAction *m_cut = editMenu->addAction(i18n("Cu&t")); + m_cut->setShortcuts(QKeySequence::Cut); + m_tabWidget->addWebAction(m_cut, QWebPage::Cut); + + QAction *m_copy = editMenu->addAction(i18n("&Copy")); + m_copy->setShortcuts(QKeySequence::Copy); + m_tabWidget->addWebAction(m_copy, QWebPage::Copy); + + QAction *m_paste = editMenu->addAction(i18n("&Paste")); + m_paste->setShortcuts(QKeySequence::Paste); + m_tabWidget->addWebAction(m_paste, QWebPage::Paste); + + editMenu->addSeparator(); + + // FIXME port FIND system to KDE + QAction *m_find = editMenu->addAction(i18n("&Find")); + m_find->setShortcuts(QKeySequence::Find); + connect(m_find, SIGNAL(triggered()), this, SLOT(slotEditFind())); + new QShortcut(QKeySequence(Qt::Key_Slash), this, SLOT(slotEditFind())); + + QAction *m_findNext = editMenu->addAction( i18n("&Find Next")); + m_findNext->setShortcuts(QKeySequence::FindNext); + connect(m_findNext, SIGNAL(triggered()), this, SLOT(slotEditFindNext())); + + QAction *m_findPrevious = editMenu->addAction( i18n("&Find Previous")); + m_findPrevious->setShortcuts(QKeySequence::FindPrevious); + connect(m_findPrevious, SIGNAL(triggered()), this, SLOT(slotEditFindPrevious())); + + editMenu->addSeparator(); + + editMenu->addAction( i18n("&Preferences"), this, SLOT(slotPreferences()), i18n("Ctrl+,")); + + + // ------------------------------------------------------------- VIEW ------------------------------------------------------------------------------------------------- + KMenu *viewMenu = (KMenu *) menuBar()->addMenu( i18n("&View") ); + + m_viewStatusbar = new KAction(this); + updateStatusbarActionText(true); + m_viewStatusbar->setShortcut( i18n("Ctrl+/") ); + connect(m_viewStatusbar, SIGNAL(triggered()), this, SLOT(slotViewStatusbar())); + viewMenu->addAction(m_viewStatusbar); + + viewMenu->addSeparator(); + + m_stop = viewMenu->addAction( i18n("&Stop") ); + QList shortcuts; + shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Period)); + shortcuts.append(Qt::Key_Escape); + m_stop->setShortcuts(shortcuts); + m_tabWidget->addWebAction(m_stop, QWebPage::Stop); + + m_reload = viewMenu->addAction( i18n("Reload Page") ); + m_reload->setShortcuts(QKeySequence::Refresh); + m_tabWidget->addWebAction(m_reload, QWebPage::Reload); + + viewMenu->addAction( i18n("&Make Text Bigger"), this, SLOT(slotViewTextBigger()), QKeySequence(Qt::CTRL | Qt::Key_Plus)); + viewMenu->addAction( i18n("&Make Text Normal"), this, SLOT(slotViewTextNormal()), QKeySequence(Qt::CTRL | Qt::Key_0)); + viewMenu->addAction( i18n("&Make Text Smaller"), this, SLOT(slotViewTextSmaller()), QKeySequence(Qt::CTRL | Qt::Key_Minus)); + + viewMenu->addSeparator(); + viewMenu->addAction( i18n("Page S&ource"), this, SLOT(slotViewPageSource()), i18n("Ctrl+Alt+U")); + action = viewMenu->addAction( i18n("&Full Screen"), this, SLOT(slotViewFullScreen(bool)), Qt::Key_F11); + action->setCheckable(true); + + // ------------------------------------------------------------- HISTORY -------------------------------------------------------------------------------------------------- // HistoryMenu *historyMenu = new HistoryMenu(this); // connect(historyMenu, SIGNAL(openUrl(const QUrl&)), m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); // connect(historyMenu, SIGNAL(hovered(const QString&)), this, SLOT(slotUpdateStatusbar(const QString&))); @@ -354,7 +348,9 @@ void BrowserMainWindow::setupMenu() // historyActions.append(m_restoreLastSession); // historyMenu->setInitialActions(historyActions); // -// // ------------------------------------------------------------- BOOKMARKS -------------------------------------------------------------------------------------------------- + + + // ------------------------------------------------------------- BOOKMARKS -------------------------------------------------------------------------------------------------- // BookmarksMenu *bookmarksMenu = new BookmarksMenu(this); // connect(bookmarksMenu, SIGNAL(openUrl(const QUrl&)), m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&))); // connect(bookmarksMenu, SIGNAL(hovered(const QString&)), this, SLOT(slotUpdateStatusbar(const QString&))); @@ -381,22 +377,23 @@ void BrowserMainWindow::setupMenu() // bookmarksActions.append(m_addBookmark); // bookmarksMenu->setInitialActions(bookmarksActions); // -// // ------------------------------------------------------------- WINDOW -------------------------------------------------------------------------------------------------- -// m_windowMenu = menuBar()->addMenu( i18n("&Window")); -// connect(m_windowMenu, SIGNAL(aboutToShow()), -// this, SLOT(slotAboutToShowWindowMenu())); -// slotAboutToShowWindowMenu(); -// -// QMenu *toolsMenu = menuBar()->addMenu( i18n("&Tools")); -// toolsMenu->addAction( i18n("Web &Search"), this, SLOT(slotWebSearch()), QKeySequence( tr("Ctrl+K", "Web Search"))); -// #ifndef Q_CC_MINGW -// a = toolsMenu->addAction( i18n("Enable Web &Inspector"), this, SLOT(slotToggleInspector(bool))); -// a->setCheckable(true); -// #endif -// -// QMenu *helpMenu = menuBar()->addMenu( i18n("&Help")); -// helpMenu->addAction( i18n("About &Qt"), qApp, SLOT(aboutQt())); -// helpMenu->addAction( i18n("About &reKonq"), this, SLOT(slotAboutApplication())); + + // ------------------------------------------------------------- WINDOW -------------------------------------------------------------------------------------------------- + m_windowMenu = (KMenu *) menuBar()->addMenu( i18n("&Window") ); + + connect(m_windowMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowWindowMenu())); + slotAboutToShowWindowMenu(); + + // ------------------------------------------------------------- TOOLS ------------------------------------------------------------------------------------------------------ + KMenu* toolsMenu = (KMenu *) menuBar()->addMenu( i18n("&Tools") ); + + toolsMenu->addAction( i18n("Web &Search"), this, SLOT(slotWebSearch()), QKeySequence( tr("Ctrl+K", "Web Search"))); + action = toolsMenu->addAction( i18n("Enable Web &Inspector"), this, SLOT(slotToggleInspector(bool))); + action->setCheckable(true); + + + // ------------------------------------------------------------- HELP -------------------------------------------------------------------------------------------------- + menuBar()->addMenu( helpMenu() ); } @@ -405,31 +402,29 @@ void BrowserMainWindow::setupMenu() void BrowserMainWindow::setupToolBar() { -// setUnifiedTitleAndToolBarOnMac(true); -// -// m_navigationBar = addToolBar(i18n("Navigation")); +// m_navigationBar = (KToolBar *) addToolBar(i18n("Navigation")); // connect(m_navigationBar->toggleViewAction(), SIGNAL(toggled(bool)), this, SLOT(updateToolbarActionText(bool))); // -// m_historyBack->setIcon( KIcon("go-previous") ); -// m_historyBackMenu = new QMenu(this); +// m_historyBack->setIcon( (QIcon) KIcon("go-previous") ); +// m_historyBackMenu = new KMenu(this); // m_historyBack->setMenu(m_historyBackMenu); // connect(m_historyBackMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowBackMenu())); // connect(m_historyBackMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotOpenActionUrl(QAction *))); // m_navigationBar->addAction(m_historyBack); // -// m_historyForward->setIcon( KIcon("go-next") ); -// m_historyForwardMenu = new QMenu(this); +// m_historyForward->setIcon( (QIcon) KIcon("go-next") ); +// m_historyForwardMenu = new KMenu(this); // connect(m_historyForwardMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowForwardMenu())); // connect(m_historyForwardMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotOpenActionUrl(QAction *))); // m_historyForward->setMenu(m_historyForwardMenu); // m_navigationBar->addAction(m_historyForward); // -// m_stopReload = new QAction(this); +// m_stopReload = new KAction(this); // m_reloadIcon = KIcon( "view-refresh" ); // m_stopReload->setIcon(m_reloadIcon); // m_navigationBar->addAction(m_stopReload); // -// m_goHome = new QAction(this); +// m_goHome = new KAction(this); // m_goHome->setIcon( KIcon( "go-home" ) ); // m_navigationBar->addAction(m_goHome); // connect(m_goHome, SIGNAL(triggered()), this, SLOT(slotHome())); @@ -814,10 +809,10 @@ void BrowserMainWindow::slotViewPageSource() void BrowserMainWindow::slotHome() { - QSettings settings; +/* QSettings settings; settings.beginGroup(QLatin1String("MainWindow")); QString home = settings.value(QLatin1String("home"), QLatin1String("http://www.kde.org/")).toString(); - loadPage(home); + loadPage(home);*/ } diff --git a/src/browsermainwindow.h b/src/browsermainwindow.h index 54c590e3..5570564f 100644 --- a/src/browsermainwindow.h +++ b/src/browsermainwindow.h @@ -114,6 +114,7 @@ private: void updateStatusbarActionText(bool visible); private: + KToolBar *m_navigationBar; ToolbarSearch *m_toolbarSearch; TabWidget *m_tabWidget; @@ -125,8 +126,8 @@ private: KMenu *m_historyForwardMenu; KMenu *m_windowMenu; - KAction *m_stop; - KAction *m_reload; + QAction *m_stop; + QAction *m_reload; KAction *m_stopReload; KAction *m_goHome; KAction *m_viewStatusbar; diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 6c340793..8808c926 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -385,7 +385,7 @@ QLineEdit *TabWidget::currentLineEdit() const WebView *TabWidget::currentWebView() const { - return webView(currentIndex()); +// return webView(currentIndex()); // FIXME } QLineEdit *TabWidget::lineEdit(int index) const @@ -406,7 +406,7 @@ WebView *TabWidget::webView(int index) const if (count() == 1) { TabWidget *that = const_cast(this); that->setUpdatesEnabled(false); - that->newTab(); +// that->newTab(); FIXME that->closeTab(0); that->setUpdatesEnabled(true); return currentWebView(); -- cgit v1.2.1