@@ -70,12 +70,13 @@ class AddressTablePriv
7070{
7171public:
7272 QList<AddressTableEntry> cachedAddressTable;
73- AddressTableModel *parent;
73+ AddressTableModel* const parent;
74+ const bool pk_hash_only;
7475
75- explicit AddressTablePriv (AddressTableModel *_parent):
76- parent(_parent) {}
76+ explicit AddressTablePriv (AddressTableModel *_parent, bool pk_hash_only ):
77+ parent(_parent), pk_hash_only(pk_hash_only) {}
7778
78- void refreshAddressTable (interfaces::Wallet& wallet, bool pk_hash_only = false )
79+ void refreshAddressTable (interfaces::Wallet& wallet)
7980 {
8081 cachedAddressTable.clear ();
8182 {
@@ -166,15 +167,19 @@ AddressTableModel::AddressTableModel(WalletModel *parent, bool pk_hash_only) :
166167 QAbstractTableModel(parent), walletModel(parent)
167168{
168169 columns << tr (" Label" ) << tr (" Address" );
169- priv = new AddressTablePriv (this );
170- priv->refreshAddressTable (parent->wallet (), pk_hash_only);
170+ priv = new AddressTablePriv (this , pk_hash_only);
171171}
172172
173173AddressTableModel::~AddressTableModel ()
174174{
175175 delete priv;
176176}
177177
178+ void AddressTableModel::preload ()
179+ {
180+ priv->refreshAddressTable (walletModel->wallet ());
181+ }
182+
178183int AddressTableModel::rowCount (const QModelIndex &parent) const
179184{
180185 if (parent.isValid ()) {
0 commit comments