summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2014-04-07 14:03:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-08 05:16:58 +0200
commitd2f5fdb20d30638c82f6d26fff92b73b84f1e1b2 (patch)
treeb844149f6725069eafe592f254ae7b6424d42fb7
parent6ea574d4461199e036fb9cd05b1bbdb0f93c390c (diff)
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>
-rw-r--r--src/printsupport/kernel/qcups.cpp2
1 files changed, 1 insertions, 1 deletions
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"),