From efdb16ef3680c8b66bab7dd4b298097666651327 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Mon, 27 Jan 2025 09:56:31 +0700 Subject: [PATCH] Qt6 compatibility --- python/console/console.py | 2 +- python/console/console_editor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/console/console.py b/python/console/console.py index 0789c2e312d..3e495bc66ce 100644 --- a/python/console/console.py +++ b/python/console/console.py @@ -322,7 +322,7 @@ class PythonConsoleWidget(QWidget): self.toggleCommentEditorButton.setIcon( QgsApplication.getThemeIcon( "console/iconCommentEditorConsole.svg", - self.palette().color(QPalette.WindowText), + self.palette().color(QPalette.ColorRole.WindowText), ), ) self.toggleCommentEditorButton.setMenuRole(QAction.MenuRole.PreferencesRole) diff --git a/python/console/console_editor.py b/python/console/console_editor.py index e18e93d6a31..9503f6f92e2 100644 --- a/python/console/console_editor.py +++ b/python/console/console_editor.py @@ -263,7 +263,7 @@ class Editor(QgsCodeEditorPython): toggle_comment_action = QAction( QgsApplication.getThemeIcon( "console/iconCommentEditorConsole.svg", - self.palette().color(QPalette.WindowText), + self.palette().color(QPalette.ColorRole.WindowText), ), QCoreApplication.translate("PythonConsole", "Toggle Comment"), menu,