]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/versioncontrol/versioncontrolobserver.cpp
DolphinView: set the parent of layout in the ctor
[dolphin.git] / src / views / versioncontrol / versioncontrolobserver.cpp
index 7cf78c8aaa6914bf24fcb54b9a673199d9ffb32f..c66c639c87fbdd86b92aec1edf01966d546c6fbb 100644 (file)
@@ -97,7 +97,7 @@ DolphinView* VersionControlObserver::view() const
 QList<QAction*> VersionControlObserver::actions(const KFileItemList& items) const
 {
     bool hasNullItems = false;
-    foreach (const KFileItem& item, items) {
+    for (const KFileItem& item : items) {
         if (item.isNull()) {
             qCWarning(DolphinDebug) << "Requesting version-control-actions for empty items";
             hasNullItems = true;
@@ -189,7 +189,7 @@ void VersionControlObserver::slotThreadFinished()
     for (; it != itemStates.constEnd(); ++it) {
         const QVector<ItemState>& items = it.value();
 
-        foreach (const ItemState& item, items) {
+        for (const ItemState& item : items) {
             const KFileItem& fileItem = item.first;
             const KVersionControlPlugin::ItemVersion version = item.second;
             QHash<QByteArray, QVariant> values;
@@ -202,7 +202,7 @@ void VersionControlObserver::slotThreadFinished()
         // Using an empty message results in clearing the previously shown information message and showing
         // the default status bar information. This is useful as the user already gets feedback that the
         // operation has been completed because of the icon emblems.
-        emit operationCompletedMessage(QString());
+        Q_EMIT operationCompletedMessage(QString());
     }
 
     if (m_pendingItemStatesUpdate) {
@@ -226,7 +226,7 @@ void VersionControlObserver::updateItemStates()
 
     if (!itemStates.isEmpty()) {
         if (!m_silentUpdate) {
-            emit infoMessage(i18nc("@info:status", "Updating version information..."));
+            Q_EMIT infoMessage(i18nc("@info:status", "Updating version information..."));
         }
         m_updateItemStatesThread = new UpdateItemStatesThread(m_plugin, itemStates);
         connect(m_updateItemStatesThread, &UpdateItemStatesThread::finished,