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

List:       kde-commits
Subject:    KDE/kdepim/calendarsupport
From:       Sergio Luis Martins <iamsergio () gmail ! com>
Date:       2010-09-30 23:44:26
Message-ID: 20100930234426.3533BAC896 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1181423 by smartins:

Use QSharedPointer for ScheduleMessage too wrt allen's last changes in KCalCore.

 M  +4 -5      attachmenthandler.cpp  
 M  +6 -7      attachmenthandler.h  


--- trunk/KDE/kdepim/calendarsupport/attachmenthandler.cpp #1181422:1181423
@@ -28,8 +28,6 @@
 */
 #include "attachmenthandler.h"
 
-#include <KCalCore/ScheduleMessage>
-
 #include <KFileDialog>
 #include <KLocale>
 #include <KMessageBox>
@@ -108,7 +106,8 @@
 }
 
 Attachment::Ptr AttachmentHandler::find( const QString &attachmentName,
-                                         ScheduleMessage *message, QWidget *parent )
+                                         const ScheduleMessage::Ptr &message,
+                                         QWidget *parent )
 {
   if ( !message ) {
     return Attachment::Ptr();
@@ -192,7 +191,7 @@
 }
 
 bool AttachmentHandler::view( const QString &attachmentName,
-                              ScheduleMessage *message, QWidget *parent )
+                              const ScheduleMessage::Ptr &message, QWidget *parent )
 {
   return view( parent, find( parent, attachmentName, message ) );
 }
@@ -247,7 +246,7 @@
 }
 
 bool AttachmentHandler::saveAs( const QString &attachmentName,
-                                ScheduleMessage *message, QWidget *parent )
+                                const ScheduleMessage::Ptr &message, QWidget *parent )
 {
   return saveAs( parent, find( parent, attachmentName, message ) );
 }
--- trunk/KDE/kdepim/calendarsupport/attachmenthandler.h #1181422:1181423
@@ -28,11 +28,8 @@
 
 #include <KCalCore/Attachment>
 #include <KCalCore/Incidence>
+#include <KCalCore/ScheduleMessage>
 
-namespace KCalCore {
-  class ScheduleMessage;
-}
-
 class QString;
 class QWidget;
 
@@ -70,7 +67,7 @@
     @return a pointer to the Attachment object located; 0 if no such attachment could be found.
   */
   KCalCore::Attachment::Ptr find( const QString &attachmentName,
-                                  KCalCore::ScheduleMessage *message,
+                                  const KCalCore::ScheduleMessage::Ptr &message,
                                   QWidget *parent );
 
   /**
@@ -133,7 +130,8 @@
     @return true if the attachment could be found and the viewer program successfully launched;
     false otherwise.
   */
-  bool view( const QString &attachmentName, KCalCore::ScheduleMessage *message, QWidget *parent );
+  bool view( const QString &attachmentName, const KCalCore::ScheduleMessage::Ptr &message,
+             QWidget *parent );
 
   /**
     Saves the specified attachment to a file of the user's choice.
@@ -181,7 +179,8 @@
     @return true if the attachment could be found and the save operation was successful;
     false otherwise.
   */
-  bool saveAs( const QString &attachmentName, KCalCore::ScheduleMessage *message, QWidget *parent );
+  bool saveAs( const QString &attachmentName, const KCalCore::ScheduleMessage::Ptr &message,
+               QWidget *parent );
 }
 
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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