detect a disconect error in GooglePlugin
[mdictionary] / trunk / src / base / gui / WordListWidget.cpp
index a753588..59f4724 100644 (file)
@@ -66,7 +66,7 @@ void WordListWidget::addWord(QString word, int row) {
                            Qt::ItemIsUserCheckable);
 
     /*checking if word is already in bookmarks, information about that is
-    stored in it's translation object (not all translation have to be in
+    stored in its translation object (not all translations have to be in
     bookmarks)*/
     bool bookmark = false;
     Translation* t;
@@ -111,8 +111,8 @@ void WordListWidget::showSearchResults(
 
 void WordListWidget::wordClicked(QModelIndex index) {
     //we're getting translation based on data in index
-    qDebug()<<searchResult[index.data().toString()].at(0)->dictionaryInfo();
-    emit showTranslation(
+    //qDebug()<<searchResult[index.data().toString()].at(0)->dictionaryInfo();
+    Q_EMIT showTranslation(
             searchResult[index.data().toString()]);
 }
 
@@ -129,15 +129,15 @@ void WordListWidget::wordChecked(QModelIndex index) {
     QModelIndex item = selectedIndexes().at(0);
     if(!item.isValid()) return;
 
-    //to shorten lag between clicking on star and it's change
+    //to shorten lag between clicking on star and its change
     repaint();
 
     //depending on new state emit suitable signal
     if(state == Qt::Checked) {
-        emit addBookmark(searchResult[item.data().toString()]);
+        Q_EMIT addBookmark(searchResult[item.data().toString()]);
     }
     else {
-        emit removeBookmark(searchResult[item.data().toString()]);
+        Q_EMIT removeBookmark(searchResult[item.data().toString()]);
     }
 }
 
@@ -147,16 +147,16 @@ void WordListWidget::mouseReleaseEvent(QMouseEvent *event) {
     //firstly we normally handle this event
     QTreeView::mouseReleaseEvent(event);
 
-    //then we checking at which item user clicked
+    //then we check at which item user clicked
     QModelIndex index = indexAt(event->pos());
     if(!index.isValid()) return;
 
     /*if there are no selected items we return, that occurs sometimes
-    on maemo, when user is scrolling list and click to stop the scroll,
-    system don't select item but emitting mouseReleaseEvent*/
+    on maemo, when user is scrolling list and clicks to stop the scroll,
+    system doesn't select item but emits mouseReleaseEvent*/
     if(selectedIndexes().count() == 0) return;
 
-    //if user don't click on word either on star return
+    //if user doesn't click either on word or on star, return
     if(selectedIndexes().at(0) != index && selectedIndexes().at(1) != index)
         return;