[LyX/master] FindAdv: Amend 4125f6a9

Kornel Benko kornel at lyx.org
Sun Apr 3 15:34:51 UTC 2022


commit c559b69fe1d37471b840857baba952482995c97d
Author: Kornel Benko <kornel at lyx.org>
Date:   Sun Apr 3 18:05:15 2022 +0200

    FindAdv: Amend 4125f6a9
    
    Variables regexError and regexError only defined
    when searching via QT-version >= 5
---
 src/lyxfind.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index bd76966..5ceb345 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -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) {


More information about the lyx-cvs mailing list