Skip to content

Bitcoin-Qt: remove SLOT()/SIGNAL() connections from .ui files#2946

Closed
Diapolo wants to merge 1 commit intobitcoin:masterfrom
Diapolo:noConnectUIfiles
Closed

Bitcoin-Qt: remove SLOT()/SIGNAL() connections from .ui files#2946
Diapolo wants to merge 1 commit intobitcoin:masterfrom
Diapolo:noConnectUIfiles

Conversation

@Diapolo
Copy link
Copy Markdown

@Diapolo Diapolo commented Aug 28, 2013

  • to be consistent and for better readability move all remaining
    SLOT()/SIGNAL() connections from .ui files into the .cpp files

- to be consistent and for better readability move all remaining
  SLOT()/SIGNAL() connections from .ui files into the .cpp files
@laanwj
Copy link
Copy Markdown
Member

laanwj commented Aug 28, 2013

Why? Wouldn't it be better to specify declaratively what can be specified declaratively?

@Diapolo
Copy link
Copy Markdown
Author

Diapolo commented Aug 29, 2013

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

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Aug 29, 2013

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.

@Diapolo
Copy link
Copy Markdown
Author

Diapolo commented Aug 29, 2013

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?

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Aug 29, 2013

Sure... I don't really mind that much, devs can use them if convenient, no need to either forbid them or mandate them.

@Diapolo
Copy link
Copy Markdown
Author

Diapolo commented Aug 29, 2013

If you don't care, I have no chance forcing them :-P, so closed ^^.

@Diapolo Diapolo closed this Aug 29, 2013
@Diapolo Diapolo deleted the noConnectUIfiles branch August 29, 2013 14:16
Bushstar pushed a commit to Bushstar/omnicore that referenced this pull request Apr 8, 2020
* 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.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants