aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-01-22 12:15:55 -0500
committerRiccardo Spagni <ric@spagni.net>2017-01-22 12:15:55 -0500
commit160e5c480ac4feb4994f36cb1749d94feb7f08c9 (patch)
treece7adc610f3e7527faadfe703c97cad27d838675
parent32a81517d6a8062f89a2b9fe73ca50106edd1fe1 (diff)
parentfb8d9bd5dc06152f12a9ce7ec8f5778e9a8d7859 (diff)
downloadmonzero-gui-160e5c480ac4feb4994f36cb1749d94feb7f08c9.tar.gz
monzero-gui-160e5c480ac4feb4994f36cb1749d94feb7f08c9.tar.xz
monzero-gui-160e5c480ac4feb4994f36cb1749d94feb7f08c9.zip
Merge pull request #413
fb8d9bd Settings: allow setting log categories (moneromooo.monero) ea8bc5b LineEdit: forward editingFinished signal (moneromooo.monero) d4b3834 Build against monero with new logging system (moneromooo.monero)
-rw-r--r--components/LineEdit.qml4
-rw-r--r--monero-wallet-gui.pro1
-rw-r--r--pages/Settings.qml27
-rw-r--r--src/libwalletqt/WalletManager.cpp5
-rw-r--r--src/libwalletqt/WalletManager.h1
5 files changed, 34 insertions, 4 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index f1e275f2..49eee0b1 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -29,6 +29,7 @@
import QtQuick 2.0
Item {
+ id: item
property alias placeholderText: input.placeholderText
property alias text: input.text
property alias validator: input.validator
@@ -36,7 +37,7 @@ Item {
property alias cursorPosition: input.cursorPosition
property int fontSize: 18
property bool error: false
-
+ signal editingFinished()
height: 37
@@ -67,5 +68,6 @@ Item {
anchors.leftMargin: 4
anchors.rightMargin: 30
font.pixelSize: parent.fontSize
+ onEditingFinished: item.editingFinished()
}
}
diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro
index 4f687802..dab04749 100644
--- a/monero-wallet-gui.pro
+++ b/monero-wallet-gui.pro
@@ -73,6 +73,7 @@ SOURCES = *.qml \
LIBS += -L$$WALLET_ROOT/lib \
-lwallet_merged \
+ monero/build/release/contrib/epee/src/libepee.a \
-lunbound
diff --git a/pages/Settings.qml b/pages/Settings.qml
index 4d8a4a49..0027e0da 100644
--- a/pages/Settings.qml
+++ b/pages/Settings.qml
@@ -352,14 +352,35 @@ Rectangle {
ComboBox {
id: logLevel
- model: [0,1,2,3,4]
+ model: [0,1,2,3,4,"custom"]
currentIndex : appWindow.persistentSettings.logLevel;
onCurrentIndexChanged: {
- console.log("log level changed: ",currentIndex);
- walletManager.setLogLevel(currentIndex);
+ if (currentIndex == 5) {
+ console.log("log categories changed: ", logCategories.text);
+ walletManager.setLogCategories(logCategories.text);
+ }
+ else {
+ console.log("log level changed: ",currentIndex);
+ walletManager.setLogLevel(currentIndex);
+ }
appWindow.persistentSettings.logLevel = currentIndex;
}
}
+
+ LineEdit {
+ id: logCategories
+ Layout.preferredWidth: 200
+ Layout.fillWidth: true
+ text: ""
+ placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
+ enabled: logLevel.currentIndex == 5
+ onEditingFinished: {
+ if(enabled) {
+ console.log("log categories changed: ", text);
+ walletManager.setLogCategories(text);
+ }
+ }
+ }
}
// Version
diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp
index ce37b9bb..fa06edd3 100644
--- a/src/libwalletqt/WalletManager.cpp
+++ b/src/libwalletqt/WalletManager.cpp
@@ -261,6 +261,11 @@ void WalletManager::setLogLevel(int logLevel)
Monero::WalletManagerFactory::setLogLevel(logLevel);
}
+void WalletManager::setLogCategories(const QString &categories)
+{
+ Monero::WalletManagerFactory::setLogCategories(categories.toStdString());
+}
+
QString WalletManager::urlToLocalPath(const QUrl &url) const
{
return QDir::toNativeSeparators(url.toLocalFile());
diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h
index 12972efe..5b8adf5a 100644
--- a/src/libwalletqt/WalletManager.h
+++ b/src/libwalletqt/WalletManager.h
@@ -112,6 +112,7 @@ public:
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;
Q_INVOKABLE void setLogLevel(int logLevel);
+ Q_INVOKABLE void setLogCategories(const QString &categories);
Q_INVOKABLE quint64 add(quint64 x, quint64 y) const { return x + y; }
Q_INVOKABLE quint64 sub(quint64 x, quint64 y) const { return x - y; }