|
From: <cn...@us...> - 2024-08-21 19:59:25
|
Revision: 1529
http://sourceforge.net/p/seq/svn/1529
Author: cn187
Date: 2024-08-21 19:59:22 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Fix for regex regression due to different behavior between Qt4 and Qt5/6
Modified Paths:
--------------
showeq/trunk/src/eqstr.cpp
Modified: showeq/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2024-08-21 19:59:15 UTC (rev 1528)
+++ showeq/trunk/src/eqstr.cpp 2024-08-21 19:59:22 UTC (rev 1529)
@@ -254,11 +254,11 @@
#else
if (!substFormatStringRes.isEmpty())
{
- formatString.replace(curPos-2, rxt.matchedLength()+2, substFormatStringRes);
+ formatString.replace(curPos, rxt.matchedLength(), substFormatStringRes);
}
else
{
- formatString.replace(curPos-2, rxt.matchedLength()+2, "");
+ formatString.replace(curPos, rxt.matchedLength(), "");
curPos += rxt.matchedLength(); // if no replacement string, skip over
}
@@ -293,7 +293,7 @@
// some messages contains spell names with additional delimited fields
if (sub.contains('^'))
{
- sub = sub.section("^", -1);
+ sub = sub.mid(sub.lastIndexOf('^')+1);
// they also contain an oddball apostrophe
if (sub.startsWith("'"))
sub.replace(0, 1, "");
@@ -320,17 +320,17 @@
// some messages contains spell names with additional delimited fields
if (sub.contains('^'))
{
- sub = sub.section("^", -1);
+ sub = sub.mid(sub.lastIndexOf('^')+1);
// they also contain an oddball apostrophe
if (sub.startsWith("'"))
sub.replace(0, 1, "");
}
- formatString.replace(curPos-1, rx.matchedLength()+1, argList[substArg-1]);
+ formatString.replace(curPos, rx.matchedLength(), sub);
}
else
{
//no argument for this replacement, so replace with empty string
- formatString.replace(curPos-1, rx.matchedLength()+1, "");
+ formatString.replace(curPos, rx.matchedLength(), "");
curPos += rx.matchedLength(); // if no such argument, skip over
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|