Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
eea4f8fb
Commit
eea4f8fb
authored
Jul 16, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes for compiling QSerialPort based communications library in windows
parent
d7d40c79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
qserialportglobal.h
libs/serialport/qserialportglobal.h
+2
-2
XbeeConfigurationWindow.cpp
src/ui/XbeeConfigurationWindow.cpp
+5
-3
No files found.
libs/serialport/qserialportglobal.h
View file @
eea4f8fb
...
...
@@ -51,12 +51,12 @@ QT_BEGIN_NAMESPACE
# if defined(QT_BUILD_SERIALPORT_LIB)
# define Q_SERIALPORT_EXPORT Q_DECL_EXPORT
# else
# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT
//
# define Q_SERIALPORT_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_SERIALPORT_EXPORT
#endif
# define Q_SERIALPORT_EXPORT
// The macro has been available only since Qt 5.0
#ifndef Q_DECL_OVERRIDE
#define Q_DECL_OVERRIDE
...
...
src/ui/XbeeConfigurationWindow.cpp
View file @
eea4f8fb
...
...
@@ -8,7 +8,8 @@
#include <qdatastream.h>
#ifdef _WIN32
#include <QextSerialEnumerator.h>
//#include <QextSerialEnumerator.h>
#include <qserialportinfo.h>
#endif
#if defined (__APPLE__) && defined (__MACH__)
...
...
@@ -368,11 +369,12 @@ void XbeeConfigurationWindow::setupPortList()
#ifdef _WIN32
// Get the ports available on this system
QList
<
QextPortInfo
>
ports
=
QextSerialEnumerator
::
getPorts
();
QList
<
QSerialPortInfo
>
ports
=
QSerialPortInfo
::
availablePorts
();
//QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
// Add the ports in reverse order, because we prepend them to the list
for
(
int
i
=
ports
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
QString
portString
=
QString
(
ports
.
at
(
i
).
portName
.
toLocal8Bit
().
constData
())
+
" - "
+
QString
(
ports
.
at
(
i
).
friendName
.
toLocal8Bit
().
constData
()).
split
(
"("
).
first
()
;
QString
portString
=
QString
(
ports
.
at
(
i
).
portName
.
toLocal8Bit
().
constData
());
// Prepend newly found port to the list
if
(
portBox
->
findText
(
portString
)
==
-
1
)
{
portBox
->
insertItem
(
0
,
portString
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment