diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-03-20 09:58:04 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2022-03-20 10:00:25 +0100 |
commit | ccdd9e6784c1aaee8ebb35f192dae647895c67bc (patch) | |
tree | 2ec8164d4b6f504adc3f2d441f4c20a0e77ad8e7 /utils/rbutilqt/base/ttsfestival.cpp | |
parent | c21d10cb33e0d123d4b53acdc28e73002d240634 (diff) | |
download | rockbox-ccdd9e6784c1aaee8ebb35f192dae647895c67bc.tar.gz rockbox-ccdd9e6784c1aaee8ebb35f192dae647895c67bc.zip |
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
Diffstat (limited to 'utils/rbutilqt/base/ttsfestival.cpp')
-rw-r--r-- | utils/rbutilqt/base/ttsfestival.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) | |||
336 | return ""; | 336 | return ""; |
337 | 337 | ||
338 | // this operation could take some time | 338 | // this operation could take some time |
339 | emit busy(); | 339 | emit busy(true); |
340 | 340 | ||
341 | LOG_INFO() << "queryServer with" << query; | 341 | LOG_INFO() << "queryServer with" << query; |
342 | 342 | ||
343 | if (!ensureServerRunning()) | 343 | if (!ensureServerRunning()) |
344 | { | 344 | { |
345 | LOG_ERROR() << "queryServer: ensureServerRunning failed"; | 345 | LOG_ERROR() << "queryServer: ensureServerRunning failed"; |
346 | emit busyEnd(); | 346 | emit busy(false); |
347 | return ""; | 347 | return ""; |
348 | } | 348 | } |
349 | 349 | ||
@@ -391,7 +391,7 @@ QString TTSFestival::queryServer(QString query, int timeout) | |||
391 | while(QDateTime::currentDateTime() < tmpEndTime) | 391 | while(QDateTime::currentDateTime() < tmpEndTime) |
392 | QCoreApplication::processEvents(QEventLoop::AllEvents); | 392 | QCoreApplication::processEvents(QEventLoop::AllEvents); |
393 | } | 393 | } |
394 | emit busyEnd(); | 394 | emit busy(false); |
395 | socket.disconnectFromHost(); | 395 | socket.disconnectFromHost(); |
396 | 396 | ||
397 | if(response == "nil") | 397 | if(response == "nil") |