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/help/libkvihelp.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/help/libkvihelp.cpp')
| -rw-r--r-- | src/modules/help/libkvihelp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp index 4badfc0cb..32a773b35 100644 --- a/src/modules/help/libkvihelp.cpp +++ b/src/modules/help/libkvihelp.cpp @@ -28,6 +28,7 @@ #include "KviLocale.h" #include "KviModule.h" #include "KviFileUtils.h" +#include "KviRegExp.h" #include "kvi_sourcesdate.h" #include "KviApplication.h" #include "KviMainWindow.h" @@ -148,7 +149,7 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) } } - int i = g_pDocIndex->titlesList().indexOf(QRegExp(QRegExp::escape(szParam), Qt::CaseInsensitive)); + int i = g_pDocIndex->titlesList().indexOf((QRegularExpression) KviRegExp(KviRegExp::escape(szParam), KviRegExp::CaseInsensitive)); if(i != -1) { szDoc = QUrl(g_pDocIndex->documentList()[i]).toLocalFile(); @@ -157,9 +158,9 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c) else { QString szTmpDocName(".*/doc_"); - szTmpDocName.append(QRegExp::escape(szParam)); + szTmpDocName.append(KviRegExp::escape(szParam)); szTmpDocName.append("\\.html"); - i = g_pDocIndex->documentList().indexOf(QRegExp(szTmpDocName, Qt::CaseInsensitive)); + i = g_pDocIndex->documentList().indexOf((QRegularExpression) KviRegExp(szTmpDocName, KviRegExp::CaseInsensitive)); if(i != -1) { szDoc = QUrl(g_pDocIndex->documentList()[i]).toLocalFile(); |
