SVN commit 1037129 by toma: This should work, but doesn't, I need to find out why, but i've had enough for today regarding the expunge stuff. M +12 -0 mainwindow.cpp --- trunk/extragear/pim/mailody/src/mainwindow.cpp #1037128:1037129 @@ -1348,11 +1348,23 @@ kDebug() << "CollectionResource " << m_currentCollection.resource() << m_currentCollection.id(); + { QString dbusstr = "org.freedesktop.Akonadi.Resource."; dbusstr.append( m_currentCollection.resource() ); QDBusInterface dbus( dbusstr, "/" ); dbus.call( QLatin1String( "requestManualExpunge" ), m_currentCollection.id() ); + } + + // Now the messages are removed from the imap server, but not yet in + // the view. + { + QString dbusstr = "org.freedesktop.Akonadi.Resource."; + dbusstr.append( m_currentCollection.resource() ); + QDBusInterface dbus( dbusstr, "/" ); + dbus.call( QLatin1String( "rsynchronizeCollection" ), + m_currentCollection.id() ); + } }