MCPcopy Create free account
hub / github.com/KDE/falkon / installScript

Method installScript

src/plugins/GreaseMonkey/gm_notification.cpp:46–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void GM_Notification::installScript()
47{
48 bool success = false;
49
50 GM_Script* script = nullptr;
51 QString message = tr("Cannot install script");
52
53 if (QFile::copy(m_tmpFileName, m_fileName)) {
54 script = new GM_Script(m_manager, m_fileName);
55 success = m_manager->addScript(script);
56 }
57
58 if (success) {
59 message = tr("'%1' installed successfully").arg(script->name());
60 }
61
62 m_manager->showNotification(message);
63
64 hide();
65}
66
67GM_Notification::~GM_Notification()
68{

Callers

nothing calls this directly

Calls 3

addScriptMethod · 0.80
nameMethod · 0.45
showNotificationMethod · 0.45

Tested by

no test coverage detected