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

Method unloadPlugin

src/plugins/GreaseMonkey/gm_manager.cpp:165–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void GM_Manager::unloadPlugin()
166{
167 // Save settings
168 QSettings settings(m_settingsPath + QSL("/extensions.ini"), QSettings::IniFormat);
169 settings.beginGroup(QSL("GreaseMonkey"));
170 settings.setValue(QSL("enabled"), m_enabled);
171 settings.setValue(QSL("disabledScripts"), m_disabledScripts);
172 settings.endGroup();
173
174 delete m_settings.data();
175
176 // Remove icons from all windows
177 QHashIterator<BrowserWindow*, GM_Icon*> it(m_windows);
178 while (it.hasNext()) {
179 it.next();
180 mainWindowDeleted(it.key());
181 }
182
183 unloadScripts();
184
185 for (GM_Script *gmScript : std::as_const(m_scripts)) {
186 delete gmScript;
187 }
188 m_scripts.clear();
189 m_contextMenuScripts.clear();
190}
191
192bool GM_Manager::isEnabled() const
193{

Callers 1

unloadMethod · 0.45

Calls 6

beginGroupMethod · 0.80
endGroupMethod · 0.80
keyMethod · 0.80
setValueMethod · 0.45
dataMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected