| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move examples into a dedicated 'serialport' directory. This is
in line with what the other modules do, and makes sure that
the examples show up in a sensible place even for the 'combined'
source packages.
Task-number: QTBUG-30912
Change-Id: Iefa2b634df3d2eb34f655b34f6fb24a224b78869
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned in the previous change, this is necessary for those end users who
would like to explicitly know if the device on the serial port has a valid
vendor or/and product identifier.
This is now providing a nice and convenient API for having a dedicated boolean
method for making this query possible. It is a lot more readable and convenient
to use than other alternatives including the extended scope for the integer
query method and so forth. It is more explicit and clear about the intention
that one checks if the device has a valid identifier. It would be more vague
with error codes and so forth. One somewhat reasonable alternative could be
this, albeit this is also more inconvenient:
a) bool vendorIdentifier(quint16 &vendorIdentifier) const;
b) bool productIdentifier(quint16 &vendorIdentifier) const;
... as this would require an additional variable from the user, and this
could not be used with ternary operators so easily, et cetera.
There are even worse ideas like how the exceptional conversion happens in
QString and so forth, but that also requires an explicit variable or zero if one
is sure the conversion should succeed. One can pass zero in there, but that is
still inconvenient and more than passing nothing, and zero can become unclear
what it supposed to present half or one year later.
The change has been tested on Linux with Qt4 and Qt5, and cenumerator works as
expected. The documentation has been added accodingly.
Task-number: QTPLAYGROUND-21
Change-Id: I905708ce0e67307bf89d69e645462486ad869b0c
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier, by default when put a characters for the transfer, this
characters is always displayed on the console, i.e. can be said
that has always worked the local echo mode.
This led to the problem with duplication of input characters on the
console, in case if the remote device (e.g. a modem) was enabled the
echo mode by default. For example, when typing the command "AT", the
console displays "AATT".
To fix this problem, to the settings dialog was added the checkbox
"Local echo" in which can turn off the display of input characters
to the console.
Change-Id: Iebc9384bab97e313a954a8f8c00ea22129913280
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempting to choose from QComboBox the custom baud rate leads to
crash because the null pointer is returned to the QLineEdit and call
the method for setup the validator by null pointer.
Only editable combo boxes have a line edit, so trying to set a
non-editable is dereferencing a null ptr.
Change-Id: Ia9aaef64ef908b1b2d95090a203dc223d12f0b76
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API was established with a bit of insanity, namely: it returns raw strings
for the 16-bit vendor and product _numbers_. This brings lots of limitations
into the system aside from its silly nature, like how to handle lower and upper
case hex letters (a-f, A-F) and so forth.
Also, it is not clear whether the API should return zero aligned strings, or
whether or not to return the leading indicator of the hex format (0x). This is
now all being eliminated by switching to the 16-bit unsigned integer use.
There are mostly two use cases for the usage of this:
a) Comparison or mapping to find the requested port and device
This is getting very simple because it will mean a simple 16-bit
unsigned integer comparison which is cross-platform by its nature for
sure.
b) Display the string to the end user
This is for instance with an enumerator or terminal emulator
application, but in this special case the user can format the output of
the integer as wished. Then, it can easily become a cross-platform
display. Even customizing is simple enough to provide the native look'n
feel without the library forcing one particular type.
The documentation is being changed correspondingly. As for the future, if the
need even arises, the following methods could be considered for the info
provider class (QSerialPortInfo):
bool hasVendorIdentifier() const;
bool hasProductIdentifier() const;
... both can be added without any issues (i.e. in a binary compatible way).
The examples are updated now as well with presenting the usage of the new API.
The GUI emulator example got the string management a bit updated to be in line
with the console based emulator (cenumerator). In general, it is also a way more
reasonable way of putting a string together with so many placeholders. Also, the
argument and list management got a bit nicer formatting style per line break.
Testing: the change has been tested on Linux with Qt4 and Qt5.
Task-number: QTPLAYGROUND-21
Change-Id: I33683061787af94a797685794be9ebcfa90c499a
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* This is for following the convention in the Qt Project with the rest.
* This fixes examples and tests to build now as all of them are broken due to
the regression.
Change-Id: I3f4d64d97466520aea621da582a64a0d97e32136
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: Id8af629c2b488050b8accd4c552e9b0ebf366e32
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This is not a nice way, but quick of getting this feature done. For future
reference, we should most likely do something as QtCreator does for instance
with "QMAKE_SUBSTITUTES".
Change-Id: I3df23ac019552f9586aede336296079109066da1
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This makes the custom baud rate handling independent on
the index of the last entry in the QComboBox.
Change-Id: I5f0bfa148595e4312a8721a690e87e2fc36906d9
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
"git log --follow /path/to/the/file/in/question" can be used, for instance, for
the renamed files to get the whole history.
Change-Id: I20da087ca88e2c179a6c3232772fa21575e0aa6a
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: Ic19f6843d32260404f72038cf77aa6f686e7a3ff
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, the rename has to happen in a separate commit because of the
limitations of "git":
"git does not track renames of files in history, git only records tree
snapshots. It can try to guess whether a change was a rename, or just unrelated
removal+addition, when asked. You can help this by making the rename in a
different commit from a modification. See man git-log -C and -M"
... so the rename will happen in the next change.
Change-Id: Ibe56eba0a0d2c7489db48a6c519d60d3315c00de
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: I8c564f68bb32423957f2171e1c76d8a428f16eb3
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
Use the QTSERIALPORT as a term for internal variables as well to remain
consistent with the freshly chosen module name.
Change-Id: Ia780b105649b39a1eca46702466da5bc31ec5af0
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: Id6414c91a0bc700734873cd798807868865cd453
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: Id5db378b6da89f672cb55fa312e325cd1e9b88ce
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: Iab98b7146b0d4de542c099162cac11a6408ad9de
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
| |
Change-Id: I580a62dd52b4151f511042f7a382d9a4c1532fc9
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having checked all the current Playground projects. This license selection seems
to be the most appropriate according to the other playground project licenses:
https://qt.gitorious.org/qtplayground/
In fact, QtSerialPort is the only Playground project which does not have license
yet. This patch tries to amend that gap. It is going to provide more trustworthy
situation about the usage of the module to commercial customers right away.
As for now, it looks a bit undefined what license this project goes for in the
end even if it is guessable. Commercial customers (perhaps even hobbyists) would
like to make sure they can reuse this library the way, they wish (aka. No GPLvX
and so forth).
Change-Id: Ia3a4e48a5140696f749df9fb5a8391955afaa637
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
|
|
| |
Change-Id: I2f9fbf58d4b56729bc2dbe91f4b0e67ea00c374a
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
| |
Change-Id: I6cfcb40016851f6b08f41f7949162fe10665234e
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
| |
Change-Id: I24d6553410c8ccc60ef3bc1694b4f0850c03731b
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
|
| |
Change-Id: I29c1ec0a44e9631aba5d802428a67e7870f2dfc8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
| |
Change-Id: I7947ebf437a8731d68f47966c6f21cccb03d3825
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
|
| |
Change-Id: I7199c283142125af5e162373b6b146d9ee648ba9
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is probably better to show this value in the settings for the data bits since
it is probably the most common usage out there. This way 8N1 would be available
by default. Therefore, in most cases while testing or debugging the qtserialport
codebase itself, it is not even needed to go to the settings, just press
connect.
Change-Id: I2cbe2e364ef488693c5687edf7658aa722e43a78
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|
|
Change-Id: Ic68be9d0c007dfd142deef37ab931f4b68f1f692
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
|