dialogs/qpagesetupdialog.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6QPageSetupDialogPrivate::QPageSetupDialogPrivate(QPrinter *prntr) : printer(0), ownsPrinter(false) -
7{ -
8 setPrinter(prntr); -
9 init(); -
10}
executed: }
Execution Count:1
1
11 -
12void QPageSetupDialogPrivate::init() -
13{ -
14} -
15 -
16void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter) -
17{ -
18 if (printer && ownsPrinter)
partially evaluated: printer
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
never evaluated: ownsPrinter
0-1
19 delete printer;
never executed: delete printer;
0
20 -
21 if (newPrinter) {
partially evaluated: newPrinter
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
22 printer = newPrinter; -
23 ownsPrinter = false; -
24 } else {
executed: }
Execution Count:1
1
25 printer = new QPrinter; -
26 ownsPrinter = true; -
27 }
never executed: }
0
28 -
29 if (printer->outputFormat() != QPrinter::NativeFormat)
partially evaluated: printer->outputFormat() != QPrinter::NativeFormat
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
30 QMessageLogger("dialogs/qpagesetupdialog.cpp", 128, __PRETTY_FUNCTION__).warning("QPageSetupDialog: Cannot be used on non-native printers");
executed: QMessageLogger("dialogs/qpagesetupdialog.cpp", 128, __PRETTY_FUNCTION__).warning("QPageSetupDialog: Cannot be used on non-native printers");
Execution Count:1
1
31 -
32}
executed: }
Execution Count:1
1
33void QPageSetupDialog::open(QObject *receiver, const char *member) -
34{ -
35 QPageSetupDialogPrivate * const d = d_func(); -
36 connect(this, "2""accepted()", receiver, member); -
37 d->receiverToDisconnectOnClose = receiver; -
38 d->memberToDisconnectOnClose = member; -
39 QDialog::open(); -
40}
never executed: }
0
41 -
42 -
43 -
44 -
45 -
46 -
47 -
48QPageSetupDialog::~QPageSetupDialog() -
49{ -
50 QPageSetupDialogPrivate * const d = d_func(); -
51 if (d->ownsPrinter)
partially evaluated: d->ownsPrinter
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
52 delete d->printer;
never executed: delete d->printer;
0
53}
executed: }
Execution Count:1
1
54 -
55QPrinter *QPageSetupDialog::printer() -
56{ -
57 QPageSetupDialogPrivate * const d = d_func(); -
58 return d->printer;
never executed: return d->printer;
0
59} -
60void QPageSetupDialog::done(int result) -
61{ -
62 QPageSetupDialogPrivate * const d = d_func(); -
63 QDialog::done(result); -
64 if (d->receiverToDisconnectOnClose) {
never evaluated: d->receiverToDisconnectOnClose
0
65 disconnect(this, "2""accepted()", -
66 d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); -
67 d->receiverToDisconnectOnClose = 0; -
68 }
never executed: }
0
69 d->memberToDisconnectOnClose.clear(); -
70 -
71}
never executed: }
0
72 -
73 -
74 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial