summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainview.cpp13
-rw-r--r--src/webview.cpp16
2 files changed, 16 insertions, 13 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index eb2ae732..65400ace 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -373,9 +373,9 @@ WebView *MainView::newWebView()
p.setColor(QPalette::Window, palette().color(QPalette::Base));
emptyWidget->setPalette(p);
emptyWidget->setAutoFillBackground(true);
- disconnect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
+ disconnect(this, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentChanged(int)));
addTab(emptyWidget, i18n("(Untitled)"));
- connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
+ connect(this, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentChanged(int)));
return 0;
}
@@ -401,12 +401,15 @@ WebView *MainView::newWebView()
addTab(webView, i18n("(Untitled)"));
setCurrentWidget(webView);
- // FIXME: focus on currentLineEdit just for empty pages
- currentLineEdit()->setFocus(Qt::ActiveWindowFocusReason);
+ // focus on currentLineEdit just for empty pages
+ if(webView->url().isEmpty())
+ {
+ currentLineEdit()->setFocus(Qt::ActiveWindowFocusReason);
+ }
if (count() == 1)
{
- currentChanged(currentIndex());
+ slotCurrentChanged(currentIndex());
}
emit tabsChanged();
diff --git a/src/webview.cpp b/src/webview.cpp
index 89647694..13b8fe61 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -87,14 +87,14 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
WebView *webView;
- kWarning() << "HttpStatusCodeAttribute " << request.attribute(QNetworkRequest::HttpStatusCodeAttribute, QVariant(QVariant::Int));
- kWarning() << "HttpReasonPhraseAttribute " << request.attribute(QNetworkRequest::HttpReasonPhraseAttribute, QVariant(QVariant::ByteArray));
- kWarning() << "RedirectionTargetAttribute " << request.attribute(QNetworkRequest::RedirectionTargetAttribute, QVariant(QVariant::Url));
- kWarning() << "ConnectionEncryptedAttribute " << request.attribute(QNetworkRequest::ConnectionEncryptedAttribute, QVariant(QVariant::Bool));
- kWarning() << "CacheLoadControlAttribute " << request.attribute(QNetworkRequest::CacheLoadControlAttribute, QVariant(QVariant::Int));
- kWarning() << "CacheSaveControlAttribute " << request.attribute(QNetworkRequest::CacheSaveControlAttribute, QVariant(QVariant::Bool));
- kWarning() << "SourceIsFromCacheAttribute " << request.attribute(QNetworkRequest::SourceIsFromCacheAttribute, QVariant(QVariant::Bool));
- kWarning() << "------------------------------------------------------------------";
+// kWarning() << "HttpStatusCodeAttribute " << request.attribute(QNetworkRequest::HttpStatusCodeAttribute, QVariant(QVariant::Int));
+// kWarning() << "HttpReasonPhraseAttribute " << request.attribute(QNetworkRequest::HttpReasonPhraseAttribute, QVariant(QVariant::ByteArray));
+// kWarning() << "RedirectionTargetAttribute " << request.attribute(QNetworkRequest::RedirectionTargetAttribute, QVariant(QVariant::Url));
+// kWarning() << "ConnectionEncryptedAttribute " << request.attribute(QNetworkRequest::ConnectionEncryptedAttribute, QVariant(QVariant::Bool));
+// kWarning() << "CacheLoadControlAttribute " << request.attribute(QNetworkRequest::CacheLoadControlAttribute, QVariant(QVariant::Int));
+// kWarning() << "CacheSaveControlAttribute " << request.attribute(QNetworkRequest::CacheSaveControlAttribute, QVariant(QVariant::Bool));
+// kWarning() << "SourceIsFromCacheAttribute " << request.attribute(QNetworkRequest::SourceIsFromCacheAttribute, QVariant(QVariant::Bool));
+// kWarning() << "------------------------------------------------------------------";
switch(type)
{