| 419 | } |
| 420 | |
| 421 | void Shell::openNewlySignedFile(const QString &path, int pageNumber) |
| 422 | { |
| 423 | // for now, this function just applies the "replace current document" |
| 424 | // strategy for opening. |
| 425 | // Given signing is slightly closer to annotating and saving, the over |
| 426 | // all user experience should not be that different |
| 427 | // The fact that we get a different file out of saving is a bit of a |
| 428 | // implementation detail that shouldn't leak that much onto the users |
| 429 | QUrl url = QUrl::fromLocalFile(path); |
| 430 | url.setFragment(QStringLiteral("page=%1").arg(pageNumber)); |
| 431 | |
| 432 | const int activeTab = m_tabWidget->currentIndex(); |
| 433 | KParts::ReadWritePart *const activePart = m_tabs[activeTab].part; |
| 434 | activePart->closeUrl(false); |
| 435 | activePart->openUrl(url); |
| 436 | } |
| 437 | |
| 438 | bool Shell::canOpenDocs(int numDocs, int desktop) |
| 439 | { |