Add some more make_unique calls
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 27 May 2020 18:00:11 +0000 (20:00 +0200)
committerCamila <smayres@gmail.com>
Thu, 4 Jun 2020 06:44:05 +0000 (08:44 +0200)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
.clang-tidy
test/syncenginetestutils.h

index 5d611df00822febd836a63c3e02cbecb2b3d5811..311e66d9e7aec6a81cda92e4fbef09a5c6908f12 100644 (file)
@@ -1,6 +1,6 @@
 Checks: '-*,
     cppcoreguidelines-init-variables,
-    modernize-make-shared,
+    modernize-make-*,
     modernize-redundant-void-arg,
     modernize-replace-*,
     modernize-return-braced-init-list,
index 4a436569a2e557cac1750a7f0e0eedcd00c7cd19..17889a1a7afec6b3375ba7f0e277a8f40e7329c7 100644 (file)
@@ -17,6 +17,8 @@
 #include <QNetworkReply>
 #include <QMap>
 #include <QtTest>
+#include <memory>
+
 
 /*
  * TODO: In theory we should use QVERIFY instead of Q_ASSERT for testing, but this
@@ -895,8 +897,8 @@ public:
         _account->setCredentials(new FakeCredentials{_fakeQnam});
         _account->setDavDisplayName("fakename");
 
-        _journalDb.reset(new OCC::SyncJournalDb(localPath() + "._sync_test.db"));
-        _syncEngine.reset(new OCC::SyncEngine(_account, localPath(), "", _journalDb.get()));
+        _journalDb = std::make_unique<OCC::SyncJournalDb>(localPath() + "._sync_test.db");
+        _syncEngine = std::make_unique<OCC::SyncEngine>(_account, localPath(), "", _journalDb.get());
 
         // A new folder will update the local file state database on first sync.
         // To have a state matching what users will encounter, we have to a sync