summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex.blasche@nokia.com>2012-06-27 13:59:25 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-02 00:52:36 +0200
commit5ba88d4d52e559a58a8349afdc30f06e55aa7f39 (patch)
treed6aa2244710ef6d288783bcaceaebf7df4f9b830
parent0bd051858ee996caa14180ebcdca75e402c2bd93 (diff)
Rename getter functions for QBluetoothHostInfo
The previous name was not compliant with Qt naming standard. QBluetoothHostInfo::getAddress() -> address() QBluetoothHostInfo::getName() -> name() Change-Id: Ia130687c456e3ded398e685846a41de7ebb908e9 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com> Reviewed-by: Michael Zanetti <michael.zanetti@nokia.com>
-rw-r--r--src/bluetooth/qbluetoothhostinfo.cpp6
-rw-r--r--src/bluetooth/qbluetoothhostinfo.h4
-rw-r--r--tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp32
3 files changed, 21 insertions, 21 deletions
diff --git a/src/bluetooth/qbluetoothhostinfo.cpp b/src/bluetooth/qbluetoothhostinfo.cpp
index d85f87c3..9057c23f 100644
--- a/src/bluetooth/qbluetoothhostinfo.cpp
+++ b/src/bluetooth/qbluetoothhostinfo.cpp
@@ -86,7 +86,7 @@ QBluetoothHostInfo::~QBluetoothHostInfo()
/*!
Returns the Bluetooth address as a QBluetoothAddress.
*/
-QBluetoothAddress QBluetoothHostInfo::getAddress() const
+QBluetoothAddress QBluetoothHostInfo::address() const
{
Q_D(const QBluetoothHostInfo);
return d->m_address;
@@ -102,9 +102,9 @@ void QBluetoothHostInfo::setAddress(const QBluetoothAddress &address)
}
/*!
- Returns the name of the host info object.
+ Returns the user visible name of the host info object.
*/
-QString QBluetoothHostInfo::getName() const
+QString QBluetoothHostInfo::name() const
{
Q_D(const QBluetoothHostInfo);
return d->m_name;
diff --git a/src/bluetooth/qbluetoothhostinfo.h b/src/bluetooth/qbluetoothhostinfo.h
index 25655f1d..96ec4ffa 100644
--- a/src/bluetooth/qbluetoothhostinfo.h
+++ b/src/bluetooth/qbluetoothhostinfo.h
@@ -57,10 +57,10 @@ public:
QBluetoothHostInfo(const QBluetoothHostInfo &other);
~QBluetoothHostInfo();
- QBluetoothAddress getAddress() const;
+ QBluetoothAddress address() const;
void setAddress(const QBluetoothAddress &address);
- QString getName() const;
+ QString name() const;
void setName(const QString &name);
private:
diff --git a/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp b/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
index 37543d9a..d249cc84 100644
--- a/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
+++ b/tests/auto/qbluetoothhostinfo/tst_qbluetoothhostinfo.cpp
@@ -84,10 +84,10 @@ void tst_QBluetoothHostInfo::tst_address()
QCOMPARE(address.toString(), addressString);
QBluetoothHostInfo info;
- QBluetoothAddress result = info.getAddress();
+ QBluetoothAddress result = info.address();
QVERIFY(result.isNull());
info.setAddress(address);
- QCOMPARE(info.getAddress().toString(), addressString);
+ QCOMPARE(info.address().toString(), addressString);
}
@@ -106,12 +106,12 @@ void tst_QBluetoothHostInfo::tst_name()
QFETCH(QString, name);
QBluetoothHostInfo info;
- QString result = info.getName();
+ QString result = info.name();
QVERIFY(result.isNull());
QVERIFY(result.isEmpty());
info.setName(name);
- QCOMPARE(info.getName(), name);
+ QCOMPARE(info.name(), name);
}
void tst_QBluetoothHostInfo::tst_name_data()
@@ -151,24 +151,24 @@ void tst_QBluetoothHostInfo::tst_construction()
QBluetoothAddress addr(btAddress);
setter.setName(name);
setter.setAddress(addr);
- QCOMPARE(setter.getName(), name);
- QCOMPARE(setter.getAddress().toString(), btAddress);
- QCOMPARE(setter.getAddress().isNull(), !validBtAddress);
+ QCOMPARE(setter.name(), name);
+ QCOMPARE(setter.address().toString(), btAddress);
+ QCOMPARE(setter.address().isNull(), !validBtAddress);
setter.setAddress(empty);
- QCOMPARE(setter.getName(), name);
- QCOMPARE(setter.getAddress().toString(), QString("00:00:00:00:00:00"));
- QCOMPARE(setter.getAddress().isNull(), true);
+ QCOMPARE(setter.name(), name);
+ QCOMPARE(setter.address().toString(), QString("00:00:00:00:00:00"));
+ QCOMPARE(setter.address().isNull(), true);
setter.setName(QString());
- QCOMPARE(setter.getName(), QString());
- QCOMPARE(setter.getAddress().toString(), QString("00:00:00:00:00:00"));
- QCOMPARE(setter.getAddress().isNull(), true);
+ QCOMPARE(setter.name(), QString());
+ QCOMPARE(setter.address().toString(), QString("00:00:00:00:00:00"));
+ QCOMPARE(setter.address().isNull(), true);
setter.setAddress(addr);
- QCOMPARE(setter.getName(), QString());
- QCOMPARE(setter.getAddress().toString(), btAddress);
- QCOMPARE(setter.getAddress().isNull(), !validBtAddress);
+ QCOMPARE(setter.name(), QString());
+ QCOMPARE(setter.address().toString(), btAddress);
+ QCOMPARE(setter.address().isNull(), !validBtAddress);
}
QTEST_MAIN(tst_QBluetoothHostInfo)