mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-28 22:28:24 -05:00
early-access version 3326
This commit is contained in:
parent
c99dcbc427
commit
a77a8138cb
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3325.
|
This is the source code for early-access 3326.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -81,20 +81,13 @@ void DirectConnectWindow::Connect() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (static_cast<ConnectionType>(ui->connection_type->currentIndex())) {
|
if (!ui->ip->hasAcceptableInput()) {
|
||||||
case ConnectionType::TraversalServer:
|
NetworkMessage::ErrorManager::ShowError(NetworkMessage::ErrorManager::IP_ADDRESS_NOT_VALID);
|
||||||
break;
|
return;
|
||||||
case ConnectionType::IP:
|
}
|
||||||
if (!ui->ip->hasAcceptableInput()) {
|
if (!ui->port->hasAcceptableInput()) {
|
||||||
NetworkMessage::ErrorManager::ShowError(
|
NetworkMessage::ErrorManager::ShowError(NetworkMessage::ErrorManager::PORT_NOT_VALID);
|
||||||
NetworkMessage::ErrorManager::IP_ADDRESS_NOT_VALID);
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!ui->port->hasAcceptableInput()) {
|
|
||||||
NetworkMessage::ErrorManager::ShowError(NetworkMessage::ErrorManager::PORT_NOT_VALID);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store settings
|
// Store settings
|
||||||
|
@ -26,20 +26,11 @@
|
|||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="connection_type">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>IP Address</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="ip_container" native="true">
|
<widget class="QWidget" name="ip_container" native="true">
|
||||||
<layout class="QHBoxLayout" name="ip_layout">
|
<layout class="QHBoxLayout" name="ip_layout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -53,14 +44,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>IP</string>
|
<string>Server Address</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="ip">
|
<widget class="QLineEdit" name="ip">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>IP address of the host</p></body></html></string>
|
<string><html><head/><body><p>Server address of the host</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>253</number>
|
<number>253</number>
|
||||||
@ -85,6 +76,18 @@
|
|||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string notr="true" extracomment="placeholder string that tells user default port">24872</string>
|
<string notr="true" extracomment="placeholder string that tells user default port">24872</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>65</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -40,9 +40,19 @@ private:
|
|||||||
|
|
||||||
/// ipv4 / ipv6 / hostnames
|
/// ipv4 / ipv6 / hostnames
|
||||||
QRegularExpression ip_regex = QRegularExpression(QStringLiteral(
|
QRegularExpression ip_regex = QRegularExpression(QStringLiteral(
|
||||||
"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|"
|
//IPv4 regex
|
||||||
"^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|"
|
"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|"
|
||||||
"^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-zA-Z]{2,}$"));
|
//IPv6 regex
|
||||||
|
"^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|"
|
||||||
|
"(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|"
|
||||||
|
"(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?$|"
|
||||||
|
// Hostname regex
|
||||||
|
"^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-zA-Z]{2,}$"));
|
||||||
QRegularExpressionValidator ip;
|
QRegularExpressionValidator ip;
|
||||||
|
|
||||||
/// port must be between 0 and 65535
|
/// port must be between 0 and 65535
|
||||||
|
Loading…
Reference in New Issue
Block a user