summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2010-09-10 15:29:04 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2010-09-10 15:29:04 (GMT)
commitb8644eab5205a9ff20ad27836be2439e7f6a19e9 (patch)
tree763de4d835e668d16be556998357f047a0a93754 /doc/src/snippets
parentdd387a0125b577fafc1a3363a4b8cd995053b7db (diff)
downloadQt-b8644eab5205a9ff20ad27836be2439e7f6a19e9.zip
Qt-b8644eab5205a9ff20ad27836be2439e7f6a19e9.tar.gz
Qt-b8644eab5205a9ff20ad27836be2439e7f6a19e9.tar.bz2
Clarified the coding standard regarding connecting signals to slots.
Cleaned up the contradiction identified in QTBUG-10114. Reviewed-by: David Boddie Bug: QTBUG-8961, QTBUG-10114
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/signalmapper/filereader.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/snippets/signalmapper/filereader.cpp b/doc/src/snippets/signalmapper/filereader.cpp
index 76ed4c1..08f4d06 100644
--- a/doc/src/snippets/signalmapper/filereader.cpp
+++ b/doc/src/snippets/signalmapper/filereader.cpp
@@ -66,10 +66,18 @@ FileReader::FileReader(QWidget *parent)
//! [0]
//! [1]
- connect(signalMapper, SIGNAL(mapped(const QString &)),
- this, SLOT(readFile(const QString &)));
+ connect(signalMapper, SIGNAL(mapped(QString)),
+ this, SLOT(readFile(QString)));
//! [1]
+/*
+//! [2]
+ //slower due to signature normalization at runtime
+
+ connect(signalMapper, SIGNAL(mapped(const QString &)),
+ this, SLOT(readFile(const QString &)));
+//! [2]
+*/
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(taxFileButton);
buttonLayout->addWidget(accountFileButton);