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
Owner

Use the TQ_* prefix to be consistent with other TQ_* components.

Use the TQ_* prefix to be consistent with other TQ_* components.
MicheleC added this to the R14.1.2 release milestone 7 months ago
MicheleC added 1 commit 7 months ago
fb401a891f
Rename METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT
MicheleC requested review from Core 7 months ago
MicheleC requested review from Owners 7 months ago
Collaborator

Why not just use METHOD, SIGNAL, SLOT? Isn't it highly unlikely that someone will mix TQt and Qt code?

Why not just use METHOD, SIGNAL, SLOT? Isn't it highly unlikely that someone will mix TQt and Qt code?
Poster
Owner

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 and slots can sometimes conflict with similar names used in other libraries (gtk, boost for example). In Qt4 the problem was addressed by using Q_SIGNALS and Q_SLOTS for defining signals and slots, while using Q_SIGNAL and Q_SLOT when making a connection. One of the things I would like to introduce in the future is also TQ_SIGNALS and TQ_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.

> 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` and `slots` can sometimes conflict with similar names used in other libraries (gtk, boost for example). In Qt4 the problem was addressed by using `Q_SIGNALS` and `Q_SLOTS` for defining signals and slots, while using `Q_SIGNAL` and `Q_SLOT` when making a connection. One of the things I would like to introduce in the future is also `TQ_SIGNALS` and `TQ_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.
SlavekB reviewed 7 months ago
SlavekB left a comment
Owner

All seems good. Comments are only small cosmetic adjustments.

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"
Owner

Adding TQ_ caused an inconsistent indentation of value.

Adding `TQ_` caused an inconsistent indentation of value.
Poster
Owner

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?

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?
Owner

Ok, I understand, we can leave it for later processing.

Ok, I understand, we can leave it for later processing.
SlavekB marked this conversation as resolved
#define SLOT(a) "1"#a
#define SIGNAL(a) "2"#a
#define TQ_METHOD(a) "0"#a
#define TQ_SLOT(a) "1"#a
Owner

Adding TQ_ caused an inconsistent indentation of value.

Adding `TQ_` caused an inconsistent indentation of value.
SlavekB marked this conversation as resolved
SlavekB approved these changes 7 months ago
SlavekB left a comment
Owner

All seems good.

All seems good.
MicheleC merged commit fb401a891f into master 7 months ago
MicheleC deleted branch replace/signal-n-slot 7 months ago

Reviewers

SlavekB approved these changes 7 months ago
TDE/Core was requested for review 7 months ago
The pull request has been merged as fb401a891f.
Sign in to join this conversation.
No reviewers
TDE/Core
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Reference: TDE/tqt3#101
Loading…
There is no content yet.