diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-03-03 12:53:06 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-03-04 16:08:01 +0000 |
commit | cb3086376fce460aa85b542d487d26b2506875f7 (patch) | |
tree | b81febecca91e2c8040e9f43a313ed697320c3ba /examples/speech/hello_speak/mainwindow.cpp | |
parent | 360f708326ed53285d0d65c0e9db9a3fcb4219ac (diff) |
QTextToSpeech: QObject *parent ctor args go last
This is one of the deepest and most long-standing
Qt API design patterns: subclasses add ctor args
_at the front_, not at the back.
To compensate the slight SC breakage, add an
overloaded ctor that only takes QObject *parent
(also a Qt API pattern worth following), so the
common case of
new QTextToSpeech(this)
continues to work.
Change-Id: I7253abada1355e53e9817914abd80e8af17ce429
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'examples/speech/hello_speak/mainwindow.cpp')
-rw-r--r-- | examples/speech/hello_speak/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/speech/hello_speak/mainwindow.cpp b/examples/speech/hello_speak/mainwindow.cpp index b496cda..6f2f300 100644 --- a/examples/speech/hello_speak/mainwindow.cpp +++ b/examples/speech/hello_speak/mainwindow.cpp @@ -103,7 +103,7 @@ void MainWindow::engineSelected(int index) if (engineName == "default") m_speech = new QTextToSpeech(this); else - m_speech = new QTextToSpeech(this, engineName); + m_speech = new QTextToSpeech(engineName, QVariantMap(), this); disconnect(ui.language, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &MainWindow::languageSelected); ui.language->clear(); // Populate the languages combobox before connecting its signal. |