summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-10 19:20:15 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-10 19:20:15 +0200
commitdb4dbacd0b073fe561bf9f4da9b093f4be907afc (patch)
treeb1eb5744f1a1023828357eded19b6e750ab7b69a
parentnew tab has to have focusgit st (diff)
downloadrekonq-db4dbacd0b073fe561bf9f4da9b093f4be907afc.tar.xz
Fixed some wrong changes
-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)
{