hebasto
commented at 10:13 AM on July 26, 2025:
member
For some reason, the MOC compiler in older versions of Qt 6 fails to parse qt/intro.cpp, as noted in this comment.
This PR proposes a move-only refactoring to simplify the source structure by eliminating the need for the inline #include <qt/intro.moc>, thereby effectively working around the issue.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
DrahtBot added the label CI failed on Jul 26, 2025
DrahtBot
commented at 2:07 PM on July 26, 2025:
contributor
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed.
<sub>Task lint: https://github.com/bitcoin-core/gui/runs/46777090693</sub>
<sub>LLM reason (✨ experimental): The CI failure is caused by multiple linting errors including a circular dependency, missing include guards, and other linting checks.</sub>
<details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
hebasto force-pushed on Jul 26, 2025
hebasto force-pushed on Jul 26, 2025
hebasto force-pushed on Jul 26, 2025
DrahtBot removed the label CI failed on Jul 26, 2025
ajtowns
commented at 5:17 AM on July 29, 2025:
contributor
ACKdd392a64bb0608847f771f8b1f09c2fcae146923
Shouldn't the copyright dates in these files be updated? git blame has some lines from 2022 in intro.h and 2024/25 in intro.cpp.
You could avoid the circularity with something like:
diff --git a/src/qt/freespacechecker.h b/src/qt/freespacechecker.h
index d3a61a11571..214324be7c8 100644
--- a/src/qt/freespacechecker.h
+++ b/src/qt/freespacechecker.h
@@ -9,8 +9,6 @@
#include <QString>
#include <QtGlobal>
-class Intro;
-
/* Check free space asynchronously to prevent hanging the UI thread.
Up to one request to check a path is in flight to this thread; when the check()
@@ -26,7 +24,12 @@ class FreespaceChecker : public QObject
Q_OBJECT
public:
- explicit FreespaceChecker(Intro *intro);
+ class PathQuery {
+ public:
+ virtual QString getPathToCheck() = 0;
+ };
+
+ explicit FreespaceChecker(PathQuery* intro) : intro{intro} { }
enum Status {
ST_OK,
@@ -40,7 +43,7 @@ Q_SIGNALS:
void reply(int status, const QString &message, quint64 available);
private:
- Intro *intro;
+ PathQuery* intro;
};
#endif // BITCOIN_QT_FREESPACECHECKER_H
diff --git a/src/qt/freespacechecker.cpp b/src/qt/freespacechecker.cpp
index 28c55baf7d0..c259facb782 100644
--- a/src/qt/freespacechecker.cpp
+++ b/src/qt/freespacechecker.cpp
@@ -5,7 +5,6 @@
#include <qt/freespacechecker.h>
#include <qt/guiutil.h>
-#include <qt/intro.h>
#include <util/fs.h>
#include <QDir>
@@ -13,11 +12,6 @@
#include <cstdint>
-FreespaceChecker::FreespaceChecker(Intro *_intro)
-{
- this->intro = _intro;
-}
-
void FreespaceChecker::check()
{
QString dataDirStr = intro->getPathToCheck();
diff --git a/src/qt/intro.h b/src/qt/intro.h
index 7b34c73b025..409ecea16d3 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -5,14 +5,14 @@
#ifndef BITCOIN_QT_INTRO_H
#define BITCOIN_QT_INTRO_H
+#include <qt/freespacechecker.h>
+
#include <QDialog>
#include <QMutex>
#include <QThread>
static const bool DEFAULT_CHOOSE_DATADIR = false;
-class FreespaceChecker;
-
namespace interfaces {
class Node;
}
@@ -25,7 +25,7 @@ namespace Ui {
Allows the user to choose a data directory,
in which the wallet and block chain will be stored.
*/
-class Intro : public QDialog
+class Intro : public QDialog, public FreespaceChecker::PathQuery
{
Q_OBJECT
@@ -78,7 +78,7 @@ private:
void startThread();
void checkPath(const QString &dataDir);
- QString getPathToCheck();
+ QString getPathToCheck() override;
void UpdatePruneLabels(bool prune_checked);
void UpdateFreeSpaceLabel();
diff --git a/test/lint/lint-circular-dependencies.py b/test/lint/lint-circular-dependencies.py
index 2ec79724d10..9554e560650 100755
--- a/test/lint/lint-circular-dependencies.py
+++ b/test/lint/lint-circular-dependencies.py
@@ -16,7 +16,6 @@ EXPECTED_CIRCULAR_DEPENDENCIES = (
"node/blockstorage -> validation -> node/blockstorage",
"node/utxo_snapshot -> validation -> node/utxo_snapshot",
"qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel",
- "qt/freespacechecker -> qt/intro -> qt/freespacechecker",
"qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel",
"qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog",
"qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel",
qt, refactor: Move `FreespaceChecker` class into its own module25884bd896
hebasto force-pushed on Jul 29, 2025
hebasto renamed this: refactor: Move `FreespaceChecker` class into its own module Move `FreespaceChecker` class into its own module on Jul 29, 2025
hebasto removed the label Refactoring on Jul 29, 2025
hebasto
commented at 8:23 AM on July 29, 2025:
member
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-04-27 21:20 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me