Skip to content

Commit

Permalink
Fixes #11094. Use Qt5 compatible Q_OS_MAC define where needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Dec 20, 2012
1 parent 097f670 commit 25ef08d
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/gallerysettings.cpp
Expand Up @@ -39,7 +39,7 @@ static HostLineEdit *MythGalleryDir()
{ {
HostLineEdit *gc = new HostLineEdit("GalleryDir"); HostLineEdit *gc = new HostLineEdit("GalleryDir");
gc->setLabel(QObject::tr("Directory that holds images")); gc->setLabel(QObject::tr("Directory that holds images"));
#ifdef Q_WS_MACX #ifdef Q_OS_MAC
gc->setValue(QDir::homePath() + "/Pictures"); gc->setValue(QDir::homePath() + "/Pictures");
#else #else
gc->setValue("/var/lib/pictures"); gc->setValue("/var/lib/pictures");
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythcontext.cpp
Expand Up @@ -237,7 +237,7 @@ void MythContextPrivate::TempMainWindow(bool languagePrompt)
SilenceDBerrors(); SilenceDBerrors();


gCoreContext->OverrideSettingForSession("Theme", DEFAULT_UI_THEME); gCoreContext->OverrideSettingForSession("Theme", DEFAULT_UI_THEME);
#ifdef Q_WS_MACX #ifdef Q_OS_MAC
// Qt 4.4 has window-focus problems // Qt 4.4 has window-focus problems
gCoreContext->OverrideSettingForSession("RunFrontendInWindow", "1"); gCoreContext->OverrideSettingForSession("RunFrontendInWindow", "1");
#endif #endif
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythcommandlineparser.cpp
Expand Up @@ -1485,7 +1485,7 @@ bool MythCommandLineParser::Parse(int argc, const char * const * argv)
return false; return false;
} }


#ifdef Q_WS_MACX #ifdef Q_OS_MAC
if (opt.startsWith("-psn_")) if (opt.startsWith("-psn_"))
{ {
cerr << "Ignoring Process Serial Number from command line" cerr << "Ignoring Process Serial Number from command line"
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/globals.cpp
Expand Up @@ -29,7 +29,7 @@ const QString JUMP_VIDEO_TREE = "Video Listings";
const QString JUMP_VIDEO_GALLERY = "Video Gallery"; const QString JUMP_VIDEO_GALLERY = "Video Gallery";
const QString JUMP_VIDEO_DEFAULT = "Video Default"; const QString JUMP_VIDEO_DEFAULT = "Video Default";


#ifdef Q_WS_MACX #ifdef Q_OS_MAC
const QString DEFAULT_VIDEOSTARTUP_DIR = QDir::homePath() + "/Movies"; const QString DEFAULT_VIDEOSTARTUP_DIR = QDir::homePath() + "/Movies";
#else #else
const QString DEFAULT_VIDEOSTARTUP_DIR = "/share/Movies/dvd"; const QString DEFAULT_VIDEOSTARTUP_DIR = "/share/Movies/dvd";
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythdisplay.cpp
Expand Up @@ -2,7 +2,7 @@
#include "mythdisplay.h" #include "mythdisplay.h"
#include "mythmainwindow.h" #include "mythmainwindow.h"


#if defined(Q_WS_MAC) #if defined(Q_OS_MAC)
#import "util-osx.h" #import "util-osx.h"
#elif USING_X11 #elif USING_X11
#include "mythxdisplay.h" #include "mythxdisplay.h"
Expand Down Expand Up @@ -41,7 +41,7 @@ DisplayInfo MythDisplay::GetDisplayInfo(int video_rate)
{ {
DisplayInfo ret; DisplayInfo ret;


#if defined(Q_WS_MAC) #if defined(Q_OS_MAC)
CGDirectDisplayID disp = GetOSXDisplay(GetWindowID()); CGDirectDisplayID disp = GetOSXDisplay(GetWindowID());
if (!disp) if (!disp)
return ret; return ret;
Expand All @@ -63,7 +63,7 @@ DisplayInfo MythDisplay::GetDisplayInfo(int video_rate)
uint height = (uint)CGDisplayPixelsHigh(disp); uint height = (uint)CGDisplayPixelsHigh(disp);
ret.res = QSize(width, height); ret.res = QSize(width, height);


#elif defined(Q_WS_WIN) #elif defined(Q_OS_WIN)
HDC hdc = GetDC(GetWindowID()); HDC hdc = GetDC(GetWindowID());
int rate = 0; int rate = 0;
if (hdc) if (hdc)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -1298,7 +1298,7 @@ void MythMainWindow::attach(QWidget *child)
currentWidget()->setEnabled(false); currentWidget()->setEnabled(false);


d->widgetList.push_back(child); d->widgetList.push_back(child);
#ifndef Q_WS_MACX #ifndef Q_OS_MAC
child->winId(); child->winId();
#endif #endif
child->raise(); child->raise();
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythrender_opengl.cpp
Expand Up @@ -76,7 +76,7 @@ MythRenderOpenGL* MythRenderOpenGL::Create(const QString &painter,
LOG(VB_GENERAL, LOG_INFO, LOC + "Sync to VBlank is enabled (good!)"); 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."); LOG(VB_GENERAL, LOG_INFO, LOC + "Forcing swap interval for OS X.");
setswapinterval = true; setswapinterval = true;
#endif #endif
Expand Down Expand Up @@ -175,7 +175,7 @@ void MythRenderOpenGL::doneCurrent()


void MythRenderOpenGL::Release(void) void MythRenderOpenGL::Release(void)
{ {
#if !defined(Q_WS_WIN) #if !defined(Q_OS_WIN)
while (m_lock_level > 0) while (m_lock_level > 0)
doneCurrent(); doneCurrent();
#endif #endif
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythrender_opengl.h
Expand Up @@ -23,7 +23,7 @@
#include <GL/glext.h> #include <GL/glext.h>
#endif #endif


#ifdef Q_WS_MACX #ifdef Q_OS_MAC
#include "util-osx.h" #include "util-osx.h"
#import <agl.h> #import <agl.h>
#endif #endif
Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythfrontend/globalsettings.cpp
Expand Up @@ -3332,9 +3332,8 @@ OSDSettings::OSDSettings()
//cc->addChild(DecodeVBIFormat()); //cc->addChild(DecodeVBIFormat());
//addChild(cc); //addChild(cc);


#if CONFIG_DARWIN #if Q_OS_MAC
// Any Mac OS-specific OSD stuff would go here. // Any Mac OS-specific OSD stuff would go here.
// Note that this define should be Q_WS_MACX
#endif #endif
} }


Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -1450,7 +1450,7 @@ int main(int argc, char **argv)


CleanupGuard callCleanup(cleanup); 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 // 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. // of the MythPushButton widgets, and they don't use the themed background.
QApplication::setDesktopSettingsAware(false); QApplication::setDesktopSettingsAware(false);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtv-setup/main.cpp
Expand Up @@ -276,7 +276,7 @@ int main(int argc, char *argv[])


CleanupGuard callCleanup(cleanup); 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 // 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. // of the MythPushButton widgets, and they don't use the themed background.
QApplication::setDesktopSettingsAware(FALSE); QApplication::setDesktopSettingsAware(FALSE);
Expand Down

0 comments on commit 25ef08d

Please sign in to comment.