| 153 | */ |
| 154 | |
| 155 | static LoadResult loadIndex(Task::Ptr& loadTask, Net::Mode netmode) |
| 156 | { |
| 157 | // FIXME: DECIDE. do we want to run the update task anyway? |
| 158 | if(APPLICATION->metadataIndex()->isLoaded()) |
| 159 | { |
| 160 | qDebug() << "Index is already loaded"; |
| 161 | return LoadResult::LoadedLocal; |
| 162 | } |
| 163 | APPLICATION->metadataIndex()->load(netmode); |
| 164 | loadTask = APPLICATION->metadataIndex()->getCurrentTask(); |
| 165 | if(loadTask) |
| 166 | { |
| 167 | return LoadResult::RequiresRemote; |
| 168 | } |
| 169 | // FIXME: this is assuming the load succeeded... did it really? |
| 170 | return LoadResult::LoadedLocal; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void ComponentUpdateTask::loadComponents() |
no test coverage detected