diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks.cpp | 2 | ||||
-rw-r--r-- | src/cookiejar.cpp | 2 | ||||
-rw-r--r-- | src/lineedit.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/mainview.cpp | 4 | ||||
-rw-r--r-- | src/mainwindow.cpp | 7 | ||||
-rw-r--r-- | src/networkaccessmanager.cpp | 17 | ||||
-rw-r--r-- | src/networkaccessmanager.h | 6 | ||||
-rw-r--r-- | src/settings.cpp | 5 | ||||
-rw-r--r-- | src/webview.cpp | 2 |
10 files changed, 39 insertions, 9 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index c9db4a9b..a1f0e441 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -261,6 +261,8 @@ void BookmarkProvider::contextMenu(const QPoint &point) if (!action) return; KMenu *menu = m_bookmarkMenu->viewContextMenu(action); + if (!menu) + return; menu->popup(m_bookmarkToolBar->mapToGlobal(point)); } diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp index bef1c51c..5160d6ed 100644 --- a/src/cookiejar.cpp +++ b/src/cookiejar.cpp @@ -68,7 +68,6 @@ QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const if (reply.isValid()) { cookieList << reply.value().toUtf8(); - //kDebug() << reply.value(); } else { @@ -87,7 +86,6 @@ bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, cons cookieHeader = "Set-Cookie: "; cookieHeader += cookie.toRawForm(); m_kcookiejar->call("addCookies", url.toString(), cookieHeader, m_windowId); - //kDebug() << "url: " << url.host() << ", cookie: " << cookieHeader; } return !m_kcookiejar->lastError().isValid(); diff --git a/src/lineedit.cpp b/src/lineedit.cpp index 186ac143..b691e090 100644 --- a/src/lineedit.cpp +++ b/src/lineedit.cpp @@ -45,6 +45,7 @@ LineEdit::LineEdit(QWidget* parent) setMinimumWidth(200); setFocusPolicy(Qt::WheelFocus); setHandleSignals(true); + setClearButtonShown(true); } diff --git a/src/main.cpp b/src/main.cpp index 092c03c8..7840fa9c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,7 @@ static const char description[] = I18N_NOOP("WebKit based Web Browser for KDE"); -static const char version[] = "0.1.97"; +static const char version[] = "0.1.98"; int main(int argc, char **argv) diff --git a/src/mainview.cpp b/src/mainview.cpp index b8d063b8..efabf0f1 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -367,6 +367,10 @@ WebView *MainView::webView(int index) const } +// FIXME (0.3 target, after OneUrlBar). Divide in 2 functions: +// 1. the slot void newTab() to create a "new empty focused tab" +// 2. the public method WebView *newWebView() to just create a new webview +// without working with the focus and loading an url WebView *MainView::newTab(bool focused) { // line edit diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4ed885bc..3ac46a1b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -176,13 +176,18 @@ void MainWindow::postLaunch() connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &))); // bookmarks loading - connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)), Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&))); + connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)), + Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&))); // setting up toolbars to NOT have context menu enabled setContextMenuPolicy(Qt::DefaultContextMenu); // accept d'n'd setAcceptDrops(true); + + const qlonglong winId = window()->winId(); + Application::cookieJar()->setWindowId(winId); + Application::networkAccessManager()->metaData().insert("window-id", QString::number(winId)); } diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 32bc15b5..a06b20aa 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -202,3 +202,20 @@ void NetworkAccessManager::slotSSLErrors(QNetworkReply *reply, const QList<QSslE reply->ignoreSslErrors(); } #endif + + +KIO::MetaData& NetworkAccessManager::metaData() +{ + return m_metaData; +}; + + +QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData) +{ + // FIXME: rude hack. Waiting for a real POST behaviour fix ;) + if(op == PostOperation) + { + return QNetworkAccessManager::createRequest(op,req,outgoingData); + } + return AccessManager::createRequest(op,req,outgoingData); +} diff --git a/src/networkaccessmanager.h b/src/networkaccessmanager.h index 1eea9a0d..a6c264f2 100644 --- a/src/networkaccessmanager.h +++ b/src/networkaccessmanager.h @@ -48,12 +48,15 @@ class NetworkAccessManager : public RekonqAccessManager public: NetworkAccessManager(QObject *parent = 0); - + KIO::MetaData& metaData(); void resetDiskCache(); public slots: void loadSettings(); +protected: + virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0); + private slots: void authenticationRequired(QNetworkReply *reply, QAuthenticator *auth); void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth); @@ -64,6 +67,7 @@ private slots: private: QNetworkDiskCache *m_diskCache; + KIO::MetaData m_metaData; }; #endif // NETWORKACCESSMANAGER_H diff --git a/src/settings.cpp b/src/settings.cpp index b5316ff5..51281379 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -121,7 +121,7 @@ Private::Private(SettingsDialog *parent) pageItem = parent->addPage(ebrowsingModule, i18n(ebrowsingInfo.moduleName().toLocal8Bit())); pageItem->setIcon(KIcon(ebrowsingInfo.icon())); - parent->setMinimumSize(800,550); + parent->setMinimumSize(800,500); } @@ -146,7 +146,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons())); connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings())); - + connect(this, SIGNAL(okClicked()), this, SLOT(saveSettings())); + setWebSettingsToolTips(); } diff --git a/src/webview.cpp b/src/webview.cpp index dca8b6fb..75dc0979 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -36,8 +36,6 @@ #include "application.h" #include "mainwindow.h" #include "mainview.h" -#include "cookiejar.h" -#include "networkaccessmanager.h" #include "history.h" #include "webpage.h" |