| 153 | } |
| 154 | |
| 155 | void QuerySaver::Load() |
| 156 | { |
| 157 | string hexData; |
| 158 | if (!settings::Get(kSettingsKey, hexData) || hexData.empty()) |
| 159 | return; |
| 160 | |
| 161 | try |
| 162 | { |
| 163 | Deserialize(hexData); |
| 164 | } |
| 165 | catch (RootException const &) |
| 166 | { |
| 167 | Clear(); |
| 168 | LOG(LWARNING, ("Search history data corrupted! Creating new one.")); |
| 169 | } |
| 170 | } |
| 171 | } // namespace search |