mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
refactor: Replace string chain name constants with ChainTypes
This commit effectively moves the definition of these constants out of the chainparamsbase to their own file. Using the ChainType enums provides better type safety compared to passing around strings. The commit is part of an ongoing effort to decouple the libbitcoinkernel library from the ArgsManager and other functionality that should not be part of the kernel library.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef BITCOIN_QT_NETWORKSTYLE_H
|
||||
#define BITCOIN_QT_NETWORKSTYLE_H
|
||||
|
||||
#include <util/chaintype.h>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
@@ -14,7 +16,7 @@ class NetworkStyle
|
||||
{
|
||||
public:
|
||||
/** Get style associated with provided network id, or 0 if not known */
|
||||
static const NetworkStyle* instantiate(const std::string& networkId);
|
||||
static const NetworkStyle* instantiate(const ChainType networkId);
|
||||
|
||||
const QString &getAppName() const { return appName; }
|
||||
const QIcon &getAppIcon() const { return appIcon; }
|
||||
|
||||
Reference in New Issue
Block a user