Commit 6a7fc1c4 authored by Laurent Montel's avatar Laurent Montel 😁

Add debug info.

parent 0eb05c83
...@@ -83,6 +83,7 @@ void SendLaterAgent::doSetOnline( bool online ) ...@@ -83,6 +83,7 @@ void SendLaterAgent::doSetOnline( bool online )
void SendLaterAgent::reload() void SendLaterAgent::reload()
{ {
qDebug()<<" void SendLaterAgent::reload()";
if (SendLaterAgentSettings::enabled()) if (SendLaterAgentSettings::enabled())
mManager->load(true); mManager->load(true);
} }
......
...@@ -60,8 +60,11 @@ void SendLaterManager::stopAll() ...@@ -60,8 +60,11 @@ void SendLaterManager::stopAll()
void SendLaterManager::load(bool forcereload) void SendLaterManager::load(bool forcereload)
{ {
stopAll(); stopAll();
if (forcereload) if (forcereload) {
qDebug()<<" reparse config !!!!!!!!!!";
mConfig->reparseConfiguration(); mConfig->reparseConfiguration();
}
qDebug()<<"void SendLaterManager::load(bool forcereload) "<<forcereload;
const QStringList itemList = mConfig->groupList().filter( QRegExp( QLatin1String("SendLaterItem \\d+") ) ); const QStringList itemList = mConfig->groupList().filter( QRegExp( QLatin1String("SendLaterItem \\d+") ) );
const int numberOfItems = itemList.count(); const int numberOfItems = itemList.count();
...@@ -207,7 +210,9 @@ void SendLaterManager::recreateSendList() ...@@ -207,7 +210,9 @@ void SendLaterManager::recreateSendList()
void SendLaterManager::sendDone(SendLater::SendLaterInfo *info) void SendLaterManager::sendDone(SendLater::SendLaterInfo *info)
{ {
if (info) { if (info) {
qDebug()<<" void SendLaterManager::sendDone(SendLater::SendLaterInfo *info)"<<info;
if (info->isRecurrence()) { if (info->isRecurrence()) {
qDebug()<<" recurent "<<info;
SendLater::SendLaterUtil::changeRecurrentDate(info); SendLater::SendLaterUtil::changeRecurrentDate(info);
} else { } else {
removeLaterInfo(info); removeLaterInfo(info);
......
...@@ -58,7 +58,7 @@ void SendLater::SendLaterUtil::changeRecurrentDate(SendLater::SendLaterInfo *inf ...@@ -58,7 +58,7 @@ void SendLater::SendLaterUtil::changeRecurrentDate(SendLater::SendLaterInfo *inf
} }
} }
info->setDateTime(newInfoDateTime); info->setDateTime(newInfoDateTime);
//qDebug()<<"AFTER SendLater::SendLaterUtil::changeRecurrentDate "<<info->dateTime().toString(); qDebug()<<"AFTER SendLater::SendLaterUtil::changeRecurrentDate "<<info->dateTime().toString()<<" info"<<info;
writeSendLaterInfo(defaultConfig(), info, false); writeSendLaterInfo(defaultConfig(), info, false);
} }
} }
...@@ -85,6 +85,7 @@ void SendLater::SendLaterUtil::writeSendLaterInfo(KSharedConfig::Ptr config, Sen ...@@ -85,6 +85,7 @@ void SendLater::SendLaterUtil::writeSendLaterInfo(KSharedConfig::Ptr config, Sen
info->writeConfig(group); info->writeConfig(group);
config->sync(); config->sync();
config->reparseConfiguration(); config->reparseConfiguration();
qDebug()<<" reparse config";
if (forceReload) if (forceReload)
reload(); reload();
} }
...@@ -108,6 +109,7 @@ bool SendLater::SendLaterUtil::sentLaterAgentEnabled() ...@@ -108,6 +109,7 @@ bool SendLater::SendLaterUtil::sentLaterAgentEnabled()
void SendLater::SendLaterUtil::reload() void SendLater::SendLaterUtil::reload()
{ {
qDebug()<<" void SendLater::SendLaterUtil::reload()";
QDBusInterface interface( QLatin1String("org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent"), QLatin1String("/SendLaterAgent") ); QDBusInterface interface( QLatin1String("org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent"), QLatin1String("/SendLaterAgent") );
if (interface.isValid()) { if (interface.isValid()) {
interface.call(QLatin1String("reload")); interface.call(QLatin1String("reload"));
......
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