~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/queuemanager/batchtoolsmanager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
public:
69
69
 
70
 
    BatchToolsManagerPriv(){}
 
70
    BatchToolsManagerPriv() {}
71
71
 
72
72
    BatchToolsList toolsList;
73
73
};
74
74
 
75
75
BatchToolsManager::BatchToolsManager(QObject* parent)
76
 
                 : QObject(parent), d(new BatchToolsManagerPriv)
 
76
    : QObject(parent), d(new BatchToolsManagerPriv)
77
77
{
78
78
    // Convert
79
79
    registerTool(new Convert2JPEG(this));
137
137
void BatchToolsManager::registerTool(BatchTool* tool)
138
138
{
139
139
    if (!tool)
 
140
    {
140
141
        return;
 
142
    }
141
143
 
142
144
    d->toolsList.append(tool);
143
145
}
145
147
void BatchToolsManager::unregisterTool(BatchTool* tool)
146
148
{
147
149
    if (!tool)
 
150
    {
148
151
        return;
 
152
    }
149
153
 
150
154
    for (BatchToolsList::iterator it = d->toolsList.begin();
151
 
            it != d->toolsList.end(); )
 
155
         it != d->toolsList.end(); )
152
156
    {
153
157
        if (*it == tool)
154
158
        {
167
171
    for (BatchToolsList::const_iterator it = d->toolsList.constBegin(); it != d->toolsList.constEnd(); ++it)
168
172
    {
169
173
        if ((*it)->objectName() == name && (*it)->toolGroup() == group)
 
174
        {
170
175
            return *it;
 
176
        }
171
177
    }
172
178
 
173
179
    return 0;