From: tobtoht Date: Sat, 14 Aug 2021 15:14:27 +0000 (+0200) Subject: Nodes: don't append http:// on add custom node X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=3288b85071224dc5938ccce27477603bfadb20d2;p=gamesguru%2Ffeather.git Nodes: don't append http:// on add custom node --- diff --git a/src/widgets/NodeWidget.cpp b/src/widgets/NodeWidget.cpp index 23d6afa0..3b94d892 100644 --- a/src/widgets/NodeWidget.cpp +++ b/src/widgets/NodeWidget.cpp @@ -135,8 +135,9 @@ void NodeWidget::onCustomAddClicked(){ auto currentNodes = m_ctx->nodes->customNodes(); QString currentNodesText; - for (auto &entry: currentNodes) - currentNodesText += QString("%1\n").arg(entry.url.toString()); + for (auto &entry: currentNodes) { + currentNodesText += QString("%1\n").arg(entry.toFullAddress()); + } bool ok; QString text = QInputDialog::getMultiLineText(this, "Add custom node(s).", "E.g: user:password@127.0.0.1:18081", currentNodesText, &ok); @@ -145,9 +146,9 @@ void NodeWidget::onCustomAddClicked(){ QList nodesList; auto newNodesList = text.split("\n"); - for(auto &newNodeText: newNodesList) { + for (auto &newNodeText: newNodesList) { newNodeText = newNodeText.replace("\r", "").trimmed(); - if(newNodeText.isEmpty()) + if (newNodeText.isEmpty()) continue; auto node = FeatherNode(newNodeText);