summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp40
-rw-r--r--src/mainview.cpp4
-rw-r--r--src/mainwindow.cpp7
-rw-r--r--src/mainwindow.h6
-rw-r--r--src/webview.cpp21
-rw-r--r--src/webview.h2
6 files changed, 21 insertions, 59 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 889ec51f..cc237823 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -61,48 +61,10 @@ NetworkAccessManager *Application::s_networkAccessManager = 0;
Application::Application()
: KUniqueApplication()
-// , m_localServer(0)
{
m_mainWindow = new MainWindow();
- m_mainWindow->show();
-
-// QLocalSocket socket;
-// socket.connectToServer(serverName);
-// if (socket.waitForConnected(500))
-// {
-// QTextStream stream(&socket);
-// int n = args->count();
-// if (n > 1)
-// stream << args->arg(n-1);
-// else
-// stream << QString();
-// stream.flush();
-// socket.waitForBytesWritten();
-// return;
-// }
-//
-// KApplication::setQuitOnLastWindowClosed(true);
-//
-// m_localServer = new QLocalServer(this);
-// connect(m_localServer, SIGNAL(newConnection()), this, SLOT(newLocalSocketConnection()));
-// if (!m_localServer->listen(serverName))
-// {
-// if (m_localServer->serverError() == QAbstractSocket::AddressInUseError
-// && QFile::exists(m_localServer->serverName()))
-// {
-// QFile::remove(m_localServer->serverName());
-// m_localServer->listen(serverName);
-// }
-// }
-//
-// QDesktopServices::setUrlHandler(QLatin1String("http"), this, "openUrl");
-// QString localSysName = QLocale::system().name();
-//
-// KConfig config("rekonqrc");
-// KConfigGroup group = config.group("sessions");
-// m_lastSession = group.readEntry( QString("lastSession"), QByteArray() );
-
setWindowIcon( KIcon("rekonq") );
+ m_mainWindow->show();
QTimer::singleShot(0, this, SLOT( postLaunch() ) );
}
diff --git a/src/mainview.cpp b/src/mainview.cpp
index a3030748..cb84f56b 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -48,7 +48,7 @@ MainView::MainView(QWidget *parent)
, m_recentlyClosedTabsAction(0)
, m_recentlyClosedTabsMenu(0)
, m_lineEditCompleter(0)
- , m_lineEdits(0)
+ , m_lineEdits(new QStackedWidget(this))
, m_tabBar(new TabBar(this))
{
setElideMode(Qt::ElideRight);
@@ -72,8 +72,6 @@ MainView::MainView(QWidget *parent)
// --
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
-
- m_lineEdits = new QStackedWidget(this);
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 213d3a84..07b0fb9c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -65,9 +65,12 @@
MainWindow::MainWindow()
: KXmlGuiWindow()
- , m_view( new MainView(this) )
- , m_bookmarksProvider( new BookmarksProvider(this) )
+ , m_view(0)
+ , m_bookmarksProvider(0)
{
+ m_view = new MainView(this);
+ m_bookmarksProvider = new BookmarksProvider(this);
+
// accept dnd
setAcceptDrops(true);
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 1a1d14d1..a1f4464b 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -117,18 +117,12 @@ private slots:
private:
SearchBar *m_searchBar;
FindBar *m_findBar;
-
KMenu *m_historyBackMenu;
KMenu *m_windowMenu;
-
BookmarksProvider *m_bookmarksProvider;
-
QAction *m_stopReload;
-
QString m_lastSearch;
-
MainView *m_view;
-
QString m_homePage;
};
diff --git a/src/webview.cpp b/src/webview.cpp
index 850ff54b..b90f85cc 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -111,14 +111,19 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type)
}
-QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
-{
- Q_UNUSED(url);
- Q_UNUSED(paramNames);
- Q_UNUSED(paramValues);
- QUiLoader loader;
- return loader.createWidget(classId, view());
-}
+// QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
+// {
+// kWarning() << "creating PLUGIN for rekonq ";
+// kWarning() << "classId = " << classId;
+// kWarning() << "url = " << url;
+// kWarning() << "Param Names = " << paramNames;
+// kWarning() << "Param Values = " << paramValues;
+// Q_UNUSED(url);
+// Q_UNUSED(paramNames);
+// Q_UNUSED(paramValues);
+// QUiLoader loader;
+// return loader.createWidget(classId, view());
+// }
void WebPage::handleUnsupportedContent(QNetworkReply *reply)
diff --git a/src/webview.h b/src/webview.h
index 6892fbd4..b45edc17 100644
--- a/src/webview.h
+++ b/src/webview.h
@@ -50,7 +50,7 @@ public:
protected:
bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
QWebPage *createWindow(QWebPage::WebWindowType type);
- QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
+// QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
private slots:
void handleUnsupportedContent(QNetworkReply *reply);