qcups.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/printsupport/kernel/qcups.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7QStringList QCUPSSupport::cupsOptionsList(QPrinter *printer)-
8{-
9 return
never executed: return printer->printEngine()->property(QPrintEngine::PrintEnginePropertyKey(0xfe00)).toStringList();
printer->printEngine()->property(QPrintEngine::PrintEnginePropertyKey(0xfe00)).toStringList();
never executed: return printer->printEngine()->property(QPrintEngine::PrintEnginePropertyKey(0xfe00)).toStringList();
0
10}-
11-
12void QCUPSSupport::setCupsOptions(QPrinter *printer, const QStringList &cupsOptions)-
13{-
14 printer->printEngine()->setProperty(QPrintEngine::PrintEnginePropertyKey(0xfe00), QVariant(cupsOptions));-
15}
never executed: end of block
0
16-
17void QCUPSSupport::setCupsOption(QStringList &cupsOptions, const QString &option, const QString &value)-
18{-
19 if (cupsOptions.contains(option)
cupsOptions.contains(option)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
20 cupsOptions.replace(cupsOptions.indexOf(option) + 1, value);-
21 }
never executed: end of block
else {
0
22 cupsOptions.append(option);-
23 cupsOptions.append(value);-
24 }
never executed: end of block
0
25}-
26-
27void QCUPSSupport::clearCupsOption(QStringList &cupsOptions, const QString &option)-
28{-
29-
30 const QStringList::iterator it = std::find(cupsOptions.begin(), cupsOptions.end(), option);-
31 if (it != cupsOptions.end()
it != cupsOptions.end()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
32 ((!(it + 1 < cupsOptions.end())) ? qt_assert("it + 1 < cupsOptions.end()",__FILE__,73) : qt_noop());-
33 cupsOptions.erase(it, it+1);-
34 }
never executed: end of block
0
35}
never executed: end of block
0
36-
37static inline QString jobHoldToString(const QCUPSSupport::JobHoldUntil jobHold, const QTime holdUntilTime)-
38{-
39 switch (jobHold) {-
40 case
never executed: case QCUPSSupport::Indefinite:
QCUPSSupport::Indefinite:
never executed: case QCUPSSupport::Indefinite:
0
41 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "indefinite")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "indefinite" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "indefinite")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "indefinite" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "indefinite")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "indefinite" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
42 case
never executed: case QCUPSSupport::DayTime:
QCUPSSupport::DayTime:
never executed: case QCUPSSupport::DayTime:
0
43 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "day-time")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "day-time" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "day-time")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "day-time" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "day-time")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "day-time" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
44 case
never executed: case QCUPSSupport::Night:
QCUPSSupport::Night:
never executed: case QCUPSSupport::Night:
0
45 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "night")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "night" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "night")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "night" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "night")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "night" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
46 case
never executed: case QCUPSSupport::SecondShift:
QCUPSSupport::SecondShift:
never executed: case QCUPSSupport::SecondShift:
0
47 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "second-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "second-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "second-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "second-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "second-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "second-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
48 case
never executed: case QCUPSSupport::ThirdShift:
QCUPSSupport::ThirdShift:
never executed: case QCUPSSupport::ThirdShift:
0
49 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "third-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "third-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "third-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "third-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "third-shift")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "third-shift" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
50 case
never executed: case QCUPSSupport::Weekend:
QCUPSSupport::Weekend:
never executed: case QCUPSSupport::Weekend:
0
51 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "weekend")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "weekend" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "weekend")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "weekend" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "weekend")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "weekend" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
52 case
never executed: case QCUPSSupport::SpecificTime:
QCUPSSupport::SpecificTime:
never executed: case QCUPSSupport::SpecificTime:
0
53 if (!holdUntilTime.isNull()
!holdUntilTime.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
54-
55 QDateTime localDateTime = QDateTime::currentDateTime();-
56-
57 if (holdUntilTime < localDateTime.time()
holdUntilTime ...ateTime.time()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
58 localDateTime = localDateTime.addDays(1);
never executed: localDateTime = localDateTime.addDays(1);
0
59 localDateTime.setTime(holdUntilTime);-
60 return
never executed: return localDateTime.toUTC().time().toString(([]() -> QString { enum { Size = sizeof(u"" "HH:mm")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HH:mm" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
localDateTime.toUTC().time().toString(([]() -> QString { enum { Size = sizeof(u"" "HH:mm")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HH:mm" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return localDateTime.toUTC().time().toString(([]() -> QString { enum { Size = sizeof(u"" "HH:mm")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HH:mm" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
61 }-
62-
63 case
never executed: case QCUPSSupport::NoHold:
QCUPSSupport::NoHold:
never executed: case QCUPSSupport::NoHold:
code before this statement never executed: case QCUPSSupport::NoHold:
0
64 return
never executed: return QString();
QString();
never executed: return QString();
0
65 }-
66 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,107) : qt_noop()); __builtin_unreachable(); } while (0);-
67 return
never executed: return QString();
QString();
never executed: return QString();
0
68}-
69-
70void QCUPSSupport::setJobHold(QPrinter *printer, const JobHoldUntil jobHold, const QTime &holdUntilTime)-
71{-
72 QStringList cupsOptions = cupsOptionsList(printer);-
73 const QString jobHoldUntilArgument = jobHoldToString(jobHold, holdUntilTime);-
74 if (!jobHoldUntilArgument.isEmpty()
!jobHoldUntilA...ment.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
75 setCupsOption(cupsOptions,-
76 ([]() -> QString { enum { Size = sizeof(u"" "job-hold-until")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "job-hold-until" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()),
0
77 jobHoldUntilArgument);-
78 }
never executed: end of block
else {
0
79 clearCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "job-hold-until")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "job-hold-until" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
0
80 }
never executed: end of block
0
81 setCupsOptions(printer, cupsOptions);-
82}
never executed: end of block
0
83-
84void QCUPSSupport::setJobBilling(QPrinter *printer, const QString &jobBilling)-
85{-
86 QStringList cupsOptions = cupsOptionsList(printer);-
87 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "job-billing")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "job-billing" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), jobBilling);
0
88 setCupsOptions(printer, cupsOptions);-
89}
never executed: end of block
0
90-
91void QCUPSSupport::setJobPriority(QPrinter *printer, int priority)-
92{-
93 QStringList cupsOptions = cupsOptionsList(printer);-
94 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "job-priority")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "job-priority" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), QString::number(priority));
0
95 setCupsOptions(printer, cupsOptions);-
96}
never executed: end of block
0
97-
98static inline QString bannerPageToString(const QCUPSSupport::BannerPage bannerPage)-
99{-
100 switch (bannerPage) {-
101 case
never executed: case QCUPSSupport::NoBanner:
QCUPSSupport::NoBanner:
never executed: case QCUPSSupport::NoBanner:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "none")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "none" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "none")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "none" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "none")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "none" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
102 case
never executed: case QCUPSSupport::Standard:
QCUPSSupport::Standard:
never executed: case QCUPSSupport::Standard:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "standard")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "standard" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "standard")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "standard" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "standard")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "standard" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
103 case
never executed: case QCUPSSupport::Unclassified:
QCUPSSupport::Unclassified:
never executed: case QCUPSSupport::Unclassified:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "unclassified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "unclassified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "unclassified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "unclassified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "unclassified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "unclassified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
104 case
never executed: case QCUPSSupport::Confidential:
QCUPSSupport::Confidential:
never executed: case QCUPSSupport::Confidential:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "confidential")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "confidential" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "confidential")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "confidential" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "confidential")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "confidential" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
105 case
never executed: case QCUPSSupport::Classified:
QCUPSSupport::Classified:
never executed: case QCUPSSupport::Classified:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "classified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "classified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "classified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "classified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "classified")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "classified" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
106 case
never executed: case QCUPSSupport::Secret:
QCUPSSupport::Secret:
never executed: case QCUPSSupport::Secret:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "secret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "secret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "secret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "secret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "secret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "secret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
107 case
never executed: case QCUPSSupport::TopSecret:
QCUPSSupport::TopSecret:
never executed: case QCUPSSupport::TopSecret:
return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "topsecret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "topsecret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "topsecret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "topsecret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "topsecret")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "topsecret" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
108 }-
109 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,150) : qt_noop()); __builtin_unreachable(); } while (0);-
110 return
never executed: return QString();
QString();
never executed: return QString();
0
111};-
112-
113void QCUPSSupport::setBannerPages(QPrinter *printer, const BannerPage startBannerPage, const BannerPage endBannerPage)-
114{-
115 QStringList cupsOptions = cupsOptionsList(printer);-
116 const QString startBanner = bannerPageToString(startBannerPage);-
117 const QString endBanner = bannerPageToString(endBannerPage);-
118-
119 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "job-sheets")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "job-sheets" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), startBanner + QLatin1Char(',') + endBanner);
0
120 setCupsOptions(printer, cupsOptions);-
121}
never executed: end of block
0
122-
123void QCUPSSupport::setPageSet(QPrinter *printer, const PageSet pageSet)-
124{-
125 QStringList cupsOptions = cupsOptionsList(printer);-
126 QString pageSetString;-
127-
128 switch (pageSet) {-
129 case
never executed: case OddPages:
OddPages:
never executed: case OddPages:
0
130 pageSetString = ([]() -> QString { enum { Size = sizeof(u"" "odd")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "odd" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
131 break;
never executed: break;
0
132 case
never executed: case EvenPages:
EvenPages:
never executed: case EvenPages:
0
133 pageSetString = ([]() -> QString { enum { Size = sizeof(u"" "even")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "even" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
134 break;
never executed: break;
0
135 case
never executed: case AllPages:
AllPages:
never executed: case AllPages:
0
136 pageSetString = ([]() -> QString { enum { Size = sizeof(u"" "all")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "all" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
137 break;
never executed: break;
0
138 }-
139-
140 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "page-set")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "page-set" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), pageSetString);
0
141 setCupsOptions(printer, cupsOptions);-
142}
never executed: end of block
0
143-
144void QCUPSSupport::setPagesPerSheetLayout(QPrinter *printer, const PagesPerSheet pagesPerSheet,-
145 const PagesPerSheetLayout pagesPerSheetLayout)-
146{-
147 QStringList cupsOptions = cupsOptionsList(printer);-
148-
149-
150-
151 static const char pagesPerSheetData[][2] = { "1", "2", "4", "6", "9", {'1', '6'}, "\0" };-
152 static const char pageLayoutData[][5] = {"lrtb", "lrbt", "rlbt", "rltb", "btlr", "btrl", "tblr", "tbrl"};-
153 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "number-up")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "number-up" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), QLatin1String(pagesPerSheetData[pagesPerSheet]));
0
154 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "number-up-layout")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "number-up-layout" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), QLatin1String(pageLayoutData[pagesPerSheetLayout]));
0
155 setCupsOptions(printer, cupsOptions);-
156}
never executed: end of block
0
157-
158void QCUPSSupport::setPageRange(QPrinter *printer, int pageFrom, int pageTo)-
159{-
160 QStringList cupsOptions = cupsOptionsList(printer);-
161 setCupsOption(cupsOptions, ([]() -> QString { enum { Size = sizeof(u"" "page-ranges")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "page-ranges" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), ([]() -> QString { enum { Size = sizeof(u"" "%1-%2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "%1-%2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()).arg(pageFrom).arg(pageTo));
0
162 setCupsOptions(printer, cupsOptions);-
163}
never executed: end of block
0
164-
165-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9