forked from Public/monero-gui
Merge pull request #128
689f041 Report when the GUI is connected to a daemon with mismatched version (moneromooo.monero)
This commit is contained in:
@@ -86,9 +86,9 @@ Wallet::Status Wallet::status() const
|
||||
return static_cast<Status>(m_walletImpl->status());
|
||||
}
|
||||
|
||||
bool Wallet::connected() const
|
||||
Wallet::ConnectionStatus Wallet::connected() const
|
||||
{
|
||||
return m_walletImpl->connected();
|
||||
return static_cast<ConnectionStatus>(m_walletImpl->connected());
|
||||
}
|
||||
|
||||
bool Wallet::synchronized() const
|
||||
|
||||
@@ -22,7 +22,7 @@ class Wallet : public QObject
|
||||
Q_PROPERTY(QString seed READ getSeed)
|
||||
Q_PROPERTY(QString seedLanguage READ getSeedLanguage)
|
||||
Q_PROPERTY(Status status READ status)
|
||||
Q_PROPERTY(bool connected READ connected)
|
||||
Q_PROPERTY(ConnectionStatus connected READ connected)
|
||||
Q_PROPERTY(bool synchronized READ synchronized)
|
||||
Q_PROPERTY(QString errorString READ errorString)
|
||||
Q_PROPERTY(QString address READ address)
|
||||
@@ -42,6 +42,14 @@ public:
|
||||
|
||||
Q_ENUM(Status)
|
||||
|
||||
enum ConnectionStatus {
|
||||
ConnectionStatus_Connected = Bitmonero::Wallet::ConnectionStatus_Connected,
|
||||
ConnectionStatus_Disconnected = Bitmonero::Wallet::ConnectionStatus_Disconnected,
|
||||
ConnectionStatus_WrongVersion = Bitmonero::Wallet::ConnectionStatus_WrongVersion
|
||||
};
|
||||
|
||||
Q_ENUM(ConnectionStatus)
|
||||
|
||||
//! returns mnemonic seed
|
||||
QString getSeed() const;
|
||||
|
||||
@@ -54,8 +62,8 @@ public:
|
||||
//! returns last operation's status
|
||||
Status status() const;
|
||||
|
||||
//! returns true if wallet connected
|
||||
bool connected() const;
|
||||
//! returns whether the wallet is connected, and version status
|
||||
ConnectionStatus connected() const;
|
||||
|
||||
//! returns true if wallet was ever synchronized
|
||||
bool synchronized() const;
|
||||
|
||||
Reference in New Issue
Block a user