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>
This commit is contained in:
Marco Bubke
2022-07-19 14:33:00 +02:00
parent fdcb02d5e2
commit 93d0b5a1d3
15 changed files with 194 additions and 198 deletions

View File

@@ -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)