Changeset View
Changeset View
Standalone View
Standalone View
src/runtime/kserviceactioncomponent.cpp
| Show All 13 Lines | 1 | /* Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz> | |||
|---|---|---|---|---|---|
| 14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License | ||
| 15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
| 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
| 18 | */ | 18 | */ | ||
| 19 | 19 | | |||
| 20 | #include "kserviceactioncomponent.h" | 20 | #include "kserviceactioncomponent.h" | ||
| 21 | #include "globalshortcutcontext.h" | 21 | #include "globalshortcutcontext.h" | ||
| 22 | #include "globalshortcutsregistry.h" | ||||
| 22 | #include "logging_p.h" | 23 | #include "logging_p.h" | ||
| 23 | 24 | | |||
| 24 | #include <QProcess> | 25 | #include <QProcess> | ||
| 25 | #include <QDBusConnectionInterface> | 26 | #include <QDBusConnectionInterface> | ||
| 26 | 27 | | |||
| 27 | 28 | | |||
| 28 | namespace KdeDGlobalAccel { | 29 | namespace KdeDGlobalAccel { | ||
| 29 | 30 | | |||
| ▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | |||||
| 135 | bool KServiceActionComponent::cleanUp() | 136 | bool KServiceActionComponent::cleanUp() | ||
| 136 | { | 137 | { | ||
| 137 | qCDebug(KGLOBALACCELD) << "Disabling desktop file"; | 138 | qCDebug(KGLOBALACCELD) << "Disabling desktop file"; | ||
| 138 | 139 | | |||
| 139 | const auto shortcuts = allShortcuts(); | 140 | const auto shortcuts = allShortcuts(); | ||
| 140 | for (GlobalShortcut *shortcut : shortcuts) { | 141 | for (GlobalShortcut *shortcut : shortcuts) { | ||
| 141 | shortcut->setIsPresent(false); | 142 | shortcut->setIsPresent(false); | ||
| 142 | } | 143 | } | ||
| 143 | 144 | GlobalShortcutsRegistry::self()->markComponentAsDisabled(this); | |||
| 144 | m_desktopFile.desktopGroup().writeEntry("NoDisplay", true); | | |||
| 145 | m_desktopFile.desktopGroup().sync(); | | |||
| 146 | | ||||
| 147 | return Component::cleanUp(); | 145 | return Component::cleanUp(); | ||
| 148 | } | 146 | } | ||
| 149 | 147 | | |||
| 150 | } // namespace KdeDGlobalAccel | 148 | } // namespace KdeDGlobalAccel | ||
| 151 | 149 | | |||
| 152 | #include "moc_kserviceactioncomponent.cpp" | 150 | #include "moc_kserviceactioncomponent.cpp" | ||