diff --git a/cad/fritzing/files/patch-src_commands.cpp b/cad/fritzing/files/patch-src_commands.cpp new file mode 100644 index 000000000000..78311931faf8 --- /dev/null +++ b/cad/fritzing/files/patch-src_commands.cpp @@ -0,0 +1,25 @@ +Fix build with Qt 6.10.1. The QString::arg() method no longer accepts +implicit conversions. [1] + +[1] https://doc.qt.io/qt-6/qstring.html#arg-2 + +--- src/commands.cpp.orig 2025-10-07 13:46:45 UTC ++++ src/commands.cpp +@@ -509,7 +509,7 @@ QString FlipItemCommand::getParamString() const { + + BaseCommand::getParamString() + + QString(" id:%1 by:%2") + .arg(m_itemID) +- .arg(m_orientation); ++ .arg(static_cast(m_orientation)); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// +@@ -1830,7 +1830,7 @@ QString RotateFlipLabelCommand::getParamString() const + } + + result += QString(" id:%1 degrees:%2 orientation:%3") +- .arg(m_itemID).arg(m_degrees).arg(m_orientation); ++ .arg(m_itemID).arg(m_degrees).arg(static_cast(m_orientation)); + + return result; + } diff --git a/cad/fritzing/files/patch-src_fapplication.cpp b/cad/fritzing/files/patch-src_fapplication.cpp index 862bb95c5307..570939bce680 100644 --- a/cad/fritzing/files/patch-src_fapplication.cpp +++ b/cad/fritzing/files/patch-src_fapplication.cpp @@ -1,23 +1,23 @@ ---- src/fapplication.cpp.orig 2025-04-02 10:33:24 UTC +--- src/fapplication.cpp.orig 2025-10-07 13:46:45 UTC +++ src/fapplication.cpp -@@ -895,19 +895,7 @@ bool FApplication::loadReferenceModel(const QString & +@@ -897,19 +897,7 @@ bool FApplication::loadReferenceModel(const QString & QFileInfo info(dbPath); bool dbExists = (info.size() > 0) && !fullLoad; - - QString sha; - if (!dbExists) { - // fullLoad == true means we are creating the parts database - // so get the sha for last commit of the parts folder and store it in the database - // this sha will be used to determine whether the user's parts folder can be updated from the remote repo - sha = PartsChecker::getSha(dir.absolutePath()); - if (sha.isEmpty()) { - DebugDialog::debug(QString("1.6 SHA empty")); - return false; - } - referenceModel->setSha(sha); - } + referenceModel->setSha(""); // loads local parts, resource parts, and any other parts in files not in the db--these part override db parts with the same moduleID QString db = databaseName; diff --git a/cad/fritzing/files/patch-src_items_itembase.cpp b/cad/fritzing/files/patch-src_items_itembase.cpp index 3c9ce55a0bbc..69ff49c70d5f 100644 --- a/cad/fritzing/files/patch-src_items_itembase.cpp +++ b/cad/fritzing/files/patch-src_items_itembase.cpp @@ -1,20 +1,22 @@ ---- src/items/itembase.cpp.orig 2025-04-02 10:33:24 UTC +--- src/items/itembase.cpp.orig 2025-10-07 13:46:45 UTC +++ src/items/itembase.cpp @@ -55,6 +55,8 @@ along with Fritzing. If not, see #include +#include + ///////////////////////////////// static QRegularExpression NumberMatcher; -@@ -1999,7 +2001,7 @@ void ItemBase::debugInfo2(const QString & msg) const +@@ -2006,8 +2008,8 @@ void ItemBase::debugInfo2(const QString & msg) const + .arg(this->instanceTitle()) .arg(this->viewLayerID()) .arg(this->viewLayerPlacement()) - .arg(this->wireFlags()) +- .arg(this->wireFlags()) - .arg((long) dynamic_cast(this), 0, 16) ++ .arg(this->wireFlags().toInt()) + .arg(static_cast(reinterpret_cast(dynamic_cast(this))), 0, 16) .arg(m_viewID) .arg(this->zValue()) .arg(this->pos().x()) diff --git a/cad/fritzing/files/patch-src_items_paletteitembase.cpp b/cad/fritzing/files/patch-src_items_paletteitembase.cpp index 2d19f2a299f8..0b7469b77f42 100644 --- a/cad/fritzing/files/patch-src_items_paletteitembase.cpp +++ b/cad/fritzing/files/patch-src_items_paletteitembase.cpp @@ -1,20 +1,20 @@ ---- src/items/paletteitembase.cpp.orig 2025-04-02 10:33:24 UTC +--- src/items/paletteitembase.cpp.orig 2025-10-07 13:46:45 UTC +++ src/items/paletteitembase.cpp -@@ -626,7 +626,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLa +@@ -653,7 +653,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLa //DebugDialog::debug(QString("path: %1").arg(path)); - QString svg = svgHash.value(path + xmlName + QString(QChar(m_viewLayerPlacement)), ""); + QString svg = svgHash.value(path + xmlName + QString(QChar(static_cast(m_viewLayerPlacement))), ""); if (!svg.isEmpty()) return svg; SvgFileSplitter splitter; -@@ -657,7 +657,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLa +@@ -684,7 +684,7 @@ QString PaletteItemBase::retrieveSvg(ViewLayer::ViewLa return ""; } svg = splitter.elementString(xmlName); - svgHash.insert(path + xmlName + QString(QChar(m_viewLayerPlacement)), svg); + svgHash.insert(path + xmlName + QString(QChar(static_cast(m_viewLayerPlacement))), svg); return svg; } diff --git a/cad/fritzing/files/patch-src_model_modelbase.cpp b/cad/fritzing/files/patch-src_model_modelbase.cpp index 3424010641d4..6283f067f24f 100644 --- a/cad/fritzing/files/patch-src_model_modelbase.cpp +++ b/cad/fritzing/files/patch-src_model_modelbase.cpp @@ -1,11 +1,11 @@ ---- src/model/modelbase.cpp.orig 2025-04-02 10:33:24 UTC +--- src/model/modelbase.cpp.orig 2025-10-07 13:46:45 UTC +++ src/model/modelbase.cpp -@@ -895,7 +895,7 @@ ModelPart * ModelBase::createOldSchematicPartAux(Model +@@ -909,7 +909,7 @@ ModelPart * ModelBase::createOldSchematicPartAux(Model } QDomDocument oldDoc; QDomDocument::ParseResult parseResult = oldDoc.setContent(&newFzp); - if (!parseResult.operator bool()) { + if (!static_cast(parseResult)) { QString logMessage = QString("Parse Error: %1 at line %2, column %3 in %4") .arg(parseResult.errorMessage) .arg(parseResult.errorLine) diff --git a/cad/fritzing/files/patch-src_sketch_sketchwidget.cpp b/cad/fritzing/files/patch-src_sketch_sketchwidget.cpp index 3df0f7e521a8..744133bd3dfb 100644 --- a/cad/fritzing/files/patch-src_sketch_sketchwidget.cpp +++ b/cad/fritzing/files/patch-src_sketch_sketchwidget.cpp @@ -1,28 +1,37 @@ ---- src/sketch/sketchwidget.cpp.orig 2025-04-02 10:33:24 UTC +--- src/sketch/sketchwidget.cpp.orig 2025-10-07 13:46:45 UTC +++ src/sketch/sketchwidget.cpp @@ -42,6 +42,7 @@ along with Fritzing. If not, see - #include + #include + #include +#include #include #include "../items/partfactory.h" -@@ -998,7 +999,7 @@ void SketchWidget::deleteItemForCommand(long id, bool +@@ -1009,7 +1010,7 @@ void SketchWidget::deleteItemForCommand(long id, bool void SketchWidget::deleteItemForCommand(long id, bool deleteModelPart, bool doEmit, bool later) { ItemBase * pitem = findItem(id); - // DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg((long) pitem, 0, 16) ); + // DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg(static_cast(reinterpret_cast(pitem)), 0, 16) ); if (pitem) { deleteItem(pitem, deleteModelPart, doEmit, later); } -@@ -1012,7 +1013,7 @@ void SketchWidget::deleteItem(ItemBase * itemBase, boo +@@ -1023,7 +1024,7 @@ void SketchWidget::deleteItem(ItemBase * itemBase, boo void SketchWidget::deleteItem(ItemBase * itemBase, bool deleteModelPart, bool doEmit, bool later) { long id = itemBase->id(); - DebugDialog::debug(QString("delete item (2) %1 %2 %3 %4").arg(id).arg(itemBase->title()).arg(m_viewID).arg((long) itemBase, 0, 16) ); + DebugDialog::debug(QString("delete item (2) %1 %2 %3 %4").arg(id).arg(itemBase->title()).arg(m_viewID).arg(static_cast(reinterpret_cast(itemBase)), 0, 16) ); // this is a hack to try to workaround a Qt 4.7 crash in QGraphicsSceneFindItemBspTreeVisitor::visit // when using a custom boundingRect, after deleting an item, it still appears on the visit list. +@@ -1384,7 +1385,7 @@ long SketchWidget::createWire(ConnectorItem * from, Co + .arg(newID) + .arg(fromPos.x()).arg(fromPos.y()) + .arg(toPos.x()).arg(toPos.y()) +- .arg(wireFlags) ++ .arg(wireFlags.toInt()) + .arg(from->attachedToTitle()).arg(from->connectorSharedID()) + .arg(to->attachedToTitle()).arg(to->connectorSharedID()) + .arg(m_viewID) diff --git a/cad/fritzing/files/patch-src_utils_textutils.cpp b/cad/fritzing/files/patch-src_utils_textutils.cpp index af803869aa0d..99a153c3630e 100644 --- a/cad/fritzing/files/patch-src_utils_textutils.cpp +++ b/cad/fritzing/files/patch-src_utils_textutils.cpp @@ -1,20 +1,20 @@ ---- src/utils/textutils.cpp.orig 2025-04-02 10:33:24 UTC +--- src/utils/textutils.cpp.orig 2025-10-07 13:46:45 UTC +++ src/utils/textutils.cpp -@@ -77,7 +77,7 @@ QList PowerPrefixValues; +@@ -80,7 +80,7 @@ QList PowerPrefixValues; QList PowerPrefixes; QList PowerPrefixValues; -const QString TextUtils::PowerPrefixesString = QString("pnmkMGTu\\x%1").arg(MicroSymbolCode, 4, 16, QChar('0')); +const QString TextUtils::PowerPrefixesString = QString("pnmkMGTu\\x%1").arg(static_cast(MicroSymbolCode), 4, 16, QChar('0')); typedef QHash FixedFontsHash; -@@ -761,7 +761,7 @@ QString TextUtils::convertExtendedChars(const QString +@@ -763,7 +763,7 @@ QString TextUtils::convertExtendedChars(const QString result.append(c); } else { - result.append(QString("&#x%1;").arg(c.unicode(), 0, 16)); + result.append(QString("&#x%1;").arg(static_cast(c.unicode()), /*fieldWidth*/ 0, /*base*/ 16)); } }