fix bug
authorjakub <jakub.jaszczynski@comarch.com>
Tue, 4 Jan 2011 08:23:50 +0000 (09:23 +0100)
committerjakub <jakub.jaszczynski@comarch.com>
Tue, 4 Jan 2011 08:23:50 +0000 (09:23 +0100)
src/mdictionary/backbone/backbone.cpp
src/mdictionary/gui/MainWindow.cpp
src/mdictionary/gui/SearchBarWidget.cpp
src/mdictionary/mdictionary.pro
src/mdictionary/qml/AboutWidget.qml
src/mdictionary/qml/TranslationView.qml
src/plugins/stardict/CompressedReader.cpp
src/plugins/stardict/UncompressedReader.cpp

index 721decc..5e77d38 100644 (file)
@@ -588,8 +588,9 @@ void Backbone::xmlTranslationReady() {
 QList<CommonDictInterface*> Backbone::activeDicts() {
     QList<CommonDictInterface*>res;
     foreach(CommonDictInterface* dict, _dicts.keys())
-        if(_dicts[dict])
+        if(_dicts[dict]){
             res.append(dict);
+        }
     return res;
 
 }
index e5a0b61..48f3159 100644 (file)
@@ -235,7 +235,6 @@ void MainWindow::wordListReady() {
             setExactSearch(false);
         }
     }
-
     wordListWidget->setFocus();
 }
 
index 88645b1..95e2543 100644 (file)
@@ -97,8 +97,8 @@ SearchBarWidget::SearchBarWidget(QWidget *parent) : QWidget(parent) {
     emit setEnableHistoryPrev(false);
 
     completerModel = new QStringListModel(this);
- //   connect(&delayTimer, SIGNAL(timeout()),
- //           this, SLOT(delaySearchTimeout()));
+    connect(&delayTimer, SIGNAL(timeout()),
+            this, SLOT(delaySearchTimeout()));
 
     view->setFocus();
 
@@ -364,6 +364,7 @@ void SearchBarWidget::setEnabled(bool enabled) {
         historyShowToolButton->setEnabled(false);
     }
 #endif
+qDebug()<<"tu2???";
 }
 
 void SearchBarWidget::setBusy() {
@@ -390,7 +391,7 @@ void SearchBarWidget::setBusy() {
 }
 
 void SearchBarWidget::updateBusyTimer(){
-   // qDebug()<<"test12";
+    qDebug()<<"test12";
     if(progressMax==true){
         emit progresSetValue2(0);
         progressMax=false;
index b790af9..6062abc 100644 (file)
@@ -95,7 +95,7 @@ OTHER_FILES += \
     qml/TranslationView.qml \
     qml/FlickableWebView.qml \
     qml/ScrollBar.qml \
-    qml/SpinBox.qml
+    qml/SpinBox.qml \
     qml/Checkbox.qml
 
 target.path = $$BIN_DIR
index 9821576..92c6d07 100644 (file)
@@ -52,10 +52,4 @@ Rectangle {
         anchors.horizontalCenterOffset: 0
         onLinkActivated: linkClicked(link);
     }
-
-    SpinBox{
-        id: test;
-        x:100;
-        y:100;
-    }
 }
index 809e4c8..f161c4d 100644 (file)
@@ -10,7 +10,7 @@ Rectangle {
     color: myPalette.window
 
     function setUrl(string){
-        webView.url = "file:///home/test.html";
+        webView.url = "file:///home/jakub/test.html";
         webView.url = string;
     }
 
index 4943056..59bfaa1 100644 (file)
@@ -78,7 +78,10 @@ QChar CompressedReader::readChar() {
     }
 
     cha=QString::fromUtf8(c);
-    return cha.at(0);
+    if(cha.size()!=0)
+        return cha.at(0);
+    else
+        return '\0';
 }
 
 
index 6b75e90..b66693e 100644 (file)
@@ -63,7 +63,6 @@ void UncompressedReader::close() {
 QChar UncompressedReader::readChar() {
     char c[4]={0};
     QString cha;
-
     _stream.readRawData(c,1);
     if(((unsigned char)c[0])>239)
         _stream.readRawData(c+1,3);
@@ -75,8 +74,10 @@ QChar UncompressedReader::readChar() {
         qDebug()<<"error - starDict - read wordList from UTF-8";
 
     cha=QString::fromUtf8(c);
-
-    return cha.at(0);
+    if(cha.size()!=0)
+        return cha.at(0);
+    else
+        return '\0';
 }
 
 
@@ -84,7 +85,6 @@ QString UncompressedReader::readKeyword() {
     QString result;
     QChar c;
     c = readChar();
-
     while(c != '\0') {
         result += c;
         c = readChar();