7 changes: 5 additions & 2 deletions mythtv/libs/libmythbase/lcddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// C++ headers
#include <cerrno>
#include <chrono>
#include <cmath>
#include <cstdlib>
#include <fcntl.h>
Expand All @@ -33,6 +34,8 @@
#include "mythsystemlegacy.h"
#include "exitcodes.h"

using namespace std::chrono_literals;


#define LOC QString("LCDdevice: ")

Expand Down Expand Up @@ -201,7 +204,7 @@ void LCD::sendToServerSlot(const QString &someText)
// Ack, connection to server has been severed try to re-establish the
// connection
m_retryTimer->setSingleShot(false);
m_retryTimer->start(10000);
m_retryTimer->start(10s);
LOG(VB_GENERAL, LOG_ERR,
"Connection to LCDServer died unexpectedly. "
"Trying to reconnect every 10 seconds...");
Expand Down Expand Up @@ -527,7 +530,7 @@ void LCD::setupLEDs(int(*LedMaskFunc)(void))
m_getLEDMask = LedMaskFunc;
// update LED status every 10 seconds
m_ledTimer->setSingleShot(false);
m_ledTimer->start(10000);
m_ledTimer->start(10s);
}

void LCD::outputLEDs()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <chrono>

#include <QTimer>
#include <QString>
#include <QStringList>
Expand All @@ -12,6 +14,8 @@

#include "requesthandler/outboundhandler.h"

using namespace std::chrono_literals;

OutboundRequestHandler::OutboundRequestHandler(void)
{
m_timer.setSingleShot(true);
Expand All @@ -22,7 +26,7 @@ void OutboundRequestHandler::ConnectToMaster(void)
{
m_timer.stop();
if (!DoConnectToMaster())
m_timer.start(5000);
m_timer.start(5s);
}

bool OutboundRequestHandler::DoConnectToMaster(void)
Expand Down
7 changes: 5 additions & 2 deletions mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// race on startup?
// http date format and locale

#include <chrono>
#include <vector>

#include <QTcpSocket>
Expand All @@ -27,6 +28,8 @@
#include "bonjourregister.h"
#include "mythairplayserver.h"

using namespace std::chrono_literals;

MythAirplayServer* MythAirplayServer::gMythAirplayServer = nullptr;
MThread* MythAirplayServer::gMythAirplayServerThread = nullptr;
QMutex* MythAirplayServer::gMythAirplayServerMutex = new QMutex(QMutex::Recursive);
Expand Down Expand Up @@ -502,15 +505,15 @@ void MythAirplayServer::Start(void)
connect(m_serviceRefresh, &QTimer::timeout, this, &MythAirplayServer::timeout);
}
// Will force a Bonjour refresh in two seconds
m_serviceRefresh->start(2000);
m_serviceRefresh->start(2s);
}
m_valid = true;
}

void MythAirplayServer::timeout(void)
{
m_bonjour->ReAnnounceService();
m_serviceRefresh->start(10000);
m_serviceRefresh->start(10s);
}

void MythAirplayServer::Stop(void)
Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <unistd.h> // for usleep()

#include <chrono>
#include <utility>

Expand All @@ -20,7 +22,7 @@

#include "mythmainwindow.h"

#include <unistd.h> // for usleep()
using namespace std::chrono_literals;

#define LOC QString("RAOP Conn: ")
#define MAX_PACKET_SIZE 2048
Expand All @@ -38,8 +40,6 @@ QString MythRAOPConnection::g_rsaLastError;
#define AUDIO_DATA 0x60
#define FIRSTAUDIO_DATA (0x60 | 0x80)

using namespace std::chrono_literals;

// Size (in ms) of audio buffered in audio card
#define AUDIOCARD_BUFFER 500
// How frequently we may call ProcessAudio (via QTimer)
Expand Down Expand Up @@ -216,7 +216,7 @@ bool MythRAOPConnection::Init(void)
// start the watchdog timer to auto delete the client after a period of inactivity
m_watchdogTimer = new QTimer();
connect(m_watchdogTimer, &QTimer::timeout, this, &MythRAOPConnection::timeout);
m_watchdogTimer->start(10000);
m_watchdogTimer->start(10s);

m_dequeueAudioTimer = new QTimer();
connect(m_dequeueAudioTimer, &QTimer::timeout, this, &MythRAOPConnection::ProcessAudio);
Expand All @@ -233,7 +233,7 @@ void MythRAOPConnection::udpDataReady(QByteArray buf, const QHostAddress& /*peer
{
// restart the idle timer
if (m_watchdogTimer)
m_watchdogTimer->start(10000);
m_watchdogTimer->start(10s);

if (!m_audio || !m_codec || !m_codecContext)
return;
Expand Down Expand Up @@ -925,7 +925,7 @@ void MythRAOPConnection::ProcessRequest(const QStringList &header,
if (!tags.contains("Authorization"))
{
// 60 seconds to enter password.
m_watchdogTimer->start(60000);
m_watchdogTimer->start(1min);
FinishAuthenticationResponse(m_textStream, m_socket, tags["CSeq"]);
return;
}
Expand Down Expand Up @@ -1707,7 +1707,7 @@ void MythRAOPConnection::StartAudioTimer(void)

m_audioTimer = new QTimer();
connect(m_audioTimer, &QTimer::timeout, this, &MythRAOPConnection::audioRetry);
m_audioTimer->start(5000);
m_audioTimer->start(5s);
}

void MythRAOPConnection::StopAudioTimer(void)
Expand Down
6 changes: 5 additions & 1 deletion mythtv/libs/libmythtv/mythplayeroverlayui.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include <chrono>

// MythTV
#include "tv_play.h"
#include "livetvchain.h"
#include "mythplayeroverlayui.h"

using namespace std::chrono_literals;

#define LOC QString("PlayerOverlay: ")

// N.B. Overlay is initialised without a player - it must be set before it can be used
Expand All @@ -13,7 +17,7 @@ MythPlayerOverlayUI::MythPlayerOverlayUI(MythMainWindow* MainWindow, TV* Tv, Pla
// Register our state type for signalling
qRegisterMetaType<MythOverlayState>();

m_positionUpdateTimer.setInterval(999);
m_positionUpdateTimer.setInterval(999ms);
connect(&m_positionUpdateTimer, &QTimer::timeout, this, &MythPlayerOverlayUI::UpdateOSDPosition);
connect(this, &MythPlayerOverlayUI::OverlayStateChanged, m_tv, &TV::OverlayStateChanged);
connect(m_tv, &TV::ChangeOSDMessage, this, QOverload<const QString&>::of(&MythPlayerOverlayUI::UpdateOSDMessage));
Expand Down
6 changes: 5 additions & 1 deletion mythtv/libs/libmythtv/mythplayerui.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <chrono>

// MythTV
#include "mythsystemevent.h"
#include "audiooutput.h"
Expand All @@ -11,6 +13,8 @@
#include "livetvchain.h"
#include "mythplayerui.h"

using namespace std::chrono_literals;

#define LOC QString("PlayerUI: ")

MythPlayerUI::MythPlayerUI(MythMainWindow* MainWindow, TV* Tv,
Expand Down Expand Up @@ -38,7 +42,7 @@ MythPlayerUI::MythPlayerUI(MythMainWindow* MainWindow, TV* Tv,
});

// Setup OSD debug
m_osdDebugTimer.setInterval(1000);
m_osdDebugTimer.setInterval(1s);
connect(&m_osdDebugTimer, &QTimer::timeout, this, &MythPlayerUI::UpdateOSDDebug);
connect(m_tv, &TV::ChangeOSDDebug, this, &MythPlayerUI::ChangeOSDDebug);

Expand Down
4 changes: 3 additions & 1 deletion mythtv/libs/libmythtv/recorders/httptsstreamhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <chrono> // for milliseconds
#include <thread> // for sleep_for

using namespace std::chrono_literals;

#define LOC QString("HTTPTSSH[%1](%2): ").arg(m_inputId).arg(m_device)

// BUFFER_SIZE is a multiple of TS_SIZE
Expand Down Expand Up @@ -156,7 +158,7 @@ bool HTTPReader::DownloadStream(const QUrl& url)

// Configure timeout and size limit
m_timer.setSingleShot(true);
m_timer.start(10000);
m_timer.start(10s);

event_loop.exec(); // blocks stack until quit() is called

Expand Down
8 changes: 6 additions & 2 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <chrono>

//Qt
#include <QTimer>
#include <QThread>
Expand All @@ -14,6 +16,8 @@
#include "mythegl.h"
#include "mythmainwindow.h"

using namespace std::chrono_literals;

#ifdef USING_DBUS
#include "platforms/mythdisplaymutter.h"
#endif
Expand Down Expand Up @@ -971,7 +975,7 @@ void MythDisplay::WaitForScreenChange()
QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
QObject::connect(m_screen, &QScreen::geometryChanged, &loop, &QEventLoop::quit);
// 500ms maximum wait
timer.start(500);
timer.start(500ms);
loop.exec();
}

Expand All @@ -991,7 +995,7 @@ void MythDisplay::WaitForNewScreen()
QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
QObject::connect(m_widget->windowHandle(), &QWindow::screenChanged, &loop, &QEventLoop::quit);
// 500ms maximum wait
timer.start(500);
timer.start(500ms);
loop.exec();
}

Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// C++ headers
#include <algorithm>
#include <chrono>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -172,7 +173,7 @@ MythMainWindow::MythMainWindow(const bool useDB)
connect(d->m_gestureTimer, &QTimer::timeout, this, &MythMainWindow::mouseTimeout);
d->m_hideMouseTimer = new QTimer(this);
d->m_hideMouseTimer->setSingleShot(true);
d->m_hideMouseTimer->setInterval(3000); // 3 seconds
d->m_hideMouseTimer->setInterval(3s);
connect(d->m_hideMouseTimer, &QTimer::timeout, this, &MythMainWindow::HideMouseTimeout);

// MythSignalingTimer is scheduled for the scrap heap (it
Expand Down Expand Up @@ -714,7 +715,7 @@ void MythMainWindow::Init(bool mayReInit)

// SetWidget may move the widget into a new screen.
m_display->SetWidget(this);
QTimer::singleShot(1000, this, &MythMainWindow::DelayedAction);
QTimer::singleShot(1s, this, &MythMainWindow::DelayedAction);

// Ensure we have latest screen bounds if we have moved
UpdateScreenSettings(m_display);
Expand Down
7 changes: 5 additions & 2 deletions mythtv/libs/libmythui/mythscreenstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
#include "mythevent.h"

#include <cassert>
#include <chrono>

#include <QCoreApplication>
#include <QTimer>
#include <QString>
#include <QTimer>

using namespace std::chrono_literals;

const int kFadeVal = 20;

Expand Down Expand Up @@ -210,7 +213,7 @@ void MythScreenStack::ScheduleInitIfNeeded(void)
!m_topScreen->IsLoading())
{
m_initTimerStarted = true;
QTimer::singleShot(100, this, &MythScreenStack::doInit);
QTimer::singleShot(100ms, this, &MythScreenStack::doInit);
}
}

Expand Down
7 changes: 5 additions & 2 deletions mythtv/libs/libmythui/mythuibutton.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <chrono>

#include "mythuibutton.h"

Expand All @@ -10,11 +11,13 @@
#include "mythlogging.h"

// MythUI headers
#include "mythgesture.h"
#include "mythmainwindow.h"
#include "mythuigroup.h"
#include "mythuistatetype.h"
#include "mythuitext.h"
#include "mythgesture.h"

using namespace std::chrono_literals;

MythUIButton::MythUIButton(MythUIType *parent, const QString &name)
: MythUIType(parent, name)
Expand Down Expand Up @@ -175,7 +178,7 @@ void MythUIButton::Push(bool lock)
SetState("pushed");

if (!lock && !m_lockable)
m_clickTimer->start(500);
m_clickTimer->start(500ms);

emit Clicked();
}
Expand Down
22 changes: 13 additions & 9 deletions mythtv/libs/libmythui/mythuifilebrowser.cpp
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
#include <chrono>
#include <utility>

#include <QCoreApplication>
#include <QFileInfo>
#include <QImageReader>
#include <QString>
#include <QStringList>
#include <QTimer>
#include <QUrl>
#include <utility>

#include "mythlogging.h"

#include "mythcorecontext.h"
#include "mythdialogbox.h"
#include "mythmainwindow.h"
#include "mythfontproperties.h"
#include "mythuiutils.h"
#include "mythuitext.h"
#include "mythuiimage.h"
#include "mythuibuttonlist.h"
#include "mythmainwindow.h"
#include "mythuibutton.h"
#include "mythuistatetype.h"
#include "mythuibuttonlist.h"
#include "mythuifilebrowser.h"
#include "mythcorecontext.h"
#include "mythuiimage.h"
#include "mythuistatetype.h"
#include "mythuitext.h"
#include "mythuiutils.h"

using namespace std::chrono_literals;

#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
#define qEnvironmentVariable getenv
Expand Down Expand Up @@ -282,7 +286,7 @@ void MythUIFileBrowser::PathSelected(MythUIButtonListItem *item)
if (IsImage(finfo.suffix()) && m_previewImage)
{
m_previewImage->SetFilename(finfo.absoluteFilePath());
m_previewTimer->start(250);
m_previewTimer->start(250ms);
}

if (m_infoText)
Expand Down
11 changes: 7 additions & 4 deletions mythtv/libs/libmythupnp/websocket.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <chrono>

// Own header
#include "websocket.h"
Expand All @@ -10,13 +11,15 @@
#include "websocket_extensions/websocket_mythevent.h"

// QT headers
#include <QThread>
#include <QTcpSocket>
#include <QSslCipher>
#include <QCryptographicHash>
#include <QSslCipher>
#include <QTcpSocket>
#include <QThread>
#include <QtCore>
#include <QtGlobal>

using namespace std::chrono_literals;

/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -214,7 +217,7 @@ void WebSocketWorker::SetupSocket()
connect(m_socket, &QAbstractSocket::disconnected, this, &WebSocketWorker::CloseConnection);

// Setup heartbeat
m_heartBeat->setInterval(20000); // 20 second
m_heartBeat->setInterval(20s);
m_heartBeat->setSingleShot(false);
connect(m_heartBeat, &QTimer::timeout, this, &WebSocketWorker::SendHeartBeat);
}
Expand Down
8 changes: 5 additions & 3 deletions mythtv/programs/mythbackend/mainserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
// mythbackend headers
#include "backendcontext.h"

using namespace std::chrono_literals;

/** Milliseconds to wait for an existing thread from
* process request thread pool.
*/
Expand Down Expand Up @@ -310,7 +312,7 @@ MainServer::MainServer(bool master, int port,
m_deferredDeleteTimer = new QTimer(this);
connect(m_deferredDeleteTimer, &QTimer::timeout,
this, &MainServer::deferredDeleteSlot);
m_deferredDeleteTimer->start(30 * 1000);
m_deferredDeleteTimer->start(30s);

if (sched)
{
Expand Down Expand Up @@ -1915,7 +1917,7 @@ void MainServer::HandleAnnounce(QStringList &slist, QStringList commands,

pbs->setBlockShutdown(false);

m_autoexpireUpdateTimer->start(1000);
m_autoexpireUpdateTimer->start(1s);

gCoreContext->SendSystemEvent(
QString("SLAVE_CONNECTED HOSTNAME %1").arg(commands[2]));
Expand Down Expand Up @@ -8216,7 +8218,7 @@ void MainServer::reconnectTimeout(void)
m_playbackList.push_back(m_masterServer);
m_sockListLock.unlock();

m_autoexpireUpdateTimer->start(1000);
m_autoexpireUpdateTimer->start(1s);
}

// returns true, if a client (slavebackends are not counted!)
Expand Down
8 changes: 6 additions & 2 deletions mythtv/programs/mythfrontend/galleryinfo.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include <chrono>

#include "galleryinfo.h"

#include "imagemetadata.h"
#include "mythcoreutil.h"
#include "mythdate.h"
#include "imagemetadata.h"

using namespace std::chrono_literals;


//! The exif/video tags comprising the Basic file info
Expand Down Expand Up @@ -49,7 +53,7 @@ InfoList::InfoList(MythScreenType &screen)
: m_screen(screen), m_mgr(ImageManagerFe::getInstance())
{
m_timer.setSingleShot(true);
m_timer.setInterval(1000);
m_timer.setInterval(1s);
connect(&m_timer, &QTimer::timeout, this, &InfoList::Clear);
}

Expand Down
6 changes: 4 additions & 2 deletions mythtv/programs/mythfrontend/idlescreen.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#include "idlescreen.h"

#include <chrono>

#include <QTimer>

#include <mythcontext.h>
Expand Down Expand Up @@ -94,7 +96,7 @@ bool IdleScreen::CheckConnectionToServer(void)
if (bRes)
m_updateScreenTimer->start(UPDATE_INTERVAL);
else
m_updateScreenTimer->start(5000);
m_updateScreenTimer->start(5s);

return bRes;
}
Expand Down Expand Up @@ -286,7 +288,7 @@ void IdleScreen::customEvent(QEvent* event)

if (!PendingSchedUpdate())
{
QTimer::singleShot(50, this, &IdleScreen::UpdateScheduledList);
QTimer::singleShot(50ms, this, &IdleScreen::UpdateScheduledList);
SetPendingSchedUpdate(true);
}
}
Expand Down
21 changes: 13 additions & 8 deletions mythtv/programs/mythfrontend/themechooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Theme Chooser headers
#include "themechooser.h"

// C++ headers
#include <chrono>

// Qt headers
#include <QCoreApplication>
#include <QRegExp>
Expand All @@ -21,17 +24,19 @@
#include "storagegroup.h"

// LibMythUI headers
#include "mythmainwindow.h"
#include "mythuihelper.h"
#include "mythuiprogressbar.h"
#include "mythdialogbox.h"
#include "mythuibuttonlist.h"
#include "mythmainwindow.h"
#include "mythscreenstack.h"
#include "mythuistatetype.h"
#include "mythuibuttonlist.h"
#include "mythuigroup.h"
#include "mythuihelper.h"
#include "mythuiimage.h"
#include "mythuiprogressbar.h"
#include "mythuistatetype.h"
#include "mythuitext.h"

using namespace std::chrono_literals;

#define LOC QString("ThemeChooser: ")
#define LOC_WARN QString("ThemeChooser, Warning: ")
#define LOC_ERR QString("ThemeChooser, Error: ")
Expand Down Expand Up @@ -1033,16 +1038,16 @@ ThemeUpdateChecker::ThemeUpdateChecker(void) :
if (qEnvironmentVariableIsSet("MYTHTV_DEBUGMDM"))
{
LOG(VB_GENERAL, LOG_INFO, "Checking for theme updates every minute");
m_updateTimer->start(60 * 1000); // Run once a minute
m_updateTimer->start(1min);
}
else
{
LOG(VB_GENERAL, LOG_INFO, "Checking for theme updates every hour");
m_updateTimer->start(60 * 60 * 1000); // Run once an hour
m_updateTimer->start(1h);
}

// Run once 15 seconds from now
QTimer::singleShot(15 * 1000, this, &ThemeUpdateChecker::checkForUpdate);
QTimer::singleShot(15s, this, &ThemeUpdateChecker::checkForUpdate);
}

