| 295 | } |
| 296 | |
| 297 | void MainWidget::recvData(const TaskMsg taskMsg) { |
| 298 | if(taskMsg._taskid == THREAD_SCAN_KEY_TASK) { |
| 299 | _SCAN_KEY_LOCK.lockForRead(); |
| 300 | if(_iScanKeySeq == taskMsg._sequence) { |
| 301 | QString strKey; |
| 302 | KeyTreeItem *subTreeItem; |
| 303 | for(int i = 0; i < taskMsg._respResult._arrayValue[1]._arrayValue.size(); ++i) { |
| 304 | strKey = QTextCodec::codecForLocale()->toUnicode(taskMsg._respResult._arrayValue[1]._arrayValue[i]._stringValue); |
| 305 | if(_isClusterMode) { |
| 306 | subTreeItem = new KeyTreeItem(strKey,_treeItemKey); |
| 307 | } else { |
| 308 | subTreeItem = new KeyTreeItem(strKey,_vTreeItemKey[taskMsg._dbIndex]); |
| 309 | } |
| 310 | _itemKeyModel->insertRow(subTreeItem); |
| 311 | } |
| 312 | } |
| 313 | _SCAN_KEY_LOCK.unlock(); |
| 314 | } else if(taskMsg._taskid == THREAD_SCAN_VALUE_TASK) { |
| 315 | _SCAN_VALUE_LOCK.lockForRead(); |
| 316 | if(_iScanValueSeq == taskMsg._sequence) { |
| 317 | _dataView->appendValue(taskMsg, taskMsg._type); |
| 318 | } |
| 319 | _SCAN_VALUE_LOCK.unlock(); |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | void MainWidget::finishWork(const int taskid) { |
| 324 | _vTaskId.removeOne(taskid); |
nothing calls this directly
no test coverage detected