Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4650224f authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove some unused code

parent 8e212571
...@@ -103,8 +103,8 @@ public: ...@@ -103,8 +103,8 @@ public:
// This is the main place containing ActionInfoItems. // This is the main place containing ActionInfoItems.
QMap<QString, ActionInfoItem> actionInfoList; QMap<QString, ActionInfoItem> actionInfoList;
void loadActionFiles(); void loadActionFiles();
void loadActionCollections();
void loadCustomShortcuts(QString filename = QStringLiteral("kritashortcutsrc")); void loadCustomShortcuts(QString filename = QStringLiteral("kritashortcutsrc"));
ActionInfoItem &actionInfo(const QString &name) { ActionInfoItem &actionInfo(const QString &name) {
if (!actionInfoList.contains(name)) { if (!actionInfoList.contains(name)) {
dbgAction << "Tried to look up info for unknown action" << name; dbgAction << "Tried to look up info for unknown action" << name;
...@@ -113,7 +113,6 @@ public: ...@@ -113,7 +113,6 @@ public:
}; };
KisActionRegistry *q; KisActionRegistry *q;
KActionCollection * defaultActionCollection;
QMap<QString, KActionCollection*> actionCollections; QMap<QString, KActionCollection*> actionCollections;
}; };
...@@ -129,13 +128,10 @@ KisActionRegistry *KisActionRegistry::instance() ...@@ -129,13 +128,10 @@ KisActionRegistry *KisActionRegistry::instance()
KisActionRegistry::KisActionRegistry() KisActionRegistry::KisActionRegistry()
: d(new KisActionRegistry::Private(this)) : d(new KisActionRegistry::Private(this))
{ {
d->loadActionFiles();
KConfigGroup cg = KSharedConfig::openConfig()->group("Shortcut Schemes"); KConfigGroup cg = KSharedConfig::openConfig()->group("Shortcut Schemes");
QString schemeName = cg.readEntry("Current Scheme", "Default"); QString schemeName = cg.readEntry("Current Scheme", "Default");
loadShortcutScheme(schemeName); loadShortcutScheme(schemeName);
loadCustomShortcuts(); loadCustomShortcuts();
} }
QList<QKeySequence> KisActionRegistry::getCustomShortcut(const QString &name) QList<QKeySequence> KisActionRegistry::getCustomShortcut(const QString &name)
...@@ -201,7 +197,6 @@ void KisActionRegistry::loadShortcutScheme(const QString &schemeName) ...@@ -201,7 +197,6 @@ void KisActionRegistry::loadShortcutScheme(const QString &schemeName)
if (schemeName != QStringLiteral("Default")) { if (schemeName != QStringLiteral("Default")) {
QString schemeFileName = KShortcutSchemesHelper::schemeFileLocations().value(schemeName); QString schemeFileName = KShortcutSchemesHelper::schemeFileLocations().value(schemeName);
if (schemeFileName.isEmpty()) { if (schemeFileName.isEmpty()) {
// qDebug() << "No configuration file found for scheme" << schemeName;
return; return;
} }
KConfig schemeConfig(schemeFileName, KConfig::SimpleConfig); KConfig schemeConfig(schemeFileName, KConfig::SimpleConfig);
...@@ -380,6 +375,7 @@ void KisActionRegistry::Private::loadActionFiles() ...@@ -380,6 +375,7 @@ void KisActionRegistry::Private::loadActionFiles()
QStringList actionDefinitions = QStringList actionDefinitions =
KoResourcePaths::findAllResources("kis_actions", "*.action", KoResourcePaths::Recursive); KoResourcePaths::findAllResources("kis_actions", "*.action", KoResourcePaths::Recursive);
// Extract actions all XML .action files. // Extract actions all XML .action files.
Q_FOREACH (const QString &actionDefinition, actionDefinitions) { Q_FOREACH (const QString &actionDefinition, actionDefinitions) {
QDomDocument doc; QDomDocument doc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment