Reduce compiler warnings: replace qAsConst with std::as_const and update event localPos() to position()
Replaced deprecated qAsConst usages in built modules and updated QMouseEvent::localPos() to position() per Qt6 deprecation guidance.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
46e673f660
commit
8af436f09a
281 files changed
+7102
-5490
No files matched your search
@@ -0,0 +1,15 @@
|
||||
Final migration helper
|
||||
|
||||
This folder contains scripts to perform the final build and test invocation after successful Qt6.8 migration.
|
||||
|
||||
Files:
|
||||
- build.sh -> configure & build (Ninja). Pass --qt-root to override Qt location.
|
||||
- run_tests.sh -> run ctest (parallel) and the Strix per-file runner (if Strix installed).
|
||||
|
||||
Recommended use (inside the prepared Docker container):
|
||||
|
||||
./app/run_docker.sh "$PWD" -- bash -lc "./final-migration/build.sh --release && ./final-migration/run_tests.sh"
|
||||
|
||||
Notes:
|
||||
- Strix requires LLM credentials: set STRIX_LLM and LLM_API_KEY in the environment before running Strix.
|
||||
- If you want to install Strix in the container manually, activate the venv at /opt/venv and pip install strix-agent (Dockerfile already attempts to install it).
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Final build script for migrated project
|
||||
# Usage:
|
||||
# ./final-migration/build.sh [--release] [--qt-root PATH]
|
||||
# Run inside the Docker container created by ./app/run_docker.sh or on a host with Qt6 installed.
|
||||
|
||||
BUILD_TYPE=Release
|
||||
QT_ROOT=${QT_ROOT:-/opt/Qt/6.8.3/gcc_64}
|
||||
JOBS=5
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--release) BUILD_TYPE=Release; shift;;
|
||||
--debug) BUILD_TYPE=Debug; shift;;
|
||||
--qt-root) QT_ROOT="$2"; shift 2;;
|
||||
--jobs) JOBS="$2"; shift 2;;
|
||||
-j*) JOBS="${1#-j}"; shift;;
|
||||
*) echo "Unknown arg: $1"; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Using Qt root: ${QT_ROOT}"
|
||||
|
||||
mkdir -p build
|
||||
cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH="${QT_ROOT}" -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
cmake --build build -- -j${JOBS}
|
||||
# Optional: install into target prefix (uncomment when ready)
|
||||
# sudo cmake --install build --prefix /shd/CTC
|
||||
|
||||
echo "Build complete. Artifacts are in ./build"
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Run a non-interactive Strix quick scan inside an ephemeral container.
|
||||
# Expects ./.env-swy (not checked into VCS) containing STRIX/LLM credentials.
|
||||
# Mounts the repo at the same absolute path so Strix's sandbox can access it.
|
||||
|
||||
REPO_DIR="$(pwd)"
|
||||
ENV_FILE="$REPO_DIR/.env-swy"
|
||||
PY_IMAGE="python:3.12-slim"
|
||||
|
||||
if [[ ! -f "$ENV_FILE" ]]; then
|
||||
echo "Missing env file: $ENV_FILE"
|
||||
echo "Create it with STRIX_LLM, LLM_API_KEY, LLM_API_BASE (and any provider keys)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run container with host docker binary and socket mounted (required by Strix sandbox)
|
||||
# Keep container ephemeral. The container will install strix-agent on-the-fly.
|
||||
|
||||
docker run --rm -i \
|
||||
-v "$REPO_DIR":"$REPO_DIR" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /usr/bin/docker:/usr/bin/docker:ro \
|
||||
-w "$REPO_DIR" \
|
||||
--env-file "$ENV_FILE" \
|
||||
"$PY_IMAGE" bash -lc '
|
||||
set -euo pipefail
|
||||
apt-get update >/dev/null
|
||||
apt-get install -y --no-install-recommends python3-pip >/tmp/apt-install.log 2>&1
|
||||
pip3 install --no-cache-dir --upgrade pip strix-agent >/tmp/pip-install.log 2>&1
|
||||
|
||||
# Map generic LLM envs for OpenAI-compatible clients and prefer recommended model
|
||||
export OPENAI_API_KEY="${LLM_API_KEY:-}"
|
||||
export OPENAI_API_BASE="${LLM_API_BASE:-}"
|
||||
export STRIX_LLM="openai/gpt-5.4"
|
||||
|
||||
# Run Strix non-interactively; adjust --scan-mode or additional args as needed
|
||||
strix -n -t "'$REPO_DIR'" --scan-mode quick
|
||||
'
|
||||
|
||||
echo "Strix run complete (exit code reported above). Output is written by Strix into ./strix_runs/ or printed above."
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Final test invocation script
|
||||
# Usage: ./final-migration/run_tests.sh
|
||||
# Run inside Docker (recommended) or on host with test deps installed.
|
||||
|
||||
JOBS=5
|
||||
|
||||
echo "Running unit tests with ctest"
|
||||
cmake --build build --target test || true
|
||||
# Prefer ctest directly for parallel runs
|
||||
ctest --test-dir build -j ${JOBS} --output-on-failure
|
||||
|
||||
# Strix runs removed from this script by request
|
||||
# To re-enable a similar AI-driven scan, add your chosen tool's invocation here.
|
||||
|
||||
echo "All tests invoked."
|
||||
Reference in new issue
Block a user