| 44 | } |
| 45 | |
| 46 | void 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 | |
| 67 | GM_Notification::~GM_Notification() |
| 68 | { |
nothing calls this directly
no test coverage detected