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
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythcommandlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythrender_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythrender_opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythfrontend/globalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtv-setup/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25ef08d

Please sign in to comment.