From 7509b983edb4b95b38089a89305e1d1e988da09b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 25 Dec 2018 14:57:23 +0100 Subject: fix build... --- gui/init.cpp | 1 - spline/spline-widget.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gui/init.cpp b/gui/init.cpp index b70f6df6..d2b0c27d 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -204,7 +204,6 @@ int otr_main(int argc, char** argv, std::function const& make_main_w QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QCoreApplication::setAttribute(Qt::AA_X11InitThreads); - QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication app(argc, argv); diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index a2f2f0f5..7c92094d 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -139,12 +139,14 @@ void spline_widget::drawBackground() const QString text = QString::number(i); + const double width = #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) - const double width = metrics.horizontalAdvance(text); + metrics.horizontalAdvance(text); #else // XXX remove after Linux upgrades -sh 20181225 - const double width = metrics.width(text); + metrics.width(text); #endif + painter.drawText(QRectF{x - width/2, pixel_bounds.height() + 10 + height, width, height}, -- cgit v1.2.3