~ubuntu-branches/ubuntu/vivid/kdesdk/vivid

« back to all changes in this revision

Viewing changes to okteta/kasten/controllers/view/structures/structuresmanager.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-06 11:49:54 UTC
  • mfrom: (0.4.21)
  • Revision ID: package-import@ubuntu.com-20120606114954-rdls73fzlpzxglbx
Tags: 4:4.8.80-0ubuntu1
* New uptream beta release
* Update dont_export_private_classes.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *   This file is part of the Okteta Kasten Framework, made within the KDE community.
3
3
 *
4
 
 *   Copyright 2009, 2010 Alex Richardson <alex.richardson@gmx.de>
 
4
 *   Copyright 2009, 2010, 2012 Alex Richardson <alex.richardson@gmx.de>
5
5
 *
6
6
 *   This library is free software; you can redistribute it and/or
7
7
 *   modify it under the terms of the GNU Lesser General Public
28
28
#include <KDebug>
29
29
#include <QDir>
30
30
 
31
 
namespace Kasten1
 
31
namespace Kasten2
32
32
{
33
33
 
34
34
StructuresManager::~StructuresManager()
52
52
            QLatin1String("okteta/structures/*/*.desktop"), KStandardDirs::Recursive
53
53
                    | KStandardDirs::NoDuplicates);
54
54
    kDebug() << "found structures: " << paths;
55
 
    KPluginInfo::List plugins = KPluginInfo::fromFiles(paths, mConfig->group(
56
 
            "Plugins"));
 
55
    KPluginInfo::List plugins = KPluginInfo::fromFiles(paths, mConfig->group("Plugins"));
57
56
    foreach(const KPluginInfo& info, plugins)
58
 
        {
59
 
            QFileInfo desktopPath = QFileInfo(info.entryPath());
60
 
            addStructDef(info);
61
 
        }
 
57
    {
 
58
        QFileInfo desktopPath = QFileInfo(info.entryPath());
 
59
        addStructDef(info);
 
60
    }
62
61
}
63
62
 
64
63
void StructuresManager::addStructDef(const KPluginInfo& info)
76
75
{
77
76
    if (!mDefs.contains(pluginName))
78
77
    {
79
 
        kWarning() << "could not find structuredefinitionFile with name="
80
 
                << pluginName;
 
78
        kWarning() << "could not find structuredefinitionFile with name=" << pluginName;
81
79
        return NULL;
82
80
    }
83
81
    return mDefs.value(pluginName);