Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Jenirok
Summary Tracker SCM Files
authoreshe <jessehakanen@gmail.com>
Wed, 2 Jun 2010 14:44:49 +0000 (15:44 +0100)
committereshe <jessehakanen@gmail.com>
Wed, 2 Jun 2010 14:44:49 +0000 (15:44 +0100)
src/daemon/calllistener.cpp

index 840d849..5c640bb 100644 (file)
@@ -150,7 +150,7 @@ void CallListener::search(Eniro::SearchDetails const& details)
             closeConnection_ = false;
         }
 
-        showDelayedResult(tr("Searching..."), 200);
+        showDelayedResult(tr("Searching..."), BANNER_DELAY);
         eniro_->search(details);
     }
 
@@ -180,27 +180,33 @@ void CallListener::requestFinished(QVector <Eniro::Result> const& results,
         }
         else
         {
+            timedMessage_ = "";
             message = tr("Search failed:") + " " + eniro_->errorString() + ".";
+            showResult(message);
         }
     }
-    else if(results.size() == 0)
-    {
-        message = tr("Phone number was not found");
-    }
     else
     {
-        message = createResult(results.at(0).name, results.at(0).street,
-                               results.at(0).city);
-        Eniro::Result result = results.at(0);
-        result.number = details.query;
-        Cache::instance().addItem(result);
+        timedMessage_ = "";
+
+        if(results.size() == 0)
+        {
+            message = tr("Phone number was not found");
+            showResult(message);
+        }
+        else
+        {
+            message = createResult(results.at(0).name, results.at(0).street,
+                                   results.at(0).city);
+            showResult(message);
+            Eniro::Result result = results.at(0);
+            result.number = details.query;
+            Cache::instance().addItem(result);
+        }
     }
 
     retries_ = -1;
     currentSearch_ = "";
-    timedMessage_ = "";
-
-    showResult(message);
 
     if(closeConnection_ && connectionManager_)
     {

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment