Rename METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT
#101
Merged
MicheleC
merged 1 commits from replace/signal-n-slot
into master
7 months ago
Reviewers
Request review
No reviewers
TDE/Core
Labels
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
Apply labels
Clear labels
GE/need-info
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
No Label
GE/need-info
PR/keep-branch
PR/not-ok
PR/rfc
PR/update-trans
PR/wip
RS/R14.0.x
RS/R14.1.x
SL/critical
SL/major
SL/minor
SL/normal
SL/regression
SL/trivial
SL/wishlist
ST/duplicate
ST/invalid
ST/notourproblem
ST/rejected
ST/wontfix
ST/worksforme
Milestone
Set milestone
Clear milestone
No items
No Milestone
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Blocks
#36 Rename TQT_{METHOD, SIGNAL, SLOT} and METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT
TDE/tqtinterface
#18 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/gwenview
#9 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/kpicosim
#14 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/ksquirrel
#12 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/ktechlab
#6 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/kxmleditor
#6 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/potracegui
#6 Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
TDE/tdepacman
Reference: TDE/tqt3#101
Reference in new issue
There is no content yet.
Delete Branch 'replace/signal-n-slot'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Use the TQ_* prefix to be consistent with other TQ_* components.
Why not just use METHOD, SIGNAL, SLOT? Isn't it highly unlikely that someone will mix TQt and Qt code?
Primarily, mostly a matter of naming consistency with the rest of TQt, starting from
TQ_OBJECT
and extending to many other TQ_* defines.Secondarily,
signals
andslots
can sometimes conflict with similar names used in other libraries (gtk, boost for example). In Qt4 the problem was addressed by usingQ_SIGNALS
andQ_SLOTS
for defining signals and slots, while usingQ_SIGNAL
andQ_SLOT
when making a connection. One of the things I would like to introduce in the future is alsoTQ_SIGNALS
andTQ_SLOTS
, to mirror the Qt4 approach.I can do the renaming very quickly through some scripts that I have prepared. Checking the renaming do take some time, but it is not a big job overall.
All seems good. Comments are only small cosmetic adjustments.
#define SLOT(a) "1""a"
#define SIGNAL(a) "2""a"
#define TQ_METHOD(a) "0""a"
#define TQ_SLOT(a) "1""a"
Adding
TQ_
caused an inconsistent indentation of value.Yes, I had noticed that and this is because in the original code tabs are used to align those values instead of spaces. Depending on the width used for the tab, those defines can look aligned or not aligned. For example with "tab=2 spaces" that section looks aligned.
I can replace the tabs with spaces for those specific lines, but I thought we can leave the indentation and later alignment to the code formatting effort that we will start soon (I am preparing the required files already), which is why in the end I didn't change it. What do you think?
Ok, I understand, we can leave it for later processing.
#define SLOT(a) "1"#a
#define SIGNAL(a) "2"#a
#define TQ_METHOD(a) "0"#a
#define TQ_SLOT(a) "1"#a
Adding
TQ_
caused an inconsistent indentation of value.All seems good.
fb401a891f
into master 7 months agoReviewers
fb401a891f
.