| 101 | } |
| 102 | |
| 103 | void UserScriptWidget::onInstallButtonClicked() |
| 104 | { |
| 105 | bool ok; |
| 106 | QString userInput = QInputDialog::getText(this, tr("Install User Script"), tr("Enter URL of User Script:"), |
| 107 | QLineEdit::Normal, QString(), &ok); |
| 108 | if (!ok || userInput.isEmpty()) |
| 109 | return; |
| 110 | |
| 111 | QUrl scriptUrl = QUrl::fromUserInput(userInput); |
| 112 | if (!scriptUrl.isValid()) |
| 113 | { |
| 114 | static_cast<void>(QMessageBox::warning(this, tr("Installation Error"), tr("Could not install script."), QMessageBox::Ok, |
| 115 | QMessageBox::Ok)); |
| 116 | return; |
| 117 | } |
| 118 | m_userScriptManager->installScript(scriptUrl); |
| 119 | } |
| 120 | |
| 121 | void UserScriptWidget::onCreateButtonClicked() |
| 122 | { |
nothing calls this directly
no test coverage detected