refactor: Add `transactionoverviewwidget.cpp` source file #618

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:220614-tow changing 4 files +32 −16
  1. hebasto commented at 10:57 AM on June 14, 2022: member

    The TransactionOverviewWidget class was added in bitcoin-core/gui#176 as a header-only one.

    Apparently, in upcoming CMake project, CMake AUTOMOC could be integrated better/simpler, if QObject-derived class implementation been placed into a source file.

    From our Developer Notes:

    Implementation code should go into the .cpp file and not the .h, unless necessary due to template usage or when performance due to inlining is critical.

  2. DrahtBot commented at 12:22 PM on June 14, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  3. qt, refactor: Add `transactionoverviewwidget.cpp` source file
    Required for better/simpler interaction with CMake AUTOMOC.
    a50e0b1bcb
  4. hebasto force-pushed on Jun 14, 2022
  5. Sjors commented at 6:22 PM on June 14, 2022: member

    tACK a50e0b1bcb120e097a2b23dbfb71533b2f9c4d6c

    Using a cpp file is consistent with other widgets we have.

  6. shaavan approved
  7. shaavan commented at 9:07 AM on June 15, 2022: contributor

    ACK a50e0b1bcb120e097a2b23dbfb71533b2f9c4d6c

    • I agree with the idea of transforming transactionoverviewwidget from a header-only file to having a separate cpp file to implement functions.
    • The code change and cpp implementation are cleanly implemented, with proper formatting.
    • I successfully ran the PR on Ubuntu 22.04 with Qt version 5.15.3.
    • Observed no functional difference between the master and this PR, showing that this is a pure refactor change.
  8. in src/qt/transactionoverviewwidget.h:8 in a50e0b1bcb
       4 | @@ -5,11 +5,8 @@
       5 |  #ifndef BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H
       6 |  #define BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H
       7 |  
       8 | -#include <qt/transactiontablemodel.h>
       9 | -
      10 |  #include <QListView>
    


    furszy commented at 3:37 PM on June 15, 2022:

    QListView is being included in both files now. Could remove it from here.


    hebasto commented at 3:43 PM on June 15, 2022:

    From our Developer Notes:

    Every .cpp and .h file should #include every header file it directly uses classes, functions or other definitions from, even if those headers are already included indirectly through other headers.

  9. in src/qt/transactionoverviewwidget.cpp:10 in a50e0b1bcb
       5 | +#include <qt/transactionoverviewwidget.h>
       6 | +
       7 | +#include <qt/transactiontablemodel.h>
       8 | +
       9 | +#include <QListView>
      10 | +#include <QSize>
    


    furszy commented at 3:38 PM on June 15, 2022:

    QSize is included in the header file, could delete this line.

  10. chetoo40 approved
  11. hebasto merged this on Jun 15, 2022
  12. hebasto closed this on Jun 15, 2022

  13. sidhujag referenced this in commit 69c085e858 on Jun 15, 2022
  14. jarolrod commented at 5:15 PM on June 16, 2022: member
  15. hebasto deleted the branch on Jun 21, 2022
  16. bitcoin-core locked this on Jun 21, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 13:20 UTC

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