X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fmultilineedit.cpp;h=31335d1fa651800e0a1d92281a91b7a42e0fb209;hb=ac7a58dd970833da2336f6ce035ec55515bac0f1;hp=90eadaa7643c5dc9abad7c25139bef5244b7a9c3;hpb=03d1b64ddb8638465eafb4dca2dfd592739603cf;p=quassel.git diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 90eadaa7..31335d1f 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -90,6 +90,14 @@ MultiLineEdit::~MultiLineEdit() { } +#if defined HAVE_KF5 || defined HAVE_KDE4 +void MultiLineEdit::createHighlighter() +{ + KTextEdit::createHighlighter(); + if (highlighter()) + highlighter()->setAutomatic(false); +} +#endif void MultiLineEdit::setCustomFont(const QFont &font) { @@ -177,7 +185,11 @@ void MultiLineEdit::updateSizeHint() // use the style to determine a decent size int h = qMin(qMax((int)document()->size().height() + scrollBarHeight, minPixelHeight), maxPixelHeight) + 2 * frameWidth(); +#if QT_VERSION < 0x050000 QStyleOptionFrameV2 opt; +#else + QStyleOptionFrame opt; +#endif opt.initFrom(this); opt.rect = QRect(0, 0, 100, h); opt.lineWidth = lineWidth();