[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/libkcal
From:       David Faure <faure () kde ! org>
Date:       2003-01-29 18:18:19
[Download RAW message or body]

CVS commit by faure: 

Fix method-name-is-translated-on-the-wire bug.


  M +1 -1      icalformat.cpp   1.41
  M +27 -3     scheduler.cpp   1.24
  M +3 -1      scheduler.h   1.13


--- kdepim/libkcal/icalformat.cpp  #1.40:1.41
@@ -360,5 +360,5 @@ ScheduleMessage *ICalFormat::parseSchedu
   if (!icalrestriction_check(message)) {
     setException(new ErrorFormat(ErrorFormat::Restriction,
-                                   Scheduler::methodName(method) + ": " +
+                                   Scheduler::translatedMethodName(method) + ": " +
                                    mImpl->extractErrorProperty(c)));
     return 0;

--- kdepim/libkcal/scheduler.cpp  #1.23:1.24
@@ -103,4 +103,28 @@ QString Scheduler::methodName(Method met
   switch (method) {
     case Publish:
+      return QString::fromLatin1("Publish");
+    case Request:
+      return QString::fromLatin1("Request");
+    case Refresh:
+      return QString::fromLatin1("Refresh");
+    case Cancel:
+      return QString::fromLatin1("Cancel");
+    case Add:
+      return QString::fromLatin1("Add");
+    case Reply:
+      return QString::fromLatin1("Reply");
+    case Counter:
+      return QString::fromLatin1("Counter");
+    case Declinecounter:
+      return QString::fromLatin1("Decline Counter");
+    default:
+      return QString::fromLatin1("Unknown");
+  }
+}
+
+QString Scheduler::translatedMethodName(Method method)
+{
+  switch (method) {
+    case Publish:
       return i18n("Publish");
     case Request:

--- kdepim/libkcal/scheduler.h  #1.12:1.13
@@ -106,6 +106,8 @@ class Scheduler {
     bool acceptTransaction(IncidenceBase *,Method method,ScheduleMessage::Status status);
 
-    /** Return a human-readable name for a iTIP method. */
+    /** Return a machine-readable name for a iTIP method. */
     static QString methodName(Method);
+    /** Return a translated and human-readable name for a iTIP method. */
+    static QString translatedMethodName(Method);
 
     virtual bool deleteTransaction(IncidenceBase *incidence);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic