kde/H-QML: recetas Capa 1 qtshadertools/qtsvg/qtlanguageserver/qtdeclarative
De-Alpinizadas con el patrón del gate H-Qt (dinámico, wrappers zig cc/c++ en árbol de fuente, CMAKE_PREFIX_PATH=/usr para hallar qtbase sellado, examples/tests off). Deps por STEM de archivo (resolver por filename). Cadena a H-QML: qtbase(✓) → qtshadertools → qtdeclarative (+ qtsvg + qtlanguageserver). Farm desde snapshot KDE 407438750 (qtbase cache-hit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
From e635da3faf6dac654b2591204162a217a6f02766 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
||||
Date: Mon, 27 Apr 2026 10:23:44 +0200
|
||||
Subject: [PATCH 1153/1427] QQmlTableInstanceModel: refactor QModelIndex
|
||||
calculation out of QQuickTableView
|
||||
|
||||
The QQmlTableInstanceModel can derive the QModelIndex itself from the
|
||||
flat index, so there is no need for a separate object(QModelIndex)
|
||||
overload.
|
||||
|
||||
Amends de4b7283c978ca384f6c8bf9f27387158804b601
|
||||
|
||||
Pick-to: 6.11
|
||||
Change-Id: I9dfff8026ef0acca660f1211b0e453c46562985f
|
||||
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
|
||||
---
|
||||
src/qmlmodels/qqmltableinstancemodel.cpp | 31 ++++++++++--------------
|
||||
src/qmlmodels/qqmltableinstancemodel_p.h | 1 -
|
||||
src/quick/items/qquicktableview.cpp | 10 +-------
|
||||
3 files changed, 14 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/src/qmlmodels/qqmltableinstancemodel.cpp b/src/qmlmodels/qqmltableinstancemodel.cpp
|
||||
index dc73a17b78..5bc35a1190 100644
|
||||
--- a/src/qmlmodels/qqmltableinstancemodel.cpp
|
||||
+++ b/src/qmlmodels/qqmltableinstancemodel.cpp
|
||||
@@ -165,26 +165,21 @@ QObject *QQmlTableInstanceModel::object(int index, QQmlIncubator::IncubationMode
|
||||
{
|
||||
Q_ASSERT(m_delegate);
|
||||
|
||||
- QQmlDelegateModelItem *modelItem = resolveModelItem(index, QModelIndex());
|
||||
- if (!modelItem)
|
||||
- return nullptr;
|
||||
-
|
||||
- // Return the incubated object, or start an async incubation task and return nullptr for now
|
||||
- return incubateModelItemIfNeeded(modelItem, incubationMode);
|
||||
-}
|
||||
-
|
||||
-QObject *QQmlTableInstanceModel::object(const QModelIndex &modelIndex, QQmlIncubator::IncubationMode incubationMode)
|
||||
-{
|
||||
- Q_ASSERT(m_delegate);
|
||||
- Q_ASSERT(m_adaptorModel.adaptsAim());
|
||||
+ QModelIndex modelIndex;
|
||||
+ if (const QAbstractItemModel *aim = abstractItemModel()) {
|
||||
+ // A valid QModelIndex is needed for resolveModelItem() to match
|
||||
+ // items in the release cache rather than just delegate type alone.
|
||||
+ const int row = m_adaptorModel.rowAt(index);
|
||||
+ const int column = m_adaptorModel.columnAt(index);
|
||||
+ modelIndex = aim->index(row, column);
|
||||
+ }
|
||||
|
||||
- const int flatIndex = m_adaptorModel.indexAt(modelIndex.row(), modelIndex.column());
|
||||
- QQmlDelegateModelItem *modelItem = resolveModelItem(flatIndex, modelIndex);
|
||||
- if (!modelItem)
|
||||
- return nullptr;
|
||||
+ if (QQmlDelegateModelItem *modelItem = resolveModelItem(index, modelIndex)) {
|
||||
+ // Return the incubated object, or start an async incubation task and return nullptr for now
|
||||
+ return incubateModelItemIfNeeded(modelItem, incubationMode);
|
||||
+ }
|
||||
|
||||
- // Return the incubated object, or start an async incubation task and return nullptr for now
|
||||
- return incubateModelItemIfNeeded(modelItem, incubationMode);
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
QObject *QQmlTableInstanceModel::incubateModelItemIfNeeded(QQmlDelegateModelItem *modelItem, QQmlIncubator::IncubationMode incubationMode)
|
||||
diff --git a/src/qmlmodels/qqmltableinstancemodel_p.h b/src/qmlmodels/qqmltableinstancemodel_p.h
|
||||
index 23b6ef1597..a890b16a43 100644
|
||||
--- a/src/qmlmodels/qqmltableinstancemodel_p.h
|
||||
+++ b/src/qmlmodels/qqmltableinstancemodel_p.h
|
||||
@@ -86,7 +86,6 @@ public:
|
||||
const QAbstractItemModel *abstractItemModel() const override;
|
||||
|
||||
QObject *object(int index, QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested) override;
|
||||
- QObject *object(const QModelIndex &index, QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested);
|
||||
QObject *incubateModelItemIfNeeded(QQmlDelegateModelItem *modelItem, QQmlIncubator::IncubationMode incubationMode);
|
||||
void restoreFromReleasedItemsCache(QQmlDelegateModelItem *item, int newFlatIndex);
|
||||
void commitReleasedItems();
|
||||
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
|
||||
index 729d95e5f7..8e1666c4d9 100644
|
||||
--- a/src/quick/items/qquicktableview.cpp
|
||||
+++ b/src/quick/items/qquicktableview.cpp
|
||||
@@ -2826,19 +2826,11 @@ FxTableItem *QQuickTableViewPrivate::createFxTableItem(const QPoint &cell, QQmlI
|
||||
Q_Q(QQuickTableView);
|
||||
|
||||
bool ownItem = false;
|
||||
- QObject* object = nullptr;
|
||||
- const QAbstractItemModel *aim = model->abstractItemModel();
|
||||
const int modelRow = isTransposed ? logicalColumnIndex(cell.y()) : logicalRowIndex(cell.y());
|
||||
const int modelColumn = isTransposed ? logicalRowIndex(cell.x()) : logicalColumnIndex(cell.x());
|
||||
const int modelIndex = modelIndexAtCell(QPoint(modelColumn, modelRow));
|
||||
|
||||
- if (tableModel && aim) {
|
||||
- // Prefer loading via QModelIndex so that QQmlTableInstanceModel can also
|
||||
- // match recently released items by model index, not just by delegate type.
|
||||
- object = tableModel->object(aim->index(modelRow, modelColumn), incubationMode);
|
||||
- } else {
|
||||
- object = model->object(modelIndex, incubationMode);
|
||||
- }
|
||||
+ QObject *object = model->object(modelIndex, incubationMode);
|
||||
|
||||
if (!object) {
|
||||
if (model->incubationStatus(modelIndex) == QQmlIncubator::Loading) {
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# qt6-qtdeclarative 6.11.1 — QML + QtQuick + el motor JS. EL módulo del hito H-QML: Plasma es QML puro.
|
||||
# Campaña KDE (ADR 0011), Capa 1. Patrón Qt del gate H-Qt (dinámico, wrappers zig, Qt6 sellado vía
|
||||
# PREFIX_PATH). Deps por STEM de archivo (el resolver es por filename): qtbase + qtshadertools (qsb) +
|
||||
# qtsvg + qtlanguageserver (qmlls). Conserva el parche de Alpine (QQmlTableInstanceModel).
|
||||
name = "qt6-qtdeclarative"
|
||||
version = "6.11.1"
|
||||
|
||||
[source]
|
||||
tarball = "https://download.qt.io/official_releases/qt/6.11/6.11.1/submodules/qtdeclarative-everywhere-src-6.11.1.tar.xz"
|
||||
sha256 = "52e670f670b0304f534b24f98c47ceb8a41bb710464414ebc9527ec71cc86aa4"
|
||||
patches = ["0001-QQmlTableInstanceModel-refactor-QModelIndex-calculat.patch"]
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > "$ZW/cc"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" -DCMAKE_ASM_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DCMAKE_PREFIX_PATH=/usr \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin -DINSTALL_PUBLICBINDIR=bin -DINSTALL_LIBEXECDIR=lib/qt6/libexec \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 -DINSTALL_DATADIR=share/qt6 -DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
|
||||
'''
|
||||
compile = "cmake --build build"
|
||||
install = '''
|
||||
DESTDIR=/out cmake --install build
|
||||
if [ -f build/user_facing_tool_links.txt ]; then
|
||||
mkdir -p /out/usr/bin
|
||||
while read -r target name; do ln -sf "$target" "/out/$name"; done < build/user_facing_tool_links.txt
|
||||
fi
|
||||
'''
|
||||
|
||||
[deps]
|
||||
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase", "qtshadertools", "qtsvg", "qtlanguageserver"]
|
||||
@@ -0,0 +1,35 @@
|
||||
# qt6-qtlanguageserver 6.11.1 — implementación del protocolo LSP (usada por qmlls). Dep de
|
||||
# qtdeclarative. Campaña KDE (ADR 0011), Capa 1. Módulo sin GUI (sólo Core). Patrón Qt del gate H-Qt.
|
||||
name = "qt6-qtlanguageserver"
|
||||
version = "6.11.1"
|
||||
|
||||
[source]
|
||||
tarball = "https://download.qt.io/official_releases/qt/6.11/6.11.1/submodules/qtlanguageserver-everywhere-src-6.11.1.tar.xz"
|
||||
sha256 = "50008537f2ca54abb3b8dc3f26759864e9cad2b2ad39e92e42fa718de2dd8aef"
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > "$ZW/cc"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" -DCMAKE_ASM_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DCMAKE_PREFIX_PATH=/usr \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin -DINSTALL_PUBLICBINDIR=bin -DINSTALL_LIBEXECDIR=lib/qt6/libexec \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 -DINSTALL_DATADIR=share/qt6 -DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
|
||||
'''
|
||||
compile = "cmake --build build"
|
||||
install = "DESTDIR=/out cmake --install build"
|
||||
|
||||
[deps]
|
||||
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase"]
|
||||
@@ -0,0 +1,43 @@
|
||||
# qt6-qtshadertools 6.11.1 — condicionador de shaders (qsb) + APIs. Dep de qtdeclarative (QML).
|
||||
# Campaña KDE (ADR 0011), Capa 1. Patrón de-Alpinización Qt del gate H-Qt: link DINÁMICO, wrappers
|
||||
# zig cc/c++ en el árbol de fuente (CMake canonicaliza el symlink), CMAKE_PREFIX_PATH=/usr para hallar
|
||||
# el Qt6 sellado, examples/tests off. Linkea contra qtbase .so ⇒ sin la fricción static-PIC de qtbase.
|
||||
name = "qt6-qtshadertools"
|
||||
version = "6.11.1"
|
||||
|
||||
[source]
|
||||
tarball = "https://download.qt.io/official_releases/qt/6.11/6.11.1/submodules/qtshadertools-everywhere-src-6.11.1.tar.xz"
|
||||
sha256 = "2075052f9b23bcf9de045bbd180037084942f82cce870aab14a1454902c982fc"
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > "$ZW/cc"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" -DCMAKE_ASM_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DCMAKE_PREFIX_PATH=/usr \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin -DINSTALL_PUBLICBINDIR=bin -DINSTALL_LIBEXECDIR=lib/qt6/libexec \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 -DINSTALL_DATADIR=share/qt6 -DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
|
||||
'''
|
||||
compile = "cmake --build build"
|
||||
install = '''
|
||||
DESTDIR=/out cmake --install build
|
||||
if [ -f build/user_facing_tool_links.txt ]; then
|
||||
mkdir -p /out/usr/bin
|
||||
while read -r target name; do ln -sf "$target" "/out/$name"; done < build/user_facing_tool_links.txt
|
||||
fi
|
||||
'''
|
||||
|
||||
[deps]
|
||||
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase"]
|
||||
@@ -0,0 +1,35 @@
|
||||
# qt6-qtsvg 6.11.1 — soporte SVG (QtSvg). Dep de qtdeclarative y de temas/iconos KDE. Campaña KDE
|
||||
# (ADR 0011), Capa 1. Patrón Qt del gate H-Qt (dinámico, wrappers zig, Qt6 sellado vía PREFIX_PATH).
|
||||
name = "qt6-qtsvg"
|
||||
version = "6.11.1"
|
||||
|
||||
[source]
|
||||
tarball = "https://download.qt.io/official_releases/qt/6.11/6.11.1/submodules/qtsvg-everywhere-src-6.11.1.tar.xz"
|
||||
sha256 = "7f3cf02f4824bf03c2c5859ea6db173bf1482a1daf24e6cdf7bc78cfa26a8a94"
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > "$ZW/cc"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" -DCMAKE_ASM_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DCMAKE_PREFIX_PATH=/usr \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin -DINSTALL_PUBLICBINDIR=bin -DINSTALL_LIBEXECDIR=lib/qt6/libexec \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 -DINSTALL_DATADIR=share/qt6 -DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
|
||||
'''
|
||||
compile = "cmake --build build"
|
||||
install = "DESTDIR=/out cmake --install build"
|
||||
|
||||
[deps]
|
||||
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase"]
|
||||
Reference in New Issue
Block a user