summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/mainwindow.cpp20
-rw-r--r--src/networkaccessmanager.cpp8
-rw-r--r--src/searchbar.cpp6
-rw-r--r--src/settings.cpp6
-rw-r--r--src/tabbar.cpp2
-rw-r--r--src/urlbar.cpp4
-rw-r--r--src/webview.cpp18
8 files changed, 38 insertions, 36 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index acef1998..a3030748 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -25,7 +25,7 @@
// Local Includes
#include "tabbar.h"
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
#include "history.h"
#include "urlbar.h"
@@ -310,7 +310,7 @@ WebView *MainView::newTab(bool makeCurrent)
if (!m_lineEditCompleter && count() > 0)
{
HistoryCompletionModel *completionModel = new HistoryCompletionModel(this);
- completionModel->setSourceModel(BrowserApplication::historyManager()->historyFilterModel());
+ completionModel->setSourceModel(Application::historyManager()->historyFilterModel());
m_lineEditCompleter = new QCompleter(completionModel, this);
// Should this be in Qt by default?
QAbstractItemView *popup = m_lineEditCompleter->popup();
@@ -492,7 +492,7 @@ void MainView::webViewIconChanged()
int index = webViewIndex(webView);
if (-1 != index)
{
- QIcon icon = BrowserApplication::instance()->icon(webView->url());
+ QIcon icon = Application::instance()->icon(webView->url());
setTabIcon(index, icon);
}
}
@@ -507,7 +507,7 @@ void MainView::webViewTitleChanged(const QString &title)
}
if (currentIndex() == index)
emit setCurrentTitle(title);
- BrowserApplication::historyManager()->updateHistoryItem(webView->url(), title);
+ Application::historyManager()->updateHistoryItem(webView->url(), title);
}
@@ -529,7 +529,7 @@ void MainView::aboutToShowRecentTabsMenu()
{
KAction *action = new KAction(m_recentlyClosedTabsMenu);
action->setData(m_recentlyClosedTabs.at(i));
- QIcon icon = BrowserApplication::instance()->icon(m_recentlyClosedTabs.at(i));
+ QIcon icon = Application::instance()->icon(m_recentlyClosedTabs.at(i));
action->setIcon(icon);
action->setText( m_recentlyClosedTabs.at(i).prettyUrl() );
m_recentlyClosedTabsMenu->addAction(action);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ecd5e452..ee028abb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -27,7 +27,7 @@
#include "rekonq.h"
// Local Includes
-#include "browserapplication.h"
+#include "application.h"
#include "settings.h"
#include "history.h"
#include "cookiejar.h"
@@ -319,9 +319,9 @@ void MainWindow::slotUpdateConf()
defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, isJavascriptEnabled);
// load Settings on main classes
- BrowserApplication::networkAccessManager()->loadSettings();
- BrowserApplication::cookieJar()->loadSettings();
- BrowserApplication::historyManager()->loadSettings();
+ Application::networkAccessManager()->loadSettings();
+ Application::cookieJar()->loadSettings();
+ Application::historyManager()->loadSettings();
}
@@ -402,7 +402,7 @@ void MainWindow::slotFileSaveAs()
KUrl srcUrl = currentTab()->url();
QString destPath = KFileDialog::getSaveFileName();
KUrl destUrl = KUrl(destPath);
- BrowserApplication::instance()->downloadUrl( srcUrl, destUrl );
+ Application::instance()->downloadUrl( srcUrl, destUrl );
}
@@ -444,8 +444,8 @@ void MainWindow::slotUpdateWindowTitle(const QString &title)
void MainWindow::slotFileNew()
{
- BrowserApplication::instance()->newMainWindow();
- MainWindow *mw = BrowserApplication::instance()->mainWindow();
+ Application::instance()->newMainWindow();
+ MainWindow *mw = Application::instance()->mainWindow();
mw->slotHome();
}
@@ -520,7 +520,7 @@ void MainWindow::slotPrivateBrowsing()
{
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false);
- QList<MainWindow*> windows = BrowserApplication::instance()->mainWindows();
+ QList<MainWindow*> windows = Application::instance()->mainWindows();
for (int i = 0; i < windows.count(); ++i)
{
MainWindow *window = windows.at(i);
@@ -718,7 +718,7 @@ void MainWindow::slotAboutToShowBackMenu()
QWebHistoryItem item = history->backItems(history->count()).at(i);
KAction *action = new KAction(this);
action->setData(-1*(historyCount-i-1));
- QIcon icon = BrowserApplication::instance()->icon(item.url());
+ QIcon icon = Application::instance()->icon(item.url());
action->setIcon(icon);
action->setText(item.title());
m_historyBackMenu->addAction(action);
@@ -734,7 +734,7 @@ void MainWindow::slotAboutToShowBackMenu()
// if (v.canConvert<int>())
// {
// int offset = qvariant_cast<int>(v);
-// QList<MainWindow*> windows = BrowserApplication::instance()->mainWindows();
+// QList<MainWindow*> windows = Application::instance()->mainWindows();
// windows.at(offset)->activateWindow();
// windows.at(offset)->currentTab()->setFocus();
// }
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 82947c3b..f4e23fb1 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -23,7 +23,7 @@
#include "networkaccessmanager.moc"
// Local Includes
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
// Auto Includes
@@ -86,7 +86,7 @@ void NetworkAccessManager::loadSettings()
void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthenticator *auth)
{
- MainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+ MainWindow *mainWindow = Application::instance()->mainWindow();
QDialog dialog(mainWindow);
dialog.setWindowFlags(Qt::Sheet);
@@ -111,7 +111,7 @@ void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthent
void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
{
- MainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+ MainWindow *mainWindow = Application::instance()->mainWindow();
QDialog dialog(mainWindow);
dialog.setWindowFlags(Qt::Sheet);
@@ -136,7 +136,7 @@ void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &prox
#ifndef QT_NO_OPENSSL
void NetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError> &error)
{
- MainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+ MainWindow *mainWindow = Application::instance()->mainWindow();
QStringList errorStrings;
for (int i = 0; i < error.count(); ++i)
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index c6889dba..2f03e93a 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -17,13 +17,15 @@
 *
 * ============================================================ */
-// Local Includes
+// Self Includes
#include "searchbar.h"
#include "searchbar.moc"
-#include "browserapplication.h"
+// Local Includes
+#include "application.h"
#include "mainwindow.h"
+// KDE Includes
#include <KDebug>
SearchBar::SearchBar(QWidget *parent) :
diff --git a/src/settings.cpp b/src/settings.cpp
index 7ab6e3dc..f5476ad3 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -27,7 +27,7 @@
#include "rekonq.h"
// Local Includes
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
#include "cookiejar.h"
#include "history.h"
@@ -164,14 +164,14 @@ void SettingsDialog::saveSettings()
void SettingsDialog::showCookies()
{
- CookiesDialog *dialog = new CookiesDialog(BrowserApplication::cookieJar(), this);
+ CookiesDialog *dialog = new CookiesDialog(Application::cookieJar(), this);
dialog->exec();
}
void SettingsDialog::showExceptions()
{
- CookiesExceptionsDialog *dialog = new CookiesExceptionsDialog(BrowserApplication::cookieJar(), this);
+ CookiesExceptionsDialog *dialog = new CookiesExceptionsDialog(Application::cookieJar(), this);
dialog->exec();
}
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index bf63db03..c28a390c 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -23,7 +23,7 @@
#include "tabbar.moc"
// Local Includes
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
#include "history.h"
#include "urlbar.h"
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index 5ddb26aa..3940d040 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -21,7 +21,7 @@
#include "urlbar.h"
#include "urlbar.moc"
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
@@ -81,7 +81,7 @@ void UrlBar::webViewUrlChanged(const QUrl &url)
void UrlBar::webViewIconChanged()
{
KUrl url = (m_webView) ? m_webView->url() : KUrl();
- QIcon icon = BrowserApplication::instance()->icon(url);
+ QIcon icon = Application::instance()->icon(url);
QPixmap pixmap(icon.pixmap(16, 16));
QIcon urlIcon = QIcon(pixmap);
diff --git a/src/webview.cpp b/src/webview.cpp
index 5d317597..ab8ef5cd 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -26,7 +26,7 @@
#include "rekonq.h"
// Local Includes
-#include "browserapplication.h"
+#include "application.h"
#include "mainwindow.h"
#include "mainview.h"
#include "cookiejar.h"
@@ -51,7 +51,7 @@ WebPage::WebPage(QObject *parent)
, m_pressedButtons(Qt::NoButton)
, m_openInNewTab(false)
{
- setNetworkAccessManager( BrowserApplication::networkAccessManager() );
+ setNetworkAccessManager( Application::networkAccessManager() );
connect(this, SIGNAL(unsupportedContent(QNetworkReply *)), this, SLOT(handleUnsupportedContent(QNetworkReply *)));
}
@@ -65,7 +65,7 @@ MainWindow *WebPage::mainWindow()
return mw;
w = w->parent();
}
- return BrowserApplication::instance()->mainWindow();
+ return Application::instance()->mainWindow();
}
@@ -80,8 +80,8 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
WebView *webView;
if (newWindow)
{
- BrowserApplication::instance()->newMainWindow();
- MainWindow *newMainWindow = BrowserApplication::instance()->mainWindow();
+ Application::instance()->newMainWindow();
+ MainWindow *newMainWindow = Application::instance()->mainWindow();
webView = newMainWindow->currentTab();
newMainWindow->raise();
newMainWindow->activateWindow();
@@ -115,8 +115,8 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type)
m_openInNewTab = false;
return mainWindow()->tabWidget()->newTab()->page();
}
- BrowserApplication::instance()->newMainWindow();
- MainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+ Application::instance()->newMainWindow();
+ MainWindow *mainWindow = Application::instance()->mainWindow();
return mainWindow->currentTab()->page();
}
@@ -138,7 +138,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
KUrl srcUrl = reply->url();
QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName();
KUrl destUrl = KUrl(path);
- BrowserApplication::instance()->downloadUrl( srcUrl, destUrl );
+ Application::instance()->downloadUrl( srcUrl, destUrl );
return;
}
@@ -324,7 +324,7 @@ void WebView::downloadRequested(const QNetworkRequest &request)
KUrl srcUrl = request.url();
QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName();
KUrl destUrl = KUrl(path);
- BrowserApplication::instance()->downloadUrl( srcUrl, destUrl );
+ Application::instance()->downloadUrl( srcUrl, destUrl );
}