| 70 | } |
| 71 | |
| 72 | bool WizDatabaseManager::openAll() |
| 73 | { |
| 74 | // first, open private db |
| 75 | if (!open()) { |
| 76 | TOLOG("open user private database failed"); |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | // second, get groups info |
| 81 | CWizGroupDataArray arrayGroup; |
| 82 | if (!m_dbPrivate->getAllGroupInfo(arrayGroup)) { |
| 83 | TOLOG("Failed to get user group info"); |
| 84 | return true; |
| 85 | } |
| 86 | |
| 87 | // third, open groups one by one |
| 88 | CWizGroupDataArray::const_iterator it; |
| 89 | for (it = arrayGroup.begin(); it != arrayGroup.end(); it++) { |
| 90 | WIZGROUPDATA group = *it; |
| 91 | if (!open(group.strGroupGUID)) { |
| 92 | TOLOG1("failed to open group: %1", group.strGroupName); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | return true; |
| 97 | } |
| 98 | |
| 99 | bool WizDatabaseManager::isOpened(const QString& strKbGUID) |
| 100 | { |
no test coverage detected