diff --git a/components/TextBlock.qml b/components/TextBlock.qml new file mode 100644 index 00000000..7c36088a --- /dev/null +++ b/components/TextBlock.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextEdit { + wrapMode: Text.Wrap + readOnly: true + selectByMouse: true +} diff --git a/pages/Settings.qml b/pages/Settings.qml index 5a908c0c..8173aba5 100644 --- a/pages/Settings.qml +++ b/pages/Settings.qml @@ -473,7 +473,7 @@ Rectangle { RowLayout { Label { color: "#4A4949" - text: qsTr("Version") + translationManager.emptyString + text: qsTr("Debug info") + translationManager.emptyString fontSize: 16 anchors.topMargin: 30 Layout.topMargin: 30 @@ -485,19 +485,28 @@ Rectangle { color: "#DEDEDE" } - Label { - id: guiVersion + TextBlock { Layout.topMargin: 8 - color: "#4A4949" + Layout.fillWidth: true text: qsTr("GUI version: ") + Version.GUI_VERSION + translationManager.emptyString - fontSize: 16 } - Label { + TextBlock { id: guiMoneroVersion - color: "#4A4949" + Layout.fillWidth: true text: qsTr("Embedded Monero version: ") + Version.GUI_MONERO_VERSION + translationManager.emptyString - fontSize: 16 + } + TextBlock { + Layout.fillWidth: true + text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet creation height: ") + currentWallet.walletCreationHeight + translationManager.emptyString + } + TextBlock { + Layout.fillWidth: true + text: (typeof currentWallet == "undefined") ? "" : qsTr("Wallet log path: ") + currentWallet.walletLogPath + translationManager.emptyString + } + TextBlock { + Layout.fillWidth: true + text: (typeof currentWallet == "undefined") ? "" : qsTr("Daemon log path: ") + currentWallet.daemonLogPath + translationManager.emptyString } } diff --git a/qml.qrc b/qml.qrc index b81d1a44..f3680259 100644 --- a/qml.qrc +++ b/qml.qrc @@ -141,5 +141,6 @@ components/QRCodeScanner.qml components/Notifier.qml components/MobileHeader.qml + components/TextBlock.qml diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index b79d77e5..5a71debf 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -599,6 +599,16 @@ bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const } } +QString Wallet::getDaemonLogPath() const +{ + return QString::fromStdString(m_walletImpl->getDefaultDataDir()) + "/bitmonero.log"; +} + +QString Wallet::getWalletLogPath() const +{ + return QCoreApplication::applicationDirPath() + "/monero-wallet-gui.log"; +} + Wallet::Wallet(Monero::Wallet *w, QObject *parent) : QObject(parent) , m_walletImpl(w) diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 1224b24d..3fcc057f 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -45,6 +45,9 @@ class Wallet : public QObject Q_PROPERTY(QString publicViewKey READ getPublicViewKey) Q_PROPERTY(QString secretSpendKey READ getSecretSpendKey) Q_PROPERTY(QString publicSpendKey READ getPublicSpendKey) + Q_PROPERTY(QString daemonLogPath READ getDaemonLogPath CONSTANT) + Q_PROPERTY(QString walletLogPath READ getWalletLogPath CONSTANT) + Q_PROPERTY(quint64 walletCreationHeight READ getWalletCreationHeight CONSTANT) public: @@ -241,6 +244,10 @@ public: QString getSecretSpendKey() const {return QString::fromStdString(m_walletImpl->secretSpendKey());} QString getPublicSpendKey() const {return QString::fromStdString(m_walletImpl->publicSpendKey());} + quint64 getWalletCreationHeight() const {return m_walletImpl->getRefreshFromBlockHeight();} + QString getDaemonLogPath() const; + QString getWalletLogPath() const; + // TODO: setListenter() when it implemented in API signals: // emitted on every event happened with wallet