Merge branch 'master' into google
[mdictionary] / trunk / src / base / gui / SearchBarWidget.cpp
index 2fab213..6921e26 100644 (file)
@@ -123,7 +123,7 @@ void SearchBarWidget::initializeUI() {
 
 
     //create layout for lineEdit to have clear button on it
-    QHBoxLayout* lineEditLayout = new QHBoxLayout;
+    QHBoxLayout* lineEditLayout = new QHBoxLayout();
     searchWordLineEdit->setLayout(lineEditLayout);
 
 
@@ -187,7 +187,6 @@ void SearchBarWidget::initializeUI() {
                 fullScreenToolButton->sizeHint().height()*2);
     #endif*/
 
-
     searchingProgressBar = new QProgressBar();
     //progress bar have minimum and maximum values set to 0, which will effect
     //with "I'm alive" bar
@@ -221,7 +220,7 @@ void SearchBarWidget::initializeUI() {
 
 void SearchBarWidget::searchPushButtonClicked() {
     if(_isSearching) {
-        emit stopSearching();
+        Q_EMIT stopSearching();
     }
     else {
         search(searchWordLineEdit->text());
@@ -232,7 +231,7 @@ void SearchBarWidget::searchPushButtonClicked() {
 void SearchBarWidget::search(QString word) {
     if(!_isSearching && !word.isEmpty()) {
         searchWordLineEdit->setText(word);
-        emit searchForTranslations(word);
+        Q_EMIT searchForTranslations(word);
     }
 }
 
@@ -253,7 +252,7 @@ void SearchBarWidget::searchDelay(QString word) {
 void SearchBarWidget::delaySearchTimeout() {
     delayTimer.stop();
     if(!_isSearching) {
-        emit searchForTranslations(delayString);
+        Q_EMIT searchForTranslations(delayString);
     }
 }
 
@@ -281,7 +280,7 @@ void SearchBarWidget::setIdle() {
     searchPushButton->setText(tr("Search"));
     setEnabled(true);
     _isSearching = false;
-    emit refreshHistoryButtons();
+    Q_EMIT refreshHistoryButtons();
 }