| 262 | |
| 263 | |
| 264 | void |
| 265 | Viewer::newRepo( const QString& ior) |
| 266 | { |
| 267 | if( ior != repoDetachedSelection) { |
| 268 | if( !ior.isEmpty()) { |
| 269 | if( this->dataSource_->setRepoIor( ior)) { |
| 270 | this->ui.statusbar->showMessage( tr("Attached")); |
| 271 | |
| 272 | } else { |
| 273 | // This selection was not a valid repository, remove it from the |
| 274 | // selection list (since it was already added to the list to get |
| 275 | // to this point). |
| 276 | this->removeRepo(); |
| 277 | this->ui.statusbar->showMessage( tr("Failed to attach")); |
| 278 | } |
| 279 | } |
| 280 | } else { |
| 281 | // This is the <detached> selection, remove any active repository. |
| 282 | this->dataSource_->stopInstrumentation(); |
| 283 | this->dataSource_->clearData(); |
| 284 | this->ui.statusbar->showMessage( tr("Detached")); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | void |
| 289 | Viewer::doSort( int index) |
nothing calls this directly
no test coverage detected