Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrated to qt6 #429

Draft
wants to merge 80 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2b558bd
Reason:
wolfseifert Jan 17, 2023
feadf99
format
Murmele Oct 8, 2023
ad2a208
fix
Murmele Oct 8, 2023
7e2fec7
update openssl version to 3.0
Murmele Oct 8, 2023
2b2f5cd
fix compilation
Murmele Oct 8, 2023
ca253a8
fix compilation
Murmele Oct 8, 2023
c8df519
update github build file to support Qt6
Murmele Oct 8, 2023
3986e2a
Reason:
Murmele Oct 8, 2023
7bf3f9a
update action
Murmele Oct 8, 2023
318760f
try to remove xcbqpa
Murmele Oct 8, 2023
39e0348
use temporarly different branch from flathub with Qt6 upgrade
Murmele Oct 8, 2023
93e49b3
Wrong weekday in unittests
Murmele Oct 8, 2023
e468b2b
remove Win32 support because Qt6 does not support it anymore
Murmele Oct 8, 2023
f9ea366
add includes
Murmele Oct 8, 2023
7afb87c
try to fix compilation error on windows
Murmele Oct 31, 2023
b08b683
try to fix compilation on mac
Murmele Oct 31, 2023
706f288
fix compilation on win
Murmele Nov 1, 2023
e99a59f
fix ninja check for windows
Murmele Nov 1, 2023
57cf7c9
use always windows
Murmele Nov 1, 2023
dfb45a6
revert
Murmele Nov 1, 2023
8e467ce
revert
Murmele Nov 1, 2023
35680a2
revert and format
Murmele Nov 1, 2023
75a6d21
Merge branch 'master' into patch-gittyup-qt6
Murmele Nov 14, 2023
48a8bda
Merge remote-tracking branch 'refs/remotes/origin/master'
Murmele Nov 21, 2023
fe3f6e4
fix compilation
Murmele Nov 21, 2023
6cdd2c7
dirty fix for macos
Murmele Dec 13, 2023
f1e54d8
dirty fix for macos
0verEngineer Dec 15, 2023
936125d
Rebase to upstream master
0verEngineer Dec 15, 2023
3a38653
format
Murmele Oct 8, 2023
b8f9644
fix
Murmele Oct 8, 2023
1373928
update openssl version to 3.0
Murmele Oct 8, 2023
f99eb4a
fix compilation
Murmele Oct 8, 2023
a7bb1de
fix compilation
Murmele Oct 8, 2023
5ba277e
rebase
Murmele Oct 8, 2023
4c33bcd
Reason:
Murmele Oct 8, 2023
feac7e6
try to remove xcbqpa
Murmele Oct 8, 2023
6a77845
use temporarly different branch from flathub with Qt6 upgrade
Murmele Oct 8, 2023
00ccbc3
Wrong weekday in unittests
Murmele Oct 8, 2023
73fb281
remove Win32 support because Qt6 does not support it anymore
Murmele Oct 8, 2023
f216d4d
add includes
Murmele Oct 8, 2023
2df645b
try to fix compilation error on windows
Murmele Oct 31, 2023
9660d98
try to fix compilation on mac
Murmele Oct 31, 2023
cec89ce
fix compilation on win
Murmele Nov 1, 2023
82f09b9
fix ninja check for windows
Murmele Nov 1, 2023
c9f0db6
use always windows
Murmele Nov 1, 2023
2c93534
revert
Murmele Nov 1, 2023
16503ac
revert
Murmele Nov 1, 2023
2bb70a2
revert and format
Murmele Nov 1, 2023
dac85de
fix compilation
Murmele Nov 21, 2023
d05094b
dirty fix for macos
Murmele Dec 13, 2023
0552f31
dirty fix for macos
0verEngineer Dec 15, 2023
3e72c9e
Merge branch 'patch-gittyup-qt6' of git@github.com:wolfseifert/Gittyu…
0verEngineer Dec 15, 2023
271c7a5
Appimage build fix
0verEngineer Dec 15, 2023
2fe4f03
Potential Appimage fix
0verEngineer Dec 15, 2023
bf8fb25
Adds listing of plugins dir in appimage build step for debugging
0verEngineer Dec 15, 2023
27698df
Potential appimage build fix
0verEngineer Dec 15, 2023
29e1925
potential appimage build fix
0verEngineer Dec 16, 2023
0898973
try lowercase
Murmele Dec 23, 2023
c6cbc83
forgotten at another place as well
Murmele Dec 23, 2023
e516467
Revert "try lowercase"
Murmele Dec 23, 2023
a697e06
Revert "forgotten at another place as well"
Murmele Dec 23, 2023
b624c25
update license date
Murmele Jan 21, 2024
6281b1f
list folders
Murmele Jan 21, 2024
8b0ec9c
Reason:
Murmele Jan 21, 2024
9c349e5
format
Murmele Jan 21, 2024
a4efa04
WIP
Murmele Jan 21, 2024
6a04614
Must be so.6
Murmele Jan 21, 2024
7b12168
Disable using qt_import_plugins for UNIX again
Murmele Jan 21, 2024
00675a7
Try to change qt version without wildcard
Murmele Feb 6, 2024
37cf410
- Use qt 6.7.1 to build the project
0verEngineer Jun 14, 2024
79592fa
Merge branch 'master' into patch-gittyup-qt6
Murmele Jun 14, 2024
c63b67d
Fix formatting
0verEngineer Jun 14, 2024
57c84d7
Update insall-qt-action for the github workflows
0verEngineer Jun 14, 2024
51e22ce
Downgrade qt again because aqt-install is broken with qt 6.7.x
0verEngineer Jun 14, 2024
fb83908
Downgrade install-qt-action to match qt version
0verEngineer Jun 14, 2024
5fb5d66
qt downgrade
0verEngineer Jun 14, 2024
3803be2
fix flatpak manifest qt version
Murmele Jun 15, 2024
6bbcfdd
add missing Q_OBJECT
Murmele Jun 15, 2024
918df65
Add missing Q_OBJECT
Murmele Jun 15, 2024
c33a6c2
Revert "Add missing Q_OBJECT"
Murmele Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 25 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Clone flatpak manifest from Flathub
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
owner: 'flathub'
repository: 'com.github.Murmele.Gittyup'

