summaryrefslogtreecommitdiff
path: root/examples/svg
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@idiap.ch>2023-02-23 20:48:48 +0100
committerSamuel Gaist <samuel.gaist@idiap.ch>2023-02-26 20:20:22 +0100
commita5e96ae1f430cbc68bf5cb3a4058ae5d93cbcfde (patch)
tree952d36c4d6c4248173ff9f9030b85cdd66825bea /examples/svg
parentd78f378bdd2bac9428819f7004999f3cfbfe7c83 (diff)
downloadqtsvg-a5e96ae1f430cbc68bf5cb3a4058ae5d93cbcfde.tar.gz
examples: port drag and drop example to new connection style
Task-number: QTBUG-111463 Change-Id: I02c453682cf06c150ff91f4c923af73966c11ca0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/svg')
-rw-r--r--examples/svg/draganddrop/delayedencoding/sourcewidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp b/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp
index 2e717de..a782e1b 100644
--- a/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp
+++ b/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp
@@ -28,7 +28,7 @@ SourceWidget::SourceWidget(QWidget *parent)
QPushButton *dragIcon = new QPushButton(tr("Export"));
dragIcon->setIcon(QIcon(":/images/drag.png"));
- connect(dragIcon, SIGNAL(pressed()), this, SLOT(startDrag()));
+ connect(dragIcon, &QPushButton::pressed, this, &SourceWidget::startDrag);
QGridLayout *layout = new QGridLayout;
layout->addWidget(instructTopLabel, 0, 0, 1, 2);
@@ -66,8 +66,8 @@ void SourceWidget::startDrag()
{
mimeData = new MimeData;
- connect(mimeData, SIGNAL(dataRequested(QString)),
- this, SLOT(createData(QString)), Qt::DirectConnection);
+ connect(mimeData, &MimeData::dataRequested,
+ this, &SourceWidget::createData, Qt::DirectConnection);
QDrag *drag = new QDrag(this);
drag->setMimeData(mimeData);