File 0005-Sync-playlist-search-config-instantly.patch of Package amarok
From e44eedd6c42526d4e4cdc14d1bdf18e6660a46ac Mon Sep 17 00:00:00 2001
From: Mark Kretschmann <kretschmann@kde.org>
Date: Mon, 2 Sep 2013 12:55:42 +0200
Subject: [PATCH 1/1] Sync playlist search config instantly.
BUG: 324295
---
src/playlist/ProgressiveSearchWidget.cpp | 11 +++++------
src/playlist/ProgressiveSearchWidget.h | 5 -----
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/playlist/ProgressiveSearchWidget.cpp b/src/playlist/ProgressiveSearchWidget.cpp
index e608d9f..eaa0e30 100644
--- a/src/playlist/ProgressiveSearchWidget.cpp
+++ b/src/playlist/ProgressiveSearchWidget.cpp
@@ -147,12 +147,6 @@ ProgressiveSearchWidget::ProgressiveSearchWidget( QWidget * parent )
connect( Amarok::actionCollection()->action( "playlist_clear" ), SIGNAL(triggered()), this, SLOT(slotFilterClear()) );
}
-
-ProgressiveSearchWidget::~ProgressiveSearchWidget()
-{
- Amarok::config( "Playlist Search" ).writeEntry( "ShowOnlyMatches", m_showOnlyMatches );
-}
-
void ProgressiveSearchWidget::slotFilterChanged( const QString & filter )
{
DEBUG_BLOCK
@@ -350,6 +344,11 @@ void ProgressiveSearchWidget::slotShowOnlyMatches( bool onlyMatches )
m_showOnlyMatches = onlyMatches;
m_nextAction->setVisible( !onlyMatches );
m_previousAction->setVisible( !onlyMatches );
+
+ KConfigGroup cg = Amarok::config( "Playlist Search" );
+ cg.writeEntry( "ShowOnlyMatches", m_showOnlyMatches );
+ cg.sync();
+
emit( showOnlyMatches( onlyMatches ) );
}
diff --git a/src/playlist/ProgressiveSearchWidget.h b/src/playlist/ProgressiveSearchWidget.h
index 8e810ba..05d7468 100644
--- a/src/playlist/ProgressiveSearchWidget.h
+++ b/src/playlist/ProgressiveSearchWidget.h
@@ -52,11 +52,6 @@ public:
*/
ProgressiveSearchWidget( QWidget * parent );
- /**
- * Destructor.
- */
- ~ProgressiveSearchWidget();
-
QString currentFilter() const { return m_searchEdit->text(); }
void focusInputLine();
--
1.8.4