Nodes: don't append http:// on add custom node

This commit is contained in:
tobtoht 2021-08-14 17:14:27 +02:00
parent c9775affd2
commit 3288b85071

View file

@ -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<FeatherNode> 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);