summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.cpp10
-rw-r--r--src/mainwindow.cpp9
-rw-r--r--src/rekonqui.rc3
3 files changed, 10 insertions, 12 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index 2c225fb1..568759a8 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -62,16 +62,6 @@ void BookmarkOwner::openBookmark(const KBookmark & bookmark,
Q_UNUSED(mouseButtons)
Q_UNUSED(keyboardModifiers)
- // FIXME this is workaround for double call issue
- // When middle mouse button is clicked this method is called twice
- static bool isDouble = false;
- if (isDouble)
- {
- isDouble = false;
- return;
- }
- //--
-
emit openUrl(bookmark.url());
}
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;
diff --git a/src/rekonqui.rc b/src/rekonqui.rc
index d0372711..4598f097 100644
--- a/src/rekonqui.rc
+++ b/src/rekonqui.rc
@@ -98,7 +98,8 @@
<!-- ============ Bookmarks ToolBar =========== -->
<ToolBar name="bookmarksToolBar" fullWidth="true" iconText="icontextright" iconSize="16" newline="true" hidden="true" noEdit="true">
-<text>Bookmark Toolbar</text>
+ <text>Bookmark Toolbar</text>
+ <Action noEdit="true" name="bookmarks_bar" />
</ToolBar>
</gui>