diff options
author | Marco Bubke <marco.bubke@qt.io> | 2022-07-19 14:33:00 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2022-07-21 12:40:50 +0000 |
commit | 93d0b5a1d34b6dd8ff58e68c2e2daaa59a05dbb5 (patch) | |
tree | 6d9a329f7bfc83a1ab6596e8c67acc080f4ae24f /tests/unit/unittest/directorypathcompressor-test.cpp | |
parent | fdcb02d5e21cb5988078a87797de48b855eff625 (diff) | |
download | qt-creator-93d0b5a1d34b6dd8ff58e68c2e2daaa59a05dbb5.tar.gz |
Sqlite: Make the statement conversion operator id aware
Before you had to use an constructor which is has an integer as
parameter. Like
struct Foo
{
Foo{long long id} : id{id} {}
Foo{TypeId id} : id{id} {}
TypeId id;
}
Now you can write:
struct Foo
{
TypeId id;
}
With C++ 20 we can even remove more contructors.
Change-Id: I374505a037a71339b672f5f3a57b06dcf443b4bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/unit/unittest/directorypathcompressor-test.cpp')
-rw-r--r-- | tests/unit/unittest/directorypathcompressor-test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/unittest/directorypathcompressor-test.cpp b/tests/unit/unittest/directorypathcompressor-test.cpp index 99d52fab3a..21a04638ee 100644 --- a/tests/unit/unittest/directorypathcompressor-test.cpp +++ b/tests/unit/unittest/directorypathcompressor-test.cpp @@ -47,8 +47,8 @@ protected: NiceMock<MockFunction<void(const SourceContextIds &sourceContextIds)>> mockCompressorCallback; QmlDesigner::DirectoryPathCompressor<NiceMock<MockTimer>> compressor; NiceMock<MockTimer> &mockTimer = compressor.timer(); - SourceContextId sourceContextId1{1}; - SourceContextId sourceContextId2{2}; + SourceContextId sourceContextId1{SourceContextId::create(1)}; + SourceContextId sourceContextId2{SourceContextId::create(2)}; }; TEST_F(DirectoryPathCompressor, AddFilePath) |