diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-02-02 14:03:53 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-22 04:38:37 +0100 |
commit | 3a3a7f88428a13ddd52d80940fbd086e2355bc23 (patch) | |
tree | 591f21054555a8d5865ca1916219528b9818145a /src/gui/doc/snippets | |
parent | d7287f595a5a8fe5d44d0b8c821362a4bb290c96 (diff) |
Normalize signal & slot signatures in connection
Profiling showed that Qt Creator spent 2% of its load time normalizing
signals and slots. By pre-normalizing everything, we ensure that there
is no runtime cost. Profiling after this commit and the others in this
series shows that the cost dropped down to zero.
Change-Id: Ifc5a2c2552e245fb9a5f31514e9dd683c5c55327
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/gui/doc/snippets')
-rw-r--r-- | src/gui/doc/snippets/clipboard/clipwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/doc/snippets/draganddrop/mainwindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/doc/snippets/separations/viewer.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/doc/snippets/clipboard/clipwindow.cpp b/src/gui/doc/snippets/clipboard/clipwindow.cpp index 657ea4e652..19a685b9d4 100644 --- a/src/gui/doc/snippets/clipboard/clipwindow.cpp +++ b/src/gui/doc/snippets/clipboard/clipwindow.cpp @@ -59,8 +59,8 @@ ClipWindow::ClipWindow(QWidget *parent) //! [0] connect(clipboard, SIGNAL(dataChanged()), this, SLOT(updateClipboard())); //! [0] - connect(mimeTypeCombo, SIGNAL(activated(const QString &)), - this, SLOT(updateData(const QString &))); + connect(mimeTypeCombo, SIGNAL(activated(QString)), + this, SLOT(updateData(QString))); QVBoxLayout *currentLayout = new QVBoxLayout(currentItem); currentLayout->addWidget(mimeTypeLabel); diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.cpp b/src/gui/doc/snippets/draganddrop/mainwindow.cpp index dc1b39422d..c8d0bf4e09 100644 --- a/src/gui/doc/snippets/draganddrop/mainwindow.cpp +++ b/src/gui/doc/snippets/draganddrop/mainwindow.cpp @@ -54,10 +54,10 @@ MainWindow::MainWindow(QWidget *parent) QLabel *dataLabel = new QLabel(tr("Amount of data (bytes):"), centralWidget); dragWidget = new DragWidget(centralWidget); - connect(dragWidget, SIGNAL(mimeTypes(const QStringList &)), - this, SLOT(setMimeTypes(const QStringList &))); - connect(dragWidget, SIGNAL(dragResult(const QString &)), - this, SLOT(setDragResult(const QString &))); + connect(dragWidget, SIGNAL(mimeTypes(QStringList)), + this, SLOT(setMimeTypes(QStringList))); + connect(dragWidget, SIGNAL(dragResult(QString)), + this, SLOT(setDragResult(QString))); QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget); mainLayout->addWidget(mimeTypeLabel); diff --git a/src/gui/doc/snippets/separations/viewer.cpp b/src/gui/doc/snippets/separations/viewer.cpp index 84ef7b7567..6a0f49ee2f 100644 --- a/src/gui/doc/snippets/separations/viewer.cpp +++ b/src/gui/doc/snippets/separations/viewer.cpp @@ -119,8 +119,8 @@ void Viewer::createMenus() connect(openAction, SIGNAL(triggered()), this, SLOT(chooseFile())); connect(saveAction, SIGNAL(triggered()), this, SLOT(saveImage())); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(brightnessMenu, SIGNAL(triggered(QAction *)), this, - SLOT(setBrightness(QAction *))); + connect(brightnessMenu, SIGNAL(triggered(QAction*)), this, + SLOT(setBrightness(QAction*))); } /* |