mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-07 02:27:26 -04:00
fix: Wallet storage path creation broken (#49)
This commit is contained in:
@@ -132,6 +132,8 @@ QString WalletManager::maximumAllowedAmountAsSting() const
|
||||
return WalletManager::displayAmount(WalletManager::maximumAllowedAmount());
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString WalletManager::displayAmount(quint64 amount) const
|
||||
{
|
||||
return QString::fromStdString(Bitmonero::Wallet::displayAmount(amount));
|
||||
@@ -152,6 +154,16 @@ void WalletManager::setLogLevel(int logLevel)
|
||||
Bitmonero::WalletManagerFactory::setLogLevel(logLevel);
|
||||
}
|
||||
|
||||
QString WalletManager::urlToLocalPath(const QUrl &url) const
|
||||
{
|
||||
return QDir::toNativeSeparators(url.toLocalFile());
|
||||
}
|
||||
|
||||
QUrl WalletManager::localPathToUrl(const QString &path) const
|
||||
{
|
||||
return QUrl::fromLocalFile(path);
|
||||
}
|
||||
|
||||
WalletManager::WalletManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
m_pimpl = Bitmonero::WalletManagerFactory::getWalletManager();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define WALLETMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <wallet/wallet2_api.h>
|
||||
|
||||
class Wallet;
|
||||
@@ -88,6 +89,10 @@ public:
|
||||
// QML JS engine doesn't support unsigned integers
|
||||
Q_INVOKABLE QString maximumAllowedAmountAsSting() const;
|
||||
|
||||
// QML missing such functionality, implementing these helpers here
|
||||
Q_INVOKABLE QString urlToLocalPath(const QUrl &url) const;
|
||||
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;
|
||||
|
||||
void setLogLevel(int logLevel);
|
||||
|
||||
signals:
|
||||
|
||||
Reference in New Issue
Block a user