MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / onInstallButtonClicked

Method onInstallButtonClicked

src/ui/user_scripts/UserScriptWidget.cpp:103–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void 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
121void UserScriptWidget::onCreateButtonClicked()
122{

Callers

nothing calls this directly

Calls 1

installScriptMethod · 0.80

Tested by

no test coverage detected