Commit 5696ec94 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Enable KMessageWidget word-wrapping if kwidgetsaddons >= 5.29

KWidgetsAddons 5.29 has an important fix for word-wrapping in KMessageWidget.
So we enable word-wrapping only if the version detected at runtime is 5.29 or higher.

Differential Revision: D3409
parent 5e3906cc
......@@ -33,6 +33,7 @@
#include <KColorScheme>
#include <KPluginMetaData>
#include <kwidgetsaddons_version.h>
#include <QMimeDatabase>
......@@ -58,6 +59,11 @@ CompressionOptionsWidget::CompressionOptionsWidget(QWidget *parent,
// Convert from kilobytes.
volumeSizeSpinbox->setValue(static_cast<double>(m_opts.volumeSize()) / 1024);
}
// KWidgetsAddons 5.29 fixes KMessageWidget word-wrapping.
if (KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 29, 0)) {
warningMsgWidget->setWordWrap(true);
}
}
CompressionOptions CompressionOptionsWidget::commpressionOptions() const
......
......@@ -56,6 +56,7 @@
#include <KStandardGuiItem>
#include <KToggleAction>
#include <KLocalizedString>
#include <kwidgetsaddons_version.h>
#include <KXMLGUIFactory>
#include <QAction>
......@@ -123,7 +124,10 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args)
m_commentBox->setLayout(vbox);
m_messageWidget = new KMessageWidget(parentWidget);
m_messageWidget->setWordWrap(true);
// KWidgetsAddons 5.29 fixes KMessageWidget word-wrapping.
if (KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 29, 0)) {
m_messageWidget->setWordWrap(true);
}
m_messageWidget->hide();
m_commentMsgWidget = new KMessageWidget();
......
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