summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-09-02 18:10:46 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-09-03 08:27:20 +0200
commitd0ab264b8aa5f5c7fcb21dd172a1f3f5b777356b (patch)
treef89adefce79c8bf0d5cde2e1bc015a443ccb39fe /src/mainview.cpp
parentThis commit hacks a merge request, to fast fixing a crash calling the bk toolbar (diff)
downloadrekonq-d0ab264b8aa5f5c7fcb21dd172a1f3f5b777356b.tar.xz
Include clean-up in the big src directory
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp47
1 files changed, 21 insertions, 26 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 75d98b39..4aeb5256 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -29,36 +29,31 @@
// Self Includes
#include "mainview.h"
-#include "mainview.moc"
// Auto Includes
#include "rekonq.h"
// Local Includes
+#include "application.h"
+#include "iconmanager.h"
+#include "mainwindow.h"
+#include "sessionmanager.h"
+#include "stackedurlbar.h"
#include "tabbar.h"
#include "urlbar.h"
-#include "sessionmanager.h"
-#include "iconmanager.h"
+#include "webpage.h"
+#include "webtab.h"
// KDE Includes
-#include <KUrl>
#include <KAction>
-#include <KShortcut>
-#include <KStandardShortcut>
+#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardDirs>
-#include <KPassivePopup>
-#include <KLocalizedString>
// Qt Includes
-#include <QTimer>
-#include <QString>
-#include <QAction>
-#include <QIcon>
-#include <QLabel>
-#include <QMovie>
-#include <QWidget>
-#include <QVBoxLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QMovie>
+#include <QtGui/QToolButton>
MainView::MainView(MainWindow *parent)
@@ -120,7 +115,7 @@ void MainView::postLaunch()
m_recentlyClosedTabs.removeAll(item);
m_recentlyClosedTabs.prepend(item);
}
-
+
// Session Manager
connect(this, SIGNAL(tabsChanged()), Application::sessionManager(), SLOT(saveSession()));
connect(this, SIGNAL(currentChanged(int)), Application::sessionManager(), SLOT(saveSession()));
@@ -412,7 +407,7 @@ void MainView::closeOtherTabs(int index)
index = currentIndex();
if (index < 0 || index >= count())
return;
-
+
for (int i = count() - 1; i > index; --i)
{
closeTab(i);
@@ -435,9 +430,9 @@ void MainView::cloneTab(int index)
return;
KUrl url = webTab(index)->url();
-
+
Application::instance()->loadUrl(url, Rekonq::NewTab);
-
+
updateTabBar();
}
@@ -449,10 +444,10 @@ void MainView::closeTab(int index, bool del)
if (count() == 1)
{
WebView *w = currentWebTab()->view();
-
+
if( currentWebTab()->url().protocol() == QL1S("about") )
return;
-
+
switch (ReKonfig::newTabsBehaviour())
{
case 0: // new tab page
@@ -489,8 +484,8 @@ void MainView::closeTab(int index, bool del)
return;
}
- if (!tab->url().isEmpty()
- && !QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)
+ if (!tab->url().isEmpty()
+ && !QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)
)
{
QString title = tab->view()->title();
@@ -591,7 +586,7 @@ void MainView::webViewTitleChanged(const QString &title)
QString viewTitle = title.isEmpty()? i18n("(Untitled)") : title;
QString tabTitle = viewTitle;
tabTitle.replace('&', "&&");
-
+
WebView *view = qobject_cast<WebView *>(sender());
int index = indexOf(view->parentWidget());
if (-1 != index)
@@ -650,7 +645,7 @@ void MainView::openClosedTab()
if (action)
{
Application::instance()->loadUrl(action->data().toUrl(), Rekonq::NewTab);
-
+
QString title = action->text();
title = title.remove('&');
HistoryItem item(action->data().toString(), QDateTime(), title );