| 129 | } |
| 130 | |
| 131 | void ExtensionManager::on_openLocation_clicked() |
| 132 | { |
| 133 | if(m_Extensions.empty()) |
| 134 | { |
| 135 | QDesktopServices::openUrl(QString(ConfigFilePath("extensions"))); |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | RDTreeWidgetItem *item = ui->extensions->currentItem(); |
| 140 | if(!item) |
| 141 | return; |
| 142 | |
| 143 | int idx = ui->extensions->indexOfTopLevelItem(item); |
| 144 | |
| 145 | if(idx >= 0 && idx < m_Extensions.count()) |
| 146 | { |
| 147 | const ExtensionMetadata &e = m_Extensions[idx]; |
| 148 | if(!e.name.isEmpty()) |
| 149 | { |
| 150 | QDesktopServices::openUrl(QFileInfo(e.filePath).absoluteFilePath()); |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void ExtensionManager::on_alwaysLoad_toggled(bool checked) |
| 156 | { |
nothing calls this directly
no test coverage detected