Skip to content

Commit 4451102

Browse files
committed
Resolve use of QMap::insertMulti for Qt 6
1 parent 2655e1d commit 4451102

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/svn.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ int SvnRevision::prepareTransactions()
477477
apr_hash_t *changes;
478478
SVN_ERR(svn_fs_paths_changed2(&changes, fs_root, pool));
479479

480-
QMap<QByteArray, svn_fs_path_change2_t*> map;
480+
QMultiMap<QByteArray, svn_fs_path_change2_t*> map;
481481
for (apr_hash_index_t *i = apr_hash_first(pool, changes); i; i = apr_hash_next(i)) {
482482
const void *vkey;
483483
void *value;
@@ -497,10 +497,10 @@ int SvnRevision::prepareTransactions()
497497
fflush(stderr);
498498
exit(1);
499499
}
500-
map.insertMulti(QByteArray(key), change);
500+
map.insert(QByteArray(key), change);
501501
}
502502

503-
QMapIterator<QByteArray, svn_fs_path_change2_t*> i(map);
503+
QMultiMapIterator<QByteArray, svn_fs_path_change2_t*> i(map);
504504
while (i.hasNext()) {
505505
i.next();
506506
if (exportEntry(i.key(), i.value(), changes) == EXIT_FAILURE)
@@ -975,16 +975,16 @@ int SvnRevision::recursiveDumpDir(Repository::Transaction *txn, svn_fs_t *fs, sv
975975

976976
// While we get a hash, put it in a map for sorted lookup, so we can
977977
// repeat the conversions and get the same git commit hashes.
978-
QMap<QByteArray, svn_node_kind_t> map;
978+
QMultiMap<QByteArray, svn_node_kind_t> map;
979979
for (apr_hash_index_t *i = apr_hash_first(pool, entries); i; i = apr_hash_next(i)) {
980980
const void *vkey;
981981
void *value;
982982
apr_hash_this(i, &vkey, NULL, &value);
983983
svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
984-
map.insertMulti(QByteArray(dirent->name), dirent->kind);
984+
map.insert(QByteArray(dirent->name), dirent->kind);
985985
}
986986

987-
QMapIterator<QByteArray, svn_node_kind_t> i(map);
987+
QMultiMapIterator<QByteArray, svn_node_kind_t> i(map);
988988
while (i.hasNext()) {
989989
dirpool.clear();
990990
i.next();
@@ -1043,17 +1043,17 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
10431043

10441044
// While we get a hash, put it in a map for sorted lookup, so we can
10451045
// repeat the conversions and get the same git commit hashes.
1046-
QMap<QByteArray, svn_node_kind_t> map;
1046+
QMultiMap<QByteArray, svn_node_kind_t> map;
10471047
for (apr_hash_index_t *i = apr_hash_first(pool, entries); i; i = apr_hash_next(i)) {
10481048
dirpool.clear();
10491049
const void *vkey;
10501050
void *value;
10511051
apr_hash_this(i, &vkey, NULL, &value);
10521052
svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
1053-
map.insertMulti(QByteArray(dirent->name), dirent->kind);
1053+
map.insert(QByteArray(dirent->name), dirent->kind);
10541054
}
10551055

1056-
QMapIterator<QByteArray, svn_node_kind_t> i(map);
1056+
QMultiMapIterator<QByteArray, svn_node_kind_t> i(map);
10571057
while (i.hasNext()) {
10581058
dirpool.clear();
10591059
i.next();
@@ -1271,16 +1271,16 @@ int SvnRevision::addGitIgnoreOnBranch(apr_pool_t *pool, QString key, QString pat
12711271
return EXIT_FAILURE;
12721272
}
12731273

1274-
QMap<QByteArray, svn_node_kind_t> map;
1274+
QMultiMap<QByteArray, svn_node_kind_t> map;
12751275
for (apr_hash_index_t *i = apr_hash_first(pool, entries); i; i = apr_hash_next(i)) {
12761276
const void *vkey;
12771277
void *value;
12781278
apr_hash_this(i, &vkey, NULL, &value);
12791279
svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
1280-
map.insertMulti(QByteArray(dirent->name), dirent->kind);
1280+
map.insert(QByteArray(dirent->name), dirent->kind);
12811281
}
12821282

1283-
QMapIterator<QByteArray, svn_node_kind_t> i(map);
1283+
QMultiMapIterator<QByteArray, svn_node_kind_t> i(map);
12841284
while (i.hasNext()) {
12851285
i.next();
12861286
QString entryName = key + "/" + i.key();

0 commit comments

Comments
 (0)