mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
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)
This commit is contained in:
commit
160e5c480a
5 changed files with 34 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ SOURCES = *.qml \
|
|||
|
||||
LIBS += -L$$WALLET_ROOT/lib \
|
||||
-lwallet_merged \
|
||||
monero/build/release/contrib/epee/src/libepee.a \
|
||||
-lunbound
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue