remove actionCollections and shortcut config dlg

This commit is contained in:
Marco Martin 2013-03-04 16:28:51 +01:00
parent 9f6fbec2f3
commit 55add92bf8
3 changed files with 0 additions and 53 deletions

View File

@ -36,7 +36,6 @@
#include <kdebug.h>
#include <kiconloader.h>
#include <klocalizedstring.h>
#include <kshortcutsdialog.h>
#include <kwindowsystem.h>
#include "containment.h"
@ -383,54 +382,6 @@ void CoronaPrivate::init()
//fake containment/applet actions
KActionCollection *containmentActions = AppletPrivate::defaultActions(q); //containment has to start with applet stuff
ContainmentPrivate::addDefaultActions(containmentActions); //now it's really containment
actionCollections << &actions << AppletPrivate::defaultActions(q) << containmentActions;
//Update the shortcuts
QMutableListIterator<QWeakPointer<KActionCollection> > it(actionCollections);
while (it.hasNext()) {
it.next();
KActionCollection *collection = it.value().data();
if (!collection) {
// get rid of KActionCollections that have been deleted behind our backs
it.remove();
continue;
}
collection->readSettings();
if (shortcutsDlg) {
shortcutsDlg.data()->addCollection(collection);
}
}
}
void CoronaPrivate::showShortcutConfig()
{
//show a kshortcutsdialog with the actions
KShortcutsDialog *dlg = shortcutsDlg.data();
if (!dlg) {
dlg = new KShortcutsDialog();
dlg->setModal(false);
dlg->setAttribute(Qt::WA_DeleteOnClose, true);
QObject::connect(dlg, SIGNAL(saved()), q, SIGNAL(shortcutsChanged()));
dlg->addCollection(&actions);
QMutableListIterator<QWeakPointer<KActionCollection> > it(actionCollections);
while (it.hasNext()) {
it.next();
KActionCollection *collection = it.value().data();
if (!collection) {
// get rid of KActionCollections that have been deleted behind our backs
it.remove();
continue;
}
dlg->addCollection(collection);
}
}
KWindowSystem::setOnDesktop(dlg->winId(), KWindowSystem::currentDesktop());
dlg->configure();
dlg->raise();
}
void CoronaPrivate::toggleImmutability()

View File

@ -311,7 +311,6 @@ private:
Q_PRIVATE_SLOT(d, void containmentDestroyed(QObject*))
Q_PRIVATE_SLOT(d, void syncConfig())
Q_PRIVATE_SLOT(d, void toggleImmutability())
Q_PRIVATE_SLOT(d, void showShortcutConfig())
friend class CoronaPrivate;
friend class View;

View File

@ -41,7 +41,6 @@ public:
~CoronaPrivate();
void init();
void showShortcutConfig();
void toggleImmutability();
void saveLayout(KSharedConfigPtr cg) const;
void updateContainmentImmutability();
@ -64,9 +63,7 @@ public:
QHash<uint, QGraphicsWidget*> offscreenWidgets;
KActionCollection actions;
QMap<Plasma::ContainmentType, QHash<QString, QString> > containmentActionsDefaults;
QWeakPointer<KShortcutsDialog> shortcutsDlg;
QHash<Plasma::ContainmentType, QString> toolBoxPlugins;
QList<QWeakPointer<KActionCollection> > actionCollections;
};
}