diff options
Diffstat (limited to 'src/widgets/dialogs/qwizard.cpp')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 0295241a74..a4789f40b1 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -115,7 +115,7 @@ static QWidget *iWantTheFocus(QWidget *ancestor) return candidate; } } - return 0; + return nullptr; } static bool objectInheritsXAndXIsCloserThanY(const QObject *object, const QByteArray &classX, @@ -165,7 +165,7 @@ static const char *changed_signal(int which) }; Q_STATIC_ASSERT(7 == NFallbackDefaultProperties); Q_UNREACHABLE(); - return 0; + return nullptr; } class QWizardDefaultProperty @@ -286,9 +286,9 @@ class QWizardHeader : public QWidget public: enum RulerType { Ruler }; - inline QWizardHeader(RulerType /* ruler */, QWidget *parent = 0) + inline QWizardHeader(RulerType /* ruler */, QWidget *parent = nullptr) : QWidget(parent) { setFixedHeight(2); } - QWizardHeader(QWidget *parent = 0); + QWizardHeader(QWidget *parent = nullptr); void setup(const QWizardLayoutInfo &info, const QString &title, const QString &subTitle, const QPixmap &logo, const QPixmap &banner, @@ -438,7 +438,7 @@ void QWizardHeader::paintEvent(QPaintEvent * /* event */) class QWizardRuler : public QWizardHeader { public: - inline QWizardRuler(QWidget *parent = 0) + inline QWizardRuler(QWidget *parent = nullptr) : QWizardHeader(Ruler, parent) {} }; @@ -684,7 +684,7 @@ void QWizardPrivate::init() std::fill(btns, btns + QWizard::NButtons, nullptr); antiFlickerWidget = new QWizardAntiFlickerWidget(q, this); - wizStyle = QWizard::WizardStyle(q->style()->styleHint(QStyle::SH_WizardStyle, 0, q)); + wizStyle = QWizard::WizardStyle(q->style()->styleHint(QStyle::SH_WizardStyle, nullptr, q)); if (wizStyle == QWizard::MacStyle) { opts = (QWizard::NoDefaultButton | QWizard::NoCancelButton); } else if (wizStyle == QWizard::ModernStyle) { @@ -836,7 +836,7 @@ void QWizardPrivate::switchToPage(int newId, Direction direction) newPage && newPage->isCommitPage() ? QWizard::CommitButton : QWizard::NextButton; QAbstractButton *nextOrFinishButton = btns[canContinue ? nextOrCommit : QWizard::FinishButton]; - QWidget *candidate = 0; + QWidget *candidate = nullptr; /* If there is no default button and the Next or Finish button @@ -887,7 +887,7 @@ static const char * buttonSlots(QWizard::WizardButton which) case QWizard::NoButton: Q_UNREACHABLE(); }; - return 0; + return nullptr; }; QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage() @@ -898,14 +898,14 @@ QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage() QWizardLayoutInfo info; const int layoutHorizontalSpacing = style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing); - info.topLevelMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, 0, q); - info.topLevelMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, 0, q); - info.topLevelMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, 0, q); - info.topLevelMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, 0, q); - info.childMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, 0, titleLabel); - info.childMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, 0, titleLabel); - info.childMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, 0, titleLabel); - info.childMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, 0, titleLabel); + info.topLevelMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, q); + info.topLevelMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, q); + info.topLevelMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr, q); + info.topLevelMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr, q); + info.childMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, titleLabel); + info.childMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, titleLabel); + info.childMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr, titleLabel); + info.childMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr, titleLabel); info.hspacing = (layoutHorizontalSpacing == -1) ? style->layoutSpacing(QSizePolicy::DefaultType, QSizePolicy::DefaultType, Qt::Horizontal) : layoutHorizontalSpacing; @@ -959,7 +959,7 @@ void QWizardPrivate::recreateLayout(const QWizardLayoutInfo &info) for (int i = mainLayout->count() - 1; i >= 0; --i) { QLayoutItem *item = mainLayout->takeAt(i); if (item->layout()) { - item->layout()->setParent(0); + item->layout()->setParent(nullptr); } else { delete item; } @@ -2281,7 +2281,7 @@ void QWizard::removePage(int id) { Q_D(QWizard); - QWizardPage *removedPage = 0; + QWizardPage *removedPage = nullptr; // update startItem accordingly if (d->pageMap.count() > 0) { // only if we have any pages @@ -2792,7 +2792,7 @@ QAbstractButton *QWizard::button(WizardButton which) const return d->vistaHelper->backButton(); #endif if (!d->ensureButton(which)) - return 0; + return nullptr; return d->btns[which]; } @@ -3444,7 +3444,7 @@ int QWizard::nextId() const \sa wizard() */ QWizardPage::QWizardPage(QWidget *parent) - : QWidget(*new QWizardPagePrivate, parent, 0) + : QWidget(*new QWizardPagePrivate, parent, { }) { connect(this, SIGNAL(completeChanged()), this, SLOT(_q_updateCachedCompleteState())); } |