Bitcoin-Qt: remove SLOT()/SIGNAL() connections from .ui files#2946
Bitcoin-Qt: remove SLOT()/SIGNAL() connections from .ui files#2946Diapolo wants to merge 1 commit intobitcoin:masterfrom Diapolo:noConnectUIfiles
Conversation
- to be consistent and for better readability move all remaining SLOT()/SIGNAL() connections from .ui files into the .cpp files
|
Why? Wouldn't it be better to specify declaratively what can be specified declaratively? |
|
@laanwj I don't like that we currently have mixed ways of using these Qt signal stuff. If we define "it's okay to use connections specified via the Qt Designer" that is fine with me, but then we should rework the code to move this into the .ui files. Perhaps that would also remove some of the on_XYZ_clicked() stuff from our code, which Qt handles then declaratively :). What do you think? |
|
The on_XYZ_clicked stuff is generated by Qt creator as well, ie when you click on a widget and then add an event handler. In a way it is declarative, the name of the function declares what it should be bound to. |
|
Wait :), I always manually added these on_XYZ_stuff ^^, didn't even know this can be achieved via Qt Creator ^^. Holy fuck... Anyway, should we define devs have to use connections() via .ui files, if possible then? |
|
Sure... I don't really mind that much, devs can use them if convenient, no need to either forbid them or mandate them. |
|
If you don't care, I have no chance forcing them :-P, so closed ^^. |
* Use enum to define spork IDs * Introduce CSporkDef and remove if/else blocks in GetSporkIDByName/GetSporkNameByID * Deduplicate code in IsSporkActive * Fix spork RPC to use new spork defs This also removes the need for SPORK_START/SPORK_END * Move sporkManager global variable below sporkDefs This ensures correct order of initialization.
SLOT()/SIGNAL() connections from .ui files into the .cpp files