ThemeUpdateChecker::~ThemeUpdateChecker()
Expand Down
6 changes: 4 additions & 2 deletions mythtv/programs/mythfrontend/upnpscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <thread> // for sleep_for
#include <utility>

using namespace std::chrono_literals;

#define LOC QString("UPnPScan: ")
#define ERR QString("UPnPScan error: ")

Expand Down Expand Up @@ -429,7 +431,7 @@ void UPNPScanner::Start()
// create our watchdog timer (checks for stale servers)
m_watchdogTimer = new QTimer(this);
connect(m_watchdogTimer, &QTimer::timeout, this, &UPNPScanner::CheckStatus);
m_watchdogTimer->start(1000 * 10); // every 10s
m_watchdogTimer->start(10s);

// avoid connecting to the master backend
m_masterHost = gCoreContext->GetMasterServerIP();
Expand Down Expand Up @@ -756,7 +758,7 @@ void UPNPScanner::ScheduleUpdate(void)
{
m_lock.lock();
if (m_updateTimer && !m_updateTimer->isActive())
m_updateTimer->start(200);
m_updateTimer->start(200ms);
m_lock.unlock();
}

Expand Down
11 changes: 6 additions & 5 deletions mythtv/programs/mythfrontend/videodlg.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <memory>

#include <set>
#include <map>
#include <chrono>
#include <functional> //binary_negate
#include <map>
#include <memory>
#include <set>

