Ticket #65 (closed task: fixed)

Opened 5 years ago

Last modified 4 years ago

Get rid of the forward..Signal() methods [patch ready]

Reported by: diederik Owned by: diederik
Priority: minor Milestone: kmess-2.0
Component: Code cleanup Version: 1.5-pre2
Keywords: Cc:

Description

KMess has some forward...() methods when a class only needs to relay a signal. It appears Qt has a better way to write this, like:

connect( object, SIGNAL(..), this, SIGNAL(..) );

In other words, the signal can be connected to the next signal instead. Sometimes the forward methods have some useful debugging information, so it's not needed to rewrite those. The others however, could be rewritten.

Attachments

remove-plain-forwards.patch Download (10.2 KB) - added by amroth 4 years ago.
Removes slots which just send a signal.

Change History

Changed 4 years ago by amroth

  • milestone set to Someday

Changed 4 years ago by amroth

  • summary changed from Get rid of the forward..Signal() methods to Get rid of the forward..Signal() methods [patch ready]
  • milestone changed from Someday to kmess-1.6

Fixed.

Some more could have been deleted, but I was unsure if calling something like:

SIGNAL( slotItemExecuted( contactListView_->currentItem() ) )

would have worked or not.. If it's interpreted at preprocessing time, it won't, so I preferred to leave such calls. However, I've replaced a forward method with this:

SIGNAL( moveToGroup( group_ ) )

Since at that point in the code group_ is always set, there should be no problems with that.. Am I right? :P

Changed 4 years ago by amroth

Removes slots which just send a signal.

Changed 4 years ago by valerio

  • status changed from new to closed
  • resolution set to fixed

Fixed with r3131. Two of the classes in that kmess-1.5 patch do not exist anymore.

Note: See TracTickets for help on using tickets.