summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-04-06 17:22:28 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-27 14:03:28 +0200
commit0add3b934b8405fc5b65efeba9f05cc1dc353e64 (patch)
treed6bd577bc0e78e8629dfaed1324823f7d1a9560f
parent7da0c605d565a3634a6e3f32b73dcf1f57681340 (diff)
downloadqtserialport-0add3b934b8405fc5b65efeba9f05cc1dc353e64.tar.gz
API change: setBreak -> setBreakEnabled
setBreak(false) to disable breaks are a bad idea. clearBreak(false) to enable breaks are an even worse idea. So rename the function to setBreakEnabled(), which follows existing Qt patterns. Change-Id: I5f76afc3c9e7039b55be231f6be4d5d20ec2e537 Reviewed-by: Laszlo Papp <lpapp@kde.org>
-rw-r--r--src/serialport/qserialport.cpp2
-rw-r--r--src/serialport/qserialport.h6
2 files changed, 2 insertions, 6 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index 9548e1a..b48ba35 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -1176,7 +1176,7 @@ bool QSerialPort::sendBreak(int duration)
\sa clearBreak(), sendBreak()
*/
-bool QSerialPort::setBreak(bool set)
+bool QSerialPort::setBreakEnabled(bool set)
{
Q_D(QSerialPort);
return d->setBreak(set);
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index 76fb0ff..e035ee3 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -221,8 +221,7 @@ public:
bool waitForBytesWritten(int msecs) Q_DECL_OVERRIDE;
bool sendBreak(int duration = 0);
- bool setBreak(bool set = true);
- bool clearBreak(bool clear = true);
+ bool setBreakEnabled(bool set = true);
Q_SIGNALS:
void baudRateChanged(qint32 baudRate, QSerialPort::Directions dir);
@@ -250,9 +249,6 @@ private:
Q_DISABLE_COPY(QSerialPort)
};
-inline bool QSerialPort::clearBreak(bool clear)
-{ return setBreak(!clear); }
-
Q_DECLARE_OPERATORS_FOR_FLAGS(QSerialPort::Directions)
Q_DECLARE_OPERATORS_FOR_FLAGS(QSerialPort::PinoutSignals)