Don't add new entries to EntryModel when in search mode.

Only allow moving entries from one group to the other.
This commit is contained in:
Felix Geyer 2012-07-21 18:19:40 +02:00
parent f6e1af30b3
commit 33b4cd8636
5 changed files with 21 additions and 11 deletions

View file

@ -271,7 +271,7 @@ void TestGroup::testDeleteSignals()
Entry* entry = new Entry();
entry->setGroup(group);
QSignalSpy spyEntryAboutToRemove(group, SIGNAL(entryAboutToRemove(Entry*)));
QSignalSpy spyEntryRemoved(group, SIGNAL(entryRemoved()));
QSignalSpy spyEntryRemoved(group, SIGNAL(entryRemoved(Entry*)));
delete entry;
QVERIFY(group->entries().isEmpty());
@ -286,7 +286,7 @@ void TestGroup::testDeleteSignals()
Entry* entry2 = new Entry();
entry2->setGroup(group2);
QSignalSpy spyEntryAboutToRemove2(group2, SIGNAL(entryAboutToRemove(Entry*)));
QSignalSpy spyEntryRemoved2(group2, SIGNAL(entryRemoved()));
QSignalSpy spyEntryRemoved2(group2, SIGNAL(entryRemoved(Entry*)));
delete group2;
QCOMPARE(spyEntryAboutToRemove2.count(), 0);