From e6d902eb8dc2d6815d4606519b638c6ec0f435e2 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 21 Feb 2009 11:17:38 +0100 Subject: It seems good now. But we have to test it a lot with Qt 4.5.. --- src/application.cpp | 27 +++------------------------ src/application.h | 8 -------- 2 files changed, 3 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/application.cpp b/src/application.cpp index 53825411..c4b4b38f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -63,6 +63,7 @@ Application::Application() : KUniqueApplication() { m_mainWindow = new MainWindow(); + m_mainWindow->setObjectName("MainWindow"); setWindowIcon( KIcon("rekonq") ); m_mainWindow->show(); @@ -72,8 +73,9 @@ Application::Application() Application::~Application() { - delete m_mainWindow; delete s_networkAccessManager; + delete s_historyManager; + delete m_mainWindow; } @@ -131,29 +133,6 @@ void Application::downloadUrl(const KUrl &srcUrl, const KUrl &destUrl) } -// void Application::saveSession() -// { -// QWebSettings *globalSettings = QWebSettings::globalSettings(); -// if ( globalSettings->testAttribute( QWebSettings::PrivateBrowsingEnabled ) ) -// return; -// -// KConfig config("rekonqrc"); -// KConfigGroup group = config.group("sessions"); -// QByteArray data; -// QBuffer buffer(&data); -// QDataStream stream(&buffer); -// buffer.open(QIODevice::ReadWrite); -// -// stream << m_mainWindows.count(); -// for (int i = 0; i < m_mainWindows.count(); ++i) -// { -// stream << m_mainWindows.at(i)->saveState(); -// } -// -// group.writeEntry( QString("lastSession"), data ); -// } - - void Application::openUrl(const KUrl &url) { mainWindow()->loadUrl(url); diff --git a/src/application.h b/src/application.h index 0c29b72b..7a08eb1a 100644 --- a/src/application.h +++ b/src/application.h @@ -29,13 +29,6 @@ #include #include -// Qt Includes -#include - -QT_BEGIN_NAMESPACE -class QLocalServer; -QT_END_NAMESPACE - class MainWindow; class WebView; class CookieJar; @@ -77,7 +70,6 @@ private slots: */ void postLaunch(); void openUrl(const KUrl &url); -// void newLocalSocketConnection(); private: static HistoryManager *s_historyManager; -- cgit v1.2.1