summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp8
-rw-r--r--src/application.h2
-rw-r--r--src/mainview.cpp12
-rw-r--r--src/mainview.h2
-rw-r--r--src/mainwindow.cpp6
-rw-r--r--src/webview.cpp4
6 files changed, 17 insertions, 17 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 0151d364..3ff931e4 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -64,7 +64,7 @@ Application::Application()
m_mainWindow = new MainWindow();
m_mainWindow->setObjectName("MainWindow");
setWindowIcon(KIcon("rekonq"));
- newTab();
+ newWebView();
m_mainWindow->show();
@@ -91,7 +91,7 @@ int Application::newInstance()
for (int i = 1; i < args->count(); ++i)
{
KUrl url = MainWindow::guessUrlFromString(args->arg(i));
- newTab();
+ newWebView();
mainWindow()->loadUrl(url);
}
args->clear();
@@ -143,9 +143,9 @@ MainWindow *Application::mainWindow()
}
-WebView *Application::newTab()
+WebView *Application::newWebView()
{
- return m_mainWindow->mainView()->newTab();
+ return m_mainWindow->mainView()->newWebView();
}
diff --git a/src/application.h b/src/application.h
index fa731c4e..654d554f 100644
--- a/src/application.h
+++ b/src/application.h
@@ -52,7 +52,7 @@ public:
static Application *instance();
MainWindow *mainWindow();
- WebView* newTab();
+ WebView* newWebView();
KIcon icon(const KUrl &url) const;
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 4ab8dc8b..3c563230 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -61,7 +61,7 @@ MainView::MainView(QWidget *parent)
{
setTabBar(m_tabBar);
- connect(m_tabBar, SIGNAL(newTab()), this, SLOT(newTab()));
+ connect(m_tabBar, SIGNAL(newTab()), this, SLOT(newWebView()));
connect(m_tabBar, SIGNAL(closeTab(int)), this, SLOT(closeTab(int)));
connect(m_tabBar, SIGNAL(cloneTab(int)), this, SLOT(cloneTab(int)));
connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(closeOtherTabs(int)));
@@ -317,7 +317,7 @@ WebView *MainView::webView(int index) const
{
MainView *that = const_cast<MainView*>(this);
that->setUpdatesEnabled(false);
- that->newTab();
+ that->newWebView();
that->closeTab(0);
that->setUpdatesEnabled(true);
return currentWebView();
@@ -334,7 +334,7 @@ int MainView::webViewIndex(WebView *webView) const
}
-WebView *MainView::newTab(bool makeCurrent)
+WebView *MainView::newWebView(bool makeCurrent)
{
// line edit
UrlBar *urlLineEdit = new UrlBar;
@@ -465,7 +465,7 @@ void MainView::cloneTab(int index)
index = currentIndex();
if (index < 0 || index >= count())
return;
- WebView *tab = newTab(false);
+ WebView *tab = newWebView(false);
tab->setUrl(webView(index)->url());
showTabBar();
@@ -593,7 +593,7 @@ void MainView::mouseDoubleClickEvent(QMouseEvent *event)
// Remove the line below when QTabWidget does not have a one pixel frame
&& event->pos().y() < (tabBar()->y() + tabBar()->height()))
{
- newTab();
+ newWebView();
return;
}
KTabWidget::mouseDoubleClickEvent(event);
@@ -620,7 +620,7 @@ void MainView::mouseReleaseEvent(QMouseEvent *event)
KUrl url(QApplication::clipboard()->text(QClipboard::Selection));
if (!url.isEmpty() && url.isValid() && !url.scheme().isEmpty())
{
- WebView *webView = newTab();
+ WebView *webView = newWebView();
webView->setUrl(url);
}
}
diff --git a/src/mainview.h b/src/mainview.h
index 4e2d8b6e..56808c02 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -102,7 +102,7 @@ protected:
public slots:
void loadUrlInCurrentTab(const KUrl &url);
- WebView *newTab(bool makeCurrent = true);
+ WebView *newWebView(bool makeCurrent = true);
void cloneTab(int index = -1);
void closeTab(int index = -1);
void closeOtherTabs(int index);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c459fc42..2a5f9295 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -99,7 +99,7 @@ MainWindow::MainWindow()
connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *)));
connect(m_view, SIGNAL(menuBarVisibilityChangeRequested(bool)), menuBar(), SLOT(setVisible(bool)));
connect(m_view, SIGNAL(statusBarVisibilityChangeRequested(bool)), statusBar(), SLOT(setVisible(bool)));
- connect(m_view, SIGNAL(lastTabClosed()), m_view, SLOT(newTab()));
+ connect(m_view, SIGNAL(lastTabClosed()), m_view, SLOT(newWebView()));
connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions()));
connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions()));
@@ -251,7 +251,7 @@ void MainWindow::setupActions()
a = new KAction(KIcon("tab-new"), i18n("New &Tab"), this);
a->setShortcut(KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_N, Qt::CTRL + Qt::Key_T));
actionCollection()->addAction(QLatin1String("new_tab"), a);
- connect(a, SIGNAL(triggered(bool)), m_view, SLOT(newTab()));
+ connect(a, SIGNAL(triggered(bool)), m_view, SLOT(newWebView()));
a = new KAction(KIcon("tab-close"), i18n("&Close Tab"), this);
a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_W));
@@ -465,7 +465,7 @@ void MainWindow::slotUpdateWindowTitle(const QString &title)
void MainWindow::slotFileNew()
{
- Application::instance()->newTab();
+ Application::instance()->newWebView();
slotHome();
}
diff --git a/src/webview.cpp b/src/webview.cpp
index 239a5f5a..35444f42 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -84,7 +84,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
if (type == QWebPage::NavigationTypeLinkClicked && (m_keyboardModifiers & Qt::ControlModifier
|| m_pressedButtons == Qt::MidButton))
{
- WebView *webView = Application::instance()->newTab();
+ WebView *webView = Application::instance()->newWebView();
webView->setFocus();
webView->load(request);
m_keyboardModifiers = Qt::NoModifier;
@@ -122,7 +122,7 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type)
if (m_openInNewTab)
{
m_openInNewTab = false;
- return mainWindow()->mainView()->newTab()->page();
+ return mainWindow()->mainView()->newWebView()->page();
}
MainWindow *mainWindow = Application::instance()->mainWindow();