Permalink
Browse files

Convert QApplication::type() to qobject_cast<QApplication*>()

QApplication::type() has been removed from Qt5 (as of beta 2).
  • Loading branch information...
daniel-kristjansson authored and jyavenard committed Feb 26, 2013
1 parent cef92bf commit f039111a8e7b4db51bbb762e12db76ded450bac5
Showing with 4 additions and 4 deletions.
  1. +1 −1 mythtv/libs/libmythtv/videooutwindow.cpp
  2. +3 −3 mythtv/libs/libmythui/mythuihelper.cpp
@@ -95,7 +95,7 @@ VideoOutWindow::VideoOutWindow() :
db_use_gui_size = gCoreContext->GetNumSetting("GuiSizeForTV", 0);
QDesktopWidget *desktop = NULL;
if (QApplication::type() == QApplication::GuiClient)
if (qobject_cast<QApplication*>(qApp))
desktop = QApplication::desktop();
if (desktop)
@@ -1598,7 +1598,7 @@ QFont MythUIHelper::GetSmallFont(void)
void MythUIHelper::DisableScreensaver(void)
{
if (QApplication::type() == QApplication::GuiClient)
if (qobject_cast<QApplication*>(qApp))
{
QCoreApplication::postEvent(
GetMythMainWindow(),
@@ -1608,7 +1608,7 @@ void MythUIHelper::DisableScreensaver(void)
void MythUIHelper::RestoreScreensaver(void)
{
if (QApplication::type() == QApplication::GuiClient)
if (qobject_cast<QApplication*>(qApp))
{
QCoreApplication::postEvent(
GetMythMainWindow(),
@@ -1618,7 +1618,7 @@ void MythUIHelper::RestoreScreensaver(void)
void MythUIHelper::ResetScreensaver(void)
{
if (QApplication::type() == QApplication::GuiClient)
if (qobject_cast<QApplication*>(qApp))
{
QCoreApplication::postEvent(
GetMythMainWindow(),

0 comments on commit f039111

Please sign in to comment.