/trunk/Scribus/scribus/CMakeLists.txt |
---|
5,7 → 5,11 |
# a custom target that is always built |
if (NOT CMAKE_VERSION VERSION_LESS "3.2.0") |
add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_MODULE_PATH}/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h) |
if (WANT_QT6) |
add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/modules/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h) |
else() |
add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_MODULE_PATH}/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h) |
endif() |
else () |
add_custom_target(svnheader ALL DEPENDS svn_header ) # svn_header is nothing more than a unique string |
# creates svnheader.h using cmake script |
/trunk/Scribus/scribus/third_party/zip/zip.cpp |
---|
543,7 → 543,7 |
while (b != e) { |
const ZippedDir& zd = b.value(); |
if (zd.files <= 0) { |
ec = createEntry(b.key(), zd.actualRoot, level); |
ec = createEntry(QFileInfo(b.key()), zd.actualRoot, level); |
} |
++b; |
} |
/trunk/Scribus/scribus/util.h |
---|
18,6 → 18,7 |
#include <QPainterPath> |
#include <QPair> |
#include <QPixmap> |
#include <QRegularExpression> |
#include <QStack> |
#include <QString> |
#include <QStringList> |
176,10 → 177,11 |
// capture the name and the index, if any |
// fred (5) |
// ^^^^ ^ (where ^ means captured) |
static QRegExp rx("^(.*)\\s+\\((\\d+)\\)$"); |
if (rx.indexIn(newName) != -1) |
static QRegularExpression rx("^(.*)\\s+\\((\\d+)\\)$"); |
QRegularExpressionMatch match = rx.match(newName); |
if (match.hasMatch()) |
{ |
QStringList matches = rx.capturedTexts(); |
QStringList matches = rx.namedCaptureGroups(); |
prefix = matches[1]; |
suffixNum = matches[2].toInt(); |
} |