From ccdd9e6784c1aaee8ebb35f192dae647895c67bc Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 20 Mar 2022 09:58:04 +0100 Subject: rbutil: Fix TTS "waiting for engine" appearing randomly. QProgressDialog shows / hides itself automatically based on the progress value set, so calling hide() directly doesn't prevent the dialog from showing itself. Change the logic to set a value instead. Fixes the progress dialog sometimes appearing in situations where it wasn't used at all. Change-Id: Ifef063f31b7f888bb74f180dea0679e81cc5c8fe --- utils/rbutilqt/base/ttsfestival.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/rbutilqt/base/ttsfestival.cpp') diff --git a/utils/rbutilqt/base/ttsfestival.cpp b/utils/rbutilqt/base/ttsfestival.cpp index fbb8166a9a..fce1d8cb3e 100644 --- a/utils/rbutilqt/base/ttsfestival.cpp +++ b/utils/rbutilqt/base/ttsfestival.cpp @@ -336,14 +336,14 @@ QString TTSFestival::queryServer(QString query, int timeout) return ""; // this operation could take some time - emit busy(); + emit busy(true); LOG_INFO() << "queryServer with" << query; if (!ensureServerRunning()) { LOG_ERROR() << "queryServer: ensureServerRunning failed"; - emit busyEnd(); + emit busy(false); return ""; } @@ -391,7 +391,7 @@ QString TTSFestival::queryServer(QString query, int timeout) while(QDateTime::currentDateTime() < tmpEndTime) QCoreApplication::processEvents(QEventLoop::AllEvents); } - emit busyEnd(); + emit busy(false); socket.disconnectFromHost(); if(response == "nil") -- cgit v1.2.3