| 206 | } |
| 207 | |
| 208 | void PointerScanWindow::slotLoad() |
| 209 | { |
| 210 | if (defaultPath.isEmpty()) { |
| 211 | defaultPath = context->gamepath.c_str(); |
| 212 | defaultPath.append(".pm"); |
| 213 | } |
| 214 | |
| 215 | QString filename = QFileDialog::getOpenFileName(this, tr("Open pointermap"), defaultPath, tr("pointermap files (*.pm)")); |
| 216 | |
| 217 | if (filename.isNull()) |
| 218 | return; |
| 219 | |
| 220 | defaultPath = filename; |
| 221 | |
| 222 | int ret = pointerScanModel->loadChains(filename.toStdString()); |
| 223 | if (ret < 0) { |
| 224 | QMessageBox::warning(this, "Error", "Could not open pointermap file"); |
| 225 | return; |
| 226 | } |
| 227 | |
| 228 | scanCount->setText(QString("%1 results").arg(pointerScanModel->pointer_chains.size())); |
| 229 | } |
nothing calls this directly
no test coverage detected