aboutsummaryrefslogtreecommitdiff
path: root/libcontextprovider
diff options
context:
space:
mode:
authorDavid King <davidk@openismus.com>2009-12-18 13:50:42 +0100
committerDavid King <davidk@openismus.com>2009-12-18 15:34:26 +0100
commitb9eea16a2cc509ecf9b2a00a8aef37efa1067969 (patch)
tree13dbade3f524a49363a3b693bc755192a20f22a1 /libcontextprovider
parent8e7997e9e28cfecb73c1035aa3a55f5fbe4c1330 (diff)
Replace Qt keyword-like macros with ALLCAPS macros
Diffstat (limited to 'libcontextprovider')
-rw-r--r--libcontextprovider/context-provide/commandwatcher.cpp14
-rw-r--r--libcontextprovider/context-provide/commandwatcher.h2
-rw-r--r--libcontextprovider/context-provide/propertyproxy.h2
-rw-r--r--libcontextprovider/customer-tests/client/commandwatcher.cpp6
-rw-r--r--libcontextprovider/customer-tests/client/commandwatcher.h2
-rw-r--r--libcontextprovider/customer-tests/service/servicetest.h4
-rw-r--r--libcontextprovider/customer-tests/subscription/subscriptiontests.h4
-rw-r--r--libcontextprovider/customer-tests/types/typestests.h4
-rw-r--r--libcontextprovider/customer-tests/value-changes/valuechangestests.h4
-rw-r--r--libcontextprovider/src/contextc.cpp2
-rw-r--r--libcontextprovider/src/group.cpp4
-rw-r--r--libcontextprovider/src/group.h4
-rw-r--r--libcontextprovider/src/listeners.cpp4
-rw-r--r--libcontextprovider/src/listeners.h2
-rw-r--r--libcontextprovider/src/property.h2
-rw-r--r--libcontextprovider/src/propertyadaptor.h6
-rw-r--r--libcontextprovider/src/propertyprivate.cpp6
-rw-r--r--libcontextprovider/src/propertyprivate.h2
-rw-r--r--libcontextprovider/src/servicebackend.cpp4
-rw-r--r--libcontextprovider/unit-tests/contextc/contextcunittest.cpp18
-rw-r--r--libcontextprovider/unit-tests/contextc/group.h2
-rw-r--r--libcontextprovider/unit-tests/contextc/property.h2
-rw-r--r--libcontextprovider/unit-tests/contextgroup/contextgroupunittest.cpp14
-rw-r--r--libcontextprovider/unit-tests/contextgroup/property.h2
-rw-r--r--libcontextprovider/unit-tests/property/manager.h2
-rw-r--r--libcontextprovider/unit-tests/property/property.h2
-rw-r--r--libcontextprovider/unit-tests/property/propertyprivate.h2
-rw-r--r--libcontextprovider/unit-tests/property/propertyunittest.cpp6
-rw-r--r--libcontextprovider/unit-tests/service/serviceunittest.cpp2
-rw-r--r--libcontextprovider/unit-tests/servicebackend/servicebackendunittest.cpp2
30 files changed, 66 insertions, 66 deletions
diff --git a/libcontextprovider/context-provide/commandwatcher.cpp b/libcontextprovider/context-provide/commandwatcher.cpp
index 8c9ce950..6f2537d8 100644
--- a/libcontextprovider/context-provide/commandwatcher.cpp
+++ b/libcontextprovider/context-provide/commandwatcher.cpp
@@ -64,19 +64,19 @@ CommandWatcher::CommandWatcher(QString bn, QDBusConnection::BusType bt, int comm
CommandWatcher::~CommandWatcher()
{
- foreach(Property *p, properties)
+ Q_FOREACH(Property *p, properties)
delete p;
- foreach(PropertyProxy *p, proxies)
+ Q_FOREACH(PropertyProxy *p, proxies)
delete p;
}
void CommandWatcher::onRegistryChanged()
{
- foreach (PropertyProxy *p, proxies)
+ Q_FOREACH (PropertyProxy *p, proxies)
delete p;
proxies.clear();
// (Re)create the proxies and restore the user's will of overriding.
- foreach (QString key, registryInfo->listKeys()) {
+ Q_FOREACH (QString key, registryInfo->listKeys()) {
if (ContextPropertyInfo(key).provided()) {
qDebug() << "creating proxy for" << key;
proxies.insert(key, new PropertyProxy(key, !properties.contains(key),
@@ -100,7 +100,7 @@ void CommandWatcher::onActivated()
while ((nextSeparator = commandBuffer.indexOf('\n')) != -1) {
// split lines to separate commands by semicolons
QStringList commands = QString::fromUtf8(commandBuffer.constData()).left(nextSeparator).split(";");
- foreach (QString command, commands)
+ Q_FOREACH (QString command, commands)
interpret(command.trimmed());
commandBuffer.remove(0, nextSeparator + 1);
}
@@ -269,7 +269,7 @@ void CommandWatcher::delCommand(const QStringList &args)
void CommandWatcher::listCommand()
{
- foreach (QString key,
+ Q_FOREACH (QString key,
QSet<QString>::fromList(properties.keys()) +
QSet<QString>::fromList(proxies.keys()))
infoCommand(QStringList(key));
@@ -349,7 +349,7 @@ void CommandWatcher::dumpCommand(const QStringList &args)
QString bType = (busType == QDBusConnection::SystemBus) ? "system" : "session";
xml << "<?xml version=\"1.0\"?>\n";
xml << QString("<provider bus=\"%1\" service=\"%2\">\n").arg(bType).arg(busName);
- foreach(QString key, properties.keys()) {
+ Q_FOREACH(QString key, properties.keys()) {
xml << QString(" <key name=\"%1\">\n").arg(key);
xml << " <type>\n";
xml << types[key].dumpXML(3);
diff --git a/libcontextprovider/context-provide/commandwatcher.h b/libcontextprovider/context-provide/commandwatcher.h
index 9b5422f9..9f194c7c 100644
--- a/libcontextprovider/context-provide/commandwatcher.h
+++ b/libcontextprovider/context-provide/commandwatcher.h
@@ -73,7 +73,7 @@ private:
QDBusConnection::BusType busType;
bool started;
-private slots:
+private Q_SLOTS:
void onActivated();
void onRegistryChanged();
};
diff --git a/libcontextprovider/context-provide/propertyproxy.h b/libcontextprovider/context-provide/propertyproxy.h
index f185f2ad..7e93542a 100644
--- a/libcontextprovider/context-provide/propertyproxy.h
+++ b/libcontextprovider/context-provide/propertyproxy.h
@@ -33,7 +33,7 @@ public:
void enable(bool enable);
QVariant realValue() const;
QString type() const;
-private slots:
+private Q_SLOTS:
void onValueChanged();
private:
ContextProvider::Property *provider;
diff --git a/libcontextprovider/customer-tests/client/commandwatcher.cpp b/libcontextprovider/customer-tests/client/commandwatcher.cpp
index 72b95ceb..27d7a6eb 100644
--- a/libcontextprovider/customer-tests/client/commandwatcher.cpp
+++ b/libcontextprovider/customer-tests/client/commandwatcher.cpp
@@ -38,7 +38,7 @@ void CommandWatcher::onActivated()
while ((nextSeparator = commandBuffer.indexOf('\n')) != -1) {
// split lines to separate commands by semicolons
QStringList commands = QString::fromUtf8(commandBuffer.constData()).left(nextSeparator).split(";");
- foreach (QString command, commands)
+ Q_FOREACH (QString command, commands)
interpret(command.trimmed());
commandBuffer.remove(0, nextSeparator + 1);
}
@@ -230,7 +230,7 @@ void CommandWatcher::waitForChanged(int timeout)
if (changedSignalReceived) {
out << "ValueChanged: ";
- foreach (QString param, changedSignalParameters)
+ Q_FOREACH (QString param, changedSignalParameters)
out << param << " ";
out << endl;
}
@@ -245,7 +245,7 @@ void CommandWatcher::onValueChanged(QList<QVariant> value, quint64 timestamp, QD
{
changedSignalReceived = true;
QPair<QString, QString> connData;
- foreach (connData, connectionMap)
+ Q_FOREACH (connData, connectionMap)
{
QDBusReply<QString> reply = QDBusConnection::sessionBus().interface()->serviceOwner(connData.second);
if (reply.value() == msg.service())
diff --git a/libcontextprovider/customer-tests/client/commandwatcher.h b/libcontextprovider/customer-tests/client/commandwatcher.h
index 2b251c79..7f5e515a 100644
--- a/libcontextprovider/customer-tests/client/commandwatcher.h
+++ b/libcontextprovider/customer-tests/client/commandwatcher.h
@@ -36,7 +36,7 @@ private:
bool listenToChanged(const QString& name);
QString keyToPath(QString key);
-private slots:
+private Q_SLOTS:
void onActivated();
void onValueChanged(QList<QVariant> value, quint64 timestamp, QDBusMessage msg);
diff --git a/libcontextprovider/customer-tests/service/servicetest.h b/libcontextprovider/customer-tests/service/servicetest.h
index 6756cf61..6fccee70 100644
--- a/libcontextprovider/customer-tests/service/servicetest.h
+++ b/libcontextprovider/customer-tests/service/servicetest.h
@@ -11,7 +11,7 @@ class ServiceTest : public QObject
QProcess *client;
bool isReadyToRead;
-private slots:
+private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void init();
@@ -23,7 +23,7 @@ private slots:
void defaultService();
void recreateProperty();
-public slots:
+public Q_SLOTS:
void readStandardOutput();
private:
diff --git a/libcontextprovider/customer-tests/subscription/subscriptiontests.h b/libcontextprovider/customer-tests/subscription/subscriptiontests.h
index ce558978..2f568936 100644
--- a/libcontextprovider/customer-tests/subscription/subscriptiontests.h
+++ b/libcontextprovider/customer-tests/subscription/subscriptiontests.h
@@ -23,7 +23,7 @@ private:
QProcess *client;
bool isReadyToRead;
-private slots:
+private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void init();
@@ -37,7 +37,7 @@ private slots:
void multiSubscribe();
void illegalUnsubscribe();
-public slots:
+public Q_SLOTS:
void readStandardOutput();
private:
diff --git a/libcontextprovider/customer-tests/types/typestests.h b/libcontextprovider/customer-tests/types/typestests.h
index 64e67406..4defdd62 100644
--- a/libcontextprovider/customer-tests/types/typestests.h
+++ b/libcontextprovider/customer-tests/types/typestests.h
@@ -28,7 +28,7 @@ private:
QProcess *client;
bool isReadyToRead;
-private slots:
+private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void init();
@@ -37,7 +37,7 @@ private slots:
void typesInReturnValueOfSubscribe();
void typesInChangeSignal();
-public slots:
+public Q_SLOTS:
void readStandardOutput();
private:
diff --git a/libcontextprovider/customer-tests/value-changes/valuechangestests.h b/libcontextprovider/customer-tests/value-changes/valuechangestests.h
index 63746f20..92b5df32 100644
--- a/libcontextprovider/customer-tests/value-changes/valuechangestests.h
+++ b/libcontextprovider/customer-tests/value-changes/valuechangestests.h
@@ -23,7 +23,7 @@ private:
QString writeToClient(const char* input);
-private slots:
+private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void init();
@@ -37,7 +37,7 @@ private slots:
void changesBetweenZeroAndUnknown();
-public slots:
+public Q_SLOTS:
void readStandardOutput();
};
diff --git a/libcontextprovider/src/contextc.cpp b/libcontextprovider/src/contextc.cpp
index 2125479a..71592286 100644
--- a/libcontextprovider/src/contextc.cpp
+++ b/libcontextprovider/src/contextc.cpp
@@ -130,7 +130,7 @@ void context_provider_stop (void)
// Delete all listeners
if (listeners) {
- foreach (Listener *listener, *listeners)
+ Q_FOREACH (Listener *listener, *listeners)
delete listener;
}
delete listeners; listeners = NULL;
diff --git a/libcontextprovider/src/group.cpp b/libcontextprovider/src/group.cpp
index 16fe8166..63542d09 100644
--- a/libcontextprovider/src/group.cpp
+++ b/libcontextprovider/src/group.cpp
@@ -102,7 +102,7 @@ void Group::onFirstSubscriberAppeared()
++(priv->propertiesSubscribedTo);
if (priv->propertiesSubscribedTo == 1) {
contextDebug() << F_GROUP << F_SIGNALS << "First subscriber appeared for group";
- emit firstSubscriberAppeared();
+ Q_EMIT firstSubscriberAppeared();
}
}
@@ -112,7 +112,7 @@ void Group::onLastSubscriberDisappeared()
--(priv->propertiesSubscribedTo);
if (priv->propertiesSubscribedTo == 0) {
contextDebug() << F_GROUP << F_SIGNALS << "Last subscriber gone for group";
- emit lastSubscriberDisappeared();
+ Q_EMIT lastSubscriberDisappeared();
}
}
diff --git a/libcontextprovider/src/group.h b/libcontextprovider/src/group.h
index 9969a6e7..a6ab38e2 100644
--- a/libcontextprovider/src/group.h
+++ b/libcontextprovider/src/group.h
@@ -52,7 +52,7 @@ public:
inline Group &operator<<(const Property *prop)
{ add(*prop); return *this; }
-signals:
+Q_SIGNALS:
/// Emitted when the group of Context objects is subscribed
/// to. I.e., when none of them were subscribed to and now some of
/// them were subscribed to.
@@ -63,7 +63,7 @@ signals:
/// them were unsubscribed from.
void lastSubscriberDisappeared();
-private slots:
+private Q_SLOTS:
void onFirstSubscriberAppeared();
void onLastSubscriberDisappeared();
diff --git a/libcontextprovider/src/listeners.cpp b/libcontextprovider/src/listeners.cpp
index 8c200b7c..8a04a474 100644
--- a/libcontextprovider/src/listeners.cpp
+++ b/libcontextprovider/src/listeners.cpp
@@ -61,7 +61,7 @@ GroupListener::GroupListener(Service &service, const QStringList &keys,
bool clears, ContextProviderSubscriptionChangedCallback cb, void *dt)
: Listener(clears, cb, dt)
{
- foreach (const QString &key, keys)
+ Q_FOREACH (const QString &key, keys)
group << new Property(service, key, this);
sconnect(&group, SIGNAL(firstSubscriberAppeared()), this, SLOT(onFirstSubscriberAppeared()));
sconnect(&group, SIGNAL(lastSubscriberDisappeared()), this, SLOT(onLastSubscriberDisappeared()));
@@ -69,7 +69,7 @@ GroupListener::GroupListener(Service &service, const QStringList &keys,
void GroupListener::clear()
{
- foreach(const Property *p, group.getProperties())
+ Q_FOREACH(const Property *p, group.getProperties())
((Property *)p)->unsetValue();
}
diff --git a/libcontextprovider/src/listeners.h b/libcontextprovider/src/listeners.h
index db561eb8..95416846 100644
--- a/libcontextprovider/src/listeners.h
+++ b/libcontextprovider/src/listeners.h
@@ -44,7 +44,7 @@ class Listener : public QObject
public:
Listener(bool clears, ContextProviderSubscriptionChangedCallback cb, void *dt);
-private slots:
+private Q_SLOTS:
void onFirstSubscriberAppeared();
void onLastSubscriberDisappeared();
diff --git a/libcontextprovider/src/property.h b/libcontextprovider/src/property.h
index 788a270d..40e9e001 100644
--- a/libcontextprovider/src/property.h
+++ b/libcontextprovider/src/property.h
@@ -56,7 +56,7 @@ private:
PropertyPrivate *priv; ///< Private implementation
void init(ServiceBackend *serviceBackend, const QString &key);
-signals:
+Q_SIGNALS:
/// This is emitted when the first subscriber appears for this
/// Property. It can be used e.g. to start the actual process of
/// harvesting the data needed for this Property.
diff --git a/libcontextprovider/src/propertyadaptor.h b/libcontextprovider/src/propertyadaptor.h
index 60d741ab..cb0743bb 100644
--- a/libcontextprovider/src/propertyadaptor.h
+++ b/libcontextprovider/src/propertyadaptor.h
@@ -44,15 +44,15 @@ public:
QString objectPath() const;
void forgetClients();
-public slots:
+public Q_SLOTS:
void Subscribe(const QDBusMessage& msg, QVariantList& values, quint64& timestamp);
void Unsubscribe(const QDBusMessage& msg);
void Get(QVariantList& values, quint64& timestamp);
-signals:
+Q_SIGNALS:
void ValueChanged(const QVariantList &values, const quint64& timestamp);
-private slots:
+private Q_SLOTS:
void onServiceOwnerChanged(const QString&, const QString&, const QString&);
void onValueChanged(QVariantList values, quint64 timestamp);
diff --git a/libcontextprovider/src/propertyprivate.cpp b/libcontextprovider/src/propertyprivate.cpp
index 57d6cf3e..a59566d6 100644
--- a/libcontextprovider/src/propertyprivate.cpp
+++ b/libcontextprovider/src/propertyprivate.cpp
@@ -107,7 +107,7 @@ void PropertyPrivate::emitValue()
if (value.isNull() == false) {
values << value;
}
- emit valueChanged(values, timestamp);
+ Q_EMIT valueChanged(values, timestamp);
}
/// Set the PropertyPrivate to subscribed state. If it was in the
@@ -117,7 +117,7 @@ void PropertyPrivate::setSubscribed()
{
if (subscribed == false) {
subscribed = true;
- emit firstSubscriberAppeared(key);
+ Q_EMIT firstSubscriberAppeared(key);
}
}
@@ -128,7 +128,7 @@ void PropertyPrivate::setUnsubscribed()
{
if (subscribed == true) {
subscribed = false;
- emit lastSubscriberDisappeared(key);
+ Q_EMIT lastSubscriberDisappeared(key);
}
}
diff --git a/libcontextprovider/src/propertyprivate.h b/libcontextprovider/src/propertyprivate.h
index f8bb7c97..efe6807b 100644
--- a/libcontextprovider/src/propertyprivate.h
+++ b/libcontextprovider/src/propertyprivate.h
@@ -44,7 +44,7 @@ public:
void setSubscribed();
void setUnsubscribed();
-signals:
+Q_SIGNALS:
void valueChanged(const QVariantList& values, const quint64& timestamp);
void firstSubscriberAppeared(const QString& key);
void lastSubscriberDisappeared(const QString& key);
diff --git a/libcontextprovider/src/servicebackend.cpp b/libcontextprovider/src/servicebackend.cpp
index caa2e4d2..9b59de93 100644
--- a/libcontextprovider/src/servicebackend.cpp
+++ b/libcontextprovider/src/servicebackend.cpp
@@ -139,7 +139,7 @@ bool ServiceBackend::start()
contextDebug() << F_SERVICE_BACKEND << "Starting service for bus:" << busName;
// Re-register existing Property objects on D-Bus
- foreach (const QString& key, properties.keys()) {
+ Q_FOREACH (const QString& key, properties.keys()) {
contextDebug() << F_SERVICE_BACKEND << "Re-registering" << key;
if (!registerProperty(key, properties[key])) {
return false;
@@ -173,7 +173,7 @@ void ServiceBackend::stop()
// PropertyAdaptor objects to forget their subscriptions (if the
// service is started again, clients will resubscribe).
- foreach (PropertyAdaptor* adaptor, createdAdaptors) {
+ Q_FOREACH (PropertyAdaptor* adaptor, createdAdaptors) {
adaptor->forgetClients();
connection.unregisterObject(adaptor->objectPath());
}
diff --git a/libcontextprovider/unit-tests/contextc/contextcunittest.cpp b/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
index 11d1bbde..c04fad72 100644
--- a/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
+++ b/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
@@ -64,12 +64,12 @@ QSet<const Property *> Group::getProperties()
void Group::fakeFirst()
{
- emit firstSubscriberAppeared();
+ Q_EMIT firstSubscriberAppeared();
}
void Group::fakeLast()
{
- emit lastSubscriberDisappeared();
+ Q_EMIT lastSubscriberDisappeared();
}
/* Mocked implementation of Property */
@@ -82,12 +82,12 @@ void resetVariants()
void emitFirstOn(const QString &k)
{
- foreach (Property* c, propertyList) {
+ Q_FOREACH (Property* c, propertyList) {
if (c->getKey() == k)
c->fakeFirst();
}
- foreach (Group* cg, groupList) {
+ Q_FOREACH (Group* cg, groupList) {
if (cg->keyList.contains(k))
cg->fakeFirst();
}
@@ -95,12 +95,12 @@ void emitFirstOn(const QString &k)
void emitLastOn(const QString &k)
{
- foreach (Property* c, propertyList) {
+ Q_FOREACH (Property* c, propertyList) {
if (c->getKey() == k)
c->fakeLast();
}
- foreach (Group* cg, groupList) {
+ Q_FOREACH (Group* cg, groupList) {
if (cg->keyList.contains(k))
cg->fakeLast();
}
@@ -174,19 +174,19 @@ const QString Property::getKey() const
void Property::fakeFirst()
{
- emit firstSubscriberAppeared(key);
+ Q_EMIT firstSubscriberAppeared(key);
}
void Property::fakeLast()
{
- emit lastSubscriberDisappeared(key);
+ Q_EMIT lastSubscriberDisappeared(key);
}
class ContextCUnitTest : public QObject
{
Q_OBJECT
-private slots:
+private Q_SLOTS:
void init();
void startStopStart();
void installKey();
diff --git a/libcontextprovider/unit-tests/contextc/group.h b/libcontextprovider/unit-tests/contextc/group.h
index 1a3e7b5d..278b0171 100644
--- a/libcontextprovider/unit-tests/contextc/group.h
+++ b/libcontextprovider/unit-tests/contextc/group.h
@@ -52,7 +52,7 @@ public:
inline Group &operator<<(const Property *prop)
{ add(*prop); return *this; }
-signals:
+Q_SIGNALS:
void firstSubscriberAppeared();
void lastSubscriberDisappeared();
diff --git a/libcontextprovider/unit-tests/contextc/property.h b/libcontextprovider/unit-tests/contextc/property.h
index 9f0073c8..178cd2d4 100644
--- a/libcontextprovider/unit-tests/contextc/property.h
+++ b/libcontextprovider/unit-tests/contextc/property.h
@@ -52,7 +52,7 @@ public:
void fakeFirst();
void fakeLast();
-signals:
+Q_SIGNALS:
void firstSubscriberAppeared(const QString &key);
void lastSubscriberDisappeared(const QString &key);
diff --git a/libcontextprovider/unit-tests/contextgroup/contextgroupunittest.cpp b/libcontextprovider/unit-tests/contextgroup/contextgroupunittest.cpp
index 01fb034a..fce9cf4f 100644
--- a/libcontextprovider/unit-tests/contextgroup/contextgroupunittest.cpp
+++ b/libcontextprovider/unit-tests/contextgroup/contextgroupunittest.cpp
@@ -56,7 +56,7 @@ class ContextGroupUnitTest : public QObject
{
Q_OBJECT
-private slots:
+private Q_SLOTS:
void init();
void cleanup();
@@ -105,7 +105,7 @@ void ContextGroupUnitTest::oneProperty()
QCOMPARE(contextGroup->isSubscribedTo(), false);
// Test: property is subscribed to
- emit property1->firstSubscriberAppeared("test.key.1");
+ Q_EMIT property1->firstSubscriberAppeared("test.key.1");
// Expected result: the Group emits the firstSubscriberAppeared signal
QCOMPARE(firstSpy.count(), 1);
@@ -114,7 +114,7 @@ void ContextGroupUnitTest::oneProperty()
QCOMPARE(contextGroup->isSubscribedTo(), true);
// Test: property is unsubscribed from
- emit property1->lastSubscriberDisappeared("test.key.1");
+ Q_EMIT property1->lastSubscriberDisappeared("test.key.1");
// Expected result: the Group emits the lastSubscriberDisappeared signal
QCOMPARE(firstSpy.count(), 1);
@@ -134,7 +134,7 @@ void ContextGroupUnitTest::twoProperties()
QSignalSpy lastSpy(contextGroup, SIGNAL(lastSubscriberDisappeared()));
// Test: property 1 is subscribed to
- emit property1->firstSubscriberAppeared("test.key.1");
+ Q_EMIT property1->firstSubscriberAppeared("test.key.1");
// Expected result: the Group emits the firstSubscriberAppeared signal
QCOMPARE(firstSpy.count(), 1);
@@ -143,7 +143,7 @@ void ContextGroupUnitTest::twoProperties()
QCOMPARE(contextGroup->isSubscribedTo(), true);
// Test: property 2 is subscribed to
- emit property2->firstSubscriberAppeared("test.key.2");
+ Q_EMIT property2->firstSubscriberAppeared("test.key.2");
// Expected result: the Group doesn't emit anything
QCOMPARE(firstSpy.count(), 1);
@@ -152,7 +152,7 @@ void ContextGroupUnitTest::twoProperties()
QCOMPARE(contextGroup->isSubscribedTo(), true);
// Test: property 1 is unsubscribed from
- emit property1->lastSubscriberDisappeared("test.key.1");
+ Q_EMIT property1->lastSubscriberDisappeared("test.key.1");
// Expected result: the Group doesn't emit anything
QCOMPARE(firstSpy.count(), 1);
@@ -161,7 +161,7 @@ void ContextGroupUnitTest::twoProperties()
QCOMPARE(contextGroup->isSubscribedTo(), true);
// Test: property 2 is unsubscribed from
- emit property2->lastSubscriberDisappeared("test.key.2");
+ Q_EMIT property2->lastSubscriberDisappeared("test.key.2");
// Expected result: the Group emits the lastSubscriberDisappeared signal
QCOMPARE(firstSpy.count(), 1);
diff --git a/libcontextprovider/unit-tests/contextgroup/property.h b/libcontextprovider/unit-tests/contextgroup/property.h
index 90c784f5..47b57e2a 100644
--- a/libcontextprovider/unit-tests/contextgroup/property.h
+++ b/libcontextprovider/unit-tests/contextgroup/property.h
@@ -39,7 +39,7 @@ public:
QString myKey;
-signals:
+Q_SIGNALS:
void firstSubscriberAppeared(const QString &key);
void lastSubscriberDisappeared(const QString &key);
diff --git a/libcontextprovider/unit-tests/property/manager.h b/libcontextprovider/unit-tests/property/manager.h
index 9aed0020..e9d4e365 100644
--- a/libcontextprovider/unit-tests/property/manager.h
+++ b/libcontextprovider/unit-tests/property/manager.h
@@ -50,7 +50,7 @@ public:
void fakeLast(const QString &key);
QStringList getKeys();
-signals:
+Q_SIGNALS:
void firstSubscriberAppeared(const QString &key);
void lastSubscriberDisappeared(const QString &key);
diff --git a/libcontextprovider/unit-tests/property/property.h b/libcontextprovider/unit-tests/property/property.h
index e887444d..1399e508 100644
--- a/libcontextprovider/unit-tests/property/property.h
+++ b/libcontextprovider/unit-tests/property/property.h
@@ -59,7 +59,7 @@ private:
PropertyPrivate *priv;
void init(ServiceBackend *serviceBackend, const QString &key);
-signals:
+Q_SIGNALS:
/// This is emitted when the first subscriber appears for this
/// Property. It can be used e.g. to start the actual process of
/// harvesting the data needed for this Property.
diff --git a/libcontextprovider/unit-tests/property/propertyprivate.h b/libcontextprovider/unit-tests/property/propertyprivate.h
index 591045e9..15e72825 100644
--- a/libcontextprovider/unit-tests/property/propertyprivate.h
+++ b/libcontextprovider/unit-tests/property/propertyprivate.h
@@ -45,7 +45,7 @@ public:
void setSubscribed();
void setUnsubscribed();
-signals:
+Q_SIGNALS:
void valueChanged(const QVariantList& values, const qlonglong& timestamp);
void firstSubscriberAppeared(const QString& key);
void lastSubscriberDisappeared(const QString& key);
diff --git a/libcontextprovider/unit-tests/property/propertyunittest.cpp b/libcontextprovider/unit-tests/property/propertyunittest.cpp
index 9ba2de78..6c920300 100644
--- a/libcontextprovider/unit-tests/property/propertyunittest.cpp
+++ b/libcontextprovider/unit-tests/property/propertyunittest.cpp
@@ -55,7 +55,7 @@ class PropertyUnitTest : public QObject
Property* battery_voltage;
Property* battery_is_charging;
-private slots:
+private Q_SLOTS:
void initTestCase();
void init();
void cleanup();
@@ -97,13 +97,13 @@ void PropertyUnitTest::checkSignals()
QSignalSpy spy2(battery_voltage, SIGNAL(lastSubscriberDisappeared(QString)));
QVERIFY(battery_voltage->priv);
- emit battery_voltage->priv->firstSubscriberAppeared("Battery.Voltage");
+ Q_EMIT battery_voltage->priv->firstSubscriberAppeared("Battery.Voltage");
QCOMPARE(spy1.count(), 1);
QList<QVariant> args1 = spy1.takeFirst();
QCOMPARE(args1.at(0).toString(), QString("Battery.Voltage"));
- emit battery_voltage->priv->lastSubscriberDisappeared("Battery.Voltage");
+ Q_EMIT battery_voltage->priv->lastSubscriberDisappeared("Battery.Voltage");
QCOMPARE(spy2.count(), 1);
QList<QVariant> args2 = spy2.takeFirst();
diff --git a/libcontextprovider/unit-tests/service/serviceunittest.cpp b/libcontextprovider/unit-tests/service/serviceunittest.cpp
index 7659367f..626b06c6 100644
--- a/libcontextprovider/unit-tests/service/serviceunittest.cpp
+++ b/libcontextprovider/unit-tests/service/serviceunittest.cpp
@@ -109,7 +109,7 @@ class ServiceUnitTest : public QObject
{
Q_OBJECT
-private slots:
+private Q_SLOTS:
void init();
void cleanup();
void sanityCheck();
diff --git a/libcontextprovider/unit-tests/servicebackend/servicebackendunittest.cpp b/libcontextprovider/unit-tests/servicebackend/servicebackendunittest.cpp
index 22cfcc35..ade99678 100644
--- a/libcontextprovider/unit-tests/servicebackend/servicebackendunittest.cpp
+++ b/libcontextprovider/unit-tests/servicebackend/servicebackendunittest.cpp
@@ -58,7 +58,7 @@ class ServiceBackendUnitTest : public QObject
{
Q_OBJECT
-private slots:
+private Q_SLOTS:
void init();
void sanity();
void defaults();