diff options
| author | 2023-10-04 11:25:05 +0200 | |
|---|---|---|
| committer | 2023-10-18 10:26:35 +0200 | |
| commit | 29e92a939647612842b2f583ce0a43dd572b1345 (patch) | |
| tree | be091f42ad1c2ff70d670bd8bba597b9bbf8aae1 /src/modules/list/ListWindow.cpp | |
| parent | Qt6 is stricter when casting numericals and chars. Add an explicit cast/conve... (diff) | |
| download | KVIrc-29e92a939647612842b2f583ce0a43dd572b1345.tar.gz KVIrc-29e92a939647612842b2f583ce0a43dd572b1345.tar.bz2 KVIrc-29e92a939647612842b2f583ce0a43dd572b1345.zip | |
Port from QRegExp (unavailable on qt6) to KviRegExp, based on QRegularExpression
Method str_kvs_fnc_split() had to be replaced with the original version, since the newer one relied on Qt5's QStringRef
Diffstat (limited to 'src/modules/list/ListWindow.cpp')
| -rw-r--r-- | src/modules/list/ListWindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/list/ListWindow.cpp b/src/modules/list/ListWindow.cpp index 4b7f9c288..39f759650 100644 --- a/src/modules/list/ListWindow.cpp +++ b/src/modules/list/ListWindow.cpp @@ -41,6 +41,7 @@ #include "KviHtmlGenerator.h" #include "KviThemedLineEdit.h" #include "KviIrcMessage.h" +#include "KviRegExp.h" #include <QTimer> #include <QHeaderView> @@ -487,7 +488,7 @@ void ListWindow::startOfList() void ListWindow::liveSearch(const QString & szText) { - QRegExp res(szText, Qt::CaseInsensitive, QRegExp::Wildcard); + KviRegExp res(szText, KviRegExp::CaseInsensitive, KviRegExp::Wildcard); ChannelTreeWidgetItem * pItem = nullptr; for(int i = 0; i < m_pTreeWidget->topLevelItemCount(); i++) @@ -525,7 +526,7 @@ void ListWindow::processData(KviIrcMessage * pMsg) else { //rfc2812 permits wildcards here (section 3.2.6) - QRegExp res(m_pParamsEdit->text(), Qt::CaseInsensitive, QRegExp::Wildcard); + KviRegExp res(m_pParamsEdit->text(), KviRegExp::CaseInsensitive, KviRegExp::Wildcard); if( res.exactMatch(pMsg->connection()->decodeText(pMsg->safeParam(1))) || res.exactMatch(pMsg->connection()->decodeText(pMsg->safeTrailing()))) { |
