! Reads the given \a spec and displays its state and error information in this PluginErrorView. */
| 69 | error information in this PluginErrorView. |
| 70 | */ |
| 71 | void PluginErrorView::update(PluginSpec *spec) |
| 72 | { |
| 73 | QString text; |
| 74 | QString tooltip; |
| 75 | switch (spec->state()) { |
| 76 | case PluginSpec::Invalid: |
| 77 | text = tr("Invalid"); |
| 78 | tooltip = tr("Description file found, but error on read"); |
| 79 | break; |
| 80 | case PluginSpec::Read: |
| 81 | text = tr("Read"); |
| 82 | tooltip = tr("Description successfully read"); |
| 83 | break; |
| 84 | case PluginSpec::Resolved: |
| 85 | text = tr("Resolved"); |
| 86 | tooltip = tr("Dependencies are successfully resolved"); |
| 87 | break; |
| 88 | case PluginSpec::Loaded: |
| 89 | text = tr("Loaded"); |
| 90 | tooltip = tr("Library is loaded"); |
| 91 | break; |
| 92 | case PluginSpec::Initialized: |
| 93 | text = tr("Initialized"); |
| 94 | tooltip = tr("Plugin's initialization function succeeded"); |
| 95 | break; |
| 96 | case PluginSpec::Running: |
| 97 | text = tr("Running"); |
| 98 | tooltip = tr("Plugin successfully loaded and running"); |
| 99 | break; |
| 100 | case PluginSpec::Stopped: |
| 101 | text = tr("Stopped"); |
| 102 | tooltip = tr("Plugin was shut down"); |
| 103 | break; |
| 104 | case PluginSpec::Deleted: |
| 105 | text = tr("Deleted"); |
| 106 | tooltip = tr("Plugin ended its life cycle and was deleted"); |
| 107 | break; |
| 108 | } |
| 109 | |
| 110 | m_ui->state->setText(text); |
| 111 | m_ui->state->setToolTip(tooltip); |
| 112 | m_ui->errorString->setText(spec->errorString()); |
| 113 | } |
nothing calls this directly
no test coverage detected