mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Remove spaces from DNS queries
This commit is contained in:
parent
4deb803c67
commit
9f851608e0
@ -134,6 +134,9 @@ Control {
|
||||
//
|
||||
Label {
|
||||
text: qsTr("DNS lookup") + ": "
|
||||
opacity: enabled ? 1 : 0.5
|
||||
enabled: !Cpp_IO_Manager.connected
|
||||
Behavior on opacity {NumberAnimation{}}
|
||||
} RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: app.spacing / 2
|
||||
@ -141,9 +144,13 @@ Control {
|
||||
TextField {
|
||||
id: _addrLookup
|
||||
Layout.fillWidth: true
|
||||
opacity: enabled ? 1 : 0.5
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
enabled: !Cpp_IO_Manager.connected
|
||||
onAccepted: Cpp_IO_Network.findIp(text)
|
||||
placeholderText: qsTr("Enter address (e.g. google.com)")
|
||||
|
||||
Behavior on opacity {NumberAnimation{}}
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -152,8 +159,10 @@ Control {
|
||||
Layout.maximumWidth: height
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
icon.source: "qrc:/icons/search.svg"
|
||||
enabled: _addrLookup.text.length > 0
|
||||
onClicked: Cpp_IO_Network.findIp(_addrLookup.text)
|
||||
enabled: _addrLookup.text.length > 0 && !Cpp_IO_Manager.connected
|
||||
|
||||
Behavior on opacity {NumberAnimation{}}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,9 +214,10 @@ Control {
|
||||
clip: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.minimumHeight: 218
|
||||
Layout.maximumHeight: 218
|
||||
currentIndex: tab.currentIndex
|
||||
Layout.topMargin: -parent.spacing - 1
|
||||
Layout.minimumHeight: serial.implicitHeight + 14
|
||||
|
||||
SetupPanes.Serial {
|
||||
id: serial
|
||||
|
@ -101,7 +101,7 @@ int Network::socketTypeIndex() const
|
||||
bool Network::configurationOk() const
|
||||
{
|
||||
return true;
|
||||
// return port() > 0 && !QHostAddress(host()).isNull();
|
||||
return port() > 0 && !QHostAddress(host()).isNull();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,7 +210,7 @@ void Network::setHost(const QString &host)
|
||||
*/
|
||||
void Network::findIp(const QString &host)
|
||||
{
|
||||
QHostInfo::lookupHost(host, this, &Network::lookupFinished);
|
||||
QHostInfo::lookupHost(host.simplified(), this, &Network::lookupFinished);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user