# just until the new release is out
- name: Checkout restructureCMake
run: |
cd com.github.Murmele.Gittyup
git checkout Qt6

- name: Replace git tag by the commit id on which it runs
if: github.ref_type != 'tag'
run: >
Expand Down Expand Up @@ -120,11 +132,7 @@ jobs:
fail-fast: false
matrix:
qt:
- version: 5.15.2
check_only: false

- version: 5.12.0
check_only: true
- version: 6.5.3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating? Maybe it fixes the theme issues?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try it when i have some time this or next week, but i don't think it will fix our problems here, it must have something to do with the custom theme Gittyup has because default ways of theming work in every qt6 version i tried.


env:
- name: linux
Expand Down Expand Up @@ -161,23 +169,6 @@ jobs:
CXX: clang++
pack: 1

- name: win32
os: windows-latest
ninja_platform: win
qt_platform: windows
qt_arch: win32_msvc2019
qt_arch_check_only: win32_msvc2017
openssl_arch: VC-WIN32
msvc_arch: x86
cmake_flags: "-DUSE_BUNDLED_ZLIB=1"
cmake_env:
CMAKE_RC_FLAGS: "/C 1252"
CC: clang
CXX: clang++
CMAKE_C_FLAGS: -m32
CMAKE_CXX_FLAGS: -m32
pack: 1

steps:
# otherwise the testcases will fail, because signature is invalid
- name: Set git name and email
Expand Down Expand Up @@ -206,7 +197,6 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3.3.0
timeout-minutes: 10
if: "!matrix.qt.check_only"
with:
version: ${{ matrix.qt.version }}
target: desktop
Expand All @@ -215,18 +205,6 @@ jobs:
install-deps: true
modules: qtwebengine

- name: Install Qt
uses: jurplel/install-qt-action@v3.3.0
timeout-minutes: 10
if: matrix.qt.check_only
with:
version: ${{ matrix.qt.version }}
target: desktop
host: ${{ matrix.env.qt_platform }}
arch: ${{ matrix.env.qt_arch_check_only }}
install-deps: true
modules: qtwebengine

- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
with:
Expand Down Expand Up @@ -256,10 +234,6 @@ jobs:
run: |
cd dep/openssl/openssl

# this is necessary until https://github.com/openssl/openssl/issues/18720
# is fixed in OpenSSL 1.1.1r
export CFLAGS=-Wno-error=implicit-function-declaration

./Configure ${{ matrix.env.openssl_arch }} no-shared
make

Expand Down Expand Up @@ -291,7 +265,7 @@ jobs:

# Command copied from flathub build process
- name: Validate appdata file
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
if: matrix.env.ninja_platform == 'linux'
run: |
echo "Show generated appdata file"
cat ./build/release/rsrc/linux/com.github.Murmele.Gittyup.appdata.xml
Expand All @@ -302,14 +276,14 @@ jobs:
flatpak run --env=G_DEBUG=fatal-criticals org.freedesktop.appstream-glib validate ./build/release/rsrc/linux/com.github.Murmele.Gittyup.appdata.xml

- name: Publish build artifacts
if: matrix.env.pack && !matrix.qt.check_only
if: matrix.env.pack
uses: actions/upload-artifact@v3
with:
path: build/release/pack/Gittyup-*
name: Gittyup ${{ matrix.env.name }}

- name: Publish version file
if: matrix.env.pack && !matrix.qt.check_only
if: matrix.env.pack
uses: actions/upload-artifact@v3
with:
path: build/release/Version.txt
Expand All @@ -334,12 +308,12 @@ jobs:
ninja check_no_win32_offscreen

- name: Build Appimage
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
if: matrix.env.ninja_platform == 'linux'
run: |
cd build/release
sudo apt -y install appstream
sudo apt -y install libfuse2
sudo apt -y install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0
sudo apt -y install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-cursor0 libxkbcommon0 libx11-xcb1
sudo apt -y install libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb-xrm0 libxcb-xv0 libxcb-xvmc0 libxcb1

mkdir -p AppDir
Expand All @@ -352,6 +326,12 @@ jobs:

wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
echo Show QTDIR
ls $QTDIR
echo Show QTDIR plugins
ls $QTDIR/plugins
echo Show QTDIR plugins platforms
ls $QTDIR/plugins/platforms
QTDIR=$QTDIR ./appimagetool-*.AppImage -s deploy ./AppDir/usr/share/applications/*.desktop --appimage-extract-and-run # Bundle EVERYTHING

# Modify the AppDir: move ld-linux into the same directory as the payload application
Expand All @@ -365,7 +345,7 @@ jobs:
#ls -lh Gittyup-*

- name: Publish Appimage
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
if: matrix.env.ninja_platform == 'linux'
uses: actions/upload-artifact@v3
with:
path: build/release/*.AppImage
Expand Down Expand Up @@ -402,7 +382,6 @@ jobs:
automatic_release_tag: 'development'
files: |
**/artifacts/Gittyup win64/Gittyup*.exe
**/artifacts/Gittyup win32/Gittyup*.exe
**/artifacts/Gittyup macos/Gittyup*.dmg
**/artifacts/GittyupFlatpak/*.flatpak
**/artifacts/GittyupAppImage/Gittyup*.AppImage
Expand All @@ -417,7 +396,6 @@ jobs:
automatic_release_tag: ${{ github.ref_name }}
files: |
**/artifacts/Gittyup win64/Gittyup*.exe
**/artifacts/Gittyup win32/Gittyup*.exe
**/artifacts/Gittyup macos/Gittyup*.dmg
**/artifacts/GittyupFlatpak/*.flatpak
**/artifacts/GittyupAppImage/Gittyup*.AppImage
Expand Down
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,10 @@ else()
endif()

find_package(
Qt5 5.12
Qt6
COMPONENTS ${QT_MODULES} LinguistTools
REQUIRED)
if(FLATPAK)
find_package(
Qt5 5.15
COMPONENTS XcbQpa
REQUIRED)
add_compile_definitions(FLATPAK)
endif()

Expand All @@ -135,7 +131,7 @@ endif()

include(GNUInstallDirs) # Defines some variables as BINDIR, LIBDIR, ...

set(QT_TRANSLATIONS_DIR "${Qt5_DIR}/../../../translations")
set(QT_TRANSLATIONS_DIR "${Qt6_DIR}/../../../translations")
set(QT_TRANSLATIONS_DIR "/usr/share/qt/translations")

if(APPLE)
Expand All @@ -145,8 +141,8 @@ if(APPLE)
# dependencies are to the release libraries (e.g. QtGui_debug depends on
# QtCore). This causes multiple symbol definition errors at application load
# time.
get_target_property(LOCATION Qt5::${QT_MODULE} LOCATION)
set_target_properties(Qt5::${QT_MODULE} PROPERTIES IMPORTED_LOCATION_DEBUG
get_target_property(LOCATION Qt6::${QT_MODULE} LOCATION)
set_target_properties(Qt6::${QT_MODULE} PROPERTIES IMPORTED_LOCATION_DEBUG
${LOCATION})
endforeach()
endif()
Expand Down
2 changes: 1 addition & 1 deletion com.github.Murmele.Gittyup.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: com.github.Murmele.Gittyup
runtime: org.kde.Platform
runtime-version: 5.15-23.08
runtime-version: 6.7
sdk: org.kde.Sdk
command: gittyup
desktop-file-name-suffix: "" # used to create development version
Expand Down
2 changes: 1 addition & 1 deletion dep/openssl/openssl
Submodule openssl updated 9063 files
2 changes: 1 addition & 1 deletion dep/scintilla/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ target_compile_definitions(

target_include_directories(scintilla PUBLIC ${SCINTILLA_DIR}/src)

target_link_libraries(scintilla Qt5::Widgets lexilla)
target_link_libraries(scintilla Qt6::Widgets lexilla)

set_target_properties(scintilla PROPERTIES AUTOMOC ON)

Expand Down
6 changes: 3 additions & 3 deletions l10n/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/languages.cpp.inc"

if(UPDATE_TRANSLATIONS)
# FIXME: Clean removes the .ts files.
qt5_create_translation(QM_FILES ${SOURCE_FILES} ${TS_FILES})
qt6_create_translation(QM_FILES ${SOURCE_FILES} ${TS_FILES})
else()
qt5_add_translation(QM_FILES ${TS_FILES})
qt6_add_translation(QM_FILES ${TS_FILES})
endif()

add_custom_target(translations DEPENDS ${QM_FILES})
add_dependencies(gittyup translations)

add_library(translation ${LANGUAGE_SOURCE_FILE})
target_include_directories(translation PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(translation Qt5::Core)
target_link_libraries(translation Qt6::Core)

# install language files

Expand Down
25 changes: 15 additions & 10 deletions pack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ if(FLATPAK)
qt_import_plugins(gittyup INCLUDE ${QT_PLUGINS})
elseif(NOT USE_SYSTEM_QT)
foreach(QT_PLUGIN ${QT_PLUGINS})
if(NOT TARGET Qt5::${QT_PLUGIN})
if(NOT TARGET Qt6::${QT_PLUGIN})
if(UNIX OR APPLE)
continue()
endif()
endif()

get_target_property(PLUGIN Qt5::${QT_PLUGIN} LOCATION_${CMAKE_BUILD_TYPE})
get_target_property(PLUGIN Qt6::${QT_PLUGIN} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(FILE_NAME ${PLUGIN} NAME)
get_filename_component(DIR ${PLUGIN} DIRECTORY)
get_filename_component(DIR_NAME ${DIR} NAME)
Expand Down Expand Up @@ -78,11 +78,16 @@ elseif(NOT USE_SYSTEM_QT)

# Install Qt libraries.
foreach(QT_MODULE ${QT_MODULES})
get_target_property(QT_LIBRARY Qt5::${QT_MODULE}
get_target_property(QT_LIBRARY Qt6::${QT_MODULE}
LOCATION_${CMAKE_BUILD_TYPE})

if(APPLE)
get_filename_component(QT_FRAMEWORK ${QT_LIBRARY} DIRECTORY)

# FIXME: QT_LIBRARY points directly to the library bin instead of the
# symlink 2 directories above (since qt6)
string(REGEX REPLACE "/Versions/.*" "" QT_FRAMEWORK "${QT_FRAMEWORK}")

set(DEST_DIR ${CONTENTS_DIR}/Frameworks)
install(
DIRECTORY ${QT_FRAMEWORK}
Expand All @@ -102,7 +107,7 @@ elseif(NOT USE_SYSTEM_QT)
else()
# Strip minor and patch version extensions.
get_filename_component(TARGET_NAME_WE ${QT_LIBRARY} NAME_WE)
set(TARGET_NAME ${TARGET_NAME_WE}.so.5)
set(TARGET_NAME ${TARGET_NAME_WE}.so.6)
endif()

install(
Expand Down Expand Up @@ -131,8 +136,8 @@ endif()

# Install XcbQpa library.
if(UNIX AND NOT APPLE)
set(LIB_NAME libQt5XcbQpa)
get_target_property(QT_CORE_LIBRARY Qt5::Core LOCATION)
set(LIB_NAME libQt6XcbQpa)
get_target_property(QT_CORE_LIBRARY Qt6::Core LOCATION)
get_filename_component(LIB_PATH ${QT_CORE_LIBRARY} PATH)
get_filename_component(LIB_EXT ${QT_CORE_LIBRARY} EXT)

Expand All @@ -148,20 +153,20 @@ if(UNIX AND NOT APPLE)
WORLD_READ
WORLD_EXECUTE
COMPONENT ${GITTYUP_NAME}
RENAME ${LIB_NAME}.so.5)
RENAME ${LIB_NAME}.so.6)
endif()

# Install SSL libraries.
if(NOT APPLE)
if(NOT USE_SYSTEM_OPENSSL)
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SSL_LIB_SUFFIX "-1_1-x64.dll")
set(SSL_LIB_SUFFIX "-3-x64.dll")
else()
set(SSL_LIB_SUFFIX "-1_1.dll")
set(SSL_LIB_SUFFIX "-3.dll")
endif()
else()
set(SSL_LIB_SUFFIX ".so.1.1")
set(SSL_LIB_SUFFIX ".so.3")
endif()

foreach(SSL_LIB_NAME ssl crypto)
Expand Down
21 changes: 11 additions & 10 deletions src/app/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,20 @@ static LONG WINAPI exceptionFilter(PEXCEPTION_POINTERS info) {
SYSTEMTIME localTime;
GetLocalTime(&localTime);

char temp[MAX_PATH];
wchar_t temp[MAX_PATH];
GetTempPath(MAX_PATH, temp);

char dir[MAX_PATH];
StringCchPrintf(dir, MAX_PATH, "%sGittyup", temp);
wchar_t dir[MAX_PATH];
const wchar_t *gittyup_name = L"%sGittyup";
StringCchPrintf(dir, MAX_PATH, gittyup_name, temp);
CreateDirectory(dir, NULL);

char fileName[MAX_PATH];
StringCchPrintf(
fileName, MAX_PATH, "%s\\%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp",
dir, GITTYUP_NAME, GITTYUP_VERSION, localTime.wYear, localTime.wMonth,
localTime.wDay, localTime.wHour, localTime.wMinute, localTime.wSecond,
GetCurrentProcessId(), GetCurrentThreadId());
wchar_t fileName[MAX_PATH];
const wchar_t *s = L"%s\\%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp";
StringCchPrintf(fileName, MAX_PATH, s, dir, GITTYUP_NAME, GITTYUP_VERSION,
localTime.wYear, localTime.wMonth, localTime.wDay,
localTime.wHour, localTime.wMinute, localTime.wSecond,
GetCurrentProcessId(), GetCurrentThreadId());

HANDLE dumpFile =
CreateFile(fileName, GENERIC_READ | GENERIC_WRITE,
Expand Down Expand Up @@ -359,7 +360,7 @@ class CopyDataWindow : public QWindow {

protected:
virtual bool nativeEvent(const QByteArray &eventType, void *message,
long *result) Q_DECL_OVERRIDE {
qintptr *result) Q_DECL_OVERRIDE {
MSG *msg = (MSG *)message;

if (msg->message == WM_COPYDATA) {
Expand Down
Loading
Loading