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

List:       kde-commits
Subject:    [akonadi-sugarcrm] /: Map sugar task's "name" to Todo's "summary"
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2012-01-25 19:34:37
Message-ID: 20120125193437.E6C3EA60BE () git ! kde ! org
[Download RAW message or body]

Git commit c49dac161f90ef552a570713ccde5be0b3f93580 by Kevin Krammer.
Committed on 25/01/2012 at 14:32.
Pushed by krake into branch 'master'.

Map sugar task's "name" to Todo's "summary"

M  +11   -11   taskshandler.cpp

http://commits.kde.org/akonadi-sugarcrm/c49dac161f90ef552a570713ccde5be0b3f=
93580

diff --git a/taskshandler.cpp b/taskshandler.cpp
index 804b5ec..37717b2 100644
--- a/taskshandler.cpp
+++ b/taskshandler.cpp
@@ -46,16 +46,6 @@ static void setId( const QString &value, KCalCore::Todo =
&todo )
     todo.setCustomProperty( "SugarCRM", "X-Id", value );
 }
 =

-static QString getName( const KCalCore::Todo &todo )
-{
-    return todo.customProperty( "SugarCRM", "X-Name" );
-}
-
-static void setName( const QString &value, KCalCore::Todo &todo )
-{
-    todo.setCustomProperty( "SugarCRM", "X-Name", value );
-}
-
 static QString getDateEntered( const KCalCore::Todo &todo )
 {
     return todo.created().toString();
@@ -106,6 +96,16 @@ static void setDescription( const QString &value, KCalC=
ore::Todo &todo )
     todo.setDescription( value );
 }
 =

+static QString getSummary( const KCalCore::Todo &todo )
+{
+    return todo.summary();
+}
+
+static void setSummary( const QString &value, KCalCore::Todo &todo )
+{
+    todo.setSummary( value );
+}
+
 static QString getDeleted( const KCalCore::Todo &todo )
 {
     return todo.customProperty( "SugarCRM", "X-Deleted" );
@@ -265,7 +265,7 @@ TasksHandler::TasksHandler( SugarSession *session )
     mAccessors->insert( QLatin1String( "id" ),
                         new TaskAccessorPair( getId, setId, QString() ) );
     mAccessors->insert( QLatin1String( "name" ),
-                        new TaskAccessorPair( getName, setName, QString() =
) );
+                        new TaskAccessorPair( getSummary, setSummary, QStr=
ing() ) );
     mAccessors->insert( QLatin1String( "date_entered" ),
                         new TaskAccessorPair( getDateEntered, setDateEnter=
ed, QString() ) );
     mAccessors->insert( QLatin1String( "date_modififed" ),

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

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