diff --git a/src/collectioneditor.hpp b/src/collectioneditor.hpp
index 886f189bb9c4176af2e54af35394c56476b8fa4a..5b1ee45f982c422c810c385f0f78356c173bcd3e 100644
--- a/src/collectioneditor.hpp
+++ b/src/collectioneditor.hpp
@@ -50,7 +50,7 @@ QMetaObject metaObject()
 template <class T> bool CollectionEditor<T>::batchSave(const QList<T*> contacts)
 {
    bool ret = true;
-   foreach(const T* c, contacts) {
+   for(const T* c : contacts) {
       ret &= save(c);
    }
    return ret;
@@ -60,7 +60,7 @@ template <class T> bool CollectionEditor<T>::batchSave(const QList<T*> contacts)
 template <class T> bool CollectionEditor<T>::batchRemove(const QList<T*> contacts)
 {
    bool ret = true;
-   foreach(const T* c, contacts) {
+   for(const T* c : contacts) {
       ret &= remove(c);
    }
    return ret;
diff --git a/src/qtwrapper/callmanager_wrap.h b/src/qtwrapper/callmanager_wrap.h
index d5b0de717aa58b8d0b97d60f269de993ec4e6feb..302840b169bedf52d80c86efbed10799f51ce979 100644
--- a/src/qtwrapper/callmanager_wrap.h
+++ b/src/qtwrapper/callmanager_wrap.h
@@ -53,153 +53,153 @@ public:
                 [this] (const std::string &callID, const std::string &state, int code) {
                     QTimer::singleShot(0, [this,callID, state, code] {
                         LOG_DRING_SIGNAL3("callStateChanged",QString(callID.c_str()) , QString(state.c_str()) , code);
-                        emit this->callStateChanged(QString(callID.c_str()), QString(state.c_str()), code);
+                        Q_EMIT this->callStateChanged(QString(callID.c_str()), QString(state.c_str()), code);
                     });
             }),
             exportable_callback<CallSignal::TransferFailed>(
                 [this] () {
                        QTimer::singleShot(0, [this] {
                              LOG_DRING_SIGNAL("transferFailed","");
-                             emit this->transferFailed();
+                             Q_EMIT this->transferFailed();
                        });
             }),
             exportable_callback<CallSignal::TransferSucceeded>(
                 [this] () {
                        QTimer::singleShot(0, [this] {
                              LOG_DRING_SIGNAL("transferSucceeded","");
-                             emit this->transferSucceeded();
+                             Q_EMIT this->transferSucceeded();
                        });
             }),
             exportable_callback<CallSignal::RecordPlaybackStopped>(
                 [this] (const std::string &filepath) {
                        QTimer::singleShot(0, [this,filepath] {
                              LOG_DRING_SIGNAL("recordPlaybackStopped",QString(filepath.c_str()));
-                             emit this->recordPlaybackStopped(QString(filepath.c_str()));
+                             Q_EMIT this->recordPlaybackStopped(QString(filepath.c_str()));
                        });
             }),
             exportable_callback<CallSignal::VoiceMailNotify>(
                 [this] (const std::string &accountID, int count) {
                        QTimer::singleShot(0, [this,accountID, count] {
                              LOG_DRING_SIGNAL2("voiceMailNotify",QString(accountID.c_str()), count);
-                             emit this->voiceMailNotify(QString(accountID.c_str()), count);
+                             Q_EMIT this->voiceMailNotify(QString(accountID.c_str()), count);
                        });
             }),
             exportable_callback<CallSignal::IncomingMessage>(
                 [this] (const std::string &callID, const std::string &from, const std::string &message) {
                        QTimer::singleShot(0, [this,callID, from, message] {
                              LOG_DRING_SIGNAL3("incomingMessage",QString(callID.c_str()),QString(from.c_str()),QString(message.c_str()));
-                             emit this->incomingMessage(QString(callID.c_str()), QString(from.c_str()), QString(message.c_str()));
+                             Q_EMIT this->incomingMessage(QString(callID.c_str()), QString(from.c_str()), QString(message.c_str()));
                        });
             }),
             exportable_callback<CallSignal::IncomingCall>(
                 [this] (const std::string &accountID, const std::string &callID, const std::string &from) {
                        QTimer::singleShot(0, [this,accountID, callID, from] {
                              LOG_DRING_SIGNAL3("incomingCall",QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str()));
-                             emit this->incomingCall(QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str()));
+                             Q_EMIT this->incomingCall(QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str()));
                        });
             }),
             exportable_callback<CallSignal::RecordPlaybackFilepath>(
                 [this] (const std::string &callID, const std::string &filepath) {
                        QTimer::singleShot(0, [this,callID, filepath] {
                              LOG_DRING_SIGNAL2("recordPlaybackFilepath",QString(callID.c_str()), QString(filepath.c_str()));
-                             emit this->recordPlaybackFilepath(QString(callID.c_str()), QString(filepath.c_str()));
+                             Q_EMIT this->recordPlaybackFilepath(QString(callID.c_str()), QString(filepath.c_str()));
                        });
             }),
             exportable_callback<CallSignal::ConferenceCreated>(
                 [this] (const std::string &confID) {
                        QTimer::singleShot(0, [this,confID] {
                              LOG_DRING_SIGNAL("conferenceCreated",QString(confID.c_str()));
-                             emit this->conferenceCreated(QString(confID.c_str()));
+                             Q_EMIT this->conferenceCreated(QString(confID.c_str()));
                        });
             }),
             exportable_callback<CallSignal::ConferenceChanged>(
                 [this] (const std::string &confID, const std::string &state) {
                        QTimer::singleShot(0, [this,confID, state] {
                              LOG_DRING_SIGNAL2("conferenceChanged",QString(confID.c_str()), QString(state.c_str()));
-                             emit this->conferenceChanged(QString(confID.c_str()), QString(state.c_str()));
+                             Q_EMIT this->conferenceChanged(QString(confID.c_str()), QString(state.c_str()));
                        });
             }),
             exportable_callback<CallSignal::UpdatePlaybackScale>(
                 [this] (const std::string &filepath, int position, int size) {
                        QTimer::singleShot(0, [this,filepath, position, size] {
                              LOG_DRING_SIGNAL3("updatePlaybackScale",QString(filepath.c_str()), position, size);
-                             emit this->updatePlaybackScale(QString(filepath.c_str()), position, size);
+                             Q_EMIT this->updatePlaybackScale(QString(filepath.c_str()), position, size);
                        });
             }),
             exportable_callback<CallSignal::ConferenceRemoved>(
                 [this] (const std::string &confID) {
                        QTimer::singleShot(0, [this,confID] {
                              LOG_DRING_SIGNAL("conferenceRemoved",QString(confID.c_str()));
-                             emit this->conferenceRemoved(QString(confID.c_str()));
+                             Q_EMIT this->conferenceRemoved(QString(confID.c_str()));
                        });
             }),
             exportable_callback<CallSignal::NewCallCreated>(
                 [this] (const std::string &accountID, const std::string &callID, const std::string &to) {
                        QTimer::singleShot(0, [this,accountID, callID, to] {
                              LOG_DRING_SIGNAL3("newCallCreated",QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str()));
-                             emit this->newCallCreated(QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str()));
+                             Q_EMIT this->newCallCreated(QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str()));
                        });
             }),
             exportable_callback<CallSignal::RecordingStateChanged>(
                 [this] (const std::string &callID, bool recordingState) {
                        QTimer::singleShot(0, [this,callID, recordingState] {
                              LOG_DRING_SIGNAL2("recordingStateChanged",QString(callID.c_str()), recordingState);
-                             emit this->recordingStateChanged(QString(callID.c_str()), recordingState);
+                             Q_EMIT this->recordingStateChanged(QString(callID.c_str()), recordingState);
                        });
             }),
             exportable_callback<CallSignal::SecureSdesOn>(
                 [this] (const std::string &callID) {
                        QTimer::singleShot(0, [this,callID] {
                              LOG_DRING_SIGNAL("secureSdesOn",QString(callID.c_str()));
-                             emit this->secureSdesOn(QString(callID.c_str()));
+                             Q_EMIT this->secureSdesOn(QString(callID.c_str()));
                        });
             }),
             exportable_callback<CallSignal::SecureSdesOff>(
                 [this] (const std::string &callID) {
                        QTimer::singleShot(0, [this,callID] {
                              LOG_DRING_SIGNAL("secureSdesOff",QString(callID.c_str()));
-                             emit this->secureSdesOff(QString(callID.c_str()));
+                             Q_EMIT this->secureSdesOff(QString(callID.c_str()));
                        });
             }),
             exportable_callback<CallSignal::SecureZrtpOn>(
                 [this] (const std::string &callID, const std::string &cipher) {
                        QTimer::singleShot(0, [this,callID,cipher] {
                              LOG_DRING_SIGNAL2("secureZrtpOn",QString(callID.c_str()), QString(cipher.c_str()));
-                             emit this->secureZrtpOn(QString(callID.c_str()), QString(cipher.c_str()));
+                             Q_EMIT this->secureZrtpOn(QString(callID.c_str()), QString(cipher.c_str()));
                        });
             }),
             exportable_callback<CallSignal::SecureZrtpOff>(
                 [this] (const std::string &callID) {
                        QTimer::singleShot(0, [this,callID] {
-                             emit this->secureZrtpOff(QString(callID.c_str()));
+                             Q_EMIT this->secureZrtpOff(QString(callID.c_str()));
                        });
             }),
             exportable_callback<CallSignal::ShowSAS>(
                 [this] (const std::string &callID, const std::string &sas, bool verified) {
                        QTimer::singleShot(0, [this,callID, sas, verified] {
                              LOG_DRING_SIGNAL3("showSAS",QString(callID.c_str()), QString(sas.c_str()), verified);
-                             emit this->showSAS(QString(callID.c_str()), QString(sas.c_str()), verified);
+                             Q_EMIT this->showSAS(QString(callID.c_str()), QString(sas.c_str()), verified);
                        });
             }),
             exportable_callback<CallSignal::ZrtpNotSuppOther>(
                 [this] (const std::string &callID) {
                        QTimer::singleShot(0, [this,callID] {
                              LOG_DRING_SIGNAL("zrtpNotSuppOther",QString(callID.c_str()));
-                             emit this->zrtpNotSuppOther(QString(callID.c_str()));
+                             Q_EMIT this->zrtpNotSuppOther(QString(callID.c_str()));
                        });
              }),
              exportable_callback<CallSignal::ZrtpNegotiationFailed>(
                  [this] (const std::string &callID, const std::string &reason, const std::string &severity) {
                        QTimer::singleShot(0, [this,callID, reason, severity] {
                              LOG_DRING_SIGNAL3("zrtpNegotiationFailed",QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str()));
-                             emit this->zrtpNegotiationFailed(QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str()));
+                             Q_EMIT this->zrtpNegotiationFailed(QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str()));
                        });
              }),
              exportable_callback<CallSignal::RtcpReportReceived>(
                  [this] (const std::string &callID, const std::map<std::string, int>& report) {
                        QTimer::singleShot(0, [this,callID, report] {
                              LOG_DRING_SIGNAL2("onRtcpReportReceived",QString(callID.c_str()), convertStringInt(report));
-                             emit this->onRtcpReportReceived(QString(callID.c_str()), convertStringInt(report));
+                             Q_EMIT this->onRtcpReportReceived(QString(callID.c_str()), convertStringInt(report));
                        });
              })
          };
diff --git a/src/qtwrapper/configurationmanager_wrap.h b/src/qtwrapper/configurationmanager_wrap.h
index 0140137321475164c75dd02b6781bee440a8b377..5bec4a7384326bcc5a2c7db0f6b6cbab1e8c38f3 100644
--- a/src/qtwrapper/configurationmanager_wrap.h
+++ b/src/qtwrapper/configurationmanager_wrap.h
@@ -61,25 +61,25 @@ public:
             exportable_callback<ConfigurationSignal::VolumeChanged>(
                 [this] (const std::string &device, double value) {
                        QTimer::singleShot(0, [this,device,value] {
-                             emit this->volumeChanged(QString(device.c_str()), value);
+                             Q_EMIT this->volumeChanged(QString(device.c_str()), value);
                        });
             }),
             exportable_callback<ConfigurationSignal::AccountsChanged>(
                 [this] () {
                        QTimer::singleShot(0, [this] {
-                             emit this->accountsChanged();
+                             Q_EMIT this->accountsChanged();
                        });
              }),
             exportable_callback<ConfigurationSignal::StunStatusFailed>(
                 [this] (const std::string &reason) {
                        QTimer::singleShot(0, [this, reason] {
-                             emit this->stunStatusFailure(QString(reason.c_str()));
+                             Q_EMIT this->stunStatusFailure(QString(reason.c_str()));
                        });
             }),
             exportable_callback<ConfigurationSignal::RegistrationStateChanged>(
                 [this] (const std::string &accountID, const std::string& registration_state, unsigned detail_code, const std::string& detail_str) {
                        QTimer::singleShot(0, [this, accountID, registration_state, detail_code, detail_str] {
-                             emit this->registrationStateChanged(QString(accountID.c_str()),
+                             Q_EMIT this->registrationStateChanged(QString(accountID.c_str()),
                                                                 QString(registration_state.c_str()),
                                                                 detail_code,
                                                                 QString(detail_str.c_str()));
@@ -88,13 +88,13 @@ public:
             exportable_callback<ConfigurationSignal::VolatileDetailsChanged>(
                 [this] (const std::string &accountID, const std::map<std::string, std::string>& details) {
                        QTimer::singleShot(0, [this, accountID, details] {
-                         emit this->volatileAccountDetailsChanged(QString(accountID.c_str()), convertMap(details));
+                         Q_EMIT this->volatileAccountDetailsChanged(QString(accountID.c_str()), convertMap(details));
                        });
             }),
             exportable_callback<ConfigurationSignal::Error>(
                 [this] (int code) {
                        QTimer::singleShot(0, [this,code] {
-                         emit this->errorAlert(code);
+                         Q_EMIT this->errorAlert(code);
                        });
             })
         };
diff --git a/src/qtwrapper/presencemanager_wrap.h b/src/qtwrapper/presencemanager_wrap.h
index 14cbba02ee15395b5fcce7625c978ce99dd0ffa5..2c90bf9aad80381b28cbab3da45f0ee9aedcae9f 100644
--- a/src/qtwrapper/presencemanager_wrap.h
+++ b/src/qtwrapper/presencemanager_wrap.h
@@ -52,25 +52,25 @@ public:
             exportable_callback<PresenceSignal::NewServerSubscriptionRequest>(
                 [this] (const std::string &buddyUri) {
                        QTimer::singleShot(0, [this,buddyUri] {
-                             emit this->newServerSubscriptionRequest(QString(buddyUri.c_str()));
+                             Q_EMIT this->newServerSubscriptionRequest(QString(buddyUri.c_str()));
                        });
             }),
             exportable_callback<PresenceSignal::ServerError>(
                 [this] (const std::string &accountID, const std::string &error, const std::string &msg) {
                        QTimer::singleShot(0, [this,accountID, error, msg] {
-                             emit this->serverError(QString(accountID.c_str()), QString(error.c_str()), QString(msg.c_str()));
+                             Q_EMIT this->serverError(QString(accountID.c_str()), QString(error.c_str()), QString(msg.c_str()));
                        });
             }),
             exportable_callback<PresenceSignal::NewBuddyNotification>(
                 [this] (const std::string &accountID, const std::string &buddyUri, bool status, const std::string &lineStatus) {
                        QTimer::singleShot(0, [this,accountID, buddyUri, status, lineStatus] {
-                             emit this->newBuddyNotification(QString(accountID.c_str()), QString(buddyUri.c_str()), status, QString(lineStatus.c_str()));
+                             Q_EMIT this->newBuddyNotification(QString(accountID.c_str()), QString(buddyUri.c_str()), status, QString(lineStatus.c_str()));
                        });
             }),
             exportable_callback<PresenceSignal::SubscriptionStateChanged>(
                 [this] (const std::string &accountID, const std::string &buddyUri, bool state) {
                        QTimer::singleShot(0, [this,accountID, buddyUri, state] {
-                             emit this->subscriptionStateChanged(QString(accountID.c_str()), QString(buddyUri.c_str()), state);
+                             Q_EMIT this->subscriptionStateChanged(QString(accountID.c_str()), QString(buddyUri.c_str()), state);
                        });
             })
          };