From 4daae18cbefabc05c475c1eaecd02f36b73d4e24 Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Sat, 8 Nov 2014 18:10:16 +0100 Subject: [PATCH] add bringToFront functionality for Qt5, use old code only for Qt4 --- src/libtomahawk/utils/TomahawkUtilsGui.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index ebedf3e4f..1fb15ed8a 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -295,6 +295,7 @@ tomahawkWindow() void bringToFront() { +#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 ) #if defined(Q_WS_X11) { qDebug() << Q_FUNC_INFO; @@ -348,6 +349,19 @@ bringToFront() } } #endif +#endif +#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) + { + qDebug() << Q_FUNC_INFO; + + QWidget* widget = tomahawkWindow(); + if ( !widget ) + return; + + widget->show(); + widget->raise(); + } +#endif } #endif