[Ktutorial-commits] SF.net SVN: ktutorial:[303] trunk/ktutorial/ktutorial-editor
Status: Alpha
Brought to you by:
danxuliu
|
From: <dan...@us...> - 2011-05-06 12:49:57
|
Revision: 303
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=303&view=rev
Author: danxuliu
Date: 2011-05-06 12:49:50 +0000 (Fri, 06 May 2011)
Log Message:
-----------
Set the event name completion as sorted and not case sensitive.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-editor/src/view/WaitForEventWidget.cpp
trunk/ktutorial/ktutorial-editor/tests/unit/view/WaitForEventWidgetTest.cpp
Modified: trunk/ktutorial/ktutorial-editor/src/view/WaitForEventWidget.cpp
===================================================================
--- trunk/ktutorial/ktutorial-editor/src/view/WaitForEventWidget.cpp 2011-05-06 12:44:36 UTC (rev 302)
+++ trunk/ktutorial/ktutorial-editor/src/view/WaitForEventWidget.cpp 2011-05-06 12:49:50 UTC (rev 303)
@@ -58,6 +58,8 @@
ui->eventNameLineEdit->setText(waitForEvent->eventName());
+ ui->eventNameLineEdit->completionObject()->setOrder(KCompletion::Sorted);
+ ui->eventNameLineEdit->completionObject()->setIgnoreCase(true);
addItemsToEventNameCompletion();
}
Modified: trunk/ktutorial/ktutorial-editor/tests/unit/view/WaitForEventWidgetTest.cpp
===================================================================
--- trunk/ktutorial/ktutorial-editor/tests/unit/view/WaitForEventWidgetTest.cpp 2011-05-06 12:44:36 UTC (rev 302)
+++ trunk/ktutorial/ktutorial-editor/tests/unit/view/WaitForEventWidgetTest.cpp 2011-05-06 12:49:50 UTC (rev 303)
@@ -77,8 +77,9 @@
WaitForEventWidget widget(&waitFor);
KCompletion* completion = eventNameLineEdit(&widget)->completionObject();
- QCOMPARE(completion->allMatches("Dest").count(), 1);
- QCOMPARE(completion->allMatches("Dest")[0], QString("Destroy"));
+ QCOMPARE(completion->order(), KCompletion::Sorted);
+ QCOMPARE(completion->allMatches("dest").count(), 1);
+ QCOMPARE(completion->allMatches("dest")[0], QString("Destroy"));
}
/////////////////////////////////// Helpers ////////////////////////////////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|