summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-08 06:53:26 +0200
committerMontel Laurent <[email protected]>2017-08-08 06:53:26 +0200
commitc3172733c8baa7ebf4953aa890ba95bc0ecb118f (patch)
tree419851918423042a0e389417f7b339a38c27754b
parent173d8a951a9ee3acccce1cbd6cb41fd6ea0d5a06 (diff)
Use LineEditWithCompleterNg
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/ksieveui/editor/webengine/findbar/findbarbase.cpp17
-rw-r--r--src/ksieveui/editor/webengine/findbar/findbarbase.h5
-rw-r--r--src/ksieveui/editor/webengine/findbar/findbarwebengineview.cpp2
4 files changed, 9 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0f87076..4342ce1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/src/ksieveui/editor/webengine/findbar/findbarbase.cpp b/src/ksieveui/editor/webengine/findbar/findbarbase.cpp
index 94cbff6..4eb091e 100644
--- a/src/ksieveui/editor/webengine/findbar/findbarbase.cpp
+++ b/src/ksieveui/editor/webengine/findbar/findbarbase.cpp
@@ -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()
diff --git a/src/ksieveui/editor/webengine/findbar/findbarbase.h b/src/ksieveui/editor/webengine/findbar/findbarbase.h
index 3d0c333..4d4001e 100644
--- a/src/ksieveui/editor/webengine/findbar/findbarbase.h
+++ b/src/ksieveui/editor/webengine/findbar/findbarbase.h
@@ -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;
diff --git a/src/ksieveui/editor/webengine/findbar/findbarwebengineview.cpp b/src/ksieveui/editor/webengine/findbar/findbarwebengineview.cpp
index e48ac22..8e1a420 100644
--- a/src/ksieveui/editor/webengine/findbar/findbarwebengineview.cpp
+++ b/src/ksieveui/editor/webengine/findbar/findbarwebengineview.cpp
@@ -17,7 +17,7 @@
*/
#include "findbarwebengineview.h"
-#include <PimCommon/LineEditWithCompleter>
+#include <PimCommon/LineEditWithCompleterNg>
#include <QWebEngineView>
#include <QAction>