summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-04-23 00:34:19 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-04-23 00:37:03 +0200
commitd09b430f9835fd19f9a0088a5620af20bdf36b0e (patch)
tree548cee49a6bfc5f3285be4c79ed21f2c8eed8ba1 /src/urlbar
parentClean up headers && fix compilation with (the upcoming) qt 4.8.2 (diff)
downloadrekonq-d09b430f9835fd19f9a0088a5620af20bdf36b0e.tar.xz
Fix opensearch add shortcut handling
(at least on every site tested, but opensearch.org itself. Broken?) CCBUG: 296707 Backported from master branch
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/urlbar.cpp3
-rw-r--r--src/urlbar/webshortcutwidget.cpp9
-rw-r--r--src/urlbar/webshortcutwidget.h14
3 files changed, 17 insertions, 9 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 2b4b7bf0..97a3c1c7 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -134,8 +134,7 @@ UrlBar::UrlBar(QWidget *parent)
connect(_tab->view(), SIGNAL(iconChanged()), this, SLOT(refreshFavicon()));
// search icon
- connect(rApp->opensearchManager(), SIGNAL(openSearchEngineAdded(QString,QString,QString)),
- this, SLOT(updateRightIcons()));
+ connect(rApp->opensearchManager(), SIGNAL(openSearchEngineAdded(QString)), this, SLOT(updateRightIcons()));
// bookmark icon
connect(rApp->bookmarkManager(), SIGNAL(bookmarksUpdated()), this, SLOT(updateRightIcons()));
diff --git a/src/urlbar/webshortcutwidget.cpp b/src/urlbar/webshortcutwidget.cpp
index 409d0b32..c6dc3b79 100644
--- a/src/urlbar/webshortcutwidget.cpp
+++ b/src/urlbar/webshortcutwidget.cpp
@@ -4,6 +4,7 @@
*
* Copyright (C) 2009 by Fredy Yanardi <fyanardi@gmail.com>
* Copyright (C) 2010-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -27,7 +28,7 @@
// Self Includes
#include "webshortcutwidget.h"
-#include "rekonq_defines.h"
+#include "webshortcutwidget.moc"
// KDE Includes
#include <KGlobalSettings>
@@ -113,6 +114,8 @@ void WebShortcutWidget::show(const KUrl &url, const QString &openSearchName, con
void WebShortcutWidget::accept()
{
emit webShortcutSet(m_url, m_nameLineEdit->text(), m_wsLineEdit->text());
+
+ // close widget (and destroy it)
close();
}
@@ -158,7 +161,3 @@ void WebShortcutWidget::shortcutsChanged(const QString& newShorthands)
}
}
}
-
-#include "webshortcutwidget.moc"
-
-
diff --git a/src/urlbar/webshortcutwidget.h b/src/urlbar/webshortcutwidget.h
index bc072f47..d1291714 100644
--- a/src/urlbar/webshortcutwidget.h
+++ b/src/urlbar/webshortcutwidget.h
@@ -4,6 +4,7 @@
*
* Copyright (C) 2009 by Fredy Yanardi <fyanardi@gmail.com>
* Copyright (C) 2010-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -28,15 +29,24 @@
#ifndef WEBSHORTCUTWIDGET_H
#define WEBSHORTCUTWIDGET_H
-#include <QMenu>
+
+// Rekonq Includes
+#include "rekonq_defines.h"
+
+// KDE Includes
#include <KUrl>
#include <KService>
+// Qt Includes
+#include <QMenu>
+
+// Forward Declarations
class QLabel;
class QLineEdit;
class QPushButton;
-class WebShortcutWidget : public QMenu
+
+class REKONQ_TESTS_EXPORT WebShortcutWidget : public QMenu
{
Q_OBJECT
public: