From 68e85b95df275c99c2f1c816d9477de2c8d333f0 Mon Sep 17 00:00:00 2001 From: Mark Kendall Date: Sat, 10 Oct 2020 14:19:05 +0100 Subject: [PATCH] MythMainWindow: Move QWidget inheritance into MythUIScreenBounds - which allows MythUIScreenBounds to use QObject functionality --- mythtv/libs/libmythui/mythmainwindow.cpp | 1 - mythtv/libs/libmythui/mythmainwindow.h | 4 ++-- mythtv/libs/libmythui/mythuiscreenbounds.h | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp index 9a01c986c96..753ba2c9b35 100644 --- a/mythtv/libs/libmythui/mythmainwindow.cpp +++ b/mythtv/libs/libmythui/mythmainwindow.cpp @@ -131,7 +131,6 @@ MythNotificationCenter *GetNotificationCenter(void) } MythMainWindow::MythMainWindow(const bool useDB) - : QWidget(nullptr) { m_display = MythDisplay::Create(); diff --git a/mythtv/libs/libmythui/mythmainwindow.h b/mythtv/libs/libmythui/mythmainwindow.h index 54b305de5cb..ed2365db840 100644 --- a/mythtv/libs/libmythui/mythmainwindow.h +++ b/mythtv/libs/libmythui/mythmainwindow.h @@ -2,7 +2,6 @@ #define MYTHMAINWINDOW_H_ // Qt -#include #include // MythTV @@ -32,9 +31,10 @@ class MythMainWindowPrivate; class MythPainterWindow; class MythRender; -class MUI_PUBLIC MythMainWindow : public QWidget, public MythUIScreenBounds +class MUI_PUBLIC MythMainWindow : public MythUIScreenBounds { Q_OBJECT + friend class MythPainterWindowOpenGL; friend class MythPainterWindowVulkan; friend class MythPainterWindowQt; diff --git a/mythtv/libs/libmythui/mythuiscreenbounds.h b/mythtv/libs/libmythui/mythuiscreenbounds.h index de73329f559..b58468cc582 100644 --- a/mythtv/libs/libmythui/mythuiscreenbounds.h +++ b/mythtv/libs/libmythui/mythuiscreenbounds.h @@ -2,15 +2,17 @@ #define MYTHUISCREENBOUNDS_H // Qt -#include +#include // MythTV #include "mythuiexp.h" class MythDisplay; -class MUI_PUBLIC MythUIScreenBounds +class MUI_PUBLIC MythUIScreenBounds : public QWidget { + Q_OBJECT + public: static bool GeometryIsOverridden(); static void ParseGeometryOverride(const QString& Geometry);