Add missing d-pointers
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=668014
This commit is contained in:
parent
022f7f671b
commit
5d1eb7f460
@ -25,22 +25,33 @@
|
|||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class DataEngineManager::Private
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Private()
|
||||||
|
{}
|
||||||
|
|
||||||
|
Plasma::DataEngine::Dict m_engines;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
DataEngineManager::DataEngineManager()
|
DataEngineManager::DataEngineManager()
|
||||||
|
: d(new Private())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
DataEngineManager::~DataEngineManager()
|
DataEngineManager::~DataEngineManager()
|
||||||
{
|
{
|
||||||
foreach (Plasma::DataEngine* engine, m_engines) {
|
foreach (Plasma::DataEngine* engine, d->m_engines) {
|
||||||
delete engine;
|
delete engine;
|
||||||
}
|
}
|
||||||
m_engines.clear();
|
d->m_engines.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
|
Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
|
||||||
{
|
{
|
||||||
Plasma::DataEngine::Dict::const_iterator it = m_engines.find(name);
|
Plasma::DataEngine::Dict::const_iterator it = d->m_engines.find(name);
|
||||||
if (it != m_engines.end()) {
|
if (it != d->m_engines.end()) {
|
||||||
// ref and return the engine
|
// ref and return the engine
|
||||||
//Plasma::DataEngine *engine = *it;
|
//Plasma::DataEngine *engine = *it;
|
||||||
return *it;
|
return *it;
|
||||||
@ -78,7 +89,7 @@ Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
|
|||||||
engine->ref();
|
engine->ref();
|
||||||
engine->setObjectName(offers.first()->name());
|
engine->setObjectName(offers.first()->name());
|
||||||
engine->setIcon(offers.first()->icon());
|
engine->setIcon(offers.first()->icon());
|
||||||
m_engines[name] = engine;
|
d->m_engines[name] = engine;
|
||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +101,7 @@ void DataEngineManager::unloadDataEngine(const QString& name)
|
|||||||
engine->deref();
|
engine->deref();
|
||||||
|
|
||||||
if (!engine->isUsed()) {
|
if (!engine->isUsed()) {
|
||||||
m_engines.remove(name);
|
d->m_engines.remove(name);
|
||||||
delete engine;
|
delete engine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,8 @@ class PLASMA_EXPORT DataEngineManager
|
|||||||
QStringList knownEngines() const;
|
QStringList knownEngines() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Plasma::DataEngine::Dict m_engines;
|
class Private;
|
||||||
|
Private* const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
@ -23,8 +23,13 @@
|
|||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class LineEdit::Private
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
LineEdit::LineEdit(QGraphicsItem *parent, QGraphicsScene *scene)
|
LineEdit::LineEdit(QGraphicsItem *parent, QGraphicsScene *scene)
|
||||||
: QGraphicsTextItem(parent, scene)
|
: QGraphicsTextItem(parent, scene),
|
||||||
|
d(new Private())
|
||||||
{
|
{
|
||||||
setTextInteractionFlags(Qt::TextEditorInteraction);
|
setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,10 @@ class KDE_EXPORT LineEdit : public QGraphicsTextItem
|
|||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void updated(const QString&, const Plasma::DataEngine::Data&);
|
void updated(const QString&, const Plasma::DataEngine::Data&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
class Private;
|
||||||
|
Private* const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
Loading…
Reference in New Issue
Block a user