Skip to content

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Aug 28, 2025

Additional Information

Work in progress

Breaking Changes

Work in progress

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 23 milestone Aug 28, 2025
Copy link

github-actions bot commented Aug 28, 2025

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@kwvg
Copy link
Collaborator Author

kwvg commented Aug 28, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Aug 28, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

coderabbitai bot commented Aug 28, 2025

Walkthrough

This change extracts font management from GUIUtil into a new module (qt/guiutil_font.h/.cpp) and updates the Qt build files accordingly. The old font APIs are removed from guiutil.h/.cpp and reintroduced via guiutil_font.h with extended functionality. Numerous Qt source files now include guiutil_font.h. UI defaults in bitcoin.cpp and optionsmodel.cpp are switched to centralized g_font_defaults. OptionsDialog gains a UI group for choosing monospaced font; OptionsModel adds a UseEmbeddedMonospacedFont setting, signal, and storage. OverviewPage introduces dynamic switching between embedded RobotoMono and system monospace. AppearanceWidget now enumerates AVAILABLE_FONTS dynamically.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/qt/masternodelist.cpp (1)

5-13: Fix clang-format include ordering to unblock CI.

CI failed the Clang Diff Format Check on this file due to include ordering changes. Please re-run project formatting or adjust includes to the expected order.

Apply this minimal include reordering (adjust if your repo’s clang-format enforces a different order), then run the formatter:

 #include <qt/masternodelist.h>
 #include <qt/forms/ui_masternodelist.h>

-#include <evo/deterministicmns.h>
-#include <qt/clientmodel.h>
-#include <coins.h>
-#include <qt/guiutil.h>
-#include <qt/guiutil_font.h>
-#include <qt/walletmodel.h>
+#include <coins.h>
+#include <evo/deterministicmns.h>
+#include <qt/clientmodel.h>
+#include <qt/guiutil.h>
+#include <qt/guiutil_font.h>
+#include <qt/walletmodel.h>

If available in your environment, run: git clang-format -- src/qt/masternodelist.cpp

🧹 Nitpick comments (13)
src/qt/guiutil_font.h (2)

82-85: Typo in public API comment.

“appliciation” → “application”.

-/** Load dash specific appliciation fonts */
+/** Load Dash-specific application fonts */

23-28: UI label strings likely user-visible; consider i18n-friendly names.

“SystemDefault”/“DefaultMonospace” are internal-ish. If shown to users, prefer humanized, translatable labels surfaced from .cpp (e.g., via QCoreApplication::translate) rather than QStrings in a header.

src/qt/appearancewidget.h (2)

8-12: Make header self-sufficient: include QFont.

QFont::Weight is used as a data member type; ensure is directly included here to avoid relying on transitive includes.

Apply this diff:

 #include <QWidget>
+#include <QFont>
 
 #include <qt/guiutil.h>
 #include <qt/guiutil_font.h>

Also applies to: 54-55


27-29: Modernize nullptr usage (optional).

Prefer nullptr over 0 for pointer defaults.

-    explicit AppearanceWidget(QWidget* parent = 0);
+    explicit AppearanceWidget(QWidget* parent = nullptr);
src/qt/walletview.cpp (1)

72-76: Consider avoiding repeated global font updates.

If many widgets call GUIUtil::updateFonts(), it can be redundant/expensive. Prefer batching or calling once at app/init scope after all setFont calls.

src/qt/proposalwizard.cpp (1)

16-16: Header inclusion aligns with new GUI font API usage.

No functional impact here. As a minor note, if multiple widgets also call GUIUtil::updateFonts() in constructors project-wide, consider centralizing to reduce duplicate global refreshes.

src/qt/overviewpage.cpp (1)

304-306: Guard against a null OptionsModel (defensive).

Unlikely in practice, but add a null-check to avoid potential crashes if clientModel exists but optionsModel is not set yet.

-        connect(model->getOptionsModel(), &OptionsModel::useEmbeddedMonospacedFontChanged, this, &OverviewPage::setMonospacedFont);
-        setMonospacedFont(model->getOptionsModel()->getUseEmbeddedMonospacedFont());
+        if (model->getOptionsModel()) {
+            connect(model->getOptionsModel(), &OptionsModel::useEmbeddedMonospacedFontChanged, this, &OverviewPage::setMonospacedFont);
+            setMonospacedFont(model->getOptionsModel()->getUseEmbeddedMonospacedFont());
+        }
src/qt/forms/optionsdialog.ui (1)

1058-1169: UI copy/style nits and accessibility.

  • Capitalize option labels for consistency: “Embedded” and “Closest matching”.
  • Add accessibleName/description for radio buttons to help screen-readers.

Apply this minimal text tweak:

-               <string>embedded &quot;%1&quot;</string>
+               <string>Embedded &quot;%1&quot;</string>
...
-               <string>closest matching &quot;%1&quot;</string>
+               <string>Closest matching &quot;%1&quot;</string>

Optionally add accessibility hints (example):

              <widget class="QRadioButton" name="embeddedFont_radioButton">
+              <property name="accessibleName">
+               <string>Use embedded monospaced font</string>
+              </property>
+              <property name="accessibleDescription">
+               <string>Use the bundled Roboto Mono for numbers on the Overview tab</string>
+              </property>
...
              <widget class="QRadioButton" name="systemFont_radioButton">
