mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-11 05:14:34 +00:00
parent
ea8bc5b56d
commit
fb8d9bd5dc
3 changed files with 30 additions and 3 deletions
|
@ -352,14 +352,35 @@ Rectangle {
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: logLevel
|
id: logLevel
|
||||||
model: [0,1,2,3,4]
|
model: [0,1,2,3,4,"custom"]
|
||||||
currentIndex : appWindow.persistentSettings.logLevel;
|
currentIndex : appWindow.persistentSettings.logLevel;
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
console.log("log level changed: ",currentIndex);
|
if (currentIndex == 5) {
|
||||||
walletManager.setLogLevel(currentIndex);
|
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;
|
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
|
// Version
|
||||||
|
|
|
@ -261,6 +261,11 @@ void WalletManager::setLogLevel(int logLevel)
|
||||||
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WalletManager::setLogCategories(const QString &categories)
|
||||||
|
{
|
||||||
|
Monero::WalletManagerFactory::setLogCategories(categories.toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
QString WalletManager::urlToLocalPath(const QUrl &url) const
|
QString WalletManager::urlToLocalPath(const QUrl &url) const
|
||||||
{
|
{
|
||||||
return QDir::toNativeSeparators(url.toLocalFile());
|
return QDir::toNativeSeparators(url.toLocalFile());
|
||||||
|
|
|
@ -112,6 +112,7 @@ public:
|
||||||
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;
|
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;
|
||||||
|
|
||||||
Q_INVOKABLE void setLogLevel(int logLevel);
|
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 add(quint64 x, quint64 y) const { return x + y; }
|
||||||
Q_INVOKABLE quint64 sub(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