|
From: <cn...@us...> - 2024-07-26 01:47:22
|
Revision: 1500
http://sourceforge.net/p/seq/svn/1500
Author: cn187
Date: 2024-07-26 01:47:19 +0000 (Fri, 26 Jul 2024)
Log Message:
-----------
Fix for regex regression due to different behavior between Qt4 and Qt5/6
Modified Paths:
--------------
showeq/branches/cn187_devel/src/eqstr.cpp
Modified: showeq/branches/cn187_devel/src/eqstr.cpp
===================================================================
--- showeq/branches/cn187_devel/src/eqstr.cpp 2024-07-17 23:22:54 UTC (rev 1499)
+++ showeq/branches/cn187_devel/src/eqstr.cpp 2024-07-26 01:47:19 UTC (rev 1500)
@@ -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.
|