Doc: modify connect statement to new syntax

Task-number: QTBUG-60635
Change-Id: I776bdc49ae42e2d0c11dc33d58d9ce91b9f5e753
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Nico Vertriest 2017-11-10 12:14:02 +01:00
parent 1fe6a75fec
commit d0812cbdab

View File

@ -77,8 +77,8 @@ XFormView::XFormView(QWidget *parent)
pts->setBoundingRect(QRectF(0, 0, 500, 500)); pts->setBoundingRect(QRectF(0, 0, 500, 500));
ctrlPoints << QPointF(250, 250) << QPointF(350, 250); ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
pts->setPoints(ctrlPoints); pts->setPoints(ctrlPoints);
connect(pts, SIGNAL(pointsChanged(QPolygonF)), connect(pts, &HoverPoints::pointsChanged,
this, SLOT(updateCtrlPoints(QPolygonF))); this,&XFormView::updateCtrlPoints);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
} }
@ -876,29 +876,29 @@ XFormWidget::XFormWidget(QWidget *parent)
#endif #endif
mainGroupLayout->addWidget(whatsThisButton); mainGroupLayout->addWidget(whatsThisButton);
connect(rotateSlider, SIGNAL(valueChanged(int)), view, SLOT(changeRotation(int))); connect(rotateSlider, &QSlider::valueChanged, view, &XFormView::changeRotation);
connect(shearSlider, SIGNAL(valueChanged(int)), view, SLOT(changeShear(int))); connect(shearSlider, &QSlider::valueChanged, view, &XFormView::changeShear);
connect(scaleSlider, SIGNAL(valueChanged(int)), view, SLOT(changeScale(int))); connect(scaleSlider, &QSlider::valueChanged, view, &XFormView::changeScale);
connect(vectorType, SIGNAL(clicked()), view, SLOT(setVectorType())); connect(vectorType, &QRadioButton::clicked, view, &XFormView::setVectorType);
connect(pixmapType, SIGNAL(clicked()), view, SLOT(setPixmapType())); connect(pixmapType, &QRadioButton::clicked, view, &XFormView::setPixmapType);
connect(textType, SIGNAL(clicked()), view, SLOT(setTextType())); connect(textType, &QRadioButton::clicked, view, &XFormView::setTextType);
connect(textType, SIGNAL(toggled(bool)), textEditor, SLOT(setEnabled(bool))); connect(textType, &QRadioButton::toggled, textEditor, &XFormView::setEnabled);
connect(textEditor, SIGNAL(textChanged(QString)), view, SLOT(setText(QString))); connect(textEditor, &QLineEdit::textChanged, view, &XFormView::setText);
connect(view, SIGNAL(rotationChanged(int)), rotateSlider, SLOT(setValue(int))); connect(view, &XFormView::rotationChanged, rotateSlider, &QSlider::setValue);
connect(view, SIGNAL(scaleChanged(int)), scaleSlider, SLOT(setValue(int))); connect(view, &XFormView::scaleChanged, scaleSlider, &QAbstractSlider::setValue);
connect(view, SIGNAL(shearChanged(int)), shearSlider, SLOT(setValue(int))); connect(view, &XFormView::shearChanged, shearSlider, &QAbstractSlider::setValue);
connect(resetButton, SIGNAL(clicked()), view, SLOT(reset())); connect(resetButton, &QPushButton::clicked, view, &XFormView::reset);
connect(animateButton, SIGNAL(clicked(bool)), view, SLOT(setAnimation(bool))); connect(animateButton, &QPushButton::clicked, view, &XFormView::setAnimation);
connect(whatsThisButton, SIGNAL(clicked(bool)), view, SLOT(setDescriptionEnabled(bool))); connect(whatsThisButton, &QPushButton::clicked, view, &ArthurFrame::setDescriptionEnabled);
connect(whatsThisButton, SIGNAL(clicked(bool)), view->hoverPoints(), SLOT(setDisabled(bool))); connect(whatsThisButton, &QPushButton::clicked, view->hoverPoints(), &HoverPoints::setDisabled);
connect(view, SIGNAL(descriptionEnabledChanged(bool)), view->hoverPoints(), SLOT(setDisabled(bool))); connect(view, &XFormView::descriptionEnabledChanged, view->hoverPoints(), &HoverPoints::setDisabled);
connect(view, SIGNAL(descriptionEnabledChanged(bool)), whatsThisButton, SLOT(setChecked(bool))); connect(view, &XFormView::descriptionEnabledChanged, whatsThisButton, &QPushButton::setChecked);
connect(showSourceButton, SIGNAL(clicked()), view, SLOT(showSource())); connect(showSourceButton, &QPushButton::clicked, view, &XFormView::showSource);
#ifdef QT_OPENGL_SUPPORT #ifdef QT_OPENGL_SUPPORT
connect(enableOpenGLButton, SIGNAL(clicked(bool)), view, SLOT(enableOpenGL(bool))); connect(enableOpenGLButton, &QPushButton::clicked, view, &XFormView::enableOpenGL);
#endif #endif
view->loadSourceFile(":res/affine/xform.cpp"); view->loadSourceFile(":res/affine/xform.cpp");
view->loadDescription(":res/affine/xform.html"); view->loadDescription(":res/affine/xform.html");