Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Qt6 updates #410

Merged
merged 5 commits into from Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputca.cpp
Expand Up @@ -575,7 +575,7 @@ AudioDeviceID CoreAudioData::GetDeviceWithName(const QString &deviceName)
if (device.GetTotalOutputChannels() == 0)
continue;
QString *name = device.GetName();
if (name && name == deviceName)
if (name && *name == deviceName)
{
Debug(QString("GetDeviceWithName: Found: %1").arg(*name));
deviceID = pDevices[dev];
Expand Down
6 changes: 6 additions & 0 deletions mythtv/libs/libmythtv/libmythtv.pro
Expand Up @@ -88,6 +88,12 @@ macx {
}

LIBS += -liconv

# Qt6 moved QtGui to use metal, link in QtOpenGL until migrated fully to
# Metal per https://doc.qt.io/qt-6/opengl-changes-qt6.html
equals(QT_MAJOR_VERSION, 6) {
QT += opengl
}
}

cygwin:QMAKE_LFLAGS_SHLIB += -Wl,--noinhibit-exec
Expand Down
5 changes: 4 additions & 1 deletion mythtv/libs/libmythui/devices/AppleRemoteListener.cpp
Expand Up @@ -57,8 +57,11 @@ void AppleRemoteListener::appleRemoteButton(AppleRemote::Event button,
QKeySequence a(code);
for (int i = 0; i < a.count(); i++)
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
int keycode = a[i];

#else
int keycode = a[i].toCombined();
jhoyt4 marked this conversation as resolved.
Show resolved Hide resolved
#endif
if (pressedDown)
QCoreApplication::postEvent(mainWindow, new LircKeycodeEvent(
QEvent::KeyPress, keycode, Qt::NoModifier, code, code));
Expand Down
17 changes: 16 additions & 1 deletion mythtv/programs/mythfrontend/globalsettings.h
Expand Up @@ -74,15 +74,22 @@ class ChannelGroupSettings
#if CONFIG_DARWIN
class MacMainSettings : public GroupSetting
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
Q_OBJECT

#else
Q_DECLARE_TR_FUNCTIONS(MacMainSettings);
#endif
public:
MacMainSettings();
};

class MacFloatSettings : public GroupSetting
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
Q_OBJECT
#else
Q_DECLARE_TR_FUNCTIONS(MacFloatSettings);
#endif

public:
MacFloatSettings();
Expand All @@ -91,7 +98,11 @@ class MacFloatSettings : public GroupSetting

class MacDockSettings : public GroupSetting
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
Q_OBJECT
#else
Q_DECLARE_TR_FUNCTIONS(MacDockSettings);
#endif

public:
MacDockSettings();
Expand All @@ -100,7 +111,11 @@ class MacDockSettings : public GroupSetting

class MacDesktopSettings : public GroupSetting
{
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
Q_OBJECT
#else
Q_DECLARE_TR_FUNCTIONS(MacDesktopSettings);
#endif

public:
MacDesktopSettings();
Expand Down