Skip to content

Migrate to Qt6, Cmake & GitHub workflows#199

Merged
vaibhavpandeyvpz merged 17 commits into
masterfrom
VPZ/qt6
Dec 3, 2025
Merged

Migrate to Qt6, Cmake & GitHub workflows#199
vaibhavpandeyvpz merged 17 commits into
masterfrom
VPZ/qt6

Conversation

@vaibhavpandeyvpz
Copy link
Copy Markdown
Owner

@vaibhavpandeyvpz vaibhavpandeyvpz commented Dec 3, 2025

Migrate to Qt6 and CMake

Overview

This PR migrates APK Studio from Qt5 to Qt6 and from qmake to CMake build system. The project now uses modern build tooling and is compatible with the latest Qt framework.

Major Changes

Build System Migration

  • ✅ Migrated from qmake to CMake
  • ✅ Created CMakeLists.txt with proper Qt6 configuration
  • ✅ Removed apkstudio.pro and all qmake-related build scripts
  • ✅ Updated to C++17 standard (required for Qt6)

Qt5 → Qt6 Migration

  • ✅ Updated all deprecated Qt5 APIs to Qt6 equivalents:
    • Replaced QRegExp with QRegularExpression
    • Fixed QString::SkipEmptyPartsQt::SkipEmptyParts
    • Updated QFontMetrics::width()horizontalAdvance()
    • Updated QTextEdit::setTabStopWidth()setTabStopDistance()
    • Replaced QTextStream::setCodec() with setEncoding() for Qt6
    • Fixed QWheelEvent::delta()angleDelta()
    • Updated QMouseEvent constructors for Qt6 compatibility
    • Fixed QPixmap pointer access issues
  • ✅ Removed QTextCodec usage (removed in Qt6)
  • ✅ Updated qRegisterMetaType calls for Qt6

Dependencies

  • ✅ Updated QHexView submodule from v5.0.0 to v5.0.1 (Qt6 compatible)
  • ✅ Updated include paths for QHexView v5.0.1 new structure
  • ✅ Fixed QHexView API changes (document()hexDocument(), fromFile template changes)

CI/CD Modernization

  • ✅ Removed old CI configurations:
    • .travis.yml (Travis CI)
    • .appveyor.yml (AppVeyor)
    • build/linux.sh, build/osx.sh, build/windows.bat
  • ✅ Created GitHub Actions workflow (.github/workflows/build.yml):
    • Parallel builds for Windows, Linux, and macOS
    • Uses Qt 6.10.1
    • Creates distribution packages:
      • Windows: ZIP archive with windeployqt
      • Linux: AppImage using linuxdeployqt
      • macOS: DMG using macdeployqt
    • Triggers on push to master, PRs, and manual dispatch
    • Uploads build artifacts (30-day retention)

Files Changed

Added

  • CMakeLists.txt - Main CMake build configuration
  • .github/workflows/build.yml - GitHub Actions CI/CD workflow

Modified

  • sources/processutils.cpp - Removed QTextCodec, fixed SkipEmptyParts, updated qRegisterMetaType
  • sources/themedsyntaxhighlighter.cpp - Fixed SkipEmptyParts enum
  • sources/findreplacedialog.cpp - Replaced QRegExp with QRegularExpression
  • sources/mainwindow.cpp - Updated setTabStopWidth to setTabStopDistance, fontMetrics width to horizontalAdvance
  • sources/sourcecodeedit.cpp - Updated fontMetrics width to horizontalAdvance, setCodec to setEncoding, QWheelEvent::delta to angleDelta, QMouseEvent constructor
  • sources/hexedit.cpp - Updated QHexView API calls for v5.0.1
  • sources/hexedit.h - Updated include path for QHexView v5.0.1
  • sources/imageviewerwidget.cpp - Fixed QPixmap pointer access

Removed

  • apkstudio.pro - qmake project file
  • build/linux.sh - qmake build script
  • build/osx.sh - qmake build script
  • build/windows.bat - qmake build script
  • .travis.yml - Travis CI configuration
  • .appveyor.yml - AppVeyor configuration

Updated Submodules

  • QHexView - Updated to v5.0.1 (Qt6 compatible)

Testing

  • ✅ Successfully builds on Windows with MSVC 2022
  • ✅ All Qt6 API migrations verified
  • ✅ Application launches and runs correctly

Breaking Changes

  • Build system: Project now requires CMake instead of qmake
  • Qt version: Requires Qt6 (6.10.1 or compatible)
  • C++ standard: Requires C++17 compiler

Migration Notes

  • Developers need to use CMake to build the project
  • Qt6 must be installed and available in PATH or CMAKE_PREFIX_PATH
  • The GitHub Actions workflow can be used as a reference for build requirements

Benefits

  • 🚀 Modern build system (CMake is the standard for Qt6)
  • 🔄 Better CI/CD integration with GitHub Actions
  • 📦 Proper distribution packages (AppImage, DMG, ZIP)
  • 🎯 Compatible with latest Qt framework and features
  • 🛠️ Easier to maintain and extend

@vaibhavpandeyvpz vaibhavpandeyvpz merged commit 09706b3 into master Dec 3, 2025
3 checks passed
@vaibhavpandeyvpz vaibhavpandeyvpz deleted the VPZ/qt6 branch December 3, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant