Skip to content

Commit

Permalink
Convert QApplication::type() to qobject_cast<QApplication*>()
Browse files Browse the repository at this point in the history
QApplication::type() has been removed from Qt5 (as of beta 2).
  • Loading branch information
daniel-kristjansson committed Mar 1, 2013
1 parent d0bfbba commit e5b3ed0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videooutwindow.cpp
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythuihelper.cpp
Expand Up @@ -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(),
Expand All @@ -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(),
Expand All @@ -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(),
Expand Down

0 comments on commit e5b3ed0

Please sign in to comment.