summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-02-21 22:46:19 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-23 09:31:59 +0100
commit8dc40a0a9ce84ef8e3e35437f5f4626fcbcde625 (patch)
treed433d23964d57e90a3430b11fc0523aa41412870 /examples
parent49e7ecd714ef9c6c176a234aedcaa941dc8b9888 (diff)
Assign a new method name for the port name setting API
* This is more intuitive as it is not setting the port with all its settings like baud rate, flow control, stop bits, parity, and so forth, but only the port name. * This will allow in upcoming change to establish a property for the port name along with a port name changed signal to be useful from different threads, QML, and so forth. * Clean up the documentation not to provide internal information to the end users, and also make the text a bit more concise and better readable. * Examples are also changed accordingly, to use the new API. Change-Id: Idbaa8ee2dee17c63fc0278f687ccc231c5ab670f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/blockingmaster/masterthread.cpp2
-rw-r--r--examples/blockingslave/slavethread.cpp2
-rw-r--r--examples/master/dialog.cpp2
-rw-r--r--examples/slave/dialog.cpp2
-rw-r--r--examples/slave/slavethread.cpp2
-rw-r--r--examples/terminal/mainwindow.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/examples/blockingmaster/masterthread.cpp b/examples/blockingmaster/masterthread.cpp
index 1ca38f48..061ddd6e 100644
--- a/examples/blockingmaster/masterthread.cpp
+++ b/examples/blockingmaster/masterthread.cpp
@@ -102,7 +102,7 @@ void MasterThread::run()
//![6] //! [7]
if (currentPortNameChanged) {
serial.close();
- serial.setPort(currentPortName);
+ serial.setPortName(currentPortName);
if (!serial.open(QIODevice::ReadWrite)) {
emit error(tr("Can't open %1, error code %2")
diff --git a/examples/blockingslave/slavethread.cpp b/examples/blockingslave/slavethread.cpp
index 9b49edba..a31db256 100644
--- a/examples/blockingslave/slavethread.cpp
+++ b/examples/blockingslave/slavethread.cpp
@@ -98,7 +98,7 @@ void SlaveThread::run()
//![6] //! [7]
if (currentPortNameChanged) {
serial.close();
- serial.setPort(currentPortName);
+ serial.setPortName(currentPortName);
if (!serial.open(QIODevice::ReadWrite)) {
emit error(tr("Can't open %1, error code %2")
diff --git a/examples/master/dialog.cpp b/examples/master/dialog.cpp
index 0a27575c..e3a4b66e 100644
--- a/examples/master/dialog.cpp
+++ b/examples/master/dialog.cpp
@@ -100,7 +100,7 @@ void Dialog::sendRequest()
{
if (serial.portName() != serialPortComboBox->currentText()) {
serial.close();
- serial.setPort(serialPortComboBox->currentText());
+ serial.setPortName(serialPortComboBox->currentText());
if (!serial.open(QIODevice::ReadWrite)) {
processError(tr("Can't open %1, error code %2")
diff --git a/examples/slave/dialog.cpp b/examples/slave/dialog.cpp
index ddae52a0..06a2a152 100644
--- a/examples/slave/dialog.cpp
+++ b/examples/slave/dialog.cpp
@@ -107,7 +107,7 @@ void Dialog::startSlave()
{
if (serial.portName() != serialPortComboBox->currentText()) {
serial.close();
- serial.setPort(serialPortComboBox->currentText());
+ serial.setPortName(serialPortComboBox->currentText());
if (!serial.open(QIODevice::ReadWrite)) {
processError(tr("Can't open %1, error code %2")
diff --git a/examples/slave/slavethread.cpp b/examples/slave/slavethread.cpp
index 2a32454e..a0177ffa 100644
--- a/examples/slave/slavethread.cpp
+++ b/examples/slave/slavethread.cpp
@@ -92,7 +92,7 @@ void SlaveThread::run()
if (currentPortNameChanged) {
serial.close();
- serial.setPort(currentPortName);
+ serial.setPortName(currentPortName);
if (!serial.open(QIODevice::ReadWrite)) {
emit error(tr("Can't open %1, error code %2")
diff --git a/examples/terminal/mainwindow.cpp b/examples/terminal/mainwindow.cpp
index b0e7b2c7..cde83e14 100644
--- a/examples/terminal/mainwindow.cpp
+++ b/examples/terminal/mainwindow.cpp
@@ -87,7 +87,7 @@ MainWindow::~MainWindow()
void MainWindow::openSerialPort()
{
SettingsDialog::Settings p = settings->settings();
- serial->setPort(p.name);
+ serial->setPortName(p.name);
if (serial->open(QIODevice::ReadWrite)) {
if (serial->setBaudRate(p.baudRate)
&& serial->setDataBits(p.dataBits)