Commit 6e3e795e authored by David Jarvie's avatar David Jarvie
Browse files

Move conversionPrompt() to kdepim/kalarm/functions.cpp

parent 73c3a112
......@@ -166,30 +166,6 @@ int updateVersion(CalendarLocal& calendar, const QString& localFile, QString& ve
return version;
}
/******************************************************************************
* Return a prompt string to ask the user whether to convert the calendar to the
* current format.
* If 'whole' is true, the whole calendar needs to be converted; else only some
* alarms may need to be converted.
*
* Note: This method is defined here to avoid duplicating the i18n string
* definition between the Akonadi and KResources code.
*/
QString conversionPrompt(const QString& calendarName, const QString& calendarVersion, bool whole)
{
QString msg = whole
? i18nc("@info", "Calendar <resource>%1</resource> is in an old format (<application>KAlarm</application> version %2), "
"and will be read-only unless you choose to update it to the current format.",
calendarName, calendarVersion)
: i18nc("@info", "Some or all of the alarms in calendar <resource>%1</resource> are in an old <application>KAlarm</application> format, "
"and will be read-only unless you choose to update them to the current format.",
calendarName);
return i18nc("@info", "<para>%1</para><para>"
"<warning>Do not update the calendar if it is also used with an older version of <application>KAlarm</application> "
"(e.g. on another computer). If you do so, the calendar may become unusable there.</warning></para>"
"<para>Do you wish to update the calendar?</para>", msg);
}
} // namespace KACalendar
/******************************************************************************
......
......@@ -120,13 +120,6 @@ namespace KACalendar
KALARMCAL_EXPORT int updateVersion(KCal::CalendarLocal& calendar, const QString& localFile, QString& versionString);
#endif
/** Return a prompt string to ask the user whether to convert the calendar to the
* current format.
* @param whole if true, the whole calendar needs to be converted; else only some
* alarms may need to be converted.
*/
KALARMCAL_EXPORT QString conversionPrompt(const QString& calendarName, const QString& calendarVersion, bool whole);
#ifndef USE_KRESOURCES
/** Set the KAlarm version custom property for a calendar. */
KALARMCAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr&);
......
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