File c7deacf.diff of Package qt-creator
From c7deacf46a764faa9f00a3fc5afc075a44b2e737 Mon Sep 17 00:00:00 2001
From: Marco Bubke <marco.bubke@qt.io>
Date: Mon, 24 Jan 2022 14:38:29 +0100
Subject: [PATCH] QmlDesigner: Fix 32 bit
Because std::ptrdiff_t and int are the same under 32 bit the constructor
is changed to a template. The class is private so it is very unlikely
that it leads to errors.
Task-number: QTCREATORBUG-26910
Change-Id: I94c987b9b6d2f04876740ff283a339c0db056cfd
---
diff --git a/src/plugins/qmldesigner/designercore/projectstorage/storagecache.h b/src/plugins/qmldesigner/designercore/projectstorage/storagecache.h
index 747c3d9..27d2905 100644
--- a/src/plugins/qmldesigner/designercore/projectstorage/storagecache.h
+++ b/src/plugins/qmldesigner/designercore/projectstorage/storagecache.h
@@ -67,15 +67,8 @@
StorageCacheIndex(const char *) = delete;
- constexpr explicit StorageCacheIndex(int id) noexcept
- : id{id}
- {}
-
- constexpr explicit StorageCacheIndex(std::size_t id) noexcept
- : id{static_cast<int>(id)}
- {}
-
- constexpr explicit StorageCacheIndex(std::ptrdiff_t id) noexcept
+ template<typename IntegerType>
+ constexpr explicit StorageCacheIndex(IntegerType id) noexcept
: id{static_cast<int>(id)}
{}