Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d3579f4

Browse files
committed
Resolve use of Qstring::remove(const QRegExp &) for Qt 6
1 parent 41fe9c3 commit d3579f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/svn.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,11 @@ int SvnRevision::fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char
13221322
*ignore = QString(prop->data);
13231323
// remove patterns with slashes or backslashes,
13241324
// they didn't match anything in Subversion but would in Git eventually
1325+
#if QT_VERSION >= 0x060000
1326+
*ignore = QRegExp("^[^\\r\\n]*[\\\\/][^\\r\\n]*(?:[\\r\\n]|$)|[\\r\\n][^\\r\\n]*[\\\\/][^\\r\\n]*(?=[\\r\\n]|$)").removeIn(*ignore);
1327+
#else
13251328
ignore->remove(QRegExp("^[^\\r\\n]*[\\\\/][^\\r\\n]*(?:[\\r\\n]|$)|[\\r\\n][^\\r\\n]*[\\\\/][^\\r\\n]*(?=[\\r\\n]|$)"));
1329+
#endif
13261330
// add a slash in front to have the same meaning in Git of only working on the direct children
13271331
#if QT_VERSION >= 0x060000
13281332
*ignore = QRegExp("(^|[\\r\\n])\\s*(?![\\r\\n]|$)").replaceIn(*ignore, "\\1/");
@@ -1343,7 +1347,11 @@ int SvnRevision::fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char
13431347
QString global_ignore = QString(prop->data);
13441348
// remove patterns with slashes or backslashes,
13451349
// they didn't match anything in Subversion but would in Git eventually
1350+
#if QT_VERSION >= 0x060000
1351+
global_ignore = QRegExp("^[^\\r\\n]*[\\\\/][^\\r\\n]*(?:[\\r\\n]|$)|[\\r\\n][^\\r\\n]*[\\\\/][^\\r\\n]*(?=[\\r\\n]|$)").removeIn(global_ignore);
1352+
#else
13461353
global_ignore.remove(QRegExp("^[^\\r\\n]*[\\\\/][^\\r\\n]*(?:[\\r\\n]|$)|[\\r\\n][^\\r\\n]*[\\\\/][^\\r\\n]*(?=[\\r\\n]|$)"));
1354+
#endif
13471355
if (!global_ignore.trimmed().isEmpty()) {
13481356
ignore->append(global_ignore);
13491357
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /