diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-02-16 00:06:28 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-02-16 00:06:28 +0100 |
commit | 4150695c5fff0504cf19ad74b3f185bd67397497 (patch) | |
tree | 9cf5744503e83c3deea72820cd26cdd4d39fde0b /src/mainwindow.cpp | |
parent | Modified adjam's mail (diff) | |
download | rekonq-4150695c5fff0504cf19ad74b3f185bd67397497.tar.xz |
new singleton Application class.
Try 1..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ee028abb..91ee8028 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -74,9 +74,6 @@ MainWindow::MainWindow() // updating rekonq configuration slotUpdateConf(); - // creating a new tab - m_view->newTab(); - // creating a centralWidget containing m_view and the hidden findbar QWidget *centralWidget = new QWidget; QVBoxLayout *layout = new QVBoxLayout; @@ -444,9 +441,8 @@ void MainWindow::slotUpdateWindowTitle(const QString &title) void MainWindow::slotFileNew() { - Application::instance()->newMainWindow(); - MainWindow *mw = Application::instance()->mainWindow(); - mw->slotHome(); + Application::instance()->newTab(); + slotHome(); } @@ -520,13 +516,9 @@ void MainWindow::slotPrivateBrowsing() { settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false); - QList<MainWindow*> windows = Application::instance()->mainWindows(); - for (int i = 0; i < windows.count(); ++i) - { - MainWindow *window = windows.at(i); - window->m_lastSearch = QString::null; - window->tabWidget()->clear(); - } + MainWindow* win = Application::instance()->mainWindow(); + win->m_lastSearch = QString::null; + win->tabWidget()->clear(); } } @@ -726,22 +718,6 @@ void MainWindow::slotAboutToShowBackMenu() } -// void MainWindow::slotShowWindow() -// { -// if (KAction *action = qobject_cast<KAction*>(sender())) -// { -// QVariant v = action->data(); -// if (v.canConvert<int>()) -// { -// int offset = qvariant_cast<int>(v); -// QList<MainWindow*> windows = Application::instance()->mainWindows(); -// windows.at(offset)->activateWindow(); -// windows.at(offset)->currentTab()->setFocus(); -// } -// } -// } - - void MainWindow::slotOpenActionUrl(QAction *action) { int offset = action->data().toInt(); |