Permalink
Browse files

Fixes #11094. Use Qt5 compatible Q_OS_MAC define where needed.

  • Loading branch information...
1 parent 097f670 commit 25ef08d5779025bb4ead6761b144a67ad87e9004 @daniel-kristjansson daniel-kristjansson committed Dec 20, 2012
@@ -39,7 +39,7 @@ static HostLineEdit *MythGalleryDir()
{
HostLineEdit *gc = new HostLineEdit("GalleryDir");
gc->setLabel(QObject::tr("Directory that holds images"));
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
gc->setValue(QDir::homePath() + "/Pictures");
#else
gc->setValue("/var/lib/pictures");
@@ -237,7 +237,7 @@ void MythContextPrivate::TempMainWindow(bool languagePrompt)
SilenceDBerrors();
gCoreContext->OverrideSettingForSession("Theme", DEFAULT_UI_THEME);
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
// Qt 4.4 has window-focus problems
gCoreContext->OverrideSettingForSession("RunFrontendInWindow", "1");
#endif
@@ -1485,7 +1485,7 @@ bool MythCommandLineParser::Parse(int argc, const char * const * argv)
return false;
}
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
if (opt.startsWith("-psn_"))
{
cerr << "Ignoring Process Serial Number from command line"
@@ -29,7 +29,7 @@ const QString JUMP_VIDEO_TREE = "Video Listings";
const QString JUMP_VIDEO_GALLERY = "Video Gallery";
const QString JUMP_VIDEO_DEFAULT = "Video Default";
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
const QString DEFAULT_VIDEOSTARTUP_DIR = QDir::homePath() + "/Movies";
#else
const QString DEFAULT_VIDEOSTARTUP_DIR = "/share/Movies/dvd";
@@ -2,7 +2,7 @@
#include "mythdisplay.h"
#include "mythmainwindow.h"
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
#import "util-osx.h"
#elif USING_X11
#include "mythxdisplay.h"
@@ -41,7 +41,7 @@ DisplayInfo MythDisplay::GetDisplayInfo(int video_rate)
{
DisplayInfo ret;
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
CGDirectDisplayID disp = GetOSXDisplay(GetWindowID());
if (!disp)
return ret;
@@ -63,7 +63,7 @@ DisplayInfo MythDisplay::GetDisplayInfo(int video_rate)
uint height = (uint)CGDisplayPixelsHigh(disp);
ret.res = QSize(width, height);
-#elif defined(Q_WS_WIN)
+#elif defined(Q_OS_WIN)
HDC hdc = GetDC(GetWindowID());
int rate = 0;
if (hdc)
@@ -1298,7 +1298,7 @@ void MythMainWindow::attach(QWidget *child)
currentWidget()->setEnabled(false);
d->widgetList.push_back(child);
-#ifndef Q_WS_MACX
+#ifndef Q_OS_MAC
child->winId();
#endif
child->raise();
@@ -76,7 +76,7 @@ MythRenderOpenGL* MythRenderOpenGL::Create(const QString &painter,
LOG(VB_GENERAL, LOG_INFO, LOC + "Sync to VBlank is enabled (good!)");
}
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
LOG(VB_GENERAL, LOG_INFO, LOC + "Forcing swap interval for OS X.");
setswapinterval = true;
#endif
@@ -175,7 +175,7 @@ void MythRenderOpenGL::doneCurrent()
void MythRenderOpenGL::Release(void)
{
-#if !defined(Q_WS_WIN)
+#if !defined(Q_OS_WIN)
while (m_lock_level > 0)
doneCurrent();
#endif
@@ -23,7 +23,7 @@
#include <GL/glext.h>
#endif
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
#include "util-osx.h"
#import <agl.h>
#endif
@@ -3332,9 +3332,8 @@ OSDSettings::OSDSettings()
//cc->addChild(DecodeVBIFormat());
//addChild(cc);
-#if CONFIG_DARWIN
+#if Q_OS_MAC
// Any Mac OS-specific OSD stuff would go here.
- // Note that this define should be Q_WS_MACX
#endif
}
@@ -1450,7 +1450,7 @@ int main(int argc, char **argv)
CleanupGuard callCleanup(cleanup);
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
// Without this, we can't set focus to any of the CheckBoxSetting, and most
// of the MythPushButton widgets, and they don't use the themed background.
QApplication::setDesktopSettingsAware(false);
@@ -276,7 +276,7 @@ int main(int argc, char *argv[])
CleanupGuard callCleanup(cleanup);
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
// Without this, we can't set focus to any of the CheckBoxSetting, and most
// of the MythPushButton widgets, and they don't use the themed background.
QApplication::setDesktopSettingsAware(FALSE);

0 comments on commit 25ef08d

Please sign in to comment.