Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c3172733 authored by Laurent Montel's avatar Laurent Montel 😁

Use LineEditWithCompleterNg

parent 173d8a95
......@@ -27,7 +27,7 @@ set(IDENTITYMANAGEMENT_LIB_VERSION "5.6.40")
set(KMAILTRANSPORT_LIB_VERSION "5.6.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.6.40")
set(LIBKDEPIM_LIB_VERSION "5.6.40")
set(PIMCOMMON_LIB_VERSION "5.6.40")
set(PIMCOMMON_LIB_VERSION "5.6.41")
set(KIMAP_LIB_VERSION "5.6.40")
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
......
......@@ -18,7 +18,7 @@
*/
#include "findbarbase.h"
#include <PimCommon/LineEditWithCompleter>
#include <PimCommon/LineEditWithCompleterNg>
#include <qicon.h>
#include <KLocalizedString>
......@@ -58,10 +58,10 @@ FindBarBase::FindBarBase(QWidget *parent)
QLabel *label = new QLabel(i18nc("Find text", "F&ind:"), this);
lay->addWidget(label);
mSearch = new PimCommon::LineEditWithCompleter(this);
mSearch = new PimCommon::LineEditWithCompleterNg(this);
mSearch->setObjectName(QStringLiteral("searchline"));
mSearch->setToolTip(i18n("Text to search for"));
mSearch->setClearButtonShown(true);
mSearch->setClearButtonEnabled(true);
label->setBuddy(mSearch);
lay->addWidget(mSearch);
......@@ -91,8 +91,7 @@ FindBarBase::FindBarBase(QWidget *parent)
connect(mFindNextBtn, &QPushButton::clicked, this, &FindBarBase::findNext);
connect(mFindPrevBtn, &QPushButton::clicked, this, &FindBarBase::findPrev);
connect(mCaseSensitiveAct, &QAction::toggled, this, &FindBarBase::caseSensitivityChanged);
connect(mSearch, &KLineEdit::textChanged, this, &FindBarBase::autoSearch);
connect(mSearch, &KLineEdit::clearButtonClicked, this, &FindBarBase::slotClearSearch);
connect(mSearch, &QLineEdit::textChanged, this, &FindBarBase::autoSearch);
mStatus = new QLabel(this);
mStatus->setObjectName(QStringLiteral("status"));
......@@ -134,11 +133,6 @@ void FindBarBase::focusAndSetCursor()
mSearch->setFocus();
}
void FindBarBase::slotClearSearch()
{
clearSelections();
}
void FindBarBase::autoSearch(const QString &str)
{
const bool isNotEmpty = (!str.isEmpty());
......@@ -188,8 +182,7 @@ void FindBarBase::searchText(bool backward, bool isAutoSearch)
void FindBarBase::addToCompletion(const QString &text)
{
KCompletion *comp = mSearch->completionObject();
comp->addItem(text);
mSearch->addCompletionItem(text);
}
void FindBarBase::findNext()
......
......@@ -27,7 +27,7 @@ class QPushButton;
class QMenu;
class QLabel;
namespace PimCommon {
class LineEditWithCompleter;
class LineEditWithCompleterNg;
}
namespace KSieveUi {
class KSIEVEUI_EXPORT FindBarBase : public QWidget
......@@ -64,14 +64,13 @@ Q_SIGNALS:
protected Q_SLOTS:
void caseSensitivityChanged(bool);
void slotHighlightAllChanged(bool);
void slotClearSearch();
protected:
QString mNotFoundString;
QString mPositiveBackground;
QString mNegativeBackground;
QString mLastSearchStr;
PimCommon::LineEditWithCompleter *mSearch;
PimCommon::LineEditWithCompleterNg *mSearch;
QAction *mCaseSensitiveAct;
QPushButton *mFindPrevBtn;
......
......@@ -17,7 +17,7 @@
*/
#include "findbarwebengineview.h"
#include <PimCommon/LineEditWithCompleter>
#include <PimCommon/LineEditWithCompleterNg>
#include <QWebEngineView>
#include <QAction>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment