Commit 8da30437 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Rename del to remove avoiding python warning and renaming.

parent 0a6ad624
......@@ -55,7 +55,7 @@ QStringList dtkObjectManager::keys(void) const
return d->instances.keys();
}
bool dtkObjectManager::del(const QVariant& v)
bool dtkObjectManager::remove(const QVariant& v)
{
QVariantMap::const_iterator i = d->instances.begin();
while (i != d->instances.end()) {
......
......@@ -31,7 +31,8 @@ public:
public slots:
void add(const QVariant&, const QString&);
void add(const QVariant&);
bool del(const QVariant&);
bool remove(const QVariant&);
public:
QVariant value(const QString& key) const;
......
......@@ -79,16 +79,16 @@ void dtkObjectManagerTestCase::testKeys(void)
void dtkObjectManagerTestCase::testDel(void)
{
QVariant v;
QCOMPARE(dtkObjectManager::instance()->del(v), false);
QCOMPARE(dtkObjectManager::instance()->remove(v), false);
v.setValue(d->comm_1);
QCOMPARE(dtkObjectManager::instance()->del(v), true);
QCOMPARE(dtkObjectManager::instance()->remove(v), true);
QCOMPARE(dtkObjectManager::instance()->count() , 1);
v = dtkObjectManager::instance()->value(QString("dtkDistributedCommunicator* 1"));
dtkDistributedCommunicator * comm = v.value<dtkDistributedCommunicator*>();
QCOMPARE(dtkObjectManager::instance()->del(v), true);
QCOMPARE(dtkObjectManager::instance()->remove(v), true);
QCOMPARE(dtkObjectManager::instance()->count() , 0);
QCOMPARE(dtkObjectManager::instance()->del(v), false);
QCOMPARE(dtkObjectManager::instance()->remove(v), false);
QCOMPARE(dtkObjectManager::instance()->count() , 0);
}
......
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