+              <property name="accessibleName">
+               <string>Use system monospaced font</string>
+              </property>
+              <property name="accessibleDescription">
+               <string>Use the closest matching monospaced font available on this system</string>
+              </property>
src/qt/guiutil_font.cpp (5)

1-3: Copyright year range inconsistency.

The copyright header shows "2014-2025" but the current month is August 2025. Since this appears to be a new file (all lines marked as added), the copyright should start from 2025.

-// Copyright (c) 2014-2025 The Dash Core developers
+// Copyright (c) 2025 The Dash Core developers

63-64: Use translated exception message for user-facing errors.

The exception message contains an untranslated string that could be shown to users. Consider using the translation system for better internationalization support.

-    throw std::invalid_argument(strprintf("Invalid font-family: %s", strFamily.toStdString()));
+    throw std::invalid_argument(strprintf(QObject::tr("Invalid font-family: %1").toStdString(), strFamily.toStdString()));

270-276: Use std::abs from <cstdlib> for consistency.

Line 270 and 272 use abs without the std:: prefix. Since the file already includes <cmath>, consider using std::abs for consistency with C++ standard library usage patterns.

-        int nBestDiff = abs(*it - targetWeight);
+        int nBestDiff = std::abs(*it - targetWeight);
         while (++it != vecSupported.end()) {
-            int nDiff = abs(*it - targetWeight);
+            int nDiff = std::abs(*it - targetWeight);

286-287: Typo in variable name on line 287.

There's a missing space after the comma in the std::find call. This is a minor formatting issue.

-            auto it = std::find(vecSupported.begin(), vecSupported.end(),normalWeight);
+            auto it = std::find(vecSupported.begin(), vecSupported.end(), normalWeight);

362-365: Check fontsLoaded() instead of checking osDefaultFont directly.

The function checks osDefaultFont directly but should use the fontsLoaded() function for consistency with the rest of the codebase.

     // Fonts need to be loaded by GUIUtil::loadFonts(), if not just return.
-    if (!osDefaultFont) {
+    if (!fontsLoaded()) {
         return;
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 873dee0 and b50aafd.

📒 Files selected for processing (38)
  • src/Makefile.qt.include (2 hunks)
  • src/qt/addressbookpage.cpp (1 hunks)
  • src/qt/addresstablemodel.cpp (1 hunks)
  • src/qt/appearancewidget.cpp (1 hunks)
  • src/qt/appearancewidget.h (1 hunks)
  • src/qt/askpassphrasedialog.cpp (1 hunks)
  • src/qt/bitcoin.cpp (3 hunks)
  • src/qt/bitcoingui.cpp (1 hunks)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/qt/forms/optionsdialog.ui (1 hunks)
  • src/qt/governancelist.cpp (1 hunks)
  • src/qt/guiutil.cpp (0 hunks)
  • src/qt/guiutil.h (0 hunks)
  • src/qt/guiutil_font.cpp (1 hunks)
  • src/qt/guiutil_font.h (1 hunks)
  • src/qt/masternodelist.cpp (1 hunks)
  • src/qt/modaloverlay.cpp (1 hunks)
  • src/qt/openuridialog.cpp (1 hunks)
  • src/qt/optionsdialog.cpp (2 hunks)
  • src/qt/optionsmodel.cpp (8 hunks)
  • src/qt/optionsmodel.h (4 hunks)
  • src/qt/overviewpage.cpp (3 hunks)
  • src/qt/overviewpage.h (1 hunks)
  • src/qt/proposalwizard.cpp (1 hunks)
  • src/qt/qrdialog.cpp (1 hunks)
  • src/qt/qrimagewidget.cpp (1 hunks)
  • src/qt/receivecoinsdialog.cpp (1 hunks)
  • src/qt/receiverequestdialog.cpp (1 hunks)
  • src/qt/rpcconsole.cpp (1 hunks)
  • src/qt/sendcoinsdialog.cpp (1 hunks)
  • src/qt/sendcoinsentry.cpp (1 hunks)
  • src/qt/signverifymessagedialog.cpp (1 hunks)
  • src/qt/splashscreen.cpp (1 hunks)
  • src/qt/test/apptests.cpp (1 hunks)
  • src/qt/trafficgraphwidget.cpp (1 hunks)
  • src/qt/transactiondescdialog.cpp (1 hunks)
  • src/qt/utilitydialog.cpp (1 hunks)
  • src/qt/walletview.cpp (1 hunks)
💤 Files with no reviewable changes (2)
  • src/qt/guiutil.cpp
  • src/qt/guiutil.h
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: kwvg
PR: dashpay/dash#6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
📚 Learning: 2025-07-20T18:42:49.794Z
Learnt from: CR
PR: dashpay/dash#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-20T18:42:49.794Z
Learning: Applies to src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp} : Unit tests for C++ code should be placed in src/test/, src/wallet/test/, or src/qt/test/ and use Boost::Test or Qt 5 for GUI tests

Applied to files:

  • src/qt/test/apptests.cpp
🪛 GitHub Actions: Clang Diff Format Check
src/qt/masternodelist.cpp

[error] 5-13: Clang format differences detected by clang-format-diff.py for src/qt/masternodelist.cpp. The patch shows added '#include <coins.h>' before '#include <evo/deterministicmns.h>' and removal of the original '#include <coins.h>'. Step exited with code 1.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: linux64_ubsan-test / Test source
  • GitHub Check: linux64_sqlite-test / Test source
  • GitHub Check: linux64_nowallet-test / Test source
  • GitHub Check: linux64-test / Test source
  • GitHub Check: win64-build / Build source
  • GitHub Check: linux64_multiprocess-build / Build source
  • GitHub Check: linux64_tsan-build / Build source
  • GitHub Check: linux64_fuzz-build / Build source
🔇 Additional comments (44)
src/qt/optionsmodel.h (4)

110-116: Getter looks fine.

No issues; keep it const-correct and inexpensive.


139-146: Initialize and migrate safely.

Confirm m_use_embedded_monospaced_font is initialized in Init() and cleared/set in Reset(); if old settings exist, handle migration to avoid undefined reads.


161-162: Emit signal on change and hook consumers.

Ensure setData() emits useEmbeddedMonospacedFontChanged(value) on actual change and that OverviewPage connects/disconnects safely during model swaps.


69-93: No changes needed: UseEmbeddedMonospacedFont wiring is complete and correct. Default (true) is initialized in Init/Reset, data()/setData() handle the enum, the QSettings key “UseEmbeddedMonospacedFont” is stable, QDataWidgetMapper binds ui->embeddedFont_radioButton via OptionsModel::UseEmbeddedMonospacedFont, and OverviewPage listens/emits the change—enum insertion did not break any indices.

src/qt/guiutil_font.h (1)

93-95: Forward-declare QWidget to keep header lean.

You already accept QWidget*; the forward declaration added above avoids pulling in here and keeps compile units smaller.

src/qt/openuridialog.cpp (1)

10-10: Include addition is correct.

Required for GUIUtil::updateFonts(); no behavioral changes.

src/qt/coincontroldialog.cpp (2)

16-16: Include addition is correct.

Needed for GUIUtil::FontWeight and setFont(); consistent with project-wide refactor.


56-63: Good use of centralized font helper.

Batching bold labels via GUIUtil::setFont improves consistency and theme-change handling.

src/qt/addressbookpage.cpp (1)

17-17: Include addition is correct.

Required for GUIUtil::updateFonts(); no other changes.

src/qt/bitcoingui.cpp (1)

13-13: Header inclusion is correct for new font API.

Including qt/guiutil_font.h here is necessary for GUIUtil::setFont/updateFonts usage elsewhere in this file. No issues.

src/qt/addresstablemodel.cpp (1)

9-9: Good: adopt centralized font helpers.

qt/guiutil_font.h inclusion aligns this model with the new font subsystem; FontRole usage compiles against the new API.

src/qt/masternodelist.cpp (1)

12-12: Good: add guiutil_font.h for setFont/updateFonts.

Required for the bold/normal weights set during UI init. Looks fine.

src/qt/modaloverlay.cpp (1)

10-10: Good: header added for font weights.

Matches the Bold font setup used in this widget. No further changes needed.

src/Makefile.qt.include (2)

140-140: Header added to BITCOIN_QT_H is correct.

qt/guiutil_font.h should be exported to all Qt TU’s; this ensures consistent inclusion.


231-231: Source added to BITCOIN_QT_BASE_CPP is correct.

qt/guiutil_font.cpp will now be compiled into libbitcoinqt; linkage should resolve across wallet/non-wallet builds.

If the overview page uses both normal and bold monospaced faces, verify required Roboto Mono weights are present in QT_RES_FONTS; add any missing weights to avoid fallback differences across platforms.

src/qt/transactiondescdialog.cpp (1)

9-9: Include of guiutil_font.h looks correct.

Required after the font API split; keeps this TU compiling without relying on transitive includes.

src/qt/governancelist.cpp (1)

20-20: Header addition is appropriate.

This file calls GUIUtil::setFont/updateFonts; after the split, pulling in guiutil_font.h is the right move.

src/qt/receiverequestdialog.cpp (1)

10-10: LGTM: add guiutil_font.h to match refactor.

Ensures GUIUtil::updateFonts() and related font helpers are available here.

src/qt/utilitydialog.cpp (1)

15-15: LGTM: explicit font-API include.

Consistent with the new font management split; avoids transitive-dependency pitfalls.

src/qt/appearancewidget.h (1)

11-11: Include added is correct for new font APIs.

This resolves dependencies on GUIUtil::FontFamily and font helpers.

src/qt/sendcoinsdialog.cpp (1)

18-19: Correct header inclusion for font utilities.

Needed for GUIUtil::FontWeight and updateFonts(); no behavioral change introduced here.

src/qt/trafficgraphwidget.cpp (1)

9-10: Include aligns with use of GUIUtil::getFont.

Ensures explicit dependency; looks good.

src/qt/askpassphrasedialog.cpp (1)

14-16: Font header inclusion is appropriate.

Required for GUIUtil::setFont/updateFonts calls; safe change.

src/qt/qrdialog.cpp (1)

11-12: Good: adds explicit dependency on font utilities.

Matches usage of GUIUtil::setFont in this TU.

src/qt/sendcoinsentry.cpp (1)

16-16: Header include aligns with new font API usage.

Consistent with the centralized font utilities; no functional change. Keep this PR move-only per your prior backport preference.

src/qt/test/apptests.cpp (1)

11-11: Good: tests now have access to GUIUtil::loadFonts.

Load occurs before window creation, which is fine. Please ensure loadFonts is idempotent for repeated appTests runs.

If helpful, add a quick assertion to confirm at least one expected font family is available during tests (e.g., Roboto Mono or system monospace).

src/qt/signverifymessagedialog.cpp (1)

11-11: Appropriate dependency added.

Required for setFont/updateFonts calls in this dialog; no behavioral impact.

src/qt/qrimagewidget.cpp (1)

8-8: Correct include for font helpers used in setQR().

getFontNormal/calculateIdealFontSize come from guiutil_font; include is needed for portability and build clarity.

src/qt/splashscreen.cpp (1)

19-19: Include looks correct and necessary after font refactor.

Header adds access to GUIUtil font APIs used in this file. No issues.

src/qt/walletview.cpp (1)

14-14: Correct header addition for centralized font utilities.

Matches usage of GUIUtil::setFont/FontWeight in this TU. Good.

src/qt/overviewpage.h (1)

74-74: Resolved: OverviewPage::setMonospacedFont is implemented, connected to OptionsModel::useEmbeddedMonospacedFontChanged, and invoked on initialization.

src/qt/optionsdialog.cpp (1)

379-379: LGTM: correct mapper binding.

Mapping embeddedFont_radioButton to UseEmbeddedMonospacedFont (bool/checked) is the right choice; the paired radio will auto-uncheck.

src/qt/overviewpage.cpp (2)

12-12: LGTM: includes updated for font APIs.


378-394: LGTM: focused application of monospaced font to value labels with update propagation.

src/qt/bitcoin.cpp (3)

26-26: LGTM: pulls in centralized font defaults.


492-495: LGTM: help-text defaults wired to centralized g_font_defaults.


680-680: LGTM: fallback default now consistent with centralized defaults.

src/qt/optionsmodel.cpp (5)

15-16: LGTM: include for centralized font helpers.


100-101: LGTM: defaults sourced from g_font_defaults (family/scale/weights).

Also applies to: 110-112, 120-122, 137-139


559-560: LGTM: data() exposes the new option as a bool for the mapper.


807-811: LGTM: setData persists, updates cache, and emits change signal.


332-337: Use boolean for UseEmbeddedMonospacedFont and unify default

Replace the string literal in src/qt/optionsmodel.cpp (lines 332–334) with a bool and pick the intended default:

-    if (!settings.contains("UseEmbeddedMonospacedFont")) {
-        settings.setValue("UseEmbeddedMonospacedFont", "true");
-    }
+    if (!settings.contains("UseEmbeddedMonospacedFont")) {
+        settings.setValue("UseEmbeddedMonospacedFont", false); // or true if embedded is the desired default
+    }

Confirm whether the default should be false (system) or true (embedded) so the model and QDataWidgetMapper in OptionsDialog remain in sync.

src/qt/guiutil_font.cpp (2)

128-133: Potential null pointer dereference in getFontWeightNormal().

The function accesses mapWeights[fontFamily] without verifying that the fonts have been loaded first. If loadFonts() hasn't been called or failed, this could lead to unexpected behavior. Consider checking fontsLoaded() before accessing the map.

 QFont::Weight getFontWeightNormal()
 {
+    if (!fontsLoaded()) {
+        return g_font_defaults.weight_normal;
+    }
     if (!mapWeights.count(fontFamily)) {
         return g_font_defaults.weight_normal;
     }
     return mapWeights[fontFamily].first;
 }

Likely an incorrect or invalid review comment.


240-241: Ignore undefined function warning – TextWidth is declared in guiutil.h and defined in guiutil.cpp, and guiutil_font.cpp is in the GUIUtil namespace so the unqualified call is valid.

Likely an incorrect or invalid review comment.

Comment on lines 31 to 33
for (const auto& [family, family_str, selectable] : GUIUtil::AVAILABLE_FONTS) {
if (selectable) ui->fontFamily->addItem(family_str, QVariant(static_cast<uint8_t>(family)));
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Avoid narrowing enum to uint8_t in QVariant; store as int.

Prevents surprising truncation if enum grows; aligns with itemData().toInt() usage later.

Apply:

-    for (const auto& [family, family_str, selectable] : GUIUtil::AVAILABLE_FONTS) {
-        if (selectable) ui->fontFamily->addItem(family_str, QVariant(static_cast<uint8_t>(family)));
-    }
+    for (const auto& [family, family_str, selectable] : GUIUtil::AVAILABLE_FONTS) {
+        if (selectable) ui->fontFamily->addItem(family_str, QVariant(static_cast<int>(family)));
+    }

Confirm the model expects int:


🏁 Script executed:

#!/bin/bash
# Verify OptionsModel maps FontFamily as integer type
rg -n -C3 -g 'src/qt/**' -P '\bFontFamily\b'
rg -n -C2 -g 'src/qt/**' -P 'OptionsModel::FontFamily'

Length of output: 17121


Avoid narrowing FontFamily to uint8_t in QVariant; store as int
Aligns the stored type with OptionsModel::FontFamily (int) and prevents truncation if the enum grows, matching the later .toInt() usage.
[src/qt/appearancewidget.cpp:31-33]

🤖 Prompt for AI Agents
In src/qt/appearancewidget.cpp around lines 31-33, the code currently narrows
FontFamily to uint8_t when storing it in a QVariant which can truncate values;
change the stored QVariant value to an int to match OptionsModel::FontFamily and
subsequent .toInt() usage by using static_cast<int>(family) when constructing
the QVariant so the enum value is preserved and future growth is safe.

Comment on lines 10 to 12
#include <qt/guiutil.h>
#include <qt/guiutil_font.h>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Repo-wide check for missing guiutil_font.h includes.

To prevent ODR/compile issues from transitive includes, verify all TUs that use the new font APIs include <qt/guiutil_font.h>.

Also applies to: 51-55


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find files that use new font APIs/types
mapfile -t files < <(rg -nP --glob '!**/build/**' --glob '!**/dist/**' --type=cpp \
  '(GUIUtil::(setFont|getFont|getFontFamily|getFontScale|getFontWeight[A-Za-z]*|updateFonts)\s*\()|GUIUtil::Font(Weight|Family)' \
  | cut -d: -f1 | sort -u)

missing=0
for f in "${files[@]}"; do
  if ! rg -qP '#\s*include\s*[<"]qt/guiutil_font\.h[>"]' "$f"; then
    echo "Missing include: $f"
    ((missing++)) || true
  fi
done

echo "Checked ${#files[@]} file(s). Missing includes: $missing"
# Also ensure the new sources are wired into the build
echo -e "\nBuild system references to guiutil_font:"
rg -n 'guiutil_font\.(h|cpp)' -g 'src/**' || true

Length of output: 364


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Collect all translation units using the new GUIUtil font APIs/types
rg -nP --glob '!**/build/**' --glob '!**/dist/**' --type=cpp \
  '(GUIUtil::(setFont|getFont|getFontFamily|getFontScale|getFontWeight[A-Za-z]*|updateFonts)\s*\()|GUIUtil::Font(Weight|Family)' \
  | cut -d: -f1 | sort -u > /tmp/guiutil_font_files.txt

missing=0
while IFS= read -r f; do
  if ! grep -qP '#\s*include\s*[<"]qt/guiutil_font\.h[>"]' "$f"; then
    echo "Missing include: $f"
    missing=$((missing+1))
  fi
done < /tmp/guiutil_font_files.txt

echo "Checked $(wc -l < /tmp/guiutil_font_files.txt) file(s). Missing includes: $missing"

echo -e "\nBuild system references to guiutil_font:"
rg -n 'guiutil_font\.(h|cpp)' -g 'src/**' || true

Length of output: 5278


Add missing guiutil_font.h includes
In src/qt/appearancewidget.cpp and src/qt/optionsdialog.cpp, add

#include <qt/guiutil_font.h>

at the top to ensure all uses of the new GUIUtil font APIs pull in their definitions.

🤖 Prompt for AI Agents
In src/qt/appearancewidget.cpp (top of file, after existing qt includes) and
src/qt/optionsdialog.cpp (top of file, after existing qt includes), add the
missing include directive for qt/guiutil_font.h so the new GUIUtil font APIs are
declared; ensure the include is placed alongside the other qt/guiutil includes
and rebuilt to pick up the definitions.

Comment on lines +144 to +150
QFont::Weight getFontWeightBold()
{
if (!mapWeights.count(fontFamily)) {
return g_font_defaults.weight_bold;
}
return mapWeights[fontFamily].second;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Potential null pointer dereference in getFontWeightBold().

Similar to getFontWeightNormal(), this function should verify fonts are loaded before accessing the map.

 QFont::Weight getFontWeightBold()
 {
+    if (!fontsLoaded()) {
+        return g_font_defaults.weight_bold;
+    }
     if (!mapWeights.count(fontFamily)) {
         return g_font_defaults.weight_bold;
     }
     return mapWeights[fontFamily].second;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
QFont::Weight getFontWeightBold()
{
if (!mapWeights.count(fontFamily)) {
return g_font_defaults.weight_bold;
}
return mapWeights[fontFamily].second;
}
QFont::Weight getFontWeightBold()
{
if (!fontsLoaded()) {
return g_font_defaults.weight_bold;
}
if (!mapWeights.count(fontFamily)) {
return g_font_defaults.weight_bold;
}
return mapWeights[fontFamily].second;
}
🤖 Prompt for AI Agents
In src/qt/guiutil_font.cpp around lines 144 to 150, getFontWeightBold()
currently assumes the font map is ready and directly indexes
mapWeights[fontFamily], which can cause a null/invalid access; update the
function to mirror getFontWeightNormal() by first checking that fonts are loaded
or that mapWeights contains fontFamily (e.g., if (!fontsLoaded) return
g_font_defaults.weight_bold; or if (!mapWeights.count(fontFamily)) return
g_font_defaults.weight_bold;) and only then access
mapWeights[fontFamily].second, ensuring a safe default is returned when the map
isn’t initialized or the family key is missing.

Comment on lines +474 to +494
assert(mapMontserrat.count(qWeight));
#ifdef Q_OS_MAC
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
font.setStyleName([&](){
QString ret{std::get<0>(mapMontserrat.at(qWeight))};
if (fItalic) {
if (ret == "Regular") {
ret = "Italic";
} else {
ret += " Italic";
}
}
return ret;
}());
#else
if (qWeight == QFont::Normal || qWeight == QFont::Bold) {
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
} else {
font.setFamily(fontFamilyToString(FontFamily::Montserrat) + " " + std::get<0>(mapMontserrat.at(qWeight)));
}
#endif // Q_OS_MAC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ensure mapMontserrat contains the provided weight.

On line 474, there's an assert that checks if qWeight exists in mapMontserrat. However, this assert will only fire in debug builds. Consider adding proper error handling for release builds to prevent potential crashes.

     if (family == FontFamily::Montserrat) {
-        assert(mapMontserrat.count(qWeight));
+        if (!mapMontserrat.count(qWeight)) {
+            qDebug() << __func__ << ": Unsupported Montserrat weight:" << qWeight << ", falling back to Normal";
+            qWeight = QFont::Normal;
+        }
 #ifdef Q_OS_MAC
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert(mapMontserrat.count(qWeight));
#ifdef Q_OS_MAC
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
font.setStyleName([&](){
QString ret{std::get<0>(mapMontserrat.at(qWeight))};
if (fItalic) {
if (ret == "Regular") {
ret = "Italic";
} else {
ret += " Italic";
}
}
return ret;
}());
#else
if (qWeight == QFont::Normal || qWeight == QFont::Bold) {
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
} else {
font.setFamily(fontFamilyToString(FontFamily::Montserrat) + " " + std::get<0>(mapMontserrat.at(qWeight)));
}
#endif // Q_OS_MAC
if (family == FontFamily::Montserrat) {
// Replace assert-only guard with a runtime check and fallback
if (!mapMontserrat.count(qWeight)) {
qDebug() << __func__
<< ": Unsupported Montserrat weight:" << qWeight
<< ", falling back to Normal";
qWeight = QFont::Normal;
}
#ifdef Q_OS_MAC
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
font.setStyleName([&](){
QString ret{std::get<0>(mapMontserrat.at(qWeight))};
if (fItalic) {
if (ret == "Regular") {
ret = "Italic";
} else {
ret += " Italic";
}
}
return ret;
}());
#else
if (qWeight == QFont::Normal || qWeight == QFont::Bold) {
font.setFamily(fontFamilyToString(FontFamily::Montserrat));
} else {
font.setFamily(fontFamilyToString(FontFamily::Montserrat)
" " + std::get<0>(mapMontserrat.at(qWeight)));
}
#endif // Q_OS_MAC
}
🤖 Prompt for AI Agents
In src/qt/guiutil_font.cpp around lines 474 to 494, the code relies on
assert(mapMontserrat.count(qWeight)) which only triggers in debug builds;
replace that assumption with a runtime guard that checks if mapMontserrat
contains qWeight and handles the missing case safely (e.g., choose a safe
default like QFont::Normal or the "Regular" entry, log or qWarning() that an
unknown weight was requested), then proceed to use the retrieved mapping in both
the Q_OS_MAC and non-Mac branches; ensure no direct .at(...) is called without
verifying presence so release builds won't crash.

Comment on lines +556 to +558
assert(mapSupportedWeights.count(fontFamily));
return mapSupportedWeights[fontFamily];
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Replace assert with proper error handling in getSupportedWeights().

The assert on line 556 will only trigger in debug builds. For production code, proper error handling should be implemented.

 std::vector<QFont::Weight> getSupportedWeights()
 {
-    assert(mapSupportedWeights.count(fontFamily));
+    if (!mapSupportedWeights.count(fontFamily)) {
+        throw std::runtime_error(strprintf("%s: Font family not loaded: %s", __func__, fontFamilyToString(fontFamily).toStdString()));
+    }
     return mapSupportedWeights[fontFamily];
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert(mapSupportedWeights.count(fontFamily));
return mapSupportedWeights[fontFamily];
}
std::vector<QFont::Weight> getSupportedWeights()
{
if (!mapSupportedWeights.count(fontFamily)) {
throw std::runtime_error(strprintf(
"%s: Font family not loaded: %s",
__func__,
fontFamilyToString(fontFamily).toStdString()
));
}
return mapSupportedWeights[fontFamily];
}
🤖 Prompt for AI Agents
In src/qt/guiutil_font.cpp around lines 556–558, replace the debug-only assert
by explicitly checking whether mapSupportedWeights contains fontFamily; if it
does, return the stored value, otherwise emit a warning (e.g., qWarning() with
the fontFamily), and return a safe default (such as an empty weight list) or
throw a descriptive exception; ensure no use of operator[] on missing keys so
production builds won't crash.

Comment on lines 23 to 31
static std::array<std::tuple<FontFamily, QString, /*selectable=*/bool>, 4> AVAILABLE_FONTS{{
{FontFamily::SystemDefault, QString{"SystemDefault"}, true},
{FontFamily::Montserrat, QString{"Montserrat"}, true},
{FontFamily::RobotoMono, QString{"Roboto Mono"}, false},
{FontFamily::DefaultMonospace, QString{"DefaultMonospace"}, false},
}};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Avoid TU-local mutable state; prefer a single definition.

AVAILABLE_FONTS as a non-const static in a header creates one mutable copy per TU. Make it an inline const (C++17) or move to the .cpp with an extern decl to prevent divergence and reduce footprint.

Example (header-only approach):

-static std::array<std::tuple<FontFamily, QString, /*selectable=*/bool>, 4> AVAILABLE_FONTS{{
+inline const std::array<std::tuple<FontFamily, QString, /*selectable=*/bool>, 4> AVAILABLE_FONTS{{
     {FontFamily::SystemDefault, QString{"SystemDefault"}, true},
     {FontFamily::Montserrat, QString{"Montserrat"}, true},
     {FontFamily::RobotoMono, QString{"Roboto Mono"}, false},
     {FontFamily::DefaultMonospace, QString{"DefaultMonospace"}, false},
 }};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
static std::array<std::tuple<FontFamily, QString, /*selectable=*/bool>, 4> AVAILABLE_FONTS{{
{FontFamily::SystemDefault, QString{"SystemDefault"}, true},
{FontFamily::Montserrat, QString{"Montserrat"}, true},
{FontFamily::RobotoMono, QString{"Roboto Mono"}, false},
{FontFamily::DefaultMonospace, QString{"DefaultMonospace"}, false},
}};
inline const std::array<std::tuple<FontFamily, QString, /*selectable=*/bool>, 4> AVAILABLE_FONTS{{
{FontFamily::SystemDefault, QString{"SystemDefault"}, true},
{FontFamily::Montserrat, QString{"Montserrat"}, true},
{FontFamily::RobotoMono, QString{"Roboto Mono"}, false},
{FontFamily::DefaultMonospace, QString{"DefaultMonospace"}, false},
}};
🤖 Prompt for AI Agents
In src/qt/guiutil_font.h around lines 23-28, AVAILABLE_FONTS is a non-const
static in a header which produces a mutable copy in every TU; change it to a
single shared definition by either (A) making it header-only: declare it as
inline const (or inline constexpr if all types permit) so there is one shared
read-only instance across TUs, or (B) move the definition into the .cpp and
leave an extern const declaration in the header; update callers to use the const
symbol and remove any non-const usage.

Comment on lines 38 to 49
QFont::Weight weight_bold{
#ifdef Q_OS_MAC
QFont::ExtraLight
#else
QFont::Light
#endif // Q_OS_MAC
};
QFont::Weight weight_normal{QFont::Medium};
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Bold/normal defaults inverted.

weight_bold is set lighter than weight_normal (ExtraLight/Light vs Medium). This will render “bold” text lighter than normal. Fix the defaults.

Apply:

-    QFont::Weight weight_bold{
-#ifdef Q_OS_MAC
-    QFont::ExtraLight
-#else
-    QFont::Light
-#endif // Q_OS_MAC
-    };
-    QFont::Weight weight_normal{QFont::Medium};
+    QFont::Weight weight_bold{
+#ifdef Q_OS_MAC
+    QFont::DemiBold
+#else
+    QFont::Bold
+#endif // Q_OS_MAC
+    };
+    QFont::Weight weight_normal{QFont::Normal};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
QFont::Weight weight_bold{
#ifdef Q_OS_MAC
QFont::ExtraLight
#else
QFont::Light
#endif // Q_OS_MAC
};
QFont::Weight weight_normal{QFont::Medium};
};
QFont::Weight weight_bold{
#ifdef Q_OS_MAC
QFont::DemiBold
#else
QFont::Bold
#endif // Q_OS_MAC
};
QFont::Weight weight_normal{QFont::Normal};
};
🤖 Prompt for AI Agents
In src/qt/guiutil_font.h around lines 38 to 46, the bold/normal defaults are
inverted (weight_bold is lighter than weight_normal); change weight_bold to a
heavier value than weight_normal by setting weight_bold to QFont::Bold (use
QFont::Bold for both branches of the existing #ifdef) and keep weight_normal as
QFont::Medium so “bold” renders heavier than normal.

Comment on lines +209 to +221
QFont embedded_font{GUIUtil::getFont(GUIUtil::FontFamily::RobotoMono, toQFontWeight(GUIUtil::FontWeight::Bold),
/*fItalic=*/false, /*nPointSize=*/10)};
ui->embeddedFont_radioButton->setText(ui->embeddedFont_radioButton->text().arg(QFontInfo(embedded_font).family()));
ui->embeddedFont_label_1->setFont(embedded_font);
ui->embeddedFont_label_9->setFont(embedded_font);

QFont system_font{GUIUtil::getFont(GUIUtil::FontFamily::DefaultMonospace, toQFontWeight(GUIUtil::FontWeight::Bold),
/*fItalic=*/false, /*nPointSize=*/10)};
ui->systemFont_radioButton->setText(ui->systemFont_radioButton->text().arg(QFontInfo(system_font).family()));
ui->systemFont_label_1->setFont(system_font);
ui->systemFont_label_9->setFont(system_font);
// Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Prefer model-driven initial state; avoid hardcoding preview fonts’ default selection.

You set up both previews correctly. However, the initial selection is forced later (Line 221). Let the mapper seed state from OptionsModel instead to avoid flicker and mismatches.

Apply this diff:

-    // Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.
-    ui->systemFont_radioButton->setChecked(true);
+    // Initial checked state will be provided by QDataWidgetMapper from OptionsModel.

Also, since this block uses font-family/weight enums and helpers (e.g., toQFontWeight, FontFamily::RobotoMono), ensure the non-transitive include is present:
Add outside this hunk near other includes:

#include <qt/guiutil_font.h>

Run to confirm include presence:


🏁 Script executed:

#!/bin/bash
rg -n 'guiutil_font.h' src/qt/optionsdialog.cpp || echo "Missing #include <qt/guiutil_font.h> in optionsdialog.cpp"

Length of output: 172


Remove hardcoded font-selection and seed initial state from OptionsModel

  • Replace the setChecked(true) call at line 221 with a comment so QDataWidgetMapper initializes the radio buttons:
    -    // Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.
    -    ui->systemFont_radioButton->setChecked(true);
    +    // Initial checked state provided by QDataWidgetMapper from OptionsModel.
  • Add the missing include for the font helpers in src/qt/optionsdialog.cpp alongside other headers:
    #include <qt/guiutil_font.h>
🤖 Prompt for AI Agents
In src/qt/optionsdialog.cpp around lines 209 to 221, remove the hardcoded
radio-button initialization: delete the setChecked(true) call (line ~221) and
replace it with a brief comment indicating QDataWidgetMapper will populate the
initial state from OptionsModel; ensure you do not programmatically toggle the
other radio button so the mapper can initialize both consistently. Also add the
missing include for the font helper header by adding #include
<qt/guiutil_font.h> alongside the other includes at the top of this file so
GUIUtil::getFont is declared.

@@ -7,6 +7,7 @@

#include <qt/addresstablemodel.h>
#include <qt/guiutil.h>
#include <qt/guiutil_font.h>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Include addition is correct and necessary for FontWeight usage.

This TU calls GUIUtil::setFont/updateFonts below, so adding guiutil_font.h is appropriate.

Run this to ensure every TU using the GUIUtil font API includes the new header and that build files list guiutil_font.{h,cpp}:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking users of GUIUtil font API for missing includes..."
mapfile -t files < <(rg -nP --glob 'src/qt/**/*.cpp' --no-heading '(GUIUtil::FontWeight|GUIUtil::setFont\s*\(|GUIUtil::getFontNormal|GUIUtil::calculateIdealFontSize|GUIUtil::loadFonts)' | cut -d: -f1 | sort -u)
missing=0
for f in "${files[@]}"; do
  if ! rg -nF '#include <qt/guiutil_font.h>' "$f" >/dev/null; then
    echo "Missing #include <qt/guiutil_font.h> in: $f"
    missing=1
  fi
done

echo "Verifying Makefile integration..."
rg -nP 'guiutil_font\.(h|cpp)' src/Makefile.qt.include || { echo "guiutil_font not found in src/Makefile.qt.include"; missing=1; }

if [ $missing -eq 0 ]; then
  echo "OK: All users include the header and build files reference guiutil_font."
else
  echo "FAIL: See messages above."; exit 1
fi

Length of output: 468


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking users of GUIUtil font API for missing includes..."
files=$(rg -nP --glob 'src/qt/**/*.cpp' --no-heading '(GUIUtil::FontWeight|GUIUtil::setFont\s*\(|GUIUtil::getFontNormal|GUIUtil::calculateIdealFontSize|GUIUtil::loadFonts)' | cut -d: -f1 | sort -u)
missing=0
for f in $files; do
  if ! grep -q '#include <qt/guiutil_font.h>' "$f"; then
    echo "Missing #include <qt/guiutil_font.h> in: $f"
    missing=1
  fi
done

echo "Verifying build file integration..."
if ! grep -nE 'guiutil_font\.(h|cpp)' src/Makefile.qt.include; then
  echo "guiutil_font.{h,cpp} not referenced in src/Makefile.qt.include"
  missing=1
fi

if [ $missing -eq 0 ]; then
  echo "OK: All users include the header and build files reference guiutil_font."
else
  echo "FAIL: See messages above." 
  exit 1
fi

Length of output: 3336


Add missing include in optionsdialog.cpp
Add #include <qt/guiutil_font.h> at the top of src/qt/optionsdialog.cpp to ensure GUIUtil font API calls resolve.

🤖 Prompt for AI Agents
In src/qt/receivecoinsdialog.cpp around line 10, add the missing include for the
GUIUtil font API by inserting the header reference for qt/guiutil_font.h at the
top of the file so GUIUtil font calls resolve; ensure the include is placed with
the other Qt/GUI includes and recompile to confirm the symbol resolution.

@@ -18,6 +18,7 @@
#include <qt/bantablemodel.h>
#include <qt/clientmodel.h>
#include <qt/guiutil.h>
#include <qt/guiutil_font.h>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Good: explicit include for font types/enums.

This TU uses GUIUtil::FontWeight and fixedPitchFont; including guiutil_font.h here prevents accidental reliance on transitive headers.

Run to ensure all Qt files that use FontWeight/fixedPitchFont/updateFonts explicitly include guiutil_font.h:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find Qt sources using the font API
files=$(rg -nP --type-add 'cpp:*.{cpp,h,hpp,cc}' --type cpp -g 'src/**/qt/**' 'GUIUtil::(FontWeight|fixedPitchFont|updateFonts)\b' -l)
missing=0
for f in $files; do
  if ! rg -nP '^\s*#\s*include\s*[<"]qt/guiutil_font\.h[>"]' "$f" >/dev/null; then
    echo "Missing guiutil_font.h include in: $f"
    missing=$((missing+1))
  fi
done
if [[ $missing -eq 0 ]]; then
  echo "All relevant files include guiutil_font.h explicitly."
fi

Length of output: 3382


Add missing guiutil_font.h include

  • src/qt/optionsdialog.cpp: uses GUIUtil::FontWeight/fixedPitchFont/updateFonts but lacks #include <qt/guiutil_font.h>. Add it to prevent reliance on transitive headers.
🤖 Prompt for AI Agents
In src/qt/rpcconsole.cpp around line 21, add an explicit include for
qt/guiutil_font.h to avoid relying on transitive headers; place the include with
the other GUIUtil includes (near the top of the file) so GUIUtil::FontWeight,
fixedPitchFont and updateFonts are available and then rebuild to verify no
missing-declaration warnings remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant