summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc6
-rw-r--r--doc/src/snippets/signalmapper/filereader.cpp12
2 files changed, 15 insertions, 3 deletions
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 09c427b..c12ca78 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -336,7 +336,7 @@
If on the other hand you want to call two different error
functions when the number overflows, simply connect the signal to
- two different slots. Qt will call both (in arbitrary order).
+ two different slots. Qt will call both (in the order they were connected).
\snippet doc/src/snippets/signalsandslots/lcdnumber.h 10
\snippet doc/src/snippets/signalsandslots/lcdnumber.h 11
@@ -427,6 +427,10 @@
\snippet doc/src/snippets/signalmapper/filereader.cpp 1
+ \note The following code will compile and run, but due to signature normalization, the code will be slower.
+
+ \snippet doc/src/snippets/signalmapper/filereader.cpp 2
+
\sa {Meta-Object System}, {Qt's Property System}
\target 3rd Party Signals and Slots
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);