diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-27 00:20:26 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-27 00:20:26 +0200 |
commit | 53a8bd0bd87c1fb417d7206a1494534d5fa48cc2 (patch) | |
tree | 7b813338b1e4f4a5718bae0b1a4ad7e55c370214 /src/mainwindow.cpp | |
parent | fixing settings menu (diff) | |
download | rekonq-53a8bd0bd87c1fb417d7206a1494534d5fa48cc2.tar.xz |
bookmarks fixes
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fe22f328..78995855 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -115,8 +115,11 @@ MainWindow::MainWindow() // update toolbar actions connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions())); connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions())); - // -------------------------------------- + // bookmarks loading + connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); + + slotUpdateWindowTitle(); // then, setup our actions @@ -396,10 +399,12 @@ KUrl MainWindow::guessUrlFromString(const QString &string) // Check if it looks like a qualified URL. Try parsing it and see. bool hasSchema = test.exactMatch(urlStr); + if (hasSchema) { QUrl qurl(urlStr, QUrl::TolerantMode); KUrl url(qurl); + if (url.isValid()) { return url; @@ -417,12 +422,14 @@ KUrl MainWindow::guessUrlFromString(const QString &string) if (!hasSchema) { int dotIndex = urlStr.indexOf(QLatin1Char('.')); + if (dotIndex != -1) { QString prefix = urlStr.left(dotIndex).toLower(); QString schema = (prefix == QLatin1String("ftp")) ? prefix : QLatin1String("http"); QUrl qurl(schema + QLatin1String("://") + urlStr, QUrl::TolerantMode); KUrl url(qurl); + if (url.isValid()) { return url; |