GUI fix: DebugLog file opens twice after clicking "Open" in RPC Console Information tab #1307

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:fix_OpenLogFile changing 1 files +0 −1
  1. Diapolo commented at 8:05 PM on May 14, 2012: none

    I observed this today and thought why does the debug.log open twice. It seems that my naming with on_openDebugLogfileButton_clicked() is somehow internally used by Qt. So we had a connect() which uses on_openDebugLogfileButton_clicked() on clicked() and the internal stuff, which resulted in that strange behaviour. After renaming the function to on_openDebugLogfileBtn_clicked() the debug.log opens only once, as intended.

    I stumpled upon this as on_lineEdit_returnPressed() is used in no connect and only the function declaration and definition exists.

  2. laanwj commented at 8:12 PM on May 14, 2012: member

    It's better to remove the connect line and leave the slot named like that. Qt will automatically connect slots with a certain name, this is what happens when you create handler methods from the designer interface as well.

  3. Diapolo commented at 8:22 PM on May 14, 2012: none

    I had a 50% chance of chosing the right fix :D ... will update! But that was a weird bug for me ^^.

  4. fix DebugLog file opens twice after clicking "Open" in RPC Console Information tab 8892579f8b
  5. Diapolo commented at 8:26 PM on May 14, 2012: none

    Updated!

  6. laanwj commented at 8:33 PM on May 14, 2012: member

    Well they're both right fixes :-) But removing a line is simpler.

    It was kind of weird to me too, the first time I encountered it. I wondered how qt designer created the connections to the host object slots. It is documented in QMetaObject::connectSlotsByName.

  7. laanwj referenced this in commit 2643ce97ae on May 15, 2012
  8. laanwj merged this on May 15, 2012
  9. laanwj closed this on May 15, 2012

  10. coblee referenced this in commit eb75cd4a30 on Jul 17, 2012
  11. lateminer referenced this in commit ddeea1eff6 on Jan 22, 2019
  12. lateminer referenced this in commit 31a56e9cf9 on May 6, 2020
  13. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me