-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Add transactionoverviewwidget.cpp
source file
#618
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Required for better/simpler interaction with CMake AUTOMOC.
tACK a50e0b1 Using a cpp file is consistent with other widgets we have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a50e0b1
- 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.
@@ -5,11 +5,8 @@ | |||
#ifndef BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H | |||
#define BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H | |||
|
|||
#include <qt/transactiontablemodel.h> | |||
|
|||
#include <QListView> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QListView
is being included in both files now. Could remove it from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
#include <qt/transactiontablemodel.h> | ||
|
||
#include <QListView> | ||
#include <QSize> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QSize
is included in the header file, could delete this line.
…cpp` source file a50e0b1 qt, refactor: Add `transactionoverviewwidget.cpp` source file (Hennadii Stepanov) Pull request description: The `TransactionOverviewWidget` class was added in bitcoin-core/gui#176 as a header-only one. Apparently, in upcoming [CMake project](hebasto#3), CMake [AUTOMOC](https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html) could be integrated better/simpler, if `QObject`-derived class implementation been placed into a source file. From our [Developer Notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#source-code-organization): > 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. ACKs for top commit: Sjors: tACK a50e0b1 shaavan: ACK a50e0b1 Tree-SHA512: 4707b6be1c5e794c4014475f826ac45ec833e472db11f12d29995f9c5a599ee98622ad54f0af72734b192144b626411c69acdafa0e6d1a390bdebfd7e570f377
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post-merge ACK a50e0b1
The
TransactionOverviewWidget
class was added in #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: