qprogressdialog.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/dialogs/qprogressdialog.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9static const int defaultShowTime = 4000;-
10-
11static const int minWaitTime = 50;-
12-
13class QProgressDialogPrivate : public QDialogPrivate-
14{-
15 inline QProgressDialog* q_func() { return static_cast<QProgressDialog *>(q_ptr); } inline const QProgressDialog* q_func() const { return static_cast<const QProgressDialog *>(q_ptr); } friend class QProgressDialog;-
16-
17public:-
18 QProgressDialogPrivate() : label(0), cancel(0), bar(0),-
19 shown_once(false),-
20 cancellation_flag(false),-
21 setValue_called(false),-
22 showTime(defaultShowTime),-
23-
24 escapeShortcut(0),-
25-
26 useDefaultCancelText(false)-
27 {-
28 }
never executed: end of block
0
29-
30 void init(const QString &labelText, const QString &cancelText, int min, int max);-
31 void layout();-
32 void retranslateStrings();-
33 void setCancelButtonText(const QString &cancelButtonText);-
34 void adoptChildWidget(QWidget *c);-
35 void ensureSizeIsAtLeastSizeHint();-
36 void _q_disconnectOnClose();-
37-
38 QLabel *label;-
39 QPushButton *cancel;-
40 QProgressBar *bar;-
41 QTimer *forceTimer;-
42 bool shown_once;-
43 bool cancellation_flag;-
44 bool setValue_called;-
45 QElapsedTimer starttime;-
46-
47 QCursor parentCursor;-
48-
49 int showTime;-
50 bool autoClose;-
51 bool autoReset;-
52 bool forceHide;-
53-
54 QShortcut *escapeShortcut;-
55-
56 bool useDefaultCancelText;-
57 QPointer<QObject> receiverToDisconnectOnClose;-
58 QByteArray memberToDisconnectOnClose;-
59};-
60-
61void QProgressDialogPrivate::init(const QString &labelText, const QString &cancelText,-
62 int min, int max)-
63{-
64 QProgressDialog * const q = q_func();-
65 label = new QLabel(labelText, q);-
66 bar = new QProgressBar(q);-
67 bar->setRange(min, max);-
68 int align = q->style()->styleHint(QStyle::SH_ProgressDialog_TextLabelAlignment, 0, q);-
69 label->setAlignment(Qt::Alignment(align));-
70 autoClose = true;-
71 autoReset = true;-
72 forceHide = false;-
73 QObject::connect(q, qFlagLocation("2""canceled()" "\0" __FILE__ ":" "126"), q, qFlagLocation("1""cancel()" "\0" __FILE__ ":" "126"));-
74 forceTimer = new QTimer(q);-
75 QObject::connect(forceTimer, qFlagLocation("2""timeout()" "\0" __FILE__ ":" "128"), q, qFlagLocation("1""forceShow()" "\0" __FILE__ ":" "128"));-
76 if (useDefaultCancelText
useDefaultCancelTextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
77 retranslateStrings();-
78 }
never executed: end of block
else {
0
79 q->setCancelButtonText(cancelText);-
80 }
never executed: end of block
0
81 starttime.start();-
82 forceTimer->start(showTime);-
83}
never executed: end of block
0
84-
85void QProgressDialogPrivate::layout()-
86{-
87 QProgressDialog * const q = q_func();-
88 int sp = q->style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);-
89 int mtb = q->style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin);-
90 int mlr = qMin(q->width() / 10, mtb);-
91 const bool centered =-
92 bool(q->style()->styleHint(QStyle::SH_ProgressDialog_CenterCancelButton, 0, q));-
93-
94 int additionalSpacing = 0;-
95 QSize cs = cancel
cancelDescription
TRUEnever evaluated
FALSEnever evaluated
? cancel->sizeHint() : QSize(0,0);
0
96 QSize bh = bar->sizeHint();-
97 int cspc;-
98 int lh = 0;-
99-
100-
101-
102 for (int attempt=5; attempt--
attempt--Description
TRUEnever evaluated
FALSEnever evaluated
;) {
0
103 cspc = cancel
cancelDescription
TRUEnever evaluated
FALSEnever evaluated
? cs.height() + sp : 0;
0
104 lh = qMax(0, q->height() - mtb - bh.height() - sp - cspc);-
105-
106 if (lh < q->height()/4
lh < q->height()/4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
107-
108 sp /= 2;-
109 mtb /= 2;-
110 if (cancel
cancelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
111 cs.setHeight(qMax(4,cs.height()-sp-2));-
112 }
never executed: end of block
0
113 bh.setHeight(qMax(4,bh.height()-sp-1));-
114 }
never executed: end of block
else {
0
115 break;
never executed: break;
0
116 }-
117 }-
118-
119 if (cancel
cancelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
120 cancel->setGeometry(-
121 centered ? q->width()/2 - cs.width()/2 : q->width() - mlr - cs.width(),-
122 q->height() - mtb - cs.height(),-
123 cs.width(), cs.height());-
124 }
never executed: end of block
0
125-
126 if (label
labelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
127 label->setGeometry(mlr, additionalSpacing, q->width() - mlr * 2, lh);
never executed: label->setGeometry(mlr, additionalSpacing, q->width() - mlr * 2, lh);
0
128 bar->setGeometry(mlr, lh + sp + additionalSpacing, q->width() - mlr * 2, bh.height());-
129}
never executed: end of block
0
130-
131void QProgressDialogPrivate::retranslateStrings()-
132{-
133 if (useDefaultCancelText
useDefaultCancelTextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
134 setCancelButtonText(QProgressDialog::tr("Cancel"));
never executed: setCancelButtonText(QProgressDialog::tr("Cancel"));
0
135}
never executed: end of block
0
136-
137void QProgressDialogPrivate::_q_disconnectOnClose()-
138{-
139 QProgressDialog * const q = q_func();-
140 if (receiverToDisconnectOnClose
receiverToDisconnectOnCloseDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
141 QObject::disconnect(q, qFlagLocation("2""canceled()" "\0" __FILE__ ":" "194"), receiverToDisconnectOnClose,-
142 memberToDisconnectOnClose);-
143 receiverToDisconnectOnClose = 0;-
144 }
never executed: end of block
0
145 memberToDisconnectOnClose.clear();-
146}
never executed: end of block
0
147QProgressDialog::QProgressDialog(QWidget *parent, Qt::WindowFlags f)-
148 : QDialog(*(new QProgressDialogPrivate), parent, f)-
149{-
150 QProgressDialogPrivate * const d = d_func();-
151 d->useDefaultCancelText = true;-
152 d->init(QString::fromLatin1(""), QString(), 0, 100);-
153}
never executed: end of block
0
154QProgressDialog::QProgressDialog(const QString &labelText,-
155 const QString &cancelButtonText,-
156 int minimum, int maximum,-
157 QWidget *parent, Qt::WindowFlags f)-
158 : QDialog(*(new QProgressDialogPrivate), parent, f)-
159{-
160 QProgressDialogPrivate * const d = d_func();-
161 d->init(labelText, cancelButtonText, minimum, maximum);-
162}
never executed: end of block
0
163-
164-
165-
166-
167-
168-
169QProgressDialog::~QProgressDialog()-
170{-
171}-
172void QProgressDialog::setLabel(QLabel *label)-
173{-
174 QProgressDialogPrivate * const d = d_func();-
175 if (label == d->label
label == d->labelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
176 if (__builtin_expect(!!(label), false)
__builtin_expe...label), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
177 QMessageLogger(__FILE__, 363, __PRETTY_FUNCTION__).warning("QProgressDialog::setLabel: Attempt to set the same label again");
never executed: QMessageLogger(__FILE__, 363, __PRETTY_FUNCTION__).warning("QProgressDialog::setLabel: Attempt to set the same label again");
0
178 return;
never executed: return;
0
179 }-
180 delete d->label;-
181 d->label = label;-
182 d->adoptChildWidget(label);-
183}
never executed: end of block
0
184QString QProgressDialog::labelText() const-
185{-
186 const QProgressDialogPrivate * const d = d_func();-
187 if (d->label
d->labelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
188 return
never executed: return d->label->text();
d->label->text();
never executed: return d->label->text();
0
189 return
never executed: return QString();
QString();
never executed: return QString();
0
190}-
191-
192void QProgressDialog::setLabelText(const QString &text)-
193{-
194 QProgressDialogPrivate * const d = d_func();-
195 if (d->label
d->labelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
196 d->label->setText(text);-
197 d->ensureSizeIsAtLeastSizeHint();-
198 }
never executed: end of block
0
199}
never executed: end of block
0
200void QProgressDialog::setCancelButton(QPushButton *cancelButton)-
201{-
202 QProgressDialogPrivate * const d = d_func();-
203 if (d->cancel == cancelButton
d->cancel == cancelButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
204 if (__builtin_expect(!!(cancelButton), false)
__builtin_expe...utton), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
205 QMessageLogger(__FILE__, 412, __PRETTY_FUNCTION__).warning("QProgressDialog::setCancelButton: Attempt to set the same button again");
never executed: QMessageLogger(__FILE__, 412, __PRETTY_FUNCTION__).warning("QProgressDialog::setCancelButton: Attempt to set the same button again");
0
206 return;
never executed: return;
0
207 }-
208 delete d->cancel;-
209 d->cancel = cancelButton;-
210 if (cancelButton
cancelButtonDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
211 connect(d->cancel, qFlagLocation("2""clicked()" "\0" __FILE__ ":" "418"), this, qFlagLocation("2""canceled()" "\0" __FILE__ ":" "418"));-
212-
213-
214 d->escapeShortcut = new QShortcut(QKeySequence::Cancel, this, qFlagLocation("2""canceled()" "\0" __FILE__ ":" "421"));-
215-
216 }
never executed: end of block
else {
0
217-
218 delete d->escapeShortcut;-
219 d->escapeShortcut = 0;-
220-
221 }
never executed: end of block
0
222 d->adoptChildWidget(cancelButton);-
223}
never executed: end of block
0
224void QProgressDialog::setCancelButtonText(const QString &cancelButtonText)-
225{-
226 QProgressDialogPrivate * const d = d_func();-
227 d->useDefaultCancelText = false;-
228 d->setCancelButtonText(cancelButtonText);-
229}
never executed: end of block
0
230-
231void QProgressDialogPrivate::setCancelButtonText(const QString &cancelButtonText)-
232{-
233 QProgressDialog * const q = q_func();-
234-
235 if (!cancelButtonText.isNull()
!cancelButtonText.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
236 if (cancel
cancelDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
237 cancel->setText(cancelButtonText);-
238 }
never executed: end of block
else {
0
239 q->setCancelButton(new QPushButton(cancelButtonText, q));-
240 }
never executed: end of block
0
241 } else {-
242 q->setCancelButton(0);-
243 }
never executed: end of block
0
244 ensureSizeIsAtLeastSizeHint();-
245}
never executed: end of block
0
246void QProgressDialog::setBar(QProgressBar *bar)-
247{-
248 QProgressDialogPrivate * const d = d_func();-
249 if (__builtin_expect(!!(!bar), false)
__builtin_expe...(!bar), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
250 QMessageLogger(__FILE__, 475, __PRETTY_FUNCTION__).warning("QProgressDialog::setBar: Cannot set a null progress bar");-
251 return;
never executed: return;
0
252 }-
253-
254 if (__builtin_expect(!!(value() > 0), false)
__builtin_expe...) > 0), false)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
255 QMessageLogger(__FILE__, 480, __PRETTY_FUNCTION__).warning("QProgressDialog::setBar: Cannot set a new progress bar "
never executed: QMessageLogger(__FILE__, 480, __PRETTY_FUNCTION__).warning("QProgressDialog::setBar: Cannot set a new progress bar " "while the old one is active");
0
256 "while the old one is active");
never executed: QMessageLogger(__FILE__, 480, __PRETTY_FUNCTION__).warning("QProgressDialog::setBar: Cannot set a new progress bar " "while the old one is active");
0
257-
258 if (__builtin_expect(!!(bar == d->bar), false)
__builtin_expe...->bar), false)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
259 QMessageLogger(__FILE__, 484, __PRETTY_FUNCTION__).warning("QProgressDialog::setBar: Attempt to set the same progress bar again");-
260 return;
never executed: return;
0
261 }-
262 delete d->bar;-
263 d->bar = bar;-
264 d->adoptChildWidget(bar);-
265}
never executed: end of block
0
266-
267void QProgressDialogPrivate::adoptChildWidget(QWidget *c)-
268{-
269 QProgressDialog * const q = q_func();-
270-
271 if (c
cDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
272 if (c->parentWidget() == q
c->parentWidget() == qDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
273 c->hide();
never executed: c->hide();
0
274 else-
275 c->setParent(q, 0);
never executed: c->setParent(q, 0);
0
276 }-
277 ensureSizeIsAtLeastSizeHint();-
278 if (c
cDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
279 c->show();
never executed: c->show();
0
280}
never executed: end of block
0
281-
282void QProgressDialogPrivate::ensureSizeIsAtLeastSizeHint()-
283{-
284 QProgressDialog * const q = q_func();-
285-
286 QSize size = q->sizeHint();-
287 if (q->isVisible()
q->isVisible()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
288 size = size.expandedTo(q->size());
never executed: size = size.expandedTo(q->size());
0
289 q->resize(size);-
290}
never executed: end of block
0
291-
292-
293-
294-
295-
296-
297-
298bool QProgressDialog::wasCanceled() const-
299{-
300 const QProgressDialogPrivate * const d = d_func();-
301 return
never executed: return d->cancellation_flag;
d->cancellation_flag;
never executed: return d->cancellation_flag;
0
302}-
303int QProgressDialog::maximum() const-
304{-
305 const QProgressDialogPrivate * const d = d_func();-
306 return
never executed: return d->bar->maximum();
d->bar->maximum();
never executed: return d->bar->maximum();
0
307}-
308-
309void QProgressDialog::setMaximum(int maximum)-
310{-
311 QProgressDialogPrivate * const d = d_func();-
312 d->bar->setMaximum(maximum);-
313}
never executed: end of block
0
314int QProgressDialog::minimum() const-
315{-
316 const QProgressDialogPrivate * const d = d_func();-
317 return
never executed: return d->bar->minimum();
d->bar->minimum();
never executed: return d->bar->minimum();
0
318}-
319-
320void QProgressDialog::setMinimum(int minimum)-
321{-
322 QProgressDialogPrivate * const d = d_func();-
323 d->bar->setMinimum(minimum);-
324}
never executed: end of block
0
325void QProgressDialog::setRange(int minimum, int maximum)-
326{-
327 QProgressDialogPrivate * const d = d_func();-
328 d->bar->setRange(minimum, maximum);-
329}
never executed: end of block
0
330void QProgressDialog::reset()-
331{-
332 QProgressDialogPrivate * const d = d_func();-
333-
334 if (value() >= 0
value() >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
335 if (parentWidget()
parentWidget()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
336 parentWidget()->setCursor(d->parentCursor);
never executed: parentWidget()->setCursor(d->parentCursor);
0
337 }
never executed: end of block
0
338-
339 if (d->autoClose
d->autoCloseDescription
TRUEnever evaluated
FALSEnever evaluated
|| d->forceHide
d->forceHideDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
340 hide();
never executed: hide();
0
341 d->bar->reset();-
342 d->cancellation_flag = false;-
343 d->shown_once = false;-
344 d->setValue_called = false;-
345 d->forceTimer->stop();-
346-
347-
348-
349-
350-
351-
352 if (d->receiverToDisconnectOnClose
d->receiverToDisconnectOnCloseDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
353 QMetaObject::invokeMethod(this, "_q_disconnectOnClose", Qt::QueuedConnection);
never executed: QMetaObject::invokeMethod(this, "_q_disconnectOnClose", Qt::QueuedConnection);
0
354}
never executed: end of block
0
355-
356-
357-
358-
359-
360-
361-
362void QProgressDialog::cancel()-
363{-
364 QProgressDialogPrivate * const d = d_func();-
365 d->forceHide = true;-
366 reset();-
367 d->forceHide = false;-
368 d->cancellation_flag = true;-
369}
never executed: end of block
0
370-
371-
372int QProgressDialog::value() const-
373{-
374 const QProgressDialogPrivate * const d = d_func();-
375 return
never executed: return d->bar->value();
d->bar->value();
never executed: return d->bar->value();
0
376}-
377void QProgressDialog::setValue(int progress)-
378{-
379 QProgressDialogPrivate * const d = d_func();-
380 if (d->setValue_called
d->setValue_calledDescription
TRUEnever evaluated
FALSEnever evaluated
&& progress == d->bar->value()
progress == d->bar->value()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
381 return;
never executed: return;
0
382-
383 d->bar->setValue(progress);-
384-
385 if (d->shown_once
d->shown_onceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
386 if (isModal()
isModal()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
387 QApplication::processEvents();
never executed: QApplication::processEvents();
0
388 }
never executed: end of block
else {
0
389 if ((!d->setValue_called
!d->setValue_calledDescription
TRUEnever evaluated
FALSEnever evaluated
&& progress == 0
progress == 0Description
TRUEnever evaluated
FALSEnever evaluated
) || progress == minimum()
progress == minimum()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
390 d->starttime.start();-
391 d->forceTimer->start(d->showTime);-
392 d->setValue_called = true;-
393 return;
never executed: return;
0
394 } else {-
395 d->setValue_called = true;-
396 bool need_show;-
397 int elapsed = d->starttime.elapsed();-
398 if (elapsed >= d->showTime
elapsed >= d->showTimeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
399 need_show = true;-
400 }
never executed: end of block
else {
0
401 if (elapsed > minWaitTime
elapsed > minWaitTimeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
402 int estimate;-
403 int totalSteps = maximum() - minimum();-
404 int myprogress = progress - minimum();-
405 if (myprogress == 0
myprogress == 0Description
TRUEnever evaluated
FALSEnever evaluated
) myprogress = 1;
never executed: myprogress = 1;
0
406 if ((
(totalSteps - ...3647 / elapsedDescription
TRUEnever evaluated
FALSEnever evaluated
totalSteps - myprogress) >= 2147483647 / elapsed
(totalSteps - ...3647 / elapsedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
407 estimate = (totalSteps - myprogress) / myprogress * elapsed;
never executed: estimate = (totalSteps - myprogress) / myprogress * elapsed;
0
408 else-
409 estimate = elapsed * (totalSteps - myprogress) / myprogress;
never executed: estimate = elapsed * (totalSteps - myprogress) / myprogress;
0
410 need_show = estimate >= d->showTime;-
411 }
never executed: end of block
else {
0
412 need_show = false;-
413 }
never executed: end of block
0
414 }-
415 if (need_show
need_showDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
416 d->ensureSizeIsAtLeastSizeHint();-
417 show();-
418 d->shown_once = true;-
419 }
never executed: end of block
0
420 }
never executed: end of block
0
421 }-
422-
423 if (progress == d->bar->maximum()
progress == d->bar->maximum()Description
TRUEnever evaluated
FALSEnever evaluated
&& d->autoReset
d->autoResetDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
424 reset();
never executed: reset();
0
425}
never executed: end of block
0
426-
427-
428-
429-
430-
431-
432-
433QSize QProgressDialog::sizeHint() const-
434{-
435 const QProgressDialogPrivate * const d = d_func();-
436 QSize sh = d->label
d->labelDescription
TRUEnever evaluated
FALSEnever evaluated
? d->label->sizeHint() : QSize(0, 0);
0
437 QSize bh = d->bar->sizeHint();-
438 int margin = style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin);-
439 int spacing = style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);-
440 int h = margin * 2 + bh.height() + sh.height() + spacing;-
441 if (d->cancel
d->cancelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
442 h += d->cancel->sizeHint().height() + spacing;
never executed: h += d->cancel->sizeHint().height() + spacing;
0
443 return
never executed: return QSize(qMax(200, sh.width() + 2 * margin), h);
QSize(qMax(200, sh.width() + 2 * margin), h);
never executed: return QSize(qMax(200, sh.width() + 2 * margin), h);
0
444}-
445-
446-
447-
448void QProgressDialog::resizeEvent(QResizeEvent *)-
449{-
450 QProgressDialogPrivate * const d = d_func();-
451 d->layout();-
452}
never executed: end of block
0
453-
454-
455-
456-
457void QProgressDialog::changeEvent(QEvent *ev)-
458{-
459 QProgressDialogPrivate * const d = d_func();-
460 if (ev->type() == QEvent::StyleChange
ev->type() == ...t::StyleChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
461 d->layout();-
462 }
never executed: end of block
else if (ev->type() == QEvent::LanguageChange
ev->type() == ...LanguageChangeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
463 d->retranslateStrings();-
464 }
never executed: end of block
0
465 QDialog::changeEvent(ev);-
466}
never executed: end of block
0
467void QProgressDialog::setMinimumDuration(int ms)-
468{-
469 QProgressDialogPrivate * const d = d_func();-
470 d->showTime = ms;-
471 if (d->bar->value() == d->bar->minimum()
d->bar->value(...bar->minimum()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
472 d->forceTimer->stop();-
473 d->forceTimer->start(ms);-
474 }
never executed: end of block
0
475}
never executed: end of block
0
476-
477int QProgressDialog::minimumDuration() const-
478{-
479 const QProgressDialogPrivate * const d = d_func();-
480 return
never executed: return d->showTime;
d->showTime;
never executed: return d->showTime;
0
481}-
482-
483-
484-
485-
486-
487-
488void QProgressDialog::closeEvent(QCloseEvent *e)-
489{-
490 canceled();-
491 QDialog::closeEvent(e);-
492}
never executed: end of block
0
493void QProgressDialog::setAutoReset(bool b)-
494{-
495 QProgressDialogPrivate * const d = d_func();-
496 d->autoReset = b;-
497}
never executed: end of block
0
498-
499bool QProgressDialog::autoReset() const-
500{-
501 const QProgressDialogPrivate * const d = d_func();-
502 return
never executed: return d->autoReset;
d->autoReset;
never executed: return d->autoReset;
0
503}-
504void QProgressDialog::setAutoClose(bool close)-
505{-
506 QProgressDialogPrivate * const d = d_func();-
507 d->autoClose = close;-
508}
never executed: end of block
0
509-
510bool QProgressDialog::autoClose() const-
511{-
512 const QProgressDialogPrivate * const d = d_func();-
513 return
never executed: return d->autoClose;
d->autoClose;
never executed: return d->autoClose;
0
514}-
515-
516-
517-
518-
519-
520void QProgressDialog::showEvent(QShowEvent *e)-
521{-
522 QProgressDialogPrivate * const d = d_func();-
523 QDialog::showEvent(e);-
524 d->ensureSizeIsAtLeastSizeHint();-
525 d->forceTimer->stop();-
526}
never executed: end of block
0
527void QProgressDialog::forceShow()-
528{-
529 QProgressDialogPrivate * const d = d_func();-
530 d->forceTimer->stop();-
531 if (d->shown_once
d->shown_onceDescription
TRUEnever evaluated
FALSEnever evaluated
|| d->cancellation_flag
d->cancellation_flagDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
532 return;
never executed: return;
0
533-
534 show();-
535 d->shown_once = true;-
536}
never executed: end of block
0
537void QProgressDialog::open(QObject *receiver, const char *member)-
538{-
539 QProgressDialogPrivate * const d = d_func();-
540 connect(this, qFlagLocation("2""canceled()" "\0" __FILE__ ":" "879"), receiver, member);-
541 d->receiverToDisconnectOnClose = receiver;-
542 d->memberToDisconnectOnClose = member;-
543 QDialog::open();-
544}
never executed: end of block
0
545-
546-
547-
Switch to Source codePreprocessed file

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