┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/dolphinsearchbox.cpp')
-rw-r--r--src/search/dolphinsearchbox.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index 46ca01a4c..ae93030ac 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -26,6 +26,7 @@
#include <KLineEdit>
#include <KLocale>
#include <KSeparator>
+#include <KGlobalSettings>
#include <QButtonGroup>
#include <QDir>
@@ -41,9 +42,9 @@
#include <config-baloo.h>
#ifdef HAVE_BALOO
- #include <baloo/query.h>
- #include <baloo/term.h>
- #include <baloo/indexerconfig.h>
+ #include <Baloo/Query>
+ #include <Baloo/Term>
+ #include <Baloo/IndexerConfig>
#endif
DolphinSearchBox::DolphinSearchBox(QWidget* parent) :
@@ -287,7 +288,7 @@ void DolphinSearchBox::initButton(QToolButton* button)
button->setAutoExclusive(true);
button->setAutoRaise(true);
button->setCheckable(true);
- connect(button, SIGNAL(clicked(bool)), this, SLOT(slotConfigurationChanged()));
+ connect(button, &QToolButton::clicked, this, &DolphinSearchBox::slotConfigurationChanged);
}
void DolphinSearchBox::loadSettings()
@@ -322,7 +323,7 @@ void DolphinSearchBox::init()
closeButton->setAutoRaise(true);
closeButton->setIcon(KIcon("dialog-close"));
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
- connect(closeButton, SIGNAL(clicked()), this, SLOT(emitCloseRequest()));
+ connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest);
// Create search label
m_searchLabel = new QLabel(this);
@@ -333,10 +334,10 @@ void DolphinSearchBox::init()
m_searchInput->setClearButtonShown(true);
m_searchInput->setFont(KGlobalSettings::generalFont());
setFocusProxy(m_searchInput);
- connect(m_searchInput, SIGNAL(returnPressed(QString)),
- this, SLOT(slotReturnPressed(QString)));
- connect(m_searchInput, SIGNAL(textChanged(QString)),
- this, SLOT(slotSearchTextChanged(QString)));
+ connect(m_searchInput, static_cast<void(KLineEdit::*)(const QString&)>(&KLineEdit::returnPressed),
+ this, &DolphinSearchBox::slotReturnPressed);
+ connect(m_searchInput, &KLineEdit::textChanged,
+ this, &DolphinSearchBox::slotSearchTextChanged);
// Apply layout for the search input
QHBoxLayout* searchInputLayout = new QHBoxLayout();
@@ -377,12 +378,12 @@ void DolphinSearchBox::init()
m_facetsToggleButton = new QToolButton(this);
m_facetsToggleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
initButton(m_facetsToggleButton);
- connect(m_facetsToggleButton, SIGNAL(clicked()), this, SLOT(slotFacetsButtonToggled()));
+ connect(m_facetsToggleButton, &QToolButton::clicked, this, &DolphinSearchBox::slotFacetsButtonToggled);
m_facetsWidget = new DolphinFacetsWidget(this);
m_facetsWidget->installEventFilter(this);
m_facetsWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
- connect(m_facetsWidget, SIGNAL(facetChanged()), this, SLOT(slotFacetChanged()));
+ connect(m_facetsWidget, &DolphinFacetsWidget::facetChanged, this, &DolphinSearchBox::slotFacetChanged);
// Apply layout for the options
QHBoxLayout* optionsLayout = new QHBoxLayout();
@@ -422,7 +423,7 @@ void DolphinSearchBox::init()
m_startSearchTimer = new QTimer(this);
m_startSearchTimer->setSingleShot(true);
m_startSearchTimer->setInterval(1000);
- connect(m_startSearchTimer, SIGNAL(timeout()), this, SLOT(emitSearchRequest()));
+ connect(m_startSearchTimer, &QTimer::timeout, this, &DolphinSearchBox::emitSearchRequest);
updateFacetsToggleButton();
}
@@ -472,7 +473,7 @@ void DolphinSearchBox::fromBalooSearchUrl(const KUrl& url)
// while we adjust the search text and the facet widget.
blockSignals(true);
- const QVariantHash customOptions = query.customOptions();
+ const QVariantMap customOptions = query.customOptions();
if (customOptions.contains("includeFolder")) {
setSearchPath(customOptions.value("includeFolder").toString());
} else {
@@ -512,4 +513,3 @@ void DolphinSearchBox::updateFacetsToggleButton()
m_facetsToggleButton->setText(facetsIsVisible ? i18nc("action:button", "Fewer Options") : i18nc("action:button", "More Options"));
}
-#include "dolphinsearchbox.moc"