From afcffe4aa0104f4eea82b2d49fba24b15ee5e91f Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sun, 22 Aug 2021 23:56:50 +0200 Subject: [PATCH] Port away from deprecated KFontChooser constructor --- src/FontDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/FontDialog.cpp b/src/FontDialog.cpp index 9acda0a95..2ec33c8ba 100644 --- a/src/FontDialog.cpp +++ b/src/FontDialog.cpp @@ -13,6 +13,7 @@ // KDE #include +#include using namespace Konsole; @@ -24,7 +25,12 @@ FontDialog::FontDialog(QWidget *parent) : { setWindowTitle(i18nc("@title:window", "Select font")); +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 86, 0) + _fontChooser = new KFontChooser(KFontChooser::FixedFontsOnly, this); +#else _fontChooser = new KFontChooser(this, KFontChooser::FixedFontsOnly); +#endif + _showAllFonts = new QCheckBox(i18nc("@action:button", "Show all fonts"), this); _showAllFontsWarningButton = new QToolButton(this); _buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |