From d2f5fdb20d30638c82f6d26fff92b73b84f1e1b2 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 7 Apr 2014 14:03:16 +0200 Subject: 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 Reviewed-by: Thiago Macieira --- src/printsupport/kernel/qcups.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/printsupport') diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp index a1c657eda4..c6e3ddb54d 100644 --- a/src/printsupport/kernel/qcups.cpp +++ b/src/printsupport/kernel/qcups.cpp @@ -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"), -- cgit v1.2.3