[Kde-pim] KDE/kdepim

Bertjan Broeksema broeksema at kde.org
Tue Jul 13 13:52:41 BST 2010


SVN commit 1149424 by bbroeksema:

Change the signal signatures of MulplyingLine signals to let them have fuly
qualified argument names.

Please remember to specify the fuly qualified names in signals and slots, at
least in public api. It becomes a pain otherwise to get the connect statements
working.

I think all connects are fixed, if you find any regressions related to
multiplylineditor such as in composer, than this commit might have caused it.

CCMAIL: kde-pim at kde.org


 M  +13 -0     incidenceeditors/incidenceeditor-ng/attendeeeditor.cpp  
 M  +2 -0      incidenceeditors/incidenceeditor-ng/attendeeeditor.h  
 M  +8 -1      incidenceeditors/incidenceeditor-ng/incidenceattendee.cpp  
 M  +1 -0      incidenceeditors/incidenceeditor-ng/incidenceattendee.h  
 M  +4 -4      libkdepim/multiplyingline.h  
 M  +8 -8      libkdepim/multiplyinglineview_p.cpp  
 M  +4 -4      libkdepim/multiplyinglineview_p.h  


--- trunk/KDE/kdepim/incidenceeditors/incidenceeditor-ng/attendeeeditor.cpp #1149423:1149424
@@ -40,13 +40,26 @@
   AttendeeLine* att = qobject_cast<AttendeeLine*>( line );
   if( !att )
     return;
+
   connect( att, SIGNAL( changed() ), SLOT( slotCalculateTotal() ) );
+  connect( att, SIGNAL( returnPressed( KPIM::MultiplyingLine* ) ), SLOT( slotAddressEntered( KPIM::MultiplyingLine* ) ) );
 }
 
 void AttendeeEditor::slotLineDeleted( int /*pos*/ )
 {
 }
 
+void AttendeeEditor::slotAddressEntered( KPIM::MultiplyingLine *line )
+{
+  AttendeeLine* att = qobject_cast<AttendeeLine*>( line );
+  if( !att )
+    return;
+
+  AttendeeData::Ptr data = qSharedPointerDynamicCast<AttendeeData>( att->data() );
+  // The email will either be a valid email or the name of a distlist.
+  emit valueEntered( data->email() );
+}
+
 void AttendeeEditor::slotCalculateTotal()
 {
   int empty = 0;
--- trunk/KDE/kdepim/incidenceeditors/incidenceeditor-ng/attendeeeditor.h #1149423:1149424
@@ -52,8 +52,10 @@
 
   signals:
     void countChanged( int );
+    void valueEntered( const QString & );
 
   protected slots:
+    void slotAddressEntered( KPIM::MultiplyingLine* );
     void slotLineAdded( KPIM::MultiplyingLine* );
     void slotLineDeleted( int pos );
     void slotCalculateTotal();
--- trunk/KDE/kdepim/incidenceeditors/incidenceeditor-ng/incidenceattendee.cpp #1149423:1149424
@@ -66,7 +66,8 @@
   mAttendeeEditor->setCompletionMode( KGlobalSettings::self()->completionMode() );
   mAttendeeEditor->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
 
-  connect( mAttendeeEditor, SIGNAL( countChanged( int ) ), this, SIGNAL( attendeeCountChanged( int ) ) );
+  connect( mAttendeeEditor, SIGNAL( countChanged( int ) ), SIGNAL( attendeeCountChanged( int ) ) );
+  connect( mAttendeeEditor, SIGNAL( valueEntered( QString ) ), SLOT( checkIfExpansionIsNeeded( QString ) ) );
 
   mUi->mOrganizerStack->setCurrentIndex( 0 );
 
@@ -180,6 +181,12 @@
   mUi->mOrganizerCombo->addItems( uniqueList );
 }
 
+void IncidenceEditorsNG::IncidenceAttendee::checkIfExpansionIsNeeded( const QString &groupOrEmail )
+{
+  kDebug() << "TEST!!!!:" << groupOrEmail;
+
+}
+
 void IncidenceEditorsNG::IncidenceAttendee::expandResult( KJob *job )
 {
   Akonadi::ContactGroupExpandJob *expandJob = qobject_cast<Akonadi::ContactGroupExpandJob*>( job );
--- trunk/KDE/kdepim/incidenceeditors/incidenceeditor-ng/incidenceattendee.h #1149423:1149424
@@ -55,6 +55,7 @@
     void attendeeCountChanged( int );
 
 private slots:
+    void checkIfExpansionIsNeeded( const QString &groupOrEmail );
     void expandResult( KJob *job );
     void slotSelectAddresses();
 
--- trunk/KDE/kdepim/libkdepim/multiplyingline.h #1149423:1149424
@@ -174,15 +174,15 @@
     /**
       Emitted when the return/enter key is pressed
     */
-    void returnPressed( MultiplyingLine * );
+    void returnPressed( KPIM::MultiplyingLine * );
     /**
       Emitted when the down key is pressed
     */
-    void downPressed( MultiplyingLine * );
+    void downPressed( KPIM::MultiplyingLine * );
     /**
       Emitted when the up key is pressed
     */
-    void upPressed( MultiplyingLine * );
+    void upPressed( KPIM::MultiplyingLine * );
     /**
       Emitted when the right key is pressed
     */
@@ -190,7 +190,7 @@
     /**
       Should be emitted when the line should be deleted
       */
-    void deleteLine( MultiplyingLine * );
+    void deleteLine( KPIM::MultiplyingLine * );
     /**
       Emitted when the completion mode changes
     */
--- trunk/KDE/kdepim/libkdepim/multiplyinglineview_p.cpp #1149423:1149424
@@ -73,15 +73,15 @@
   mTopLayout->addWidget( line );
   line->setCompletionMode( mCompletionMode );
   line->show();
-  connect( line, SIGNAL( returnPressed( MultiplyingLine * ) ),
-    SLOT( slotReturnPressed( MultiplyingLine * ) ) );
-  connect( line, SIGNAL( upPressed( MultiplyingLine * ) ),
-    SLOT( slotUpPressed( MultiplyingLine * ) ) );
-  connect( line, SIGNAL( downPressed( MultiplyingLine * ) ),
-    SLOT( slotDownPressed( MultiplyingLine * ) ) );
+  connect( line, SIGNAL( returnPressed( KPIM::MultiplyingLine * ) ),
+    SLOT( slotReturnPressed( KPIM::MultiplyingLine * ) ) );
+  connect( line, SIGNAL( upPressed( KPIM::MultiplyingLine * ) ),
+    SLOT( slotUpPressed( KPIM::MultiplyingLine * ) ) );
+  connect( line, SIGNAL( downPressed( KPIM::MultiplyingLine * ) ),
+    SLOT( slotDownPressed( KPIM::MultiplyingLine * ) ) );
   connect( line, SIGNAL( rightPressed() ), SIGNAL( focusRight() ) );
-  connect( line, SIGNAL( deleteLine( MultiplyingLine * ) ),
-    SLOT( slotDecideLineDeletion( MultiplyingLine * ) ) );
+  connect( line, SIGNAL( deleteLine( KPIM::MultiplyingLine * ) ),
+    SLOT( slotDecideLineDeletion( KPIM::MultiplyingLine * ) ) );
   connect( line, SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
     SLOT( setCompletionMode( KGlobalSettings::Completion ) ) );
 
--- trunk/KDE/kdepim/libkdepim/multiplyinglineview_p.h #1149423:1149424
@@ -101,10 +101,10 @@
     void resizeView();
 
   protected slots:
-    void slotReturnPressed( MultiplyingLine * );
-    void slotDownPressed( MultiplyingLine * );
-    void slotUpPressed( MultiplyingLine * );
-    void slotDecideLineDeletion(  MultiplyingLine * );
+    void slotReturnPressed( KPIM::MultiplyingLine * );
+    void slotDownPressed( KPIM::MultiplyingLine * );
+    void slotUpPressed( KPIM::MultiplyingLine * );
+    void slotDecideLineDeletion( KPIM::MultiplyingLine * );
     void slotDeleteLine();
     void moveCompletionPopup();
     void moveScrollBarToEnd();
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list