void-packages/srcpkgs/qtcreator/patches/QTCREATORBUG-26910.diff
2022-03-03 19:29:48 +01:00

39 lines
1.5 KiB
Diff

From b3e9f24ed1c0d3c0ee4917d4b449da90e00e888a 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
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
---
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)}
{}