#include <QApplication>
#include <QTimer>
Expand Down Expand Up @@ -53,6 +52,8 @@
// for ImageDLFailureEvent
#include "metadataimagedownload.h"

using namespace std::chrono_literals;

#define LOC_MML QString("Manual Metadata Lookup: ")

static const QString sLocation = "MythVideo";
Expand Down Expand Up @@ -332,7 +333,7 @@ namespace

m_fanart->SetFilename(filename);
m_fanartTimer.setSingleShot(true);
m_fanartTimer.start(300);
m_fanartTimer.start(300ms);

if (wasActive)
m_itemsPast++;
Expand Down
24 changes: 12 additions & 12 deletions mythtv/programs/mythlcdserver/lcdprocclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ LCDProcClient::LCDProcClient(LCDServer *lparent)

connect( m_checkConnectionsTimer, &QTimer::timeout, this,
&LCDProcClient::checkConnections);
m_checkConnectionsTimer->start(10000);
m_checkConnectionsTimer->start(10s);

connect( m_recStatusTimer, &QTimer::timeout, this, &LCDProcClient::outputRecStatus);

Expand Down Expand Up @@ -803,7 +803,7 @@ void LCDProcClient::startTime()
setPriority("Time", MEDIUM);
setPriority("RecStatus", LOW);

m_timeTimer->start(1000);
m_timeTimer->start(1s);
outputTime();
m_activeScreen = "Time";
m_isTimeVisible = true;
Expand Down Expand Up @@ -987,14 +987,14 @@ void LCDProcClient::formatScrollingWidgets()
// We're done, no scrolling
return;

m_preScrollWTimer->start(2000);
m_preScrollWTimer->start(2s);
}

void LCDProcClient::beginScrollingWidgets()
{
m_scrollPosition = m_lcdWidth;
m_preScrollWTimer->stop();
m_scrollWTimer->start(400);
m_scrollWTimer->start(400ms);
}

void LCDProcClient::scrollWidgets()
Expand Down Expand Up @@ -1260,7 +1260,7 @@ void LCDProcClient::startMenu(QList<LCDMenuItem> *menuItems, QString app_name,
if (curItem->ItemName().length() > (int)( m_lcdWidth -lcdStartCol))
{
m_menuPreScrollTimer->setSingleShot(true);
m_menuPreScrollTimer->start(2000);
m_menuPreScrollTimer->start(2s);
curItem->setScroll(true);
}
else
Expand Down Expand Up @@ -1367,7 +1367,7 @@ void LCDProcClient::startMenu(QList<LCDMenuItem> *menuItems, QString app_name,
}

m_menuPreScrollTimer->setSingleShot(true);
m_menuPreScrollTimer->start(2000);
m_menuPreScrollTimer->start(2s);
}

