summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-07-31 13:24:21 +0200
committerMontel Laurent <[email protected]>2017-07-31 13:24:21 +0200
commitcf2543673928ca097a40225b30fcae4fd253ec63 (patch)
tree7c2684441bb242b5eaca1cf560cf26a5d549f233
parent16a082f140ce62be7283d937a88e32fb011d90c6 (diff)
Add list of include
-rw-r--r--src/ksieveui/widgets/autotests/includefilelineedittest.cpp1
-rw-r--r--src/ksieveui/widgets/includefilelineedit.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ksieveui/widgets/autotests/includefilelineedittest.cpp b/src/ksieveui/widgets/autotests/includefilelineedittest.cpp
index f28e83e..f45b423 100644
--- a/src/ksieveui/widgets/autotests/includefilelineedittest.cpp
+++ b/src/ksieveui/widgets/autotests/includefilelineedittest.cpp
@@ -33,6 +33,7 @@ void IncludeFileLineEditTest::shouldHaveDefaultValue()
KSieveUi::IncludeFileLineEdit w;
QCompleter *completer = w.findChild<QCompleter *>(QStringLiteral("completer"));
QVERIFY(completer);
+ QCOMPARE(completer->caseSensitivity(), Qt::CaseInsensitive);
}
QTEST_MAIN(IncludeFileLineEditTest)
diff --git a/src/ksieveui/widgets/includefilelineedit.cpp b/src/ksieveui/widgets/includefilelineedit.cpp
index c778382..843065c 100644
--- a/src/ksieveui/widgets/includefilelineedit.cpp
+++ b/src/ksieveui/widgets/includefilelineedit.cpp
@@ -18,6 +18,7 @@
*/
#include "includefilelineedit.h"
+#include <QStringListModel>
#include <QCompleter>
@@ -28,7 +29,7 @@ IncludeFileLineEdit::IncludeFileLineEdit(QWidget *parent)
{
mCompleter = new QCompleter(this);
mCompleter->setObjectName(QStringLiteral("completer"));
-
+ mCompleter->setCaseSensitivity(Qt::CaseInsensitive);
}
IncludeFileLineEdit::~IncludeFileLineEdit()
@@ -38,5 +39,5 @@ IncludeFileLineEdit::~IncludeFileLineEdit()
void IncludeFileLineEdit::setStringList(const QStringList &lst)
{
- //TODO
+ mCompleter->setModel(new QStringListModel(lst));
}