Commit 229e30b8 authored by Ahmad Samir's avatar Ahmad Samir Committed by Laurent Montel
Browse files

Port away from KFontChooser deprecated constructor

parent 0f22f0bf
Pipeline #76161 passed with stage
in 9 minutes and 15 seconds
......@@ -14,6 +14,7 @@
#include "lib/checkbox.h"
#include <KFontChooser>
#include <kwidgetsaddons_version.h>
#include <QGroupBox>
#include <QLabel>
......@@ -86,7 +87,14 @@ FontColourChooser::FontColourChooser(QWidget* parent, const QStringList& fontLis
layout->addWidget(new QWidget(page)); // left adjust the widget
}
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 86, 0)
mFontChooser = new KFontChooser(KFontChooser::DisplayFrame, page);
mFontChooser->setFontListItems(fontList);
mFontChooser->setMinVisibleItems(visibleListSize);
#else
mFontChooser = new KFontChooser(page, KFontChooser::DisplayFrame, fontList, visibleListSize);
#endif
mFontChooser->installEventFilter(this); // for read-only mode
QList<QWidget*> kids = mFontChooser->findChildren<QWidget*>();
for (int i = 0, end = kids.count(); i < end; ++i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment