Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
Qt
QtSerialPort
Commits
bab8ca79
Commit
bab8ca79
authored
5 years ago
by
Qt Forward Merge Bot
Browse files
Options
Download
Plain Diff
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I3d5718006e8fee8fa3c2f97aec03183a4db1aa7c
parents
c1766c64
574098ec
dev
5.13
5.13.1
5.13.2
5.14
5.14.0
5.14.1
5.14.2
5.15
5.15.0
5.15.1
5.15.2
6.2
6.2.0
6.2.1
6.2.2
v5.15.0-alpha1
v5.14.1
v5.14.0
v5.14.0-rc2
v5.14.0-rc1
v5.14.0-beta3
v5.14.0-beta2
v5.14.0-beta1
v5.14.0-alpha1
v5.13.2
v5.13.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/serialport/qserialportinfo_unix.cpp
+10
-2
src/serialport/qserialportinfo_unix.cpp
with
10 additions
and
2 deletions
src/serialport/qserialportinfo_unix.cpp
+
10
−
2
View file @
bab8ca79
...
@@ -169,6 +169,12 @@ static bool isVirtualNullModemDevice(const QString &portName)
...
@@ -169,6 +169,12 @@ static bool isVirtualNullModemDevice(const QString &portName)
return
portName
.
startsWith
(
QLatin1String
(
"tnt"
));
return
portName
.
startsWith
(
QLatin1String
(
"tnt"
));
}
}
// provided by the g_serial driver
static
bool
isGadgetDevice
(
const
QString
&
portName
)
{
return
portName
.
startsWith
(
QLatin1String
(
"ttyGS"
));
}
static
QString
ueventProperty
(
const
QDir
&
targetDir
,
const
QByteArray
&
pattern
)
static
QString
ueventProperty
(
const
QDir
&
targetDir
,
const
QByteArray
&
pattern
)
{
{
QFile
f
(
QFileInfo
(
targetDir
,
QStringLiteral
(
"uevent"
)).
absoluteFilePath
());
QFile
f
(
QFileInfo
(
targetDir
,
QStringLiteral
(
"uevent"
)).
absoluteFilePath
());
...
@@ -265,7 +271,8 @@ QList<QSerialPortInfo> availablePortsBySysfs(bool &ok)
...
@@ -265,7 +271,8 @@ QList<QSerialPortInfo> availablePortsBySysfs(bool &ok)
const
QString
driverName
=
deviceDriver
(
targetDir
);
const
QString
driverName
=
deviceDriver
(
targetDir
);
if
(
driverName
.
isEmpty
())
{
if
(
driverName
.
isEmpty
())
{
if
(
!
isRfcommDevice
(
priv
.
portName
)
if
(
!
isRfcommDevice
(
priv
.
portName
)
&&
!
isVirtualNullModemDevice
(
priv
.
portName
))
{
&&
!
isVirtualNullModemDevice
(
priv
.
portName
)
&&
!
isGadgetDevice
(
priv
.
portName
))
{
continue
;
continue
;
}
}
}
}
...
@@ -436,7 +443,8 @@ QList<QSerialPortInfo> availablePortsByUdev(bool &ok)
...
@@ -436,7 +443,8 @@ QList<QSerialPortInfo> availablePortsByUdev(bool &ok)
priv
.
productIdentifier
=
deviceProductIdentifier
(
dev
.
data
(),
priv
.
hasProductIdentifier
);
priv
.
productIdentifier
=
deviceProductIdentifier
(
dev
.
data
(),
priv
.
hasProductIdentifier
);
}
else
{
}
else
{
if
(
!
isRfcommDevice
(
priv
.
portName
)
if
(
!
isRfcommDevice
(
priv
.
portName
)
&&
!
isVirtualNullModemDevice
(
priv
.
portName
))
{
&&
!
isVirtualNullModemDevice
(
priv
.
portName
)
&&
!
isGadgetDevice
(
priv
.
portName
))
{
continue
;
continue
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets