Ticket #65: remove-plain-forwards.patch

File remove-plain-forwards.patch, 10.2 KB (added by amroth, 4 years ago)

Removes slots which just send a signal.

  • kmess/grouplistviewitem.cpp

     
    170170  if(! group_->isSpecialGroup()) 
    171171  { 
    172172    moveAction_ = new KAction(); 
    173     connect(moveAction_, SIGNAL(activated()), this, SLOT(slotForwardActivated())); 
     173    connect(moveAction_, SIGNAL(activated()), this, SIGNAL(moveToGroup(group_))); 
    174174    copyAction_ = new KAction(); 
    175     connect(copyAction_, SIGNAL(activated()), this, SLOT(slotForwardCopyActivated())); 
     175    connect(copyAction_, SIGNAL(activated()), this, SIGNAL(copyToGroup(group_))); 
    176176  } 
    177177 
    178178  // Attach group signals 
     
    328328} 
    329329 
    330330 
    331  
    332 // Forward when moveAction_ is activated 
    333 void GroupListViewItem::slotForwardActivated() 
    334 { 
    335   emit moveToGroup(group_); 
    336 } 
    337  
    338  
    339 void GroupListViewItem::slotForwardCopyActivated() 
    340 { 
    341   emit copyToGroup(group_); 
    342 } 
    343  
    344  
    345331// Update the appearance of the item 
    346332void GroupListViewItem::slotUpdateAppearance() 
    347333{ 
  • kmess/grouplistviewitem.h

     
    8484    void                 slotContactOffline(); 
    8585    // Update the online/offline counters 
    8686    void                 slotContactOnline(); 
    87     // Forward when moveAction_ is activated 
    88     void                 slotForwardActivated(); 
    89     // Forward when copyAction_ is activated 
    90     void                 slotForwardCopyActivated(); 
    9187    // Update the appearance of the item 
    9288    void                 slotUpdateAppearance(); 
    9389 
  • kmess/contact/contact.h

     
    173173    // The contact's online status 
    174174    QString              status_; 
    175175 
    176   private slots: // Slots 
    177     // Forward the "changed friendlyname" signal 
    178     void                 forwardChangedFriendlyName(); 
    179     // Forward the "changed picture" signal 
    180     void                 forwardChangedPicture(); 
    181  
    182176  signals: // Public signals 
    183177    // Signal that the contact may have changed list affiliation 
    184178    void                 changedList(Contact *contact); 
  • kmess/contact/contactlist.cpp

     
    114114 
    115115  // Attach the signals 
    116116  connect( contact, SIGNAL(                   changedMsnObject(Contact*)      ),   // Contact changed msnobject. 
    117            this,    SLOT  ( slotForwardContactChangedMsnObject(Contact*)      )); 
     117           this,    SIGNAL(            contactChangedMsnObject(Contact*)      )); 
    118118  connect( contact, SIGNAL(                     contactOffline(Contact*,bool) ),   // Contact went offline 
    119119           this,    SLOT  (          slotForwardContactOffline(Contact*,bool) )); 
    120120  connect( contact, SIGNAL(                      contactOnline(Contact*,bool) ),   // Contact went online 
    121121           this,    SLOT  (           slotForwardContactOnline(Contact*,bool) )); 
    122122  connect( contact, SIGNAL(                       changedGroup(Contact*)      ),   // Contact moved 
    123            this,    SLOT  (            slotForwardContactMoved(Contact*)      )); 
     123           this,    SIGNAL(                       contactMoved(Contact*)      )); 
    124124  connect( contact, SIGNAL(                        changedList(Contact*)      ),   // Contact was added/removed from certain lists 
    125            this,    SLOT  (            slotForwardContactMoved(Contact*)      )); 
     125           this,    SIGNAL(                       contactMoved(Contact*)      )); 
    126126 
    127127  // HACK: It would be nicer if the GUI desided whether a contact-item should be moved if it's lists changed. 
    128128  //       Currently these signal connection of changedList() assumes the GUI uses "groups to sort various lists". 
     
    365365 
    366366 
    367367 
    368 // Forward from a contact that it's msn object changed 
    369 void ContactList::slotForwardContactChangedMsnObject(Contact *contact) 
    370 { 
    371   emit contactChangedMsnObject( contact ); 
    372 } 
    373  
    374  
    375  
    376 // Forward from a contact that is has moved 
    377 void ContactList::slotForwardContactMoved(Contact *contact) 
    378 { 
    379   emit contactMoved(contact); 
    380 } 
    381  
    382  
    383  
    384368// Forward from a contact that it is offline 
    385369void ContactList::slotForwardContactOffline(Contact *contact, bool showBaloon) 
    386370{ 
  • kmess/contact/contact.cpp

     
    7878  // also there. 
    7979  extension_ = new ContactExtension( handle ); 
    8080 
    81   connect ( extension_, SIGNAL(        changedFriendlyName() ), 
    82             this,         SLOT( forwardChangedFriendlyName() ) ); 
    83   connect ( extension_, SIGNAL(             changedPicture() ), 
    84             this,         SLOT(      forwardChangedPicture() ) ); 
     81  connect ( extension_, SIGNAL( changedFriendlyName() ), 
     82            this,       SIGNAL( changedFriendlyName() ) ); 
     83  connect ( extension_, SIGNAL(      changedPicture() ), 
     84            this,       SIGNAL(      changedPicture() ) ); 
    8585} 
    8686 
    8787 
     
    139139 
    140140 
    141141 
    142 // Slot to pass on the changedFriendlyName() 
    143 void Contact::forwardChangedFriendlyName() 
    144 { 
    145   emit changedFriendlyName(); 
    146 } 
    147  
    148  
    149  
    150 // Forward the "changed picture" signal 
    151 void Contact::forwardChangedPicture() 
    152 { 
    153   emit changedPicture(); 
    154 } 
    155  
    156  
    157  
    158142// Return the path to the contact's picture 
    159143QString Contact::getContactPicturePath() const 
    160144{ 
  • kmess/contact/contactlist.h

     
    105105    bool                 groupExists( QString groupId ); 
    106106 
    107107  private slots: // Private slots 
    108     // Forward from a contact that it's msn object changed 
    109     void                 slotForwardContactChangedMsnObject(Contact *contact); 
    110     // Forward from a contact that is has moved 
    111     void                 slotForwardContactMoved(Contact *contact); 
    112108    // Forward from a contact that it is offline 
    113109    void                 slotForwardContactOffline(Contact *contact, bool showBaloon); 
    114110    // Forward from a contact that it is contact is online 
  • kmess/chat/chatwindow.h

     
    174174    void               contactTyping(QString handle, QString friendlyName); 
    175175    // The emoticon button was pressed. 
    176176    void               emoticonButtonPressed(); 
    177     // Forward the application command to the ChatMaster 
    178     void               forwardAppCommand(QString cookie, QString contact, QString command); 
    179177    // Invite a contact to the chat 
    180178    void               inviteContact(QString handle); 
    181179    // Notify the user of a received nudge 
  • kmess/chat/chatmaster.h

     
    8484    void               forwardRequestNewSwitchboard( QString handle ); 
    8585    // Forward a request to add or remove a contact from the contactlist, which comes from the ContactFrame. 
    8686    void               forwardSetContactAdded( QString handle, bool isAdded ); 
    87     // Forward a request to allow a contact, which comes from the ContactFrame. 
    88     void               forwardSetContactAllowed( QString handle ); 
    8987    // Forward a request to block or unblock a contact, which comes from the ContactFrame. 
    9088    void               forwardSetContactBlocked( QString handle, bool isBlocked ); 
    9189    // A chat window is closing 
  • kmess/chat/chatwindow.cpp

     
    538538 
    539539 
    540540 
    541 // Forward the application command to the ChatMaster 
    542 void ChatWindow::forwardAppCommand(QString cookie, QString contact, QString command) 
    543 { 
    544   emit appCommand(cookie, contact, command); 
    545 } 
    546  
    547  
    548  
    549541// Return the contact action with the given handle 
    550542ContactAction* ChatWindow::getContactActionByHandle(const QString& handle) 
    551543{ 
     
    651643  connect( chatView_, SIGNAL(             sendFiles(QStringList)               ), 
    652644           this,        SLOT( slotStartFileTransfer(QStringList)               ) ); 
    653645  connect( chatView_, SIGNAL(            appCommand(QString, QString, QString) ), 
    654            this,        SLOT(     forwardAppCommand(QString, QString, QString) ) ); 
     646           this,      SIGNAL(            appCommand(QString, QString, QString) ) ); 
    655647  connect( chatView_, SIGNAL(  sendMessageToContact(QString)                   ), 
    656648           this,        SLOT(       userSentMessage()                          ) ); 
    657649 
  • kmess/chat/chatmaster.cpp

     
    155155 
    156156 
    157157 
    158 // Forward a request to allow a contact, which comes from the ContactFrame. 
    159 void ChatMaster::forwardSetContactAllowed( QString handle ) 
    160 { 
    161     emit allowContact( handle ); 
    162 } 
    163  
    164  
    165  
    166158// Forward a request to block or unblock a contact, which comes from the ContactFrame. 
    167159void ChatMaster::forwardSetContactBlocked( QString handle, bool isBlocked ) 
    168160{ 
     
    13061298    connect( chatWindow, SIGNAL(           newChatMessage(const ChatMessage&, ChatWindow*) ), 
    13071299             this,       SLOT  (    forwardNewChatMessage(const ChatMessage&, ChatWindow*) )); 
    13081300    connect( chatWindow, SIGNAL(        setContactAllowed( QString )                       ), 
    1309              this,       SLOT  ( forwardSetContactAllowed( QString )                       ) ); 
     1301             this,       SIGNAL(             allowContact( QString )                       ) ); 
    13101302    connect( chatWindow, SIGNAL(          setContactAdded( QString, bool )                 ), 
    13111303             this,       SLOT  (   forwardSetContactAdded( QString, bool )                 ) ); 
    13121304    connect( chatWindow, SIGNAL(        setContactBlocked( QString, bool )                 ),