#!/usr/bin/env python3 """ Korrektur der Include-Pfade von Services/ParticipantManagement/ zu ParticipantManagement/ """ import os import re from pathlib import Path base_dir = Path("/home/torsten/swy/sandbox/qt-migration-legatus/qt6-after/qt6-migrated-legatus") # Alle .h und .cpp Dateien finden files = list(base_dir.rglob("*.h")) + list(base_dir.rglob("*.cpp")) count = 0 for file_path in files: try: content = file_path.read_text(encoding='utf-8') # Ersetze Services/ParticipantManagement/ durch ParticipantManagement/ new_content = content.replace( "Services/ParticipantManagement/", "ParticipantManagement/" ) if new_content != content: file_path.write_text(new_content, encoding='utf-8') count += 1 print(f"Fixed: {file_path.relative_to(base_dir)}") except Exception as e: print(f"Error processing {file_path}: {e}") print(f"\n{count} Dateien aktualisiert")