Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/cad/fritzing/files/patch-src_sketch_sketchwidget.cpp
27292 views
1
--- src/sketch/sketchwidget.cpp.orig 2025-10-07 13:46:45 UTC
2
+++ src/sketch/sketchwidget.cpp
3
@@ -42,6 +42,7 @@ along with Fritzing. If not, see <http://www.gnu.org/
4
#include <QRandomGenerator>
5
#include <QMimeData>
6
7
+#include <cstdint>
8
#include <limits>
9
10
#include "../items/partfactory.h"
11
@@ -1009,7 +1010,7 @@ void SketchWidget::deleteItemForCommand(long id, bool
12
13
void SketchWidget::deleteItemForCommand(long id, bool deleteModelPart, bool doEmit, bool later) {
14
ItemBase * pitem = findItem(id);
15
- // DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg((long) pitem, 0, 16) );
16
+ // DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg(static_cast<long>(reinterpret_cast<std::uintptr_t>(pitem)), 0, 16) );
17
if (pitem) {
18
deleteItem(pitem, deleteModelPart, doEmit, later);
19
}
20
@@ -1023,7 +1024,7 @@ void SketchWidget::deleteItem(ItemBase * itemBase, boo
21
void SketchWidget::deleteItem(ItemBase * itemBase, bool deleteModelPart, bool doEmit, bool later)
22
{
23
long id = itemBase->id();
24
- DebugDialog::debug(QString("delete item (2) %1 %2 %3 %4").arg(id).arg(itemBase->title()).arg(m_viewID).arg((long) itemBase, 0, 16) );
25
+ DebugDialog::debug(QString("delete item (2) %1 %2 %3 %4").arg(id).arg(itemBase->title()).arg(m_viewID).arg(static_cast<long>(reinterpret_cast<std::uintptr_t>(itemBase)), 0, 16) );
26
27
// this is a hack to try to workaround a Qt 4.7 crash in QGraphicsSceneFindItemBspTreeVisitor::visit
28
// when using a custom boundingRect, after deleting an item, it still appears on the visit list.
29
@@ -1384,7 +1385,7 @@ long SketchWidget::createWire(ConnectorItem * from, Co
30
.arg(newID)
31
.arg(fromPos.x()).arg(fromPos.y())
32
.arg(toPos.x()).arg(toPos.y())
33
- .arg(wireFlags)
34
+ .arg(wireFlags.toInt())
35
.arg(from->attachedToTitle()).arg(from->connectorSharedID())
36
.arg(to->attachedToTitle()).arg(to->connectorSharedID())
37
.arg(m_viewID)
38
39