16 changes: 8 additions & 8 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ bool TV::StartTV(ProgramInfo *tvrec, uint flags,

LOG(VB_PLAYBACK, LOG_INFO, LOC + "-- process events 2 begin");
do
qApp->processEvents();
QCoreApplication::processEvents();
while (tv->m_isEmbedded);
LOG(VB_PLAYBACK, LOG_INFO, LOC + "-- process events 2 end");

Expand Down Expand Up @@ -1217,14 +1217,14 @@ bool TV::Init(bool createWindow)
if (mainwindow->GetPaintWindow())
mainwindow->GetPaintWindow()->update();
mainwindow->installEventFilter(this);
qApp->processEvents();
QCoreApplication::processEvents();
}

{
QMutexLocker locker(&m_initFromDBLock);
while (!m_initFromDBDone)
{
qApp->processEvents();
QCoreApplication::processEvents();
m_initFromDBWait.wait(&m_initFromDBLock, 50);
}
}
Expand Down Expand Up @@ -1339,7 +1339,7 @@ void TV::PlaybackLoop(void)
{
while (true)
{
qApp->processEvents();
QCoreApplication::processEvents();
if (SignalHandler::IsExiting())
{
m_wantsToQuit = true;
Expand Down Expand Up @@ -7151,7 +7151,7 @@ void TV::SwitchInputs(PlayerContext *ctx,
// state of the new player e.g. when switching inputs from the guide grid,
// "EPG_EXITING" may not be received until after the player is re-created
// and we inadvertantly disable drawing...
qApp->processEvents();
QCoreApplication::processEvents();

LOG(VB_CHANNEL, LOG_INFO, LOC + QString("(%1,'%2',%3)")
.arg(chanid).arg(channum).arg(inputid));
Expand Down Expand Up @@ -8716,7 +8716,7 @@ void TV::EditSchedule(const PlayerContext */*ctx*/, int editType)
// post the request so the guide will be created in the UI thread
QString message = QString("START_EPG %1").arg(editType);
auto* me = new MythEvent(message);
qApp->postEvent(this, me);
QCoreApplication::postEvent(this, me);
}

void TV::ChangeVolume(PlayerContext *ctx, bool up, int newvolume)
Expand Down Expand Up @@ -9719,7 +9719,7 @@ void TV::customEvent(QEvent *e)
GetMythMainWindow()->PushDrawDisabled();
}

qApp->processEvents();
QCoreApplication::processEvents();

m_isEmbedded = false;
m_ignoreKeyPresses = false;
Expand Down Expand Up @@ -10958,7 +10958,7 @@ QDomElement MenuBase::GetRoot(void) const

QString MenuBase::Translate(const QString &text) const
{
return qApp->translate(m_translationContext, text.toUtf8(), nullptr);
return QCoreApplication::translate(m_translationContext, text.toUtf8(), nullptr);
}

bool MenuBase::Show(const QDomNode &node,
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videooutwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void VideoOutWindow::PopulateGeometry(void)
if (!m_display)
return;

qApp->processEvents();
QCoreApplication::processEvents();
if (not qobject_cast<QApplication*>(qApp))
return;

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/devices/mythcecadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ int MythCECAdapter::HandleKeyPress(const cec_keypress &Key)

MythUIHelper::ResetScreensaver();
auto* ke = new QKeyEvent(QEvent::KeyPress, action, modifier);
qApp->postEvent(GetMythMainWindow(), dynamic_cast<QEvent*>(ke));
QCoreApplication::postEvent(GetMythMainWindow(), dynamic_cast<QEvent*>(ke));
return 1;
}

Expand Down
22 changes: 11 additions & 11 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ QStringList MythDisplay::GetDescription(void)
}

QScreen *current = display->GetCurrentScreen();
QList<QScreen*> screens = qGuiApp->screens();
QList<QScreen*> screens = QGuiApplication::screens();
bool first = true;
foreach (auto screen, screens)
{
Expand Down Expand Up @@ -253,7 +253,7 @@ void MythDisplay::SetWidget(QWidget *MainWindow)

int MythDisplay::GetScreenCount(void)
{
return qGuiApp->screens().size();
return QGuiApplication::screens().size();
}

double MythDisplay::GetPixelAspectRatio(void)
Expand Down Expand Up @@ -311,7 +311,7 @@ QScreen *MythDisplay::GetDesiredScreen(void)
// When fullscreen, Qt appears to use the reverse - though this may be
// the window manager rather than Qt. So could be wrong.
QPoint point = windowed ? override.topLeft() : override.bottomRight();
foreach (QScreen *screen, qGuiApp->screens())
foreach (QScreen *screen, QGuiApplication::screens())
{
if (screen->geometry().contains(point))
{
Expand All @@ -327,14 +327,14 @@ QScreen *MythDisplay::GetDesiredScreen(void)
if (!newscreen && MythDisplay::SpanAllScreens())
{
LOG(VB_GENERAL, LOG_INFO, LOC + "Using primary screen for multiscreen");
newscreen = qGuiApp->primaryScreen();
newscreen = QGuiApplication::primaryScreen();
}

QString name = gCoreContext->GetSetting("XineramaScreen", nullptr);
// Lookup by name
if (!newscreen)
{
foreach (QScreen *screen, qGuiApp->screens())
foreach (QScreen *screen, QGuiApplication::screens())
{
if (!name.isEmpty() && name == screen->name())
{
Expand All @@ -349,7 +349,7 @@ QScreen *MythDisplay::GetDesiredScreen(void)
{
bool ok = false;
int screen_num = name.toInt(&ok);
QList<QScreen *>screens = qGuiApp->screens();
QList<QScreen *>screens = QGuiApplication::screens();
if (ok && (screen_num >= 0) && (screen_num < screens.size()))
{
LOG(VB_GENERAL, LOG_INFO, LOC + QString("Found screen number %1 (%2)")
Expand All @@ -361,7 +361,7 @@ QScreen *MythDisplay::GetDesiredScreen(void)
// For anything else, return the primary screen.
if (!newscreen)
{
QScreen *primary = qGuiApp->primaryScreen();
QScreen *primary = QGuiApplication::primaryScreen();
if (name.isEmpty() && primary)
{
LOG(VB_GENERAL, LOG_INFO, LOC + QString("Defaulting to primary screen (%1)")
Expand Down Expand Up @@ -401,13 +401,13 @@ void MythDisplay::PrimaryScreenChanged(QScreen* qScreen)
void MythDisplay::ScreenAdded(QScreen* qScreen)
{
DebugScreen(qScreen, "New");
emit ScreenCountChanged(qGuiApp->screens().size());
emit ScreenCountChanged(QGuiApplication::screens().size());
}

void MythDisplay::ScreenRemoved(QScreen* qScreen)
{
LOG(VB_GENERAL, LOG_INFO, LOC + QString("Screen '%1' removed").arg(qScreen->name()));
emit ScreenCountChanged(qGuiApp->screens().size());
emit ScreenCountChanged(QGuiApplication::screens().size());
}

void MythDisplay::GeometryChanged(const QRect &Geo)
Expand Down Expand Up @@ -563,7 +563,7 @@ void MythDisplay::Initialise(void)
*/
void MythDisplay::InitScreenBounds(void)
{
QList<QScreen*> screens = qGuiApp->screens();
QList<QScreen*> screens = QGuiApplication::screens();
for (auto *screen : screens)
{
QRect dim = screen->geometry();
Expand All @@ -572,7 +572,7 @@ void MythDisplay::InitScreenBounds(void)
.arg(screen->name()).arg(dim.width()).arg(dim.height()).arg(extra));
}

QScreen *primary = qGuiApp->primaryScreen();
QScreen *primary = QGuiApplication::primaryScreen();
LOG(VB_GUI, LOG_INFO, LOC +QString("Primary screen: %1.").arg(primary->name()));

int numScreens = MythDisplay::GetScreenCount();
Expand Down
13 changes: 7 additions & 6 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ void MythMainWindow::doRemoteScreenShot(const QString& filename, int x, int y)
args << filename;

MythEvent me(MythEvent::MythEventMessage, ACTION_SCREENSHOT, args);
qApp->sendEvent(this, &me);
QCoreApplication::sendEvent(this, &me);
}

void MythMainWindow::RemoteScreenShot(QString filename, int x, int y)
Expand Down Expand Up @@ -1127,13 +1127,14 @@ void MythMainWindow::Init(bool mayReInit)
// Redraw the window now to avoid race conditions in EGLFS (Qt5.4) if a
// 2nd window (e.g. TVPlayback) is created before this is redrawn.
#ifdef ANDROID
LOG(VB_GENERAL, LOG_INFO, QString("Platform name is %1").arg(qApp->platformName()));
LOG(VB_GENERAL, LOG_INFO, QString("Platform name is %1")
.arg(QGuiApplication::platformName()));
# define EARLY_SHOW_PLATFORM_NAME_CHECK "android"
#else
# define EARLY_SHOW_PLATFORM_NAME_CHECK "egl"
#endif
if (qApp->platformName().contains(EARLY_SHOW_PLATFORM_NAME_CHECK))
qApp->processEvents();
if (QGuiApplication::platformName().contains(EARLY_SHOW_PLATFORM_NAME_CHECK))
QCoreApplication::processEvents();

if (!GetMythDB()->GetBoolSetting("HideMouseCursor", false))
d->m_paintwin->setMouseTracking(true); // Required for mouse cursor auto-hide
Expand Down Expand Up @@ -1378,7 +1379,7 @@ bool MythMainWindow::WindowIsAlwaysFullscreen(void)
return true;
#else
// this may need to cover other platform plugins
return qApp->platformName().toLower().contains("eglfs");
return QGuiApplication::platformName().toLower().contains("eglfs");
#endif
}

Expand Down Expand Up @@ -2642,7 +2643,7 @@ QObject *MythMainWindow::getTarget(QKeyEvent &key)

if (!key_target)
{
QWidget *focus_widget = qApp->focusWidget();
QWidget *focus_widget = QApplication::focusWidget();
if (focus_widget && focus_widget->isEnabled())
{
key_target = focus_widget;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/myththemedmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void MythThemedMenu::parseThemeButton(QDomElement &element)
if (text.isEmpty() &&
info.attribute("lang","").isEmpty())
{
text = qApp->translate("ThemeUI",
text = QCoreApplication::translate("ThemeUI",
parseText(info).toUtf8() );
}
else if ((info.attribute("lang","").toLower() ==
Expand All @@ -476,7 +476,7 @@ void MythThemedMenu::parseThemeButton(QDomElement &element)
if (alttext.isEmpty() &&
info.attribute("lang","").isEmpty())
{
alttext = qApp->translate("ThemeUI",
alttext = QCoreApplication::translate("ThemeUI",
parseText(info).toUtf8());
}
else if ((info.attribute("lang","").toLower() ==
Expand Down Expand Up @@ -522,7 +522,7 @@ void MythThemedMenu::parseThemeButton(QDomElement &element)
if (description.isEmpty() &&
info.attribute("lang","").isEmpty())
{
description = qApp->translate("ThemeUI",
description = QCoreApplication::translate("ThemeUI",
getFirstText(info).toUtf8());
}
else if ((info.attribute("lang","").toLower() ==
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuibutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ bool MythUIButton::ParseElement(
{
if (element.tagName() == "value")
{
m_ValueText = qApp->translate("ThemeUI",
m_ValueText = QCoreApplication::translate("ThemeUI",
parseText(element).toUtf8());
}
else
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuiclock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool MythUIClock::ParseElement(
element.tagName() == "template")
{
QString format = parseText(element);
format = qApp->translate("ThemeUI", format.toUtf8());
format = QCoreApplication::translate("ThemeUI", format.toUtf8());
format.replace("%TIME%", m_TimeFormat, Qt::CaseInsensitive);
format.replace("%DATE%", m_DateFormat, Qt::CaseInsensitive);
format.replace("%SHORTDATE%", m_ShortDateFormat, Qt::CaseInsensitive);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuihelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void MythUIHelper::LoadQtConfig(void)
if (d->m_display->UsingVideoModes())
d->m_display->SwitchToGUI(true);

qApp->setStyle("Windows");
QApplication::setStyle("Windows");

QString themename = GetMythDB()->GetSetting("Theme", DEFAULT_UI_THEME);
QString themedir = FindThemeDir(themename);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuispinbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ void MythUISpinBox::SetRange(int low, int high, int step, uint pageMultiple)
{
if (temp.contains("%n"))
{
text = qApp->translate("ThemeUI", temp.toUtf8(), nullptr,
text = QCoreApplication::translate("ThemeUI", temp.toUtf8(), nullptr,
qAbs(value));
}
else
{
text = qApp->translate("ThemeUI", temp.toUtf8());
text = QCoreApplication::translate("ThemeUI", temp.toUtf8());
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions mythtv/libs/libmythui/mythuitext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void MythUIText::ResetMap(const InfoMap &map)
{
int pos = 0;

QString translatedTemplate = qApp->translate("ThemeUI",
QString translatedTemplate = QCoreApplication::translate("ThemeUI",
newText.toUtf8());

while ((pos = regexp.indexIn(translatedTemplate, pos)) != -1)
Expand Down Expand Up @@ -169,7 +169,7 @@ void MythUIText::SetTextFromMap(const InfoMap &map)
{
int pos = 0;

QString translatedTemplate = qApp->translate("ThemeUI",
QString translatedTemplate = QCoreApplication::translate("ThemeUI",
newText.toUtf8());

QString tempString = translatedTemplate;
Expand Down Expand Up @@ -828,13 +828,13 @@ void MythUIText::FillCutMessage(void)

if (isNumber && m_TemplateText.contains("%n"))
{
m_CutMessage = qApp->translate("ThemeUI",
m_CutMessage = QCoreApplication::translate("ThemeUI",
m_TemplateText.toUtf8(), nullptr,
qAbs(value));
}
else if (m_TemplateText.contains("%1"))
{
QString tmp = qApp->translate("ThemeUI", m_TemplateText.toUtf8());
QString tmp = QCoreApplication::translate("ThemeUI", m_TemplateText.toUtf8());
m_CutMessage = tmp.arg(m_Message);
}
}
Expand Down Expand Up @@ -1442,7 +1442,7 @@ bool MythUIText::ParseElement(
{
if (element.attribute("lang", "").isEmpty())
{
m_Message = qApp->translate("ThemeUI",
m_Message = QCoreApplication::translate("ThemeUI",
parseText(element).toUtf8());
}
else if ((element.attribute("lang", "").toLower() ==
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmythui/mythuiwebbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ int BrowserApi::GetVolume(void)

while (!timer.hasExpired(2000) && !m_gotAnswer)
{
qApp->processEvents();
QCoreApplication::processEvents();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}

Expand Down Expand Up @@ -230,7 +230,7 @@ QString BrowserApi::GetMetadata(void)

while (!timer.hasExpired(2000) && !m_gotAnswer)
{
qApp->processEvents();
QCoreApplication::processEvents();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}

Expand Down Expand Up @@ -325,7 +325,7 @@ bool MythWebPage::extension(Extension extension, const ExtensionOption *option,

QBuffer imageBuffer;
imageBuffer.open(QBuffer::ReadWrite);
QIcon icon = qApp->style()->standardIcon(QStyle::SP_MessageBoxWarning,
QIcon icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning,
nullptr, nullptr);
QPixmap pixmap = icon.pixmap(QSize(32, 32));

Expand Down Expand Up @@ -887,7 +887,7 @@ void MythUIWebBrowser::Init(void)
m_actualBrowserArea = m_Area;

m_browser = new MythWebView(GetMythMainWindow()->GetPaintWindow(), this);
m_browser->setPalette(qApp->style()->standardPalette());
m_browser->setPalette(QApplication::style()->standardPalette());
m_browser->setGeometry(m_actualBrowserArea);
m_browser->setFixedSize(m_actualBrowserArea.size());
m_browser->move(m_actualBrowserArea.x(), m_actualBrowserArea.y());
Expand Down Expand Up @@ -1146,7 +1146,7 @@ void MythUIWebBrowser::SetActive(bool active)
m_browser->setFocus();
m_browser->show();
m_browser->raise();
if (qApp->platformName().contains("egl"))
if (QGuiApplication::platformName().contains("egl"))
{
m_browser->setParent(nullptr);
m_browser->setFocus();
Expand All @@ -1159,7 +1159,7 @@ void MythUIWebBrowser::SetActive(bool active)
{
m_browser->clearFocus();
m_browser->hide();
if (qApp->platformName().contains("egl"))
if (QGuiApplication::platformName().contains("egl"))
m_browser->setParent(GetMythMainWindow());
UpdateBuffer();
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/themeinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ bool ThemeInfo::parseThemeInfo()
}
else if (ce.tagName() == "description")
{
m_description = qApp->translate("ThemeUI",
m_description = QCoreApplication::translate("ThemeUI",
parseText(ce).toUtf8());
}
else if (ce.tagName() == "errata")
{
m_errata = qApp->translate("ThemeUI",
m_errata = QCoreApplication::translate("ThemeUI",
parseText(ce).toUtf8());
}
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/gallerythumbview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void WaitUntilDone(MThread &worker)
while (!worker.isFinished())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
qApp->processEvents();
QCoreApplication::processEvents();
}
}

Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/globalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4553,14 +4553,14 @@ void GuiDimension::childChanged(StandardSetting * /*setting*/)

void AppearanceSettings::applyChange()
{
qApp->processEvents();
QCoreApplication::processEvents();
GetMythMainWindow()->JumpTo("Reload Theme");
}

void AppearanceSettings::PopulateScreens(int Screens)
{
m_screen->clearSelections();
foreach (QScreen *qscreen, qGuiApp->screens())
foreach (QScreen *qscreen, QGuiApplication::screens())
{
QString extra = MythDisplay::GetExtraScreenInfo(qscreen);
m_screen->addSelection(qscreen->name() + extra, qscreen->name());
Expand Down
30 changes: 15 additions & 15 deletions mythtv/programs/mythfrontend/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void handleSIGUSR2(void);
static bool gLoaded = false;
#endif

static const QString sLocation = qApp->translate("(Common)",
static const QString sLocation = QCoreApplication::translate("(Common)",
"MythFrontend");

namespace
Expand Down Expand Up @@ -275,7 +275,7 @@ namespace

void cleanup()
{
qApp->processEvents();
QCoreApplication::processEvents();
DestroyMythMainWindow();
#ifdef USING_AIRPLAY
MythRAOPDevice::Cleanup();
Expand Down Expand Up @@ -312,7 +312,7 @@ namespace

ReferenceCounter::PrintDebug();

delete qApp;
delete QCoreApplication::instance();

SignalHandler::Done();
}
Expand All @@ -332,7 +332,7 @@ static void startAppearWiz(void)

if (isWindowed)
{
ShowOkPopup(qApp->translate("(MythFrontendMain)",
ShowOkPopup(QCoreApplication::translate("(MythFrontendMain)",
"The ScreenSetupWizard cannot be used while "
"mythfrontend is operating in windowed mode."));
}
Expand Down Expand Up @@ -610,10 +610,10 @@ static bool isLiveTVAvailable(void)
if (RemoteGetFreeRecorderCount() > 0)
return true;

QString msg = qApp->translate("(Common)", "All tuners are currently busy.");
QString msg = QCoreApplication::translate("(Common)", "All tuners are currently busy.");

if (TV::ConfiguredTunerCards() < 1)
msg = qApp->translate("(Common)", "There are no configured tuners.");
msg = QCoreApplication::translate("(Common)", "There are no configured tuners.");

ShowOkPopup(msg);
return false;
Expand Down Expand Up @@ -674,7 +674,7 @@ static void standbyScreen(void)

static void RunVideoScreen(VideoDialog::DialogType type, bool fromJump = false)
{
QString message = qApp->translate("(MythFrontendMain)",
QString message = QCoreApplication::translate("(MythFrontendMain)",
"Loading videos ...");

MythScreenStack *popupStack =
Expand Down Expand Up @@ -1193,7 +1193,7 @@ static void TVMenuCallback(void *data, QString &selection)
{
if (g_settingsHelper)
{
qApp->connect(GetMythMainWindow()->GetMainStack()->GetTopScreen(),
QObject::connect(GetMythMainWindow()->GetMainStack()->GetTopScreen(),
SIGNAL(Exiting()),
g_settingsHelper,
SLOT(RunEpilog()));
Expand All @@ -1210,7 +1210,7 @@ static void handleExit(bool prompt)
g_exitPopup->HandleExit();
}
else
qApp->quit();
QCoreApplication::quit();
}

static bool RunMenu(const QString& themedir, const QString& themename)
Expand Down Expand Up @@ -1283,7 +1283,7 @@ static int internal_play_media(const QString &mrl, const QString &plot,
&& !mrl.startsWith("http://")
&& !mrl.startsWith("https://")))
{
QString errorText = qApp->translate("(MythFrontendMain)",
QString errorText = QCoreApplication::translate("(MythFrontendMain)",
"Failed to open \n '%1' in %2 \n"
"Check if the video exists")
.arg(mrl.section('/', -1))
Expand Down Expand Up @@ -1317,7 +1317,7 @@ static int internal_play_media(const QString &mrl, const QString &plot,
}
else
{
ShowNotificationError(qApp->translate("(MythFrontendMain)",
ShowNotificationError(QCoreApplication::translate("(MythFrontendMain)",
"DVD Failure"),
sLocation,
dvd->GetLastError());
Expand All @@ -1343,7 +1343,7 @@ static int internal_play_media(const QString &mrl, const QString &plot,
else
{
// ToDo: Change string to "BD Failure" after 0.28 is released
ShowNotificationError(qApp->translate("(MythFrontendMain)",
ShowNotificationError(QCoreApplication::translate("(MythFrontendMain)",
"DVD Failure"),
sLocation,
bd.GetLastError());
Expand Down Expand Up @@ -1969,7 +1969,7 @@ int main(int argc, char **argv)
return GENERIC_EXIT_OK;
}

qApp->setSetuidAllowed(true);
QCoreApplication::setSetuidAllowed(true);

if (revokeRoot() != 0)
{
Expand Down Expand Up @@ -2025,7 +2025,7 @@ int main(int argc, char **argv)

MythMainWindow *mainWindow = GetMythMainWindow();
mainWindow->Init(false);
mainWindow->setWindowTitle(qApp->translate("(MythFrontendMain)",
mainWindow->setWindowTitle(QCoreApplication::translate("(MythFrontendMain)",
"MythTV Frontend",
"Main window title"));

Expand Down Expand Up @@ -2183,7 +2183,7 @@ int main(int argc, char **argv)
fe_sd_notify("STATUS=");
fe_sd_notify("READY=1");

int ret = qApp->exec();
int ret = QCoreApplication::exec();

fe_sd_notify("STOPPING=1\nSTATUS=Exiting");
if (ret==0)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/videodlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ class VideoListDeathDelayPrivate
};

VideoListDeathDelay::VideoListDeathDelay(const VideoDialog::VideoListPtr& toSave) :
QObject(qApp)
QObject(QCoreApplication::instance())
{
m_d = new VideoListDeathDelayPrivate(toSave);
QTimer::singleShot(kDelayTimeMS, this, SLOT(OnTimeUp()));
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythscreenwizard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace

ReferenceCounter::PrintDebug();

delete qApp;
delete QCoreApplication::instance();

SignalHandler::Done();
}
Expand Down Expand Up @@ -214,7 +214,7 @@ int main(int argc, char **argv)
*/

startAppearWiz(GuiOffsetX, GuiOffsetY, GuiWidth, GuiHeight);
int exitCode = qApp->exec();
int exitCode = QCoreApplication::exec();

/*
if (sysEventHandler)
Expand Down
6 changes: 3 additions & 3 deletions mythtv/programs/mythtv-setup/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void cleanup()
delete gContext;
gContext = nullptr;

delete qApp;
delete QCoreApplication::instance();

SignalHandler::Done();
}
Expand Down Expand Up @@ -506,7 +506,7 @@ int main(int argc, char *argv[])
// stuff needed for particular scans
/* mplexid */ 0,
startChan, frequencyStandard, modulation, region);
ret = qApp->exec();
ret = QCoreApplication::exec();
}
return (ret) ? GENERIC_EXIT_NOT_OK : GENERIC_EXIT_OK;
}
Expand Down Expand Up @@ -612,7 +612,7 @@ int main(int argc, char *argv[])
}
}

qApp->exec();
QCoreApplication::exec();
}

/* vim: set expandtab tabstop=4 shiftwidth=4: */