diff --git a/krusader/Locate/locate.h b/krusader/Locate/locate.h --- a/krusader/Locate/locate.h +++ b/krusader/Locate/locate.h @@ -28,7 +28,8 @@ #include #include -#include + +#include "../GUI/krhistorycombobox.h" class KProcess; class KrTreeWidget; @@ -40,6 +41,7 @@ public: explicit LocateDlg(QWidget *parent); + ~LocateDlg() override; static LocateDlg *LocateDialog; @@ -80,7 +82,7 @@ QString pattern; - KHistoryComboBox *locateSearchFor; + KrHistoryComboBox *locateSearchFor; KrTreeWidget *resultList; QString remaining; QTreeWidgetItem *lastItem; diff --git a/krusader/Locate/locate.cpp b/krusader/Locate/locate.cpp --- a/krusader/Locate/locate.cpp +++ b/krusader/Locate/locate.cpp @@ -134,7 +134,7 @@ QLabel *label = new QLabel(i18n("Search for:"), hboxWidget); hbox->addWidget(label); - locateSearchFor = new KHistoryComboBox(false, hboxWidget); + locateSearchFor = new KrHistoryComboBox(false, hboxWidget); locateSearchFor->setMinimumContentsLength(10); hbox->addWidget(locateSearchFor); @@ -238,6 +238,13 @@ LocateDialog = this; } +LocateDlg::~LocateDlg() +{ + KConfigGroup group(krConfig, "Locate"); + group.writeEntry("Search For", locateSearchFor->historyItems()); +} + + void LocateDlg::slotFeedStop() /* The stop / feed to listbox button */ { if (isFeedToListBox) @@ -271,9 +278,8 @@ void LocateDlg::slotLocate() /* The locate button */ { locateSearchFor->addToHistory(locateSearchFor->currentText()); - QStringList list = locateSearchFor->historyItems(); + KConfigGroup group(krConfig, "Locate"); - group.writeEntry("Search For", list); group.writeEntry("Don't Search In Path", dontSearchPath = dontSearchInPath->isChecked()); group.writeEntry("Existing Files", onlyExist = existingFiles->isChecked()); group.writeEntry("Case Sensitive", isCs = caseSensitive->isChecked());