summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-01-23 17:55:07 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-27 10:48:25 +0100
commitaf837734b2259201f126b206bd5299497e080f7b (patch)
tree54957f85e5267ee0b181fcdeb836cabdb62fc151 /src/printsupport
parent5a03dfa249a270fed2c73b6d6a64a79e80eda583 (diff)
Pass QDate and QTime as value classes
It's what they are, so const refs are needless burden. In the process, consolidate two of the affected methods (one of which just adds another argument to the other's signature) into one. Change-Id: I80de35ffe078a652d1999889dede0b10302abaa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/kernel/qcups.cpp2
-rw-r--r--src/printsupport/kernel/qcups_p.h4
-rw-r--r--src/printsupport/widgets/qcupsjobwidget.cpp2
-rw-r--r--src/printsupport/widgets/qcupsjobwidget_p.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp
index 0fc8cdd1b7..ab9b2889e2 100644
--- a/src/printsupport/kernel/qcups.cpp
+++ b/src/printsupport/kernel/qcups.cpp
@@ -167,7 +167,7 @@ ppd_option_t *QCUPSSupport::findPpdOption(const char *optionName, QPrintDevice *
return nullptr;
}
-void QCUPSSupport::setJobHold(QPrinter *printer, const JobHoldUntil jobHold, const QTime &holdUntilTime)
+void QCUPSSupport::setJobHold(QPrinter *printer, const JobHoldUntil jobHold, QTime holdUntilTime)
{
const QString jobHoldUntilArgument = jobHoldToString(jobHold, holdUntilTime);
if (!jobHoldUntilArgument.isEmpty()) {
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index 57ec281383..4d72230b90 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -137,7 +137,7 @@ public:
static void clearCupsOption(QPrinter *printer, const QString &option);
static void clearCupsOptions(QPrinter *printer);
- static void setJobHold(QPrinter *printer, const JobHoldUntil jobHold = NoHold, const QTime &holdUntilTime = QTime());
+ static void setJobHold(QPrinter *printer, const JobHoldUntil jobHold = NoHold, QTime holdUntilTime = QTime());
static void setJobBilling(QPrinter *printer, const QString &jobBilling = QString());
static void setJobPriority(QPrinter *printer, int priority = 50);
static void setBannerPages(QPrinter *printer, const BannerPage startBannerPage, const BannerPage endBannerPage);
@@ -159,7 +159,7 @@ public:
struct JobHoldUntilWithTime
{
- JobHoldUntilWithTime(JobHoldUntil jh = NoHold, const QTime &t = QTime())
+ JobHoldUntilWithTime(JobHoldUntil jh = NoHold, QTime t = QTime())
: jobHold(jh), time(t) {}
JobHoldUntil jobHold;
diff --git a/src/printsupport/widgets/qcupsjobwidget.cpp b/src/printsupport/widgets/qcupsjobwidget.cpp
index 6d9e7432bc..43729d1fc6 100644
--- a/src/printsupport/widgets/qcupsjobwidget.cpp
+++ b/src/printsupport/widgets/qcupsjobwidget.cpp
@@ -138,7 +138,7 @@ void QCupsJobWidget::initJobHold()
toggleJobHoldTime();
}
-void QCupsJobWidget::setJobHold(QCUPSSupport::JobHoldUntil jobHold, const QTime &holdUntilTime)
+void QCupsJobWidget::setJobHold(QCUPSSupport::JobHoldUntil jobHold, QTime holdUntilTime)
{
if (jobHold == QCUPSSupport::SpecificTime && holdUntilTime.isNull()) {
jobHold = QCUPSSupport::NoHold;
diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h
index 42da9c7580..d73f116a69 100644
--- a/src/printsupport/widgets/qcupsjobwidget_p.h
+++ b/src/printsupport/widgets/qcupsjobwidget_p.h
@@ -83,7 +83,7 @@ private Q_SLOTS:
private:
- void setJobHold(QCUPSSupport::JobHoldUntil jobHold = QCUPSSupport::NoHold, const QTime &holdUntilTime = QTime());
+ void setJobHold(QCUPSSupport::JobHoldUntil jobHold = QCUPSSupport::NoHold, QTime holdUntilTime = QTime());
QCUPSSupport::JobHoldUntil jobHold() const;
QTime jobHoldTime() const;