void LCDProcClient::beginScrollingMenuText()
Expand Down Expand Up @@ -1405,7 +1405,7 @@ void LCDProcClient::beginScrollingMenuText()

// Can get segfaults if we try to start a timer thats already running. . .
m_menuScrollTimer->stop();
m_menuScrollTimer->start(250);
m_menuScrollTimer->start(250ms);
}

void LCDProcClient::scrollMenuText()
Expand Down Expand Up @@ -1452,7 +1452,7 @@ void LCDProcClient::scrollMenuText()
{
// Scroll slower second and subsequent times through
m_menuScrollTimer->stop();
m_menuScrollTimer->start(500);
m_menuScrollTimer->start(500ms);
curItem->setScrollPos(curItem->getIndent());
}

Expand Down Expand Up @@ -1528,7 +1528,7 @@ void LCDProcClient::scrollMenuText()
{
// Scroll slower second and subsequent times through
m_menuScrollTimer->stop();
m_menuScrollTimer->start(500);
m_menuScrollTimer->start(500ms);
m_menuScrollPosition = 0;

it = m_lcdMenuItems->begin();
Expand Down Expand Up @@ -1929,7 +1929,7 @@ void LCDProcClient::outputRecStatus(void)
setPriority("Time", MEDIUM);
setPriority("RecStatus", LOW);

m_timeTimer->start(1000);
m_timeTimer->start(1s);
m_scrollWTimer->stop();
m_scrollListTimer->stop();
m_recStatusTimer->start(LCD_TIME_TIME);
Expand Down Expand Up @@ -2402,7 +2402,7 @@ void LCDProcClient::customEvent(QEvent *e)

// we can't query the backend from inside the customEvent
// so fire the recording list update from a timer
m_updateRecInfoTimer->start(500);
m_updateRecInfoTimer->start(500ms);
}
}
}
Expand All @@ -2421,7 +2421,7 @@ void LCDProcClient::updateRecordingList(void)
"LCDProcClient: Cannot get recording status "
"- is the master server running?\n\t\t\t"
"Will retry in 30 seconds");
QTimer::singleShot(30 * 1000, this, &LCDProcClient::updateRecordingList);
QTimer::singleShot(30s, this, &LCDProcClient::updateRecordingList);

