summaryrefslogtreecommitdiff
path: root/src/protocolhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r--src/protocolhandler.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index af2e9904..a80f0a46 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -108,6 +108,33 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
// "about" handling
if ( _url.protocol() == QLatin1String("about") )
{
+ if( _url == KUrl("about:blank") )
+ {
+ frame->setHtml( QString() );
+ return true;
+ }
+
+ if( _url == KUrl("about:home") )
+ {
+ switch(ReKonfig::newTabStartPage())
+ {
+ case 0: // favorites
+ _url = KUrl("about:favorites");
+ break;
+ case 1: // closed tabs
+ _url = KUrl("about:closedTabs");
+ break;
+ case 2: // history
+ _url = KUrl("about:history");
+ break;
+ case 3: // bookmarks
+ _url = KUrl("about:bookmarks");
+ break;
+ default: // unuseful
+ break;
+ }
+ }
+
NewTabPage p(frame);
p.generate(_url);
return true;
@@ -149,7 +176,7 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr
}
// "file" handling. This is quite trivial :)
- if(_url.protocol() == QLatin1String("file") )
+ if( _url.protocol() == QLatin1String("file") )
{
QFileInfo fileInfo( _url.path() );
if(fileInfo.isDir())