Author: jghali
Date: Wed May 25 05:59:07 2022
New Revision: 25092

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25092
Log:
#16797: Barcode generation not possible

Modified:
    trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp

Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=25092&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp 
(original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp Wed May 
25 05:59:07 2022
@@ -71,11 +71,9 @@
                                "(.*[\\r\\n]+)?"
                                "(%%BeginResource.*[\\r\\n]+)"
                                "% --END \\1 \\2--[\\r\\n]+",
-                               QRegularExpression::InvertedGreedinessOption);
-       QRegularExpressionMatch match = rx.match(bwipp);
-       int n = 0;
-       int pos = match.capturedStart(n);
-       while ( pos >= 0 )
+                               QRegularExpression::InvertedGreedinessOption | 
QRegularExpression::DotMatchesEverythingOption);
+
+       for (const QRegularExpressionMatch& match : rx.globalMatch(bwipp))
        {
                int len = match.capturedLength();
                QString restype = match.captured(1);
@@ -85,7 +83,7 @@
 
                resbodys[resname] = resbody;
 
-               if (restype=="ENCODER")
+               if (restype == "ENCODER")
                {
                        QRegularExpression rxhead(
                                                "% --REQUIRES (.*)--[\\r\\n]+"
@@ -105,7 +103,6 @@
                                encoderlist.append(resname);
                        }
                }
-               pos = match.capturedStart(n++);
        }
 
        foreach (const QString& enc, encoderlist)


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to