// If we can't get the recording status and we're showing
// it, switch back to time. Maybe it would be even better
Expand Down
11 changes: 7 additions & 4 deletions mythtv/programs/mythwelcome/welcomedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// POSIX
#include <unistd.h>

// C++
#include <chrono>

// qt
#include <QCoreApplication>
#include <QKeyEvent>
Expand Down Expand Up @@ -108,7 +111,7 @@ void WelcomeDialog::startFrontendClick(void)
m_frontendIsRunning = true;

// this makes sure the button appears to click properly
QTimer::singleShot(500, this, &WelcomeDialog::startFrontend);
QTimer::singleShot(500ms, this, &WelcomeDialog::startFrontend);
}

void WelcomeDialog::checkAutoStart(void)
Expand Down Expand Up @@ -155,7 +158,7 @@ void WelcomeDialog::customEvent(QEvent *e)
else
{
// we can't query the backend from inside a customEvent
QTimer::singleShot(500, this, &WelcomeDialog::updateRecordingList);
QTimer::singleShot(500ms, this, &WelcomeDialog::updateRecordingList);
setPendingRecListUpdate(true);
}
}
Expand All @@ -173,7 +176,7 @@ void WelcomeDialog::customEvent(QEvent *e)
}
else
{
QTimer::singleShot(500, this, &WelcomeDialog::updateScheduledList);
QTimer::singleShot(500ms, this, &WelcomeDialog::updateScheduledList);
setPendingSchedUpdate(true);
}
}
Expand Down Expand Up @@ -571,7 +574,7 @@ bool WelcomeDialog::checkConnectionToServer(void)
if (bRes)
m_updateStatusTimer->start(UPDATE_STATUS_INTERVAL);
else
m_updateStatusTimer->start(5000);
m_updateStatusTimer->start(5s);

return bRes;
}
Expand Down