diff options
author | Christian Ehrlicher <[email protected]> | 2019-02-03 20:29:34 +0100 |
---|---|---|
committer | Christian Ehrlicher <[email protected]> | 2019-02-05 16:55:03 +0000 |
commit | 0059de2d1b4f9a063af7e81788aaec22a3ac7739 (patch) | |
tree | 632550de487cf23c8fd83394916d76b38280e155 /src/gui/doc/snippets/draganddrop/mainwindow.cpp | |
parent | 3514aedbf36b96f6e03f88c9c7814b6ba50aac8f (diff) |
QtGui documentation: cleanup
Cleanup the QtGui documentation:
- use new signal/slot syntax
- use range-based for loop instead foreach
Change-Id: Id49ff2cbe78f28a06ca0fb63e6ca6f7dc2736f7b
Reviewed-by: Frederik Gladhorn <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
Diffstat (limited to 'src/gui/doc/snippets/draganddrop/mainwindow.cpp')
-rw-r--r-- | src/gui/doc/snippets/draganddrop/mainwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.cpp b/src/gui/doc/snippets/draganddrop/mainwindow.cpp index 551114856e6..11311a0b57b 100644 --- a/src/gui/doc/snippets/draganddrop/mainwindow.cpp +++ b/src/gui/doc/snippets/draganddrop/mainwindow.cpp @@ -48,7 +48,7 @@ ** ****************************************************************************/ -#include <QtGui> +#include <QtWidgets> #include "dragwidget.h" #include "mainwindow.h" @@ -64,10 +64,10 @@ MainWindow::MainWindow(QWidget *parent) QLabel *dataLabel = new QLabel(tr("Amount of data (bytes):"), centralWidget); dragWidget = new DragWidget(centralWidget); - connect(dragWidget, SIGNAL(mimeTypes(QStringList)), - this, SLOT(setMimeTypes(QStringList))); - connect(dragWidget, SIGNAL(dragResult(QString)), - this, SLOT(setDragResult(QString))); + connect(dragWidget, &DragWidget::mimeTypes, + this, &MainWindow::setMimeTypes); + connect(dragWidget, &DragWidget:dragResult, + this, &MainWindow::setDragResult); QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget); mainLayout->addWidget(mimeTypeLabel); |