summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Caulier <[email protected]>2014-12-10 11:55:22 +0100
committerGilles Caulier <[email protected]>2014-12-10 11:55:22 +0100
commit8888b77f2c99bfe000e6b386c522e7b3b17319eb (patch)
treea4249c5e8c960d44c9afd3ebf04bcf62721740f5
parent209e3242262f942de3a9a932a0c0277119058efb (diff)
constify
-rw-r--r--tests/kxmlkipicmd/kipitestpluginloader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/kxmlkipicmd/kipitestpluginloader.cpp b/tests/kxmlkipicmd/kipitestpluginloader.cpp
index 29eef5f..3d2b495 100644
--- a/tests/kxmlkipicmd/kipitestpluginloader.cpp
+++ b/tests/kxmlkipicmd/kipitestpluginloader.cpp
@@ -117,7 +117,7 @@ QList<QAction*> KipiTestPluginLoader::kipiActionsByCategory(Category cat) const
void KipiTestPluginLoader::loadPlugins()
{
- d->kipipluginsActionCollection = new KActionCollection(d->app, QLatin1String("kipitest")/*, KGlobal::mainComponent()*/);
+ d->kipipluginsActionCollection = new KActionCollection(d->app, QLatin1String("kipitest"));
QStringList ignores;
@@ -158,7 +158,7 @@ void KipiTestPluginLoader::slotKipiPluginsPlug()
for (PluginLoader::PluginList::ConstIterator it = list.constBegin() ; it != list.constEnd() ; ++it)
{
- Plugin* plugin = (*it)->plugin();
+ Plugin* const plugin = (*it)->plugin();
if (!plugin || !(*it)->shouldLoad())
{
@@ -172,7 +172,7 @@ void KipiTestPluginLoader::slotKipiPluginsPlug()
for (PluginLoader::PluginList::ConstIterator it = list.constBegin() ; it != list.constEnd() ; ++it)
{
- Plugin* plugin = (*it)->plugin();
+ Plugin* const plugin = (*it)->plugin();
if (!plugin || !(*it)->shouldLoad())
{
@@ -231,15 +231,14 @@ void KipiTestPluginLoader::slotKipiPluginsPlug()
void KipiTestPluginLoader::checkEmptyCategory(Category cat)
{
- KActionCategory* category = d->kipiCategoryMap[cat];
+ KActionCategory* const category = d->kipiCategoryMap[cat];
if (!category)
{
QString actionName = QString::fromLatin1("emptyCategory") + categoryShortName(cat);
QAction* const action = d->app->actionCollection()->addAction(actionName);
action->setEnabled(false);
- category = new KActionCategory(categoryName(cat), d->kipipluginsActionCollection);
- d->kipiCategoryMap.insert(cat, category);
+ d->kipiCategoryMap.insert(cat, new KActionCategory(categoryName(cat), d->kipipluginsActionCollection));
}
}