Commit 27738351 authored by David Faure's avatar David Faure

Make caldav folder names more readable in korganizer.

Before: "https://caldav.kdab.com/calendars/dfaure@kdab.com/4454698657d8-c8443bc90b10-687f7cd3/ CalDav Calendar"
After: "shared >> calendar >> foo in KDAB calendars" (or whatever the user called it)

Approved by Laurent and Allen.
parent f7a78214
......@@ -30,6 +30,7 @@
#include <Akonadi/EntityDisplayAttribute>
#include <Akonadi/EntityTreeModel>
#include <Akonadi/Item>
#include <Akonadi/AgentManager>
#include <Akonadi/Calendar/ETMCalendar>
#include <akonadi/calendar/publishdialog.h>
#include <akonadi/calendar/calendarsettings.h>
......@@ -575,7 +576,8 @@ QString CalendarSupport::displayName( Akonadi::ETMCalendar *calendar, const Akon
// Dav Groupware
if ( resourceName.contains( QLatin1String( "davgroupware" ) ) ) {
return i18nc( "%1 is the folder name", "%1 CalDav Calendar", cName );
const QString resourceDisplayName = Akonadi::AgentManager::self()->instance(resourceName).name();
return i18nc( "%1 is the folder name", "%1 in %2", fullCollection.displayName(), resourceDisplayName );
} //end caldav section
// Google
......
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