QCUPSSupport: fix misuse of QDateTime::addDays()
QDateTime::addDays() is a const function and returns a new QDateTime with the given days added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: I1b061619d45d7806feaa2bf9fb6d9f0b43d63def Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
6ea574d446
commit
d2f5fdb20d
|
|
@ -113,7 +113,7 @@ void QCUPSSupport::setJobHold(QPrinter *printer, const JobHoldUntil jobHold, con
|
|||
QDateTime localDateTime = QDateTime::currentDateTime();
|
||||
// Check if time is for tomorrow in case of DST change overnight
|
||||
if (holdUntilTime < localDateTime.time())
|
||||
localDateTime.addDays(1);
|
||||
localDateTime = localDateTime.addDays(1);
|
||||
localDateTime.setTime(holdUntilTime);
|
||||
setCupsOption(cupsOptions,
|
||||
QStringLiteral("job-hold-until"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue