summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookview.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kaddressbookview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookview.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp
index 424d52a..09859c2 100644
--- a/kaddressbook/kaddressbookview.cpp
+++ b/kaddressbook/kaddressbookview.cpp
@@ -51,6 +51,22 @@ KAddressBookView::~KAddressBookView()
51{ 51{
52 kdDebug(5720) << "KAddressBookView::~KAddressBookView: destroying - " 52
53 << name() << endl;
54} 53}
55 54
55QRegExp KAddressBookView::getRegExp( const QString s )
56{
57 QRegExp re;
58
59 if ( s.length() == 3 && s.mid(1,1) == "-" ) {
60 QString pattern = "^[" + s.lower() +"]";
61 re.setCaseSensitive(false);
62 re.setPattern( pattern );
63 } else {
64 QString pattern = s.lower()+"*";
65 re.setWildcard(true); // most people understand these better.
66 re.setCaseSensitive(false);
67 re.setPattern( pattern );
68 }
69 return re;
70}
71
56void KAddressBookView::readConfig( KConfig *config ) 72void KAddressBookView::readConfig( KConfig *config )