]> git.lyx.org Git - features.git/commitdiff
FindAdv: Amend 4125f6a9
authorKornel Benko <kornel@lyx.org>
Sun, 3 Apr 2022 16:05:15 +0000 (18:05 +0200)
committerKornel Benko <kornel@lyx.org>
Sun, 3 Apr 2022 16:05:15 +0000 (18:05 +0200)
Variables regexError and regexError only defined
when searching via QT-version >= 5

src/lyxfind.cpp

index bd76966e4b619e9b38e910edb314426bac13b639..5ceb345e60bdde95f5c50aab78cb36d1b8498781 100644 (file)
@@ -3436,12 +3436,12 @@ static bool previous_single_replace = true;
 
 void MatchStringAdv::CreateRegexp(FindAndReplaceOptions const & opt, string regexp_str, string regexp2_str, string par_as_string)
 {
+#if QTSEARCH
        if (regexp_str.empty() || regexp2_str.empty()) {
                regexIsValid = false;
                regexError = "Invalid empty regex";
                return;
        }
-#if QTSEARCH
        // Handle \w properly
        QRegularExpression::PatternOptions popts = QRegularExpression::UseUnicodePropertiesOption | QRegularExpression::MultilineOption;
        if (! opt.casesensitive) {