Added clearFilter call to FriendListPanel::keyPressEvent.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 3 Aug 2010 09:31:56 +0000 (12:31 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Tue, 3 Aug 2010 09:31:56 +0000 (12:31 +0300)
src/situareservice/situareservice.cpp
src/ui/friendlistpanel.cpp

index edf6495..03be242 100644 (file)
@@ -294,18 +294,7 @@ void SituareService::parseUserData(const QByteArray &jsonReply)
     QJson::Parser parser;
     bool ok;
 
-    QVariantMap result;
-    QByteArray jsonDummy;
-    QFile temp("generated_json.txt");
-    if(temp.open(QIODevice::ReadOnly)) {
-        jsonDummy = temp.readAll();
-        temp.close();
-        result = parser.parse (jsonDummy, &ok).toMap();
-    } else
-        result = parser.parse (jsonReply, &ok).toMap();
-
-
-    //QVariantMap result = parser.parse (jsonReply, &ok).toMap();
+    QVariantMap result = parser.parse (jsonReply, &ok).toMap();
     if (!ok) {
         emit error(ErrorContext::SITUARE, SituareError::INVALID_JSON);
         return;
index 87a0765..d6f7e2f 100644 (file)
@@ -149,6 +149,8 @@ void FriendListPanel::keyPressEvent(QKeyEvent *event)
 
     if (!m_friendListNameRegExp.isEmpty())
         m_friendListView->filter(m_friendListNameRegExp);
+    else
+        m_friendListView->clearFilter();
 }
 
 void FriendListPanel::locationDataReady(QList<Location> &result)