From cb3086376fce460aa85b542d487d26b2506875f7 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 3 Mar 2016 12:53:06 +0100 Subject: 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 Reviewed-by: Jeremy Whiting Reviewed-by: Frederik Gladhorn --- examples/speech/hello_speak/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/speech/hello_speak/mainwindow.cpp') 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(&QComboBox::currentIndexChanged), this, &MainWindow::languageSelected); ui.language->clear(); // Populate the languages combobox before connecting its signal. -- cgit v1.2.3