Skip to content

Commit

Permalink
Fix qt6 build
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 22, 2024
1 parent 9fa38c5 commit 2f7c939
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions source/Makefile.deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,6 @@ FRONTEND_TYPE = 5
endif
endif

ifneq ($(PYUIC5)$(PYRCC5),)
PYRCC ?= $(PYRCC5)
PYUIC ?= $(PYUIC5)
else ifneq ($(PYUIC6),)
PYRCC ?= $(RCC_QT6) -g python
PYUIC ?= $(PYUIC6)
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set Qt tools, part2

Expand All @@ -384,13 +376,17 @@ ifeq ($(FRONTEND_TYPE),5)
MOC = $(MOC_QT5)
RCC = $(RCC_QT5)
UIC = $(UIC_QT5)
PYRCC ?= $(PYRCC5)
PYUIC ?= $(PYUIC5)
HAVE_THEME = $(HAVE_QT5)
QT_CXX_FLAGS = $(QT5_CXX_FLAGS)
QT_LINK_FLAGS = $(QT5_LINK_FLAGS)
else ifeq ($(FRONTEND_TYPE),6)
MOC = $(MOC_QT6)
RCC = $(RCC_QT6)
UIC = $(UIC_QT6)
PYRCC ?= $(RCC_QT6) -g python
PYUIC ?= $(PYUIC6)
HAVE_THEME = $(HAVE_QT6)
QT_CXX_FLAGS = $(QT6_CXX_FLAGS)
QT_LINK_FLAGS = $(QT6_LINK_FLAGS)
Expand Down
4 changes: 4 additions & 0 deletions source/frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ else
endif

resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg $(RESDIR)/*/*.svgz
ifeq ($(FRONTEND_TYPE),6)
$(PYRCC) $< | sed -e 's/PySide6/PyQt6/' > $@
else
$(PYRCC) $< -o $@
endif

test: $(OBJS) $(LIBS) test.cpp
@echo "Linking test"
Expand Down
2 changes: 0 additions & 2 deletions source/frontend/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
QStyle,
)

# TODO fill up everything else

Qt.AlignCenter = Qt.AlignmentFlag.AlignCenter
Qt.AlignLeft = Qt.AlignmentFlag.AlignLeft

Expand Down

0 comments on commit 2f7c939

Please sign in to comment.