OSDN Git Service

jovie: check if clipboard is empty before speaking it
authorIvailo Monev <xakepa10@gmail.com>
Sun, 27 Jun 2021 14:01:05 +0000 (17:01 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 27 Jun 2021 14:01:05 +0000 (17:01 +0300)
fixes hang when the clipboard is empty

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
jovie/jovie/jovie.cpp

index 9a4113d..bf1166c 100644 (file)
@@ -266,7 +266,7 @@ int Jovie::sayClipboard()
     QString text = cb->text();
 
     // Speak it.
-    if (!text.isNull())
+    if (!text.isEmpty())
     {
         return Speaker::Instance()->say(callingAppId(), text, 0);
     } else {