]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Compile with QT_NO_KEYWORDS
authorAlexander Lohnau <alexander.lohnau@gmx.de>
Fri, 23 Oct 2020 17:51:33 +0000 (19:51 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Fri, 23 Oct 2020 18:23:06 +0000 (18:23 +0000)
51 files changed:
src/CMakeLists.txt
src/dolphinmainwindow.cpp
src/dolphinnewfilemenu.cpp
src/dolphinpart.cpp
src/dolphinpart_ext.cpp
src/dolphinrecenttabsmenu.cpp
src/dolphintabbar.cpp
src/dolphintabpage.cpp
src/dolphintabwidget.cpp
src/dolphinviewcontainer.cpp
src/filterbar/filterbar.cpp
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/kitemlistselectionmanager.cpp
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemmodelbase.cpp
src/kitemviews/kstandarditem.cpp
src/kitemviews/kstandarditemlistwidget.cpp
src/kitemviews/kstandarditemmodel.cpp
src/kitemviews/private/kdirectorycontentscounter.cpp
src/kitemviews/private/kdirectorycontentscounterworker.cpp
src/kitemviews/private/kfileitemclipboard.cpp
src/kitemviews/private/kfileitemmodeldirlister.cpp
src/kitemviews/private/kitemlistheaderwidget.cpp
src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
src/kitemviews/private/kitemlistroleeditor.cpp
src/kitemviews/private/kitemlistrubberband.cpp
src/kitemviews/private/kitemlistviewanimation.cpp
src/middleclickactioneventfilter.cpp
src/panels/folders/folderspanel.cpp
src/panels/information/informationpanelcontent.cpp
src/panels/information/phononwidget.cpp
src/panels/places/placesitemmodel.cpp
src/panels/places/placesitemsignalhandler.cpp
src/panels/places/placespanel.cpp
src/panels/terminal/terminalpanel.cpp
src/search/dolphinfacetswidget.cpp
src/search/dolphinsearchbox.cpp
src/settings/dolphinsettingsdialog.cpp
src/settings/serviceitemdelegate.cpp
src/settings/servicemodel.cpp
src/settings/startup/startupsettingspage.cpp
src/settings/viewmodes/dolphinfontrequester.cpp
src/settings/viewpropertiesdialog.cpp
src/statusbar/mountpointobserver.cpp
src/statusbar/spaceinfoobserver.cpp
src/trash/dolphintrash.cpp
src/views/dolphinview.cpp
src/views/dolphinviewactionhandler.cpp
src/views/versioncontrol/versioncontrolobserver.cpp
src/views/viewmodecontroller.cpp

index 8ad9b7f2050cf35bfc342582e35be56a8a89a81e..c74855df62884c42d225efe15681a451d1878441 100644 (file)
@@ -17,6 +17,7 @@ remove_definitions(
     -DQT_NO_CAST_FROM_ASCII
     -DQT_NO_CAST_TO_ASCII
     -DQT_NO_FOREACH
+    -DQT_NO_KEYWORDS
 )
 
 ##########################################
index e45ca5e3897417d0d0a9261a8a7f6732df559c3e..e755e7281708a200527ea0c2a9f520fb39534ddf 100644 (file)
@@ -306,7 +306,7 @@ void DolphinMainWindow::changeUrl(const QUrl &url)
     updateViewActions();
     updateGoActions();
 
-    emit urlChanged(url);
+    Q_EMIT urlChanged(url);
 }
 
 void DolphinMainWindow::slotTerminalDirectoryChanged(const QUrl& url)
@@ -341,7 +341,7 @@ void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection)
         compareFilesAction->setEnabled(false);
     }
 
-    emit selectionChanged(selection);
+    Q_EMIT selectionChanged(selection);
 }
 
 void DolphinMainWindow::updateHistory()
@@ -1262,7 +1262,7 @@ void DolphinMainWindow::activeViewChanged(DolphinViewContainer* viewContainer)
     updateSearchAction();
 
     const QUrl url = viewContainer->url();
-    emit urlChanged(url);
+    Q_EMIT urlChanged(url);
 }
 
 void DolphinMainWindow::tabCountChanged(int count)
@@ -2108,7 +2108,7 @@ void DolphinMainWindow::refreshViews()
         updateWindowTitle();
     }
 
-    emit settingsChanged();
+    Q_EMIT settingsChanged();
 }
 
 void DolphinMainWindow::clearStatusBar()
index bcfaebd57013f2145dc346ff38d1a214d1ba026d..f83beccdafb5c6e882b4730515108925a939b6bf 100644 (file)
@@ -25,7 +25,7 @@ DolphinNewFileMenu::~DolphinNewFileMenu()
 void DolphinNewFileMenu::slotResult(KJob* job)
 {
     if (job->error()) {
-        emit errorMessage(job->errorString());
+        Q_EMIT errorMessage(job->errorString());
     } else {
         KNewFileMenu::slotResult(job);
     }
index 7694e92f7c5e554ae90093f22d8dba1d0acc9a0e..75784b522dbc4a2fb45884b80276cd527f849c17 100644 (file)
@@ -234,7 +234,7 @@ void DolphinPart::createGoAction(const char* name, const char* iconName,
 void DolphinPart::slotGoTriggered(QAction* action)
 {
     const QString url = action->data().toString();
-    emit m_extension->openUrlRequest(QUrl(url));
+    Q_EMIT m_extension->openUrlRequest(QUrl(url));
 }
 
 void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
@@ -251,8 +251,8 @@ void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
     if (!hasSelection) {
         stateChanged(QStringLiteral("has_no_selection"));
 
-        emit m_extension->enableAction("cut", false);
-        emit m_extension->enableAction("copy", false);
+        Q_EMIT m_extension->enableAction("cut", false);
+        Q_EMIT m_extension->enableAction("copy", false);
         deleteWithTrashShortcut->setEnabled(false);
         editMimeTypeAction->setEnabled(false);
     } else {
@@ -269,16 +269,16 @@ void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
         deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
         editMimeTypeAction->setEnabled(true);
         propertiesAction->setEnabled(true);
-        emit m_extension->enableAction("cut", capabilities.supportsMoving());
-        emit m_extension->enableAction("copy", true);
+        Q_EMIT m_extension->enableAction("cut", capabilities.supportsMoving());
+        Q_EMIT m_extension->enableAction("copy", true);
     }
 }
 
 void DolphinPart::updatePasteAction()
 {
     QPair<bool, QString> pasteInfo = m_view->pasteInfo();
-    emit m_extension->enableAction( "paste", pasteInfo.first );
-    emit m_extension->setActionText( "paste", pasteInfo.second );
+    Q_EMIT m_extension->enableAction( "paste", pasteInfo.first );
+    Q_EMIT m_extension->setActionText( "paste", pasteInfo.second );
 }
 
 KAboutData* DolphinPart::createAboutData()
@@ -302,13 +302,13 @@ bool DolphinPart::openUrl(const QUrl &url)
         visibleUrl.setPath(visibleUrl.path() + '/' + m_nameFilter);
     }
     QString prettyUrl = visibleUrl.toDisplayString(QUrl::PreferLocalFile);
-    emit setWindowCaption(prettyUrl);
-    emit m_extension->setLocationBarUrl(prettyUrl);
-    emit started(nullptr); // get the wheel to spin
+    Q_EMIT setWindowCaption(prettyUrl);
+    Q_EMIT m_extension->setLocationBarUrl(prettyUrl);
+    Q_EMIT started(nullptr); // get the wheel to spin
     m_view->setNameFilter(m_nameFilter);
     m_view->setUrl(url);
     updatePasteAction();
-    emit aboutToOpenURL();
+    Q_EMIT aboutToOpenURL();
     if (reload)
         m_view->reload();
     // Disable "Find File" and "Open Terminal" actions for non-file URLs,
@@ -323,24 +323,24 @@ bool DolphinPart::openUrl(const QUrl &url)
 
 void DolphinPart::slotMessage(const QString& msg)
 {
-    emit setStatusBarText(msg);
+    Q_EMIT setStatusBarText(msg);
 }
 
 void DolphinPart::slotErrorMessage(const QString& msg)
 {
     qCDebug(DolphinDebug) << msg;
-    emit canceled(msg);
+    Q_EMIT canceled(msg);
     //KMessageBox::error(m_view, msg);
 }
 
 void DolphinPart::slotRequestItemInfo(const KFileItem& item)
 {
-    emit m_extension->mouseOverInfo(item);
+    Q_EMIT m_extension->mouseOverInfo(item);
     if (item.isNull()) {
         updateStatusBar();
     } else {
         const QString escapedText = Qt::convertFromPlainText(item.getStatusBarInfo());
-        emit ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
+        Q_EMIT ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
     }
 }
 
@@ -357,7 +357,7 @@ void DolphinPart::slotItemActivated(const KFileItem& item)
     // since the idea was not to need BrowserArguments for non-browser stuff...
     KParts::BrowserArguments browserArgs;
     browserArgs.trustedSource = true;
-    emit m_extension->openUrlRequest(item.targetUrl(), args, browserArgs);
+    Q_EMIT m_extension->openUrlRequest(item.targetUrl(), args, browserArgs);
 }
 
 void DolphinPart::slotItemsActivated(const KFileItemList& items)
@@ -371,7 +371,7 @@ void DolphinPart::createNewWindow(const QUrl& url)
 {
     // TODO: Check issue N176832 for the missing QAIV signal; task 177399 - maybe this code
     // should be moved into DolphinPart::slotItemActivated()
-    emit m_extension->createNewWindow(url);
+    Q_EMIT m_extension->createNewWindow(url);
 }
 
 void DolphinPart::slotOpenContextMenu(const QPoint& pos,
@@ -448,7 +448,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos,
 
     actionGroups.insert(QStringLiteral("editactions"), editActions);
 
-    emit m_extension->popupMenu(pos,
+    Q_EMIT m_extension->popupMenu(pos,
                                 items,
                                 KParts::OpenUrlArguments(),
                                 KParts::BrowserArguments(),
@@ -462,7 +462,7 @@ void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUr
     if (oldUrl.matches(url(), QUrl::StripTrailingSlash /* #207572 */)) {
         KParts::ReadOnlyPart::setUrl(newUrl);
         const QString prettyUrl = newUrl.toDisplayString(QUrl::PreferLocalFile);
-        emit m_extension->setLocationBarUrl(prettyUrl);
+        Q_EMIT m_extension->setLocationBarUrl(prettyUrl);
     }
 }
 
@@ -579,12 +579,12 @@ void DolphinPart::updateNewMenu()
 void DolphinPart::updateStatusBar()
 {
     const QString escapedText = Qt::convertFromPlainText(m_view->statusBarText());
-    emit ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
+    Q_EMIT ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
 }
 
 void DolphinPart::updateProgress(int percent)
 {
-    emit m_extension->loadingProgress(percent);
+    Q_EMIT m_extension->loadingProgress(percent);
 }
 
 void DolphinPart::createDirectory()
index 164901483498d2c731d9999da17e81a8dccbfc81..a6d52e5836476e9ea4c5efc7ce1c54d1932325ed 100644 (file)
@@ -164,11 +164,11 @@ KParts::ListingNotificationExtension::NotificationEventTypes DolphinPartListingN
 
 void DolphinPartListingNotificationExtension::slotNewItems(const KFileItemList& items)
 {
-    emit listingEvent(KParts::ListingNotificationExtension::ItemsAdded, items);
+    Q_EMIT listingEvent(KParts::ListingNotificationExtension::ItemsAdded, items);
 }
 
 void DolphinPartListingNotificationExtension::slotItemsDeleted(const KFileItemList& items)
 {
-    emit listingEvent(KParts::ListingNotificationExtension::ItemsDeleted, items);
+    Q_EMIT listingEvent(KParts::ListingNotificationExtension::ItemsDeleted, items);
 }
 
index 0a274fed86fdb17e109a13d05dbe45e0080912cb..dede2f643fca56c2443fda451f7739b68def4927 100644 (file)
@@ -43,7 +43,7 @@ void DolphinRecentTabsMenu::rememberClosedTab(const QUrl& url, const QByteArray&
     } else {
         insertAction(menu()->actions().at(2), action);
     }
-    emit closedTabsCountChanged(menu()->actions().size() - 2);
+    Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2);
     // Assure that only up to 6 closed tabs are shown in the menu.
     // 8 because of clear action + separator + 6 closed tabs
     if (menu()->actions().size() > 8) {
@@ -69,14 +69,14 @@ void DolphinRecentTabsMenu::handleAction(QAction* action)
         for (int i = 2; i < count; ++i) {
             removeAction(actions.at(i));
         }
-        emit closedTabsCountChanged(0);
+        Q_EMIT closedTabsCountChanged(0);
     } else {
         const QByteArray state = action->data().toByteArray();
         removeAction(action);
         delete action;
         action = nullptr;
-        emit restoreClosedTab(state);
-        emit closedTabsCountChanged(menu()->actions().size() - 2);
+        Q_EMIT restoreClosedTab(state);
+        Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2);
     }
 
     if (menu()->actions().count() <= 2) {
index 8598650223e9a0bf6941ae7d8d6aca858cc93f44..67a61b0315810ebb2c9d204f5b2df2c74c436827 100644 (file)
@@ -71,7 +71,7 @@ void DolphinTabBar::dropEvent(QDropEvent* event)
     const int index = tabAt(event->pos());
 
     if (index >= 0 && mimeData->hasUrls()) {
-        emit tabDropEvent(index, event);
+        Q_EMIT tabDropEvent(index, event);
     }
 
     QTabBar::dropEvent(event);
@@ -96,7 +96,7 @@ void DolphinTabBar::mouseReleaseEvent(QMouseEvent *event)
     if (index >= 0 && index == m_tabToBeClosedOnMiddleMouseButtonRelease
         && event->button() == Qt::MiddleButton) {
         // Mouse middle click on a tab closes this tab.
-        emit tabCloseRequested(index);
+        Q_EMIT tabCloseRequested(index);
         return;
     }
 
@@ -110,7 +110,7 @@ void DolphinTabBar::mouseDoubleClickEvent(QMouseEvent* event)
     if (index < 0) {
         // Double click on the empty tabbar area opens a new activated tab
         // with the url from the current tab.
-        emit openNewActivatedTab(currentIndex());
+        Q_EMIT openNewActivatedTab(currentIndex());
         return;
     }
 
@@ -132,19 +132,19 @@ void DolphinTabBar::contextMenuEvent(QContextMenuEvent* event)
 
         QAction* selectedAction = menu.exec(event->globalPos());
         if (selectedAction == newTabAction) {
-            emit openNewActivatedTab(index);
+            Q_EMIT openNewActivatedTab(index);
         } else if (selectedAction == detachTabAction) {
-            emit tabDetachRequested(index);
+            Q_EMIT tabDetachRequested(index);
         } else if (selectedAction == closeOtherTabsAction) {
             const int tabCount = count();
             for (int i = 0; i < index; i++) {
-                emit tabCloseRequested(0);
+                Q_EMIT tabCloseRequested(0);
             }
             for (int i = index + 1; i < tabCount; i++) {
-                emit tabCloseRequested(1);
+                Q_EMIT tabCloseRequested(1);
             }
         } else if (selectedAction == closeTabAction) {
-            emit tabCloseRequested(index);
+            Q_EMIT tabCloseRequested(index);
         }
 
         return;
index e9607cc53767ab03d2918ba0c772a3863abb060d..837793b109695e14f9766dba3b673f84e9845815 100644 (file)
@@ -329,15 +329,15 @@ void DolphinTabPage::slotViewActivated()
             this, &DolphinTabPage::activeViewUrlChanged);
     connect(newActiveView, &DolphinView::redirection,
             this, &DolphinTabPage::slotViewUrlRedirection);
-    emit activeViewChanged(activeViewContainer());
-    emit activeViewUrlChanged(activeViewContainer()->url());
+    Q_EMIT activeViewChanged(activeViewContainer());
+    Q_EMIT activeViewUrlChanged(activeViewContainer()->url());
 }
 
 void DolphinTabPage::slotViewUrlRedirection(const QUrl& oldUrl, const QUrl& newUrl)
 {
     Q_UNUSED(oldUrl)
 
-    emit activeViewUrlChanged(newUrl);
+    Q_EMIT activeViewUrlChanged(newUrl);
 }
 
 void DolphinTabPage::switchActiveView()
index ae02705fc66a92b8547393da7a48804fb9140156..5ef39dac658ce3793ac9083d2f10a64a300dca38 100644 (file)
@@ -258,7 +258,7 @@ void DolphinTabWidget::closeTab(const int index)
     }
 
     DolphinTabPage* tabPage = tabPageAt(index);
-    emit rememberClosedTab(tabPage->activeViewContainer()->url(), tabPage->saveState());
+    Q_EMIT rememberClosedTab(tabPage->activeViewContainer()->url(), tabPage->saveState());
 
     removeTab(index);
     tabPage->deleteLater();
@@ -392,7 +392,7 @@ void DolphinTabWidget::tabUrlChanged(const QUrl& url)
 
         // Emit the currentUrlChanged signal if the url of the current tab has been changed.
         if (index == currentIndex()) {
-            emit currentUrlChanged(url);
+            Q_EMIT currentUrlChanged(url);
         }
     }
 }
@@ -405,8 +405,8 @@ void DolphinTabWidget::currentTabChanged(int index)
     }
     DolphinTabPage* tabPage = tabPageAt(index);
     DolphinViewContainer* viewContainer = tabPage->activeViewContainer();
-    emit activeViewChanged(viewContainer);
-    emit currentUrlChanged(viewContainer->url());
+    Q_EMIT activeViewChanged(viewContainer);
+    Q_EMIT currentUrlChanged(viewContainer->url());
     tabPage->setActive(true);
     m_lastViewedTab = index;
 }
@@ -430,7 +430,7 @@ void DolphinTabWidget::tabInserted(int index)
         tabBar()->show();
     }
 
-    emit tabCountChanged(count());
+    Q_EMIT tabCountChanged(count());
 }
 
 void DolphinTabWidget::tabRemoved(int index)
@@ -443,7 +443,7 @@ void DolphinTabWidget::tabRemoved(int index)
         tabBar()->hide();
     }
 
-    emit tabCountChanged(count());
+    Q_EMIT tabCountChanged(count());
 }
 
 QString DolphinTabWidget::tabName(DolphinTabPage* tabPage) const
index 4b65729d4e2482c1693aa59f61bb0f6aedddac19..b1b67447f8f90d1dbe2f2b793ceb4df247fbbd1d 100644 (file)
@@ -410,7 +410,7 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled)
 
     m_searchModeEnabled = enabled;
 
-    emit searchModeEnabledChanged(enabled);
+    Q_EMIT searchModeEnabledChanged(enabled);
 }
 
 bool DolphinViewContainer::isSearchModeEnabled() const
@@ -658,7 +658,7 @@ void DolphinViewContainer::closeFilterBar()
 {
     m_filterBar->closeFilterBar();
     m_view->setFocus();
-    emit showFilterBarChanged(false);
+    Q_EMIT showFilterBarChanged(false);
 }
 
 void DolphinViewContainer::setNameFilter(const QString& nameFilter)
index 7eee08b2eca049782f93ea51d2e78a370b436f89..30235eb441c453c9ff391fd009c3d20e321daee8 100644 (file)
@@ -106,7 +106,7 @@ void FilterBar::keyReleaseEvent(QKeyEvent* event)
     switch (event->key()) {
     case Qt::Key_Escape:
         if (m_filterInput->text().isEmpty()) {
-            emit closeRequest();
+            Q_EMIT closeRequest();
         } else {
             m_filterInput->clear();
         }
@@ -114,7 +114,7 @@ void FilterBar::keyReleaseEvent(QKeyEvent* event)
 
     case Qt::Key_Enter:
     case Qt::Key_Return:
-        emit focusViewRequest();
+        Q_EMIT focusViewRequest();
         break;
 
     default:
index e8cd8f39377f65297a3cc3ed452c12340bd2a713..b89fe4f58e3de05008625ddbc34b2d55632fdd9b 100644 (file)
@@ -487,7 +487,7 @@ void KFileItemModel::setRoles(const QSet<QByteArray>& roles)
             m_itemData[i]->values = retrieveData(m_itemData.at(i)->item, m_itemData.at(i)->parent);
         }
 
-        emit itemsChanged(KItemRangeList() << KItemRange(0, count()), changedRoles);
+        Q_EMIT itemsChanged(KItemRangeList() << KItemRange(0, count()), changedRoles);
     }
 
     // Clear the 'values' of all filtered items. They will be re-populated with the
@@ -892,13 +892,13 @@ void KFileItemModel::resortAllItems()
             movedToIndexes.append(newIndex);
         }
 
-        emit itemsMoved(KItemRange(firstMovedIndex, movedItemsCount), movedToIndexes);
+        Q_EMIT itemsMoved(KItemRange(firstMovedIndex, movedItemsCount), movedToIndexes);
     } else if (groupedSorting()) {
         // The groups might have changed even if the order of the items has not.
         const QList<QPair<int, QVariant> > oldGroups = m_groups;
         m_groups.clear();
         if (groups() != oldGroups) {
-            emit groupsChanged();
+            Q_EMIT groupsChanged();
         }
     }
 
@@ -934,7 +934,7 @@ void KFileItemModel::slotCompleted()
         m_urlsToExpand.clear();
     }
 
-    emit directoryLoadingCompleted();
+    Q_EMIT directoryLoadingCompleted();
 }
 
 void KFileItemModel::slotCanceled()
@@ -942,7 +942,7 @@ void KFileItemModel::slotCanceled()
     m_maximumUpdateIntervalTimer->stop();
     dispatchPendingItemsToInsert();
 
-    emit directoryLoadingCanceled();
+    Q_EMIT directoryLoadingCanceled();
 }
 
 void KFileItemModel::slotItemsAdded(const QUrl &directoryUrl, const KFileItemList& items)
@@ -1143,7 +1143,7 @@ void KFileItemModel::slotClear()
         qDeleteAll(m_itemData);
         m_itemData.clear();
         m_items.clear();
-        emit itemsRemoved(KItemRangeList() << KItemRange(0, removedCount));
+        Q_EMIT itemsRemoved(KItemRangeList() << KItemRange(0, removedCount));
     }
 
     m_expandedDirs.clear();
@@ -1259,7 +1259,7 @@ void KFileItemModel::insertItems(QList<ItemData*>& newItems)
     // It will be re-populated with the updated indices if index(const QUrl&) is called.
     m_items.clear();
 
-    emit itemsInserted(itemRanges);
+    Q_EMIT itemsInserted(itemRanges);
 
 #ifdef KFILEITEMMODEL_DEBUG
     qCDebug(DolphinDebug) << "[TIME] Inserting of" << newItems.count() << "items:" << timer.elapsed();
@@ -1312,7 +1312,7 @@ void KFileItemModel::removeItems(const KItemRangeList& itemRanges, RemoveItemsBe
     // It will be re-populated with the updated indices if index(const QUrl&) is called.
     m_items.clear();
 
-    emit itemsRemoved(itemRanges);
+    Q_EMIT itemsRemoved(itemRanges);
 }
 
 QList<KFileItemModel::ItemData*> KFileItemModel::createItemDataList(const QUrl& parentUrl, const KFileItemList& items) const
@@ -1428,7 +1428,7 @@ void KFileItemModel::removeExpandedItems()
 
 void KFileItemModel::emitItemsChangedAndTriggerResorting(const KItemRangeList& itemRanges, const QSet<QByteArray>& changedRoles)
 {
-    emit itemsChanged(itemRanges, changedRoles);
+    Q_EMIT itemsChanged(itemRanges, changedRoles);
 
     // Trigger a resorting if necessary. Note that this can happen even if the sort
     // role has not changed at all because the file name can be used as a fallback.
@@ -2307,14 +2307,14 @@ void KFileItemModel::emitSortProgress(int resolvedCount)
             resortAllItems();
         }
 
-        emit directorySortingProgress(100);
+        Q_EMIT directorySortingProgress(100);
     } else if (itemCount > 0) {
         resolvedCount = qBound(0, resolvedCount, itemCount);
 
         const int progress = resolvedCount * 100 / itemCount;
         if (m_sortingProgressPercent != progress) {
             m_sortingProgressPercent = progress;
-            emit directorySortingProgress(progress);
+            Q_EMIT directorySortingProgress(progress);
         }
     }
 }
index 0d48bb5e3c785d01a043645547e407213e82522e..5c9a2bbdd35bf3acd51d683f5397db06e1c0015c 100644 (file)
@@ -110,7 +110,7 @@ void KItemListController::setModel(KItemModelBase* model)
 
     m_selectionManager->setModel(m_model);
 
-    emit modelChanged(m_model, oldModel);
+    Q_EMIT modelChanged(m_model, oldModel);
 }
 
 KItemModelBase* KItemListController::model() const
@@ -145,7 +145,7 @@ void KItemListController::setView(KItemListView* view)
         updateExtendedSelectionRegion();
     }
 
-    emit viewChanged(m_view, oldView);
+    Q_EMIT viewChanged(m_view, oldView);
 }
 
 KItemListView* KItemListController::view() const
@@ -373,11 +373,11 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
     case Qt::Key_Return: {
         const KItemSet selectedItems = m_selectionManager->selectedItems();
         if (selectedItems.count() >= 2) {
-            emit itemsActivated(selectedItems);
+            Q_EMIT itemsActivated(selectedItems);
         } else if (selectedItems.count() == 1) {
-            emit itemActivated(selectedItems.first());
+            Q_EMIT itemActivated(selectedItems.first());
         } else {
-            emit itemActivated(index);
+            Q_EMIT itemActivated(index);
         }
         break;
     }
@@ -398,9 +398,9 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
         if (index >= 0) {
             const QRectF contextRect = m_view->itemContextRect(index);
             const QPointF pos(m_view->scene()->views().first()->mapToGlobal(contextRect.bottomRight().toPoint()));
-            emit itemContextMenuRequested(index, pos);
+            Q_EMIT itemContextMenuRequested(index, pos);
         } else {
-            emit viewContextMenuRequested(QCursor::pos());
+            Q_EMIT viewContextMenuRequested(QCursor::pos());
         }
         break;
     }
@@ -410,7 +410,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
             m_selectionManager->clearSelection();
         }
         m_keyboardManager->cancelSearch();
-        emit escapePressed();
+        Q_EMIT escapePressed();
         break;
 
     case Qt::Key_Space:
@@ -524,7 +524,7 @@ void KItemListController::slotAutoActivationTimeout()
             const bool expanded = m_model->isExpanded(index);
             m_model->setExpanded(index, !expanded);
         } else if (m_autoActivationBehavior != ExpansionOnly) {
-            emit itemActivated(index);
+            Q_EMIT itemActivated(index);
         }
     }
 }
@@ -642,7 +642,7 @@ bool KItemListController::mouseReleaseEvent(QGraphicsSceneMouseEvent* event, con
         return false;
     }
 
-    emit mouseButtonReleased(m_pressedIndex, event->buttons());
+    Q_EMIT mouseButtonReleased(m_pressedIndex, event->buttons());
 
     return onRelease(transform.map(event->pos()), event->modifiers(), event->button(), false);
 }
@@ -664,13 +664,13 @@ bool KItemListController::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event,
         m_selectionManager->clearSelection();
         if (index >= 0) {
             m_selectionManager->setSelected(index);
-            emit itemContextMenuRequested(index, event->screenPos());
+            Q_EMIT itemContextMenuRequested(index, event->screenPos());
         } else {
             const QRectF headerBounds = m_view->headerBoundaries();
             if (headerBounds.contains(event->pos())) {
-                emit headerContextMenuRequested(event->screenPos());
+                Q_EMIT headerContextMenuRequested(event->screenPos());
             } else {
-                emit viewContextMenuRequested(event->screenPos());
+                Q_EMIT viewContextMenuRequested(event->screenPos());
             }
         }
         return true;
@@ -680,7 +680,7 @@ bool KItemListController::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event,
                              (event->button() & Qt::LeftButton) &&
                              index >= 0 && index < m_model->count();
     if (emitItemActivated) {
-        emit itemActivated(index);
+        Q_EMIT itemActivated(index);
     }
     return false;
 }
@@ -707,7 +707,7 @@ bool KItemListController::dragLeaveEvent(QGraphicsSceneDragDropEvent* event, con
     KItemListWidget* widget = hoveredWidget();
     if (widget) {
         widget->setHovered(false);
-        emit itemUnhovered(widget->index());
+        Q_EMIT itemUnhovered(widget->index());
     }
     return false;
 }
@@ -730,7 +730,7 @@ bool KItemListController::dragMoveEvent(QGraphicsSceneDragDropEvent* event, cons
 
         if (oldHoveredWidget) {
             oldHoveredWidget->setHovered(false);
-            emit itemUnhovered(oldHoveredWidget->index());
+            Q_EMIT itemUnhovered(oldHoveredWidget->index());
         }
     }
 
@@ -753,7 +753,7 @@ bool KItemListController::dragMoveEvent(QGraphicsSceneDragDropEvent* event, cons
                 m_view->hideDropIndicator();
                 if (!newHoveredWidget->isHovered()) {
                     newHoveredWidget->setHovered(true);
-                    emit itemHovered(index);
+                    Q_EMIT itemHovered(index);
                 }
 
                 if (!m_autoActivationTimer->isActive() && m_autoActivationTimer->interval() >= 0) {
@@ -765,7 +765,7 @@ bool KItemListController::dragMoveEvent(QGraphicsSceneDragDropEvent* event, cons
             m_autoActivationTimer->stop();
             if (newHoveredWidget && newHoveredWidget->isHovered()) {
                 newHoveredWidget->setHovered(false);
-                emit itemUnhovered(index);
+                Q_EMIT itemUnhovered(index);
             }
         }
     } else {
@@ -802,10 +802,10 @@ bool KItemListController::dropEvent(QGraphicsSceneDragDropEvent* event, const QT
     if (dropAboveIndex >= 0) {
         // Something has been dropped between two items.
         m_view->hideDropIndicator();
-        emit aboveItemDropEvent(dropAboveIndex, event);
+        Q_EMIT aboveItemDropEvent(dropAboveIndex, event);
     } else if (!event->mimeData()->hasFormat(m_model->blacklistItemDropEventMimeType())) {
         // Something has been dropped on an item or on an empty part of the view.
-        emit itemDropEvent(m_view->itemAt(pos), event);
+        Q_EMIT itemDropEvent(m_view->itemAt(pos), event);
     }
 
     QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropEnd);
@@ -835,14 +835,14 @@ bool KItemListController::hoverMoveEvent(QGraphicsSceneHoverEvent* event, const
     if (oldHoveredWidget != newHoveredWidget) {
         if (oldHoveredWidget) {
             oldHoveredWidget->setHovered(false);
-            emit itemUnhovered(oldHoveredWidget->index());
+            Q_EMIT itemUnhovered(oldHoveredWidget->index());
         }
 
         if (newHoveredWidget) {
             newHoveredWidget->setHovered(true);
             const QPointF mappedPos = newHoveredWidget->mapFromItem(m_view, pos);
             newHoveredWidget->setHoverPosition(mappedPos);
-            emit itemHovered(newHoveredWidget->index());
+            Q_EMIT itemHovered(newHoveredWidget->index());
         }
     } else if (oldHoveredWidget) {
         const QPointF mappedPos = oldHoveredWidget->mapFromItem(m_view, pos);
@@ -868,7 +868,7 @@ bool KItemListController::hoverLeaveEvent(QGraphicsSceneHoverEvent* event, const
     for (KItemListWidget* widget : widgets) {
         if (widget->isHovered()) {
             widget->setHovered(false);
-            emit itemUnhovered(widget->index());
+            Q_EMIT itemUnhovered(widget->index());
         }
     }
     return false;
@@ -1006,7 +1006,7 @@ void KItemListController::tapAndHoldTriggered(QGestureEvent* event, const QTrans
             startRubberBand();
         }
 
-        emit scrollerStop();
+        Q_EMIT scrollerStop();
 
         m_view->m_tapAndHoldIndicator->setStartPosition(m_pressedMousePos);
         m_view->m_tapAndHoldIndicator->setActive(true);
@@ -1034,10 +1034,10 @@ void KItemListController::pinchTriggered(QGestureEvent* event, const QTransform&
         }
         counter = counter + (pinch->scaleFactor() - 1);
         if (counter >= sensitivityModifier) {
-            emit increaseZoom();
+            Q_EMIT increaseZoom();
             counter = 0;
         } else if (counter <= -sensitivityModifier) {
-            emit decreaseZoom();
+            Q_EMIT decreaseZoom();
             counter = 0;
         }
     }
@@ -1061,14 +1061,14 @@ void KItemListController::swipeTriggered(QGestureEvent* event, const QTransform&
     }
 
     if (swipe->state() == Qt::GestureFinished) {
-        emit scrollerStop();
+        Q_EMIT scrollerStop();
 
         if (swipe->swipeAngle() <= 20 || swipe->swipeAngle() >= 340) {
-            emit mouseButtonPressed(m_pressedIndex, Qt::BackButton);
+            Q_EMIT mouseButtonPressed(m_pressedIndex, Qt::BackButton);
         } else if (swipe->swipeAngle() <= 200 && swipe->swipeAngle() >= 160) {
-            emit mouseButtonPressed(m_pressedIndex, Qt::ForwardButton);
+            Q_EMIT mouseButtonPressed(m_pressedIndex, Qt::ForwardButton);
         } else if (swipe->swipeAngle() <= 110 && swipe->swipeAngle() >= 60) {
-            emit swipeUp();
+            Q_EMIT swipeUp();
         }
         m_isSwipeGesture = true;
     }
@@ -1419,7 +1419,7 @@ void KItemListController::updateExtendedSelectionRegion()
 
 bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons)
 {
-    emit mouseButtonPressed(m_pressedIndex, buttons);
+    Q_EMIT mouseButtonPressed(m_pressedIndex, buttons);
 
     if (buttons & (Qt::BackButton | Qt::ForwardButton)) {
         // Do not select items when clicking the back/forward buttons, see
@@ -1470,7 +1470,7 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c
         m_clearSelectionIfItemsAreNotDragged = true;
 
         if (m_selectionManager->selectedItems().count() == 1 && m_view->isAboveText(m_pressedIndex, m_pressedMousePos)) {
-            emit selectedItemTextPressed(m_pressedIndex);
+            Q_EMIT selectedItemTextPressed(m_pressedIndex);
         }
     }
 
@@ -1517,7 +1517,7 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c
         }
 
         if (buttons & Qt::RightButton) {
-            emit itemContextMenuRequested(m_pressedIndex, screenPos);
+            Q_EMIT itemContextMenuRequested(m_pressedIndex, screenPos);
         }
 
         return true;
@@ -1526,9 +1526,9 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c
     if (buttons & Qt::RightButton) {
         const QRectF headerBounds = m_view->headerBoundaries();
         if (headerBounds.contains(pos)) {
-            emit headerContextMenuRequested(screenPos);
+            Q_EMIT headerContextMenuRequested(screenPos);
         } else {
-            emit viewContextMenuRequested(screenPos);
+            Q_EMIT viewContextMenuRequested(screenPos);
         }
         return true;
     }
@@ -1580,7 +1580,7 @@ bool KItemListController::onRelease(const QPointF& pos, const Qt::KeyboardModifi
                 const bool expanded = m_model->isExpanded(index);
                 m_model->setExpanded(index, !expanded);
 
-                emit itemExpansionToggleClicked(index);
+                Q_EMIT itemExpansionToggleClicked(index);
                 emitItemActivated = false;
             } else if (shiftOrControlPressed) {
                 // The mouse click should only update the selection, not trigger the item
@@ -1593,10 +1593,10 @@ bool KItemListController::onRelease(const QPointF& pos, const Qt::KeyboardModifi
                 }
             }
             if (emitItemActivated) {
-                emit itemActivated(index);
+                Q_EMIT itemActivated(index);
             }
         } else if (buttons & Qt::MiddleButton) {
-            emit itemMiddleClicked(index);
+            Q_EMIT itemMiddleClicked(index);
         }
     }
 
index e5f450a7c594408f41d07de76dae5e1ea39bb485..ce0dc06debef97e0a7e2f22647ca6f5e3c181910 100644 (file)
@@ -35,12 +35,12 @@ void KItemListSelectionManager::setCurrentItem(int current)
     }
 
     if (m_currentItem != previous) {
-        emit currentChanged(m_currentItem, previous);
+        Q_EMIT currentChanged(m_currentItem, previous);
 
         if (m_isAnchoredSelectionActive) {
             const KItemSet selection = selectedItems();
             if (selection != previousSelection) {
-                emit selectionChanged(selection, previousSelection);
+                Q_EMIT selectionChanged(selection, previousSelection);
             }
         }
     }
@@ -56,7 +56,7 @@ void KItemListSelectionManager::setSelectedItems(const KItemSet& items)
     if (m_selectedItems != items) {
         const KItemSet previous = m_selectedItems;
         m_selectedItems = items;
-        emit selectionChanged(m_selectedItems, previous);
+        Q_EMIT selectionChanged(m_selectedItems, previous);
     }
 }
 
@@ -145,7 +145,7 @@ void KItemListSelectionManager::setSelected(int index, int count, SelectionMode
 
     const KItemSet selection = selectedItems();
     if (selection != previous) {
-        emit selectionChanged(selection, previous);
+        Q_EMIT selectionChanged(selection, previous);
     }
 }
 
@@ -155,7 +155,7 @@ void KItemListSelectionManager::clearSelection()
     if (!previous.isEmpty()) {
         m_selectedItems.clear();
         m_isAnchoredSelectionActive = false;
-        emit selectionChanged(KItemSet(), previous);
+        Q_EMIT selectionChanged(KItemSet(), previous);
     }
 }
 
@@ -234,7 +234,7 @@ void KItemListSelectionManager::itemsInserted(const KItemRangeList& itemRanges)
         if (m_currentItem >= m_model->count()) {
             m_currentItem = -1;
         }
-        emit currentChanged(m_currentItem, previousCurrent);
+        Q_EMIT currentChanged(m_currentItem, previousCurrent);
     }
 
     // Update the anchor item
@@ -270,7 +270,7 @@ void KItemListSelectionManager::itemsInserted(const KItemRangeList& itemRanges)
 
     const KItemSet selection = selectedItems();
     if (selection != previousSelection) {
-        emit selectionChanged(selection, previousSelection);
+        Q_EMIT selectionChanged(selection, previousSelection);
     }
 }
 
@@ -283,12 +283,12 @@ void KItemListSelectionManager::itemsRemoved(const KItemRangeList& itemRanges)
     // Update the current item
     m_currentItem = indexAfterRangesRemoving(m_currentItem, itemRanges, DiscardRemovedIndex);
     if (m_currentItem != previousCurrent) {
-        emit currentChanged(m_currentItem, previousCurrent);
+        Q_EMIT currentChanged(m_currentItem, previousCurrent);
         if (m_currentItem < 0) {
             // Calling setCurrentItem() would trigger the selectionChanged signal, but we want to
             // emit it only once in this function -> change the current item manually and emit currentChanged
             m_currentItem = indexAfterRangesRemoving(previousCurrent, itemRanges, AdjustRemovedIndex);
-            emit currentChanged(m_currentItem, -1);
+            Q_EMIT currentChanged(m_currentItem, -1);
         }
     }
 
@@ -315,7 +315,7 @@ void KItemListSelectionManager::itemsRemoved(const KItemRangeList& itemRanges)
 
     const KItemSet selection = selectedItems();
     if (selection != previousSelection) {
-        emit selectionChanged(selection, previousSelection);
+        Q_EMIT selectionChanged(selection, previousSelection);
     }
 
     Q_ASSERT(m_currentItem < m_model->count());
@@ -343,7 +343,7 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL
         // Calling setCurrentItem would trigger the selectionChanged signal, but we want to
         // emit it only once in this function -> change the current item manually and emit currentChanged
         m_currentItem = newCurrentItem;
-        emit currentChanged(newCurrentItem, previousCurrentItem);
+        Q_EMIT currentChanged(newCurrentItem, previousCurrentItem);
     }
 
     // Start a new anchored selection.
@@ -368,7 +368,7 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL
 
     const KItemSet selection = selectedItems();
     if (selection != previousSelection) {
-        emit selectionChanged(selection, previousSelection);
+        Q_EMIT selectionChanged(selection, previousSelection);
     }
 }
 
index 5bbc73d90e215de9af85b9a23cf6b2dfb752bc50..3103012a99ddf613b0e92e3fc3f06f3662833f57 100644 (file)
@@ -536,7 +536,7 @@ void KItemListView::scrollToItem(int index)
         }
 
         if (newOffset != scrollOffset()) {
-            emit scrollTo(newOffset);
+            Q_EMIT scrollTo(newOffset);
         }
     }
 }
@@ -837,7 +837,7 @@ void KItemListView::setScrollOrientation(Qt::Orientation orientation)
     doLayout(NoAnimation);
 
     onScrollOrientationChanged(orientation, previousOrientation);
-    emit scrollOrientationChanged(orientation, previousOrientation);
+    Q_EMIT scrollOrientationChanged(orientation, previousOrientation);
 }
 
 Qt::Orientation KItemListView::scrollOrientation() const
@@ -1487,7 +1487,7 @@ void KItemListView::slotHeaderColumnMoved(const QByteArray& role,
 
     setVisibleRoles(current);
 
-    emit visibleRolesChanged(current, previous);
+    Q_EMIT visibleRolesChanged(current, previous);
 }
 
 void KItemListView::triggerAutoScrolling()
@@ -1562,7 +1562,7 @@ void KItemListView::slotRoleEditingCanceled(int index, const QByteArray& role, c
 {
     disconnectRoleEditingSignals(index);
 
-    emit roleEditingCanceled(index, role, value);
+    Q_EMIT roleEditingCanceled(index, role, value);
     m_editingRole = false;
 }
 
@@ -1570,7 +1570,7 @@ void KItemListView::slotRoleEditingFinished(int index, const QByteArray& role, c
 {
     disconnectRoleEditingSignals(index);
 
-    emit roleEditingFinished(index, role, value);
+    Q_EMIT roleEditingFinished(index, role, value);
     m_editingRole = false;
 }
 
@@ -1926,25 +1926,25 @@ void KItemListView::emitOffsetChanges()
 {
     const qreal newScrollOffset = m_layouter->scrollOffset();
     if (m_oldScrollOffset != newScrollOffset) {
-        emit scrollOffsetChanged(newScrollOffset, m_oldScrollOffset);
+        Q_EMIT scrollOffsetChanged(newScrollOffset, m_oldScrollOffset);
         m_oldScrollOffset = newScrollOffset;
     }
 
     const qreal newMaximumScrollOffset = m_layouter->maximumScrollOffset();
     if (m_oldMaximumScrollOffset != newMaximumScrollOffset) {
-        emit maximumScrollOffsetChanged(newMaximumScrollOffset, m_oldMaximumScrollOffset);
+        Q_EMIT maximumScrollOffsetChanged(newMaximumScrollOffset, m_oldMaximumScrollOffset);
         m_oldMaximumScrollOffset = newMaximumScrollOffset;
     }
 
     const qreal newItemOffset = m_layouter->itemOffset();
     if (m_oldItemOffset != newItemOffset) {
-        emit itemOffsetChanged(newItemOffset, m_oldItemOffset);
+        Q_EMIT itemOffsetChanged(newItemOffset, m_oldItemOffset);
         m_oldItemOffset = newItemOffset;
     }
 
     const qreal newMaximumItemOffset = m_layouter->maximumItemOffset();
     if (m_oldMaximumItemOffset != newMaximumItemOffset) {
-        emit maximumItemOffsetChanged(newMaximumItemOffset, m_oldMaximumItemOffset);
+        Q_EMIT maximumItemOffsetChanged(newMaximumItemOffset, m_oldMaximumItemOffset);
         m_oldMaximumItemOffset = newMaximumItemOffset;
     }
 }
index 795a1a2f55e34dd0b51afb4d3cb7ac45c8d074de..5c6141ce22c158e54fe82450b1450995eab6ab3e 100644 (file)
@@ -40,7 +40,7 @@ void KItemModelBase::setGroupedSorting(bool grouped)
     if (m_groupedSorting != grouped) {
         m_groupedSorting = grouped;
         onGroupedSortingChanged(grouped);
-        emit groupedSortingChanged(grouped);
+        Q_EMIT groupedSortingChanged(grouped);
     }
 }
 
@@ -55,7 +55,7 @@ void KItemModelBase::setSortRole(const QByteArray& role, bool resortItems)
         const QByteArray previous = m_sortRole;
         m_sortRole = role;
         onSortRoleChanged(role, previous, resortItems);
-        emit sortRoleChanged(role, previous);
+        Q_EMIT sortRoleChanged(role, previous);
     }
 }
 
@@ -70,7 +70,7 @@ void KItemModelBase::setSortOrder(Qt::SortOrder order)
         const Qt::SortOrder previous = m_sortOrder;
         m_sortOrder = order;
         onSortOrderChanged(order, previous);
-        emit sortOrderChanged(order, previous);
+        Q_EMIT sortOrderChanged(order, previous);
     }
 }
 
index 39121ab3169a048b883dac789e30b85c7f13b67c..fcaa50b9d04d46d3870730dc3a82bd111d337383 100644 (file)
@@ -90,7 +90,7 @@ void KStandardItem::setDataValue(const QByteArray& role, const QVariant& value)
         QSet<QByteArray> changedRoles;
         changedRoles.insert(role);
         m_model->onItemChanged(index, changedRoles);
-        emit m_model->itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
+        Q_EMIT m_model->itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
     }
 }
 
index 032a949c101be74e0d24318ad4cf54801295f363..f2fc213326032450a36deb029780f99fe77d0d17 100644 (file)
@@ -741,7 +741,7 @@ void KStandardItemListWidget::editedRoleChanged(const QByteArray& current, const
     QGraphicsView* parent = scene()->views()[0];
     if (current.isEmpty() || !parent || current != "text") {
         if (m_roleEditor) {
-            emit roleEditingCanceled(index(), current, data().value(current));
+            Q_EMIT roleEditingCanceled(index(), current, data().value(current));
 
             disconnect(m_roleEditor, &KItemListRoleEditor::roleEditingCanceled,
                        this, &KStandardItemListWidget::slotRoleEditingCanceled);
@@ -866,7 +866,7 @@ void KStandardItemListWidget::slotRoleEditingCanceled(const QByteArray& role,
                                                       const QVariant& value)
 {
     closeRoleEditor();
-    emit roleEditingCanceled(index(), role, value);
+    Q_EMIT roleEditingCanceled(index(), role, value);
     setEditedRole(QByteArray());
 }
 
@@ -874,7 +874,7 @@ void KStandardItemListWidget::slotRoleEditingFinished(const QByteArray& role,
                                                       const QVariant& value)
 {
     closeRoleEditor();
-    emit roleEditingFinished(index(), role, value);
+    Q_EMIT roleEditingFinished(index(), role, value);
     setEditedRole(QByteArray());
 }
 
index ceadff2570b8793ed31666737626dc299c6bc9cf..128841ca8496f25a56dec4897aeb76955a900875 100644 (file)
@@ -43,7 +43,7 @@ void KStandardItemModel::insertItem(int index, KStandardItem* item)
         // TODO: no hierarchical items are handled yet
 
         onItemInserted(index);
-        emit itemsInserted(KItemRangeList() << KItemRange(index, 1));
+        Q_EMIT itemsInserted(KItemRangeList() << KItemRange(index, 1));
     }
 }
 
@@ -81,7 +81,7 @@ void KStandardItemModel::changeItem(int index, KStandardItem* item)
     m_indexesForItems.insert(item, index);
 
     onItemChanged(index, changedRoles);
-    emit itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
+    Q_EMIT itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
 }
 
 void KStandardItemModel::removeItem(int index)
@@ -102,7 +102,7 @@ void KStandardItemModel::removeItem(int index)
         item->deleteLater();
         item = nullptr;
 
-        emit itemsRemoved(KItemRangeList() << KItemRange(index, 1));
+        Q_EMIT itemsRemoved(KItemRangeList() << KItemRange(index, 1));
 
         // TODO: no hierarchical items are handled yet
     }
@@ -114,7 +114,7 @@ void KStandardItemModel::clear()
     m_items.clear();
     m_indexesForItems.clear();
 
-    emit itemsRemoved(KItemRangeList() << KItemRange(0, size));
+    Q_EMIT itemsRemoved(KItemRangeList() << KItemRange(0, size));
 }
 
 KStandardItem* KStandardItemModel::item(int index) const
index df45c417357b1709e3406d3dc0ba701e1a53e4d1..d33277a3b9d45c86bb9ecc69c5029023b3600aa6 100644 (file)
@@ -115,7 +115,7 @@ void KDirectoryContentsCounter::slotResult(const QString& path, int count, long
     }
 
     // sends the results
-    emit result(resolvedPath, count, size);
+    Q_EMIT result(resolvedPath, count, size);
 }
 
 void KDirectoryContentsCounter::slotDirWatchDirty(const QString& path)
@@ -165,7 +165,7 @@ void KDirectoryContentsCounter::startWorker(const QString& path)
         // fast path when in cache
         // will be updated later if result has changed
         const auto pair = s_cache->value(path);
-        emit result(path, pair.first, pair.second);
+        Q_EMIT result(path, pair.first, pair.second);
     }
 
     if (m_workerIsBusy) {
@@ -189,7 +189,7 @@ void KDirectoryContentsCounter::startWorker(const QString& path)
             options |= KDirectoryContentsCounterWorker::CountDirectoriesOnly;
         }
 
-        emit requestDirectoryContentsCount(path, options);
+        Q_EMIT requestDirectoryContentsCount(path, options);
         m_workerIsBusy = true;
     }
 }
index 59ff471aeee5e804b6ae8fada4bf642d0b602f8b..abe2ad757afe67f45e3ca7ffe8dd4f9fa71d04c2 100644 (file)
@@ -118,5 +118,5 @@ KDirectoryContentsCounterWorker::CountResult KDirectoryContentsCounterWorker::su
 void KDirectoryContentsCounterWorker::countDirectoryContents(const QString& path, Options options)
 {
     auto res = subItemsCount(path, options);
-    emit result(path, res.count, res.size);
+    Q_EMIT result(path, res.count, res.size);
 }
index c12b4b7b1c42fc291ca25ce68a5e57ef46f213f4..ec31068e7db3ef58c246aa19f4d199faf36c0210 100644 (file)
@@ -47,7 +47,7 @@ void KFileItemClipboard::updateCutItems()
     // mimeData can be 0 according to https://bugs.kde.org/show_bug.cgi?id=335053
     if (!mimeData) {
         m_cutItems.clear();
-        emit cutItemsChanged();
+        Q_EMIT cutItemsChanged();
         return;
     }
 
@@ -59,7 +59,7 @@ void KFileItemClipboard::updateCutItems()
     } else {
         m_cutItems.clear();
     }
-    emit cutItemsChanged();
+    Q_EMIT cutItemsChanged();
 }
 
 KFileItemClipboard::KFileItemClipboard() :
index accd200ef3fe7116b4da06c898b818b1d74585fa..90c9708744cb1a7cfca7de1d5c5f031358c6b993 100644 (file)
@@ -22,13 +22,13 @@ KFileItemModelDirLister::~KFileItemModelDirLister()
 void KFileItemModelDirLister::handleError(KIO::Job* job)
 {
     if (job->error() == KIO::ERR_IS_FILE) {
-        emit urlIsFileError(url());
+        Q_EMIT urlIsFileError(url());
     } else {
         const QString errorString = job->errorString();
         if (errorString.isEmpty()) {
-            emit errorMessage(i18nc("@info:status", "Unknown error."));
+            Q_EMIT errorMessage(i18nc("@info:status", "Unknown error."));
         } else {
-            emit errorMessage(errorString);
+            Q_EMIT errorMessage(errorString);
         }
     }
 }
index 05883b93e0bf2e4b342cf7df7e04866212467a53..e5cbc602fd9d16fbc690a30cf3428700c4271f4f 100644 (file)
@@ -201,18 +201,18 @@ void KItemListHeaderWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
             const Qt::SortOrder current = (m_model->sortOrder() == Qt::AscendingOrder) ?
                                           Qt::DescendingOrder : Qt::AscendingOrder;
             m_model->setSortOrder(current);
-            emit sortOrderChanged(current, previous);
+            Q_EMIT sortOrderChanged(current, previous);
         } else {
             // Change the sort role and reset to the ascending order
             const QByteArray previous = m_model->sortRole();
             const QByteArray current = m_columns[m_pressedRoleIndex];
             const bool resetSortOrder = m_model->sortOrder() == Qt::DescendingOrder;
             m_model->setSortRole(current, !resetSortOrder);
-            emit sortRoleChanged(current, previous);
+            Q_EMIT sortRoleChanged(current, previous);
 
             if (resetSortOrder) {
                 m_model->setSortOrder(Qt::AscendingOrder);
-                emit sortOrderChanged(Qt::AscendingOrder, Qt::DescendingOrder);
+                Q_EMIT sortOrderChanged(Qt::AscendingOrder, Qt::DescendingOrder);
             }
         }
         break;
@@ -221,7 +221,7 @@ void KItemListHeaderWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
     case ResizeRoleOperation: {
         const QByteArray pressedRole = m_columns[m_pressedRoleIndex];
         const qreal currentWidth = m_columnWidths.value(pressedRole);
-        emit columnWidthChangeFinished(pressedRole, currentWidth);
+        Q_EMIT columnWidthChangeFinished(pressedRole, currentWidth);
         break;
     }
 
@@ -287,7 +287,7 @@ void KItemListHeaderWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
         m_columnWidths.insert(pressedRole, currentWidth);
         update();
 
-        emit columnWidthChanged(pressedRole, currentWidth, previousWidth);
+        Q_EMIT columnWidthChanged(pressedRole, currentWidth, previousWidth);
         break;
     }
 
@@ -304,7 +304,7 @@ void KItemListHeaderWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
                 const QByteArray role = m_columns[m_movingRole.index];
                 const int previousIndex = m_movingRole.index;
                 m_movingRole.index = targetIndex;
-                emit columnMoved(role, targetIndex, previousIndex);
+                Q_EMIT columnMoved(role, targetIndex, previousIndex);
 
                 m_movingRole.xDec = event->pos().x() - roleXPosition(role);
             }
@@ -329,8 +329,8 @@ void KItemListHeaderWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* even
         setColumnWidth(role, preferredColumnWidth(role));
         qreal currentWidth = columnWidth(role);
 
-        emit columnWidthChanged(role, currentWidth, previousWidth);
-        emit columnWidthChangeFinished(role, currentWidth);
+        Q_EMIT columnWidthChanged(role, currentWidth, previousWidth);
+        Q_EMIT columnWidthChangeFinished(role, currentWidth);
     }
 }
 
index 97e2b0b32b6b408363aac2eedba5eb1fe462bf1e..57a954adfb2c278ac5ab123bd5259ff477d8c185 100644 (file)
@@ -58,7 +58,7 @@ void KItemListKeyboardSearchManager::addKeys(const QString& keys)
         // loosing keyboard search context basically
         m_isSearchRestarted = false;
 
-        emit changeCurrentItem(sameKey ? firstKey : m_searchedString, searchFromNextItem);
+        Q_EMIT changeCurrentItem(sameKey ? firstKey : m_searchedString, searchFromNextItem);
     }
     m_keyboardInputTime.start();
 }
index 75fd6a0c799936897ff64a438e1074fd81f118a6..df142a4564dea91ab87c64903069f3c51d8a8309 100644 (file)
@@ -69,7 +69,7 @@ void KItemListRoleEditor::keyPressEvent(QKeyEvent* event)
         // a roleEditingFinished signal (see KItemListRoleEditor::event),
         // which is not wanted in this case.
         m_blockFinishedSignal = true;
-        emit roleEditingCanceled(m_role, KIO::encodeFileName(toPlainText()));
+        Q_EMIT roleEditingCanceled(m_role, KIO::encodeFileName(toPlainText()));
         m_blockFinishedSignal = false;
         event->accept();
         return;
@@ -146,7 +146,7 @@ void KItemListRoleEditor::autoAdjustSize()
 void KItemListRoleEditor::emitRoleEditingFinished()
 {
     if (!m_blockFinishedSignal) {
-        emit roleEditingFinished(m_role, KIO::encodeFileName(toPlainText()));
+        Q_EMIT roleEditingFinished(m_role, KIO::encodeFileName(toPlainText()));
     }
 }
 
index 309a82833f750e8e6c99f8ada0077bf036bbbede..646139a33069b58cfc1a8e046c093d39865b301d 100644 (file)
@@ -23,7 +23,7 @@ void KItemListRubberBand::setStartPosition(const QPointF& pos)
     if (m_startPos != pos) {
         const QPointF previous = m_startPos;
         m_startPos = pos;
-        emit startPositionChanged(m_startPos, previous);
+        Q_EMIT startPositionChanged(m_startPos, previous);
     }
 }
 
@@ -53,7 +53,7 @@ void KItemListRubberBand::setEndPosition(const QPointF& pos)
             }
         }
 
-        emit endPositionChanged(m_endPos, previous);
+        Q_EMIT endPositionChanged(m_endPos, previous);
     }
 }
 
@@ -66,7 +66,7 @@ void KItemListRubberBand::setActive(bool active)
 {
     if (m_active != active) {
         m_active = active;
-        emit activationChanged(active);
+        Q_EMIT activationChanged(active);
     }
 }
 
index 67b9cc11382f0f8d83dcfa66717262da603f8d61..9dc5fbadaf72cdb1579a5b47bad4666a825b1b21 100644 (file)
@@ -174,7 +174,7 @@ void KItemListViewAnimation::stop(QGraphicsWidget* widget, AnimationType type)
         m_animation[type].remove(widget);
         delete propertyAnim;
 
-        emit finished(widget, type);
+        Q_EMIT finished(widget, type);
     }
 }
 
@@ -213,7 +213,7 @@ void KItemListViewAnimation::slotFinished()
                 it.remove();
                 finishedAnim->deleteLater();
 
-                emit finished(widget, static_cast<AnimationType>(type));
+                Q_EMIT finished(widget, static_cast<AnimationType>(type));
                 return;
             }
         }
index c3634551d79da2ad79fb39509f6f7520f83c04d7..6bb70202776ee3d9ed7ee22d66ffbd060a485a5e 100644 (file)
@@ -34,7 +34,7 @@ bool MiddleClickActionEventFilter::eventFilter(QObject *watched, QEvent *event)
                         m_lastMiddlePressedAction = action;
                     } else if (event->type() == QEvent::MouseButtonRelease) {
                         if (m_lastMiddlePressedAction == action) {
-                            emit actionMiddleClicked(action);
+                            Q_EMIT actionMiddleClicked(action);
                         }
                         m_lastMiddlePressedAction = nullptr;
                     }
@@ -48,7 +48,7 @@ bool MiddleClickActionEventFilter::eventFilter(QObject *watched, QEvent *event)
                         m_lastMiddlePressedAction = action;
                     } else if (event->type() == QEvent::MouseButtonRelease) {
                         if (m_lastMiddlePressedAction == action) {
-                            emit actionMiddleClicked(action);
+                            Q_EMIT actionMiddleClicked(action);
                             return true;
                         }
                         m_lastMiddlePressedAction = nullptr;
index 73c3137d3791497dd90557b6581515fb09cee063..88083e7a2563d5d3289c983c91638532139e35cb 100644 (file)
@@ -187,7 +187,7 @@ void FoldersPanel::slotItemActivated(int index)
 {
     const KFileItem item = m_model->fileItem(index);
     if (!item.isNull()) {
-        emit folderActivated(item.url());
+        Q_EMIT folderActivated(item.url());
     }
 }
 
@@ -195,7 +195,7 @@ void FoldersPanel::slotItemMiddleClicked(int index)
 {
     const KFileItem item = m_model->fileItem(index);
     if (!item.isNull()) {
-        emit folderMiddleClicked(item.url());
+        Q_EMIT folderMiddleClicked(item.url());
     }
 }
 
@@ -235,7 +235,7 @@ void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* eve
 
         KIO::DropJob *job = DragAndDropHelper::dropUrls(destItem.mostLocalUrl(), &dropEvent, this);
         if (job) {
-            connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) emit errorMessage(job->errorString()); });
+            connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) Q_EMIT errorMessage(job->errorString()); });
         }
     }
 }
@@ -323,7 +323,7 @@ void FoldersPanel::loadTree(const QUrl& url, FoldersPanel::NavigationBehaviour n
 
     const int index = m_model->index(url);
     if (jumpHome) {
-      emit folderActivated(baseUrl);
+      Q_EMIT folderActivated(baseUrl);
     } else if (index >= 0) {
         updateCurrentItem(index);
     } else if (url == baseUrl) {
index ded88bd96785fa305fd1bff5364a9b483418fb33..946bad7207037dfeb55ad49fbee13f2e6661c77d 100644 (file)
@@ -119,14 +119,14 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
                 m_metaDataWidget->setConfigurationMode(Baloo::ConfigurationMode::Accept);
                 m_configureButtons->setVisible(false);
                 m_configureLabel->setVisible(false);
-                emit configurationFinished();
+                Q_EMIT configurationFinished();
             }
     );
     connect(m_configureButtons, &QDialogButtonBox::rejected, this, [this]() {
                 m_metaDataWidget->setConfigurationMode(Baloo::ConfigurationMode::Cancel);
                 m_configureButtons->setVisible(false);
                 m_configureLabel->setVisible(false);
-                emit configurationFinished();
+                Q_EMIT configurationFinished();
             }
     );
 
@@ -362,7 +362,7 @@ bool InformationPanelContent::gestureEvent(QGestureEvent* event)
 
     if (tap) {
         if (tap->state() == Qt::GestureFinished) {
-            emit contextMenuRequested(tap->position().toPoint());
+            Q_EMIT contextMenuRequested(tap->position().toPoint());
         }
         event->accept();
         return true;
index fa4b9e2266e65a6d37533e6454bccfbfa12c5a53..c9ccaa86ce0a5ff238f97cc56af7bd4a8d49447f 100644 (file)
@@ -223,7 +223,7 @@ void PhononWidget::play()
     }
 
     if (m_isVideo) {
-        emit hasVideoChanged(true);
+        Q_EMIT hasVideoChanged(true);
     }
 
     if (m_url != m_media->currentSource().url()) {
@@ -238,7 +238,7 @@ void PhononWidget::finished()
 {
     if (m_isVideo) {
         m_videoPlayer->hide();
-        emit hasVideoChanged(false);
+        Q_EMIT hasVideoChanged(false);
     }
 }
 
@@ -252,7 +252,7 @@ void PhononWidget::stop()
     if (m_media) {
         m_media->stop();
         m_videoPlayer->hide();
-        emit hasVideoChanged(false);
+        Q_EMIT hasVideoChanged(false);
     }
 }
 
index c9f1c8365560f5f9d8bcdf5372eeb436905d7d06..8ac6b46a853622ff67abc2987282c952f2f4e755 100644 (file)
@@ -237,7 +237,7 @@ void PlacesItemModel::requestEject(int index)
         } else {
             const QString label = item->text();
             const QString message = i18nc("@info", "The device '%1' is not a disk and cannot be ejected.", label);
-            emit errorMessage(message);
+            Q_EMIT errorMessage(message);
         }
     }
 }
@@ -254,7 +254,7 @@ void PlacesItemModel::requestTearDown(int index)
             // after we have emitted PlacesItemModel::storageTearDownRequested
             disconnect(tmp, &Solid::StorageAccess::teardownRequested,
                        item->signalHandler(), &PlacesItemSignalHandler::onTearDownRequested);
-            emit storageTearDownRequested(tmp->filePath());
+            Q_EMIT storageTearDownRequested(tmp->filePath());
         }
     }
 }
@@ -467,11 +467,11 @@ void PlacesItemModel::slotStorageTearDownDone(Solid::ErrorType error, const QVar
                             "One or more files on this device are opened in following applications: <application>%2</application>.",
                             blockingApps.count(), blockingApps.join(i18nc("separator in list of apps blocking device unmount", ", ")));
                 }
-                emit errorMessage(errorString);
+                Q_EMIT errorMessage(errorString);
             });
             listOpenFilesJob->start();
         } else {
-            emit errorMessage(errorData.toString());
+            Q_EMIT errorMessage(errorData.toString());
         }
     } else {
         // No error; it must have been unmounted successfully
@@ -496,16 +496,16 @@ void PlacesItemModel::slotStorageSetupDone(Solid::ErrorType error,
 
     if (error != Solid::NoError) {
         if (errorData.isValid()) {
-            emit errorMessage(i18nc("@info", "An error occurred while accessing '%1', the system responded: %2",
+            Q_EMIT errorMessage(i18nc("@info", "An error occurred while accessing '%1', the system responded: %2",
                                     item->text(),
                                     errorData.toString()));
         } else {
-            emit errorMessage(i18nc("@info", "An error occurred while accessing '%1'",
+            Q_EMIT errorMessage(i18nc("@info", "An error occurred while accessing '%1'",
                                     item->text()));
         }
-        emit storageSetupDone(index, false);
+        Q_EMIT storageSetupDone(index, false);
     } else {
-        emit storageSetupDone(index, true);
+        Q_EMIT storageSetupDone(index, true);
     }
 }
 
index b5c7ebcec8ff40e597fca61b5cee4cd92bc56168..19f16c7b52802f7a381fc2bc48e51dcc37b9cbe2 100644 (file)
@@ -32,7 +32,7 @@ void PlacesItemSignalHandler::onTearDownRequested(const QString& udi)
     if (m_item) {
         Solid::StorageAccess *tmp = m_item->device().as<Solid::StorageAccess>();
         if (tmp) {
-            emit tearDownExternallyRequested(tmp->filePath());
+            Q_EMIT tearDownExternallyRequested(tmp->filePath());
         }
     }
 }
index 03cf628b4068028a58f57855d16044f9b2b497f8..336b9deb835010fea6ed25e507dbace732132b19 100644 (file)
@@ -437,7 +437,7 @@ void PlacesPanel::slotUrlsDropped(const QUrl& dest, QDropEvent* event, QWidget*
 {
     KIO::DropJob *job = DragAndDropHelper::dropUrls(dest, event, parent);
     if (job) {
-        connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) emit errorMessage(job->errorString()); });
+        connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) Q_EMIT errorMessage(job->errorString()); });
     }
 }
 
@@ -529,9 +529,9 @@ void PlacesPanel::triggerItem(int index, Qt::MouseButton button)
         const QUrl url = m_model->data(index).value("url").toUrl();
         if (!url.isEmpty()) {
             if (button == Qt::MiddleButton) {
-                emit placeMiddleClicked(KFilePlacesModel::convertedUrl(url));
+                Q_EMIT placeMiddleClicked(KFilePlacesModel::convertedUrl(url));
             } else {
-                emit placeActivated(KFilePlacesModel::convertedUrl(url));
+                Q_EMIT placeActivated(KFilePlacesModel::convertedUrl(url));
             }
         }
     }
@@ -540,7 +540,7 @@ void PlacesPanel::triggerItem(int index, Qt::MouseButton button)
 void PlacesPanel::showHiddenEntries(bool shown)
 {
     m_model->setHiddenItemsShown(shown);
-    emit showHiddenEntriesChanged(shown);
+    Q_EMIT showHiddenEntriesChanged(shown);
 }
 
 int PlacesPanel::hiddenListCount()
index f6eb2f28f6b61c4e1f3245c10a4d7154045c669f..fdc6c64bb409677ae68f9b463d01a73bcc723864 100644 (file)
@@ -68,7 +68,7 @@ QString TerminalPanel::currentWorkingDirectory()
 void TerminalPanel::terminalExited()
 {
     m_terminal = nullptr;
-    emit hideTerminalPanel();
+    Q_EMIT hideTerminalPanel();
 }
 
 bool TerminalPanel::isHiddenInVisibleWindow() const
@@ -286,7 +286,7 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
     KMountPoint::Ptr mountPoint = KMountPoint::currentMountPoints().findByPath(m_konsolePartCurrentDirectory);
     if (mountPoint && mountPoint->mountType() != QStringLiteral("fuse.kio-fuse")) {
         // Not in KIOFUse mount, so just switch to the corresponding URL.
-        emit changeUrl(url);
+        Q_EMIT changeUrl(url);
         return;
     }
 
@@ -296,11 +296,11 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
         watcher->deleteLater();
         if (reply.isError()) {
             // KIOFuse errored out... just show the normal URL
-            emit changeUrl(url);
+            Q_EMIT changeUrl(url);
         } else {
             // Our location happens to be in a KIOFuse mount and is mounted.
             // Let's change the DolphinView to point to the remote URL equivalent.
-            emit changeUrl(QUrl::fromUserInput(reply.value()));
+            Q_EMIT changeUrl(QUrl::fromUserInput(reply.value()));
         }
     });
 }
index a0003f6bd759c19a752304645c08707cf47e1090..d4079f1eb2258d451b7ff0011e75285047a7d9c9 100644 (file)
@@ -272,7 +272,7 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList&
             } else {
                 removeSearchTag(tagName);
             }
-            emit facetChanged();
+            Q_EMIT facetChanged();
 
             if (!onlyOneTag) {
                 m_tagsSelector->menu()->show();
index 11ddc4bf2b317ec7520342a8df80690e548043b3..16f12b989e7dbf699ccd12319d8350a966ea31d5 100644 (file)
@@ -164,7 +164,7 @@ void DolphinSearchBox::setActive(bool active)
         m_active = active;
 
         if (active) {
-            emit activated();
+            Q_EMIT activated();
         }
     }
 }
@@ -202,13 +202,13 @@ void DolphinSearchBox::keyReleaseEvent(QKeyEvent* event)
     QWidget::keyReleaseEvent(event);
     if (event->key() == Qt::Key_Escape) {
         if (m_searchInput->text().isEmpty()) {
-            emit closeRequest();
+            Q_EMIT closeRequest();
         } else {
             m_searchInput->clear();
         }
     }
     else if (event->key() == Qt::Key_Down) {
-        emit focusViewRequest();
+        Q_EMIT focusViewRequest();
     }
 }
 
@@ -241,7 +241,7 @@ void DolphinSearchBox::emitSearchRequest()
     m_startSearchTimer->stop();
     m_startedSearching = true;
     m_saveSearchAction->setEnabled(true);
-    emit searchRequest();
+    Q_EMIT searchRequest();
 }
 
 void DolphinSearchBox::emitCloseRequest()
@@ -249,7 +249,7 @@ void DolphinSearchBox::emitCloseRequest()
     m_startSearchTimer->stop();
     m_startedSearching = false;
     m_saveSearchAction->setEnabled(false);
-    emit closeRequest();
+    Q_EMIT closeRequest();
 }
 
 void DolphinSearchBox::slotConfigurationChanged()
@@ -268,20 +268,20 @@ void DolphinSearchBox::slotSearchTextChanged(const QString& text)
     } else {
         m_startSearchTimer->start();
     }
-    emit searchTextChanged(text);
+    Q_EMIT searchTextChanged(text);
 }
 
 void DolphinSearchBox::slotReturnPressed()
 {
     emitSearchRequest();
-    emit focusViewRequest();
+    Q_EMIT focusViewRequest();
 }
 
 void DolphinSearchBox::slotFacetChanged()
 {
     m_startedSearching = true;
     m_startSearchTimer->stop();
-    emit searchRequest();
+    Q_EMIT searchRequest();
 }
 
 void DolphinSearchBox::slotSearchSaved()
index e89ef233c07cfb8e5859bc77503b25b412d01070..8e129e2419d7ab75874b99e22cf05c66d6524579 100644 (file)
@@ -122,7 +122,7 @@ void DolphinSettingsDialog::applySettings()
         page->applySettings();
     }
 
-    emit settingsChanged();
+    Q_EMIT settingsChanged();
 
     GeneralSettings* settings = GeneralSettings::self();
     if (settings->modifiedStartupSettings()) {
index a15e8220d3d8d5940a9baf7104c7faee6789ca4c..cd3499d03f3fbe1cf164039783d97c6b7b0c2f90 100644 (file)
@@ -109,6 +109,6 @@ void ServiceItemDelegate::slotCheckBoxClicked(bool checked)
 
 void ServiceItemDelegate::slotConfigureButtonClicked()
 {
-    emit requestServiceConfiguration(focusedIndex());
+    Q_EMIT requestServiceConfiguration(focusedIndex());
 }
 
index 41c00a95823c06896de227b2d29ff07de4fb72d3..9bfe1dad3e433c8269c0b768004191156d85bec0 100644 (file)
@@ -65,7 +65,7 @@ bool ServiceModel::setData(const QModelIndex& index, const QVariant& value, int
         return false;
     }
 
-    emit dataChanged(index, index);
+    Q_EMIT dataChanged(index, index);
     return true;
 }
 
index f0c2d53cfc371c75fdab6135bc2c48b1c2a08435..6c3f6bdadf9328149d918c43e3ed8a57447f0bdb 100644 (file)
@@ -180,7 +180,7 @@ void StartupSettingsPage::slotSettingsChanged()
 
     // Enable and disable home URL controls appropriately
     updateInitialViewOptions();
-    emit changed();
+    Q_EMIT changed();
 }
 
 void StartupSettingsPage::updateInitialViewOptions()
index 70969a2a333e47f262244ac9eb9dc4db51e9baea..cb66870afe83e722fc381bc7da51edfeabc2a2eb 100644 (file)
@@ -78,13 +78,13 @@ void DolphinFontRequester::openFontDialog()
     if (ok) {
         m_customFont = font;
         m_modeCombo->setFont(m_customFont);
-        emit changed();
+        Q_EMIT changed();
     }
 }
 
 void DolphinFontRequester::changeMode(int index)
 {
     setMode((index == CustomFont) ? CustomFont : SystemFont);
-    emit changed();
+    Q_EMIT changed();
 }
 
index 41893ce25a702bd750eaf5b4ee6e6a2f6fa87b1b..c6dbc82b43f42d673e9eadc44dba4eedb1031521 100644 (file)
@@ -309,7 +309,7 @@ void ViewPropertiesDialog::markAsDirty(bool isDirty)
 {
     if (m_isDirty != isDirty) {
         m_isDirty = isDirty;
-        emit isDirtyChanged(isDirty);
+        Q_EMIT isDirtyChanged(isDirty);
     }
 }
 
index f8b4a811dc9ead4cc9299b0c990023ca28709150..7dbe631b53cc880619e05effa1fc7a835994a05d 100644 (file)
@@ -36,8 +36,8 @@ void MountPointObserver::update()
 void MountPointObserver::freeSpaceResult(KIO::Job* job, KIO::filesize_t size, KIO::filesize_t available)
 {
     if (!job->error()) {
-        emit spaceInfoChanged(size, available);
+        Q_EMIT spaceInfoChanged(size, available);
     } else {
-        emit spaceInfoChanged(0, 0);
+        Q_EMIT spaceInfoChanged(0, 0);
     }
 }
index 6012f969691feb5d53f629efb4b3df79d87c95a0..457fe12aea8ed579b03f21e23ab44edce87ef7de 100644 (file)
@@ -74,6 +74,6 @@ void SpaceInfoObserver::spaceInfoChanged(quint64 size, quint64 available)
         m_dataSize = size;
         m_dataAvailable = available;
 
-        emit valuesChanged();
+        Q_EMIT valuesChanged();
     }
 }
index 35c5bbdfb30dd424e2ea2b5a6804589638b86fbe..bec266c3bab3818643ad85433873e4b3e84cc46a 100644 (file)
@@ -25,7 +25,7 @@ Trash::Trash()
     m_trashDirLister->setDelayedMimeTypes(true);
     auto trashDirContentChanged = [this]() {
         bool isTrashEmpty = m_trashDirLister->items().isEmpty();
-        emit emptinessChanged(isTrashEmpty);
+        Q_EMIT emptinessChanged(isTrashEmpty);
     };
     connect(m_trashDirLister, QOverload<>::of(&KCoreDirLister::completed), this, trashDirContentChanged);
     connect(m_trashDirLister, &KDirLister::itemsDeleted, this, trashDirContentChanged);
index e69f18d7eb652951da3b180bef843aad4f4405e3..a8624170d965d2dc12bf002dda6c7aeef66e8f44 100644 (file)
@@ -211,8 +211,8 @@ void DolphinView::setActive(bool active)
 
     if (active) {
         m_container->setFocus();
-        emit activated();
-        emit writeStateChanged(m_isFolderWritable);
+        Q_EMIT activated();
+        Q_EMIT writeStateChanged(m_isFolderWritable);
     }
 }
 
@@ -251,11 +251,11 @@ void DolphinView::setPreviewsShown(bool show)
 
     const int oldZoomLevel = m_view->zoomLevel();
     m_view->setPreviewsShown(show);
-    emit previewsShownChanged(show);
+    Q_EMIT previewsShownChanged(show);
 
     const int newZoomLevel = m_view->zoomLevel();
     if (newZoomLevel != oldZoomLevel) {
-        emit zoomLevelChanged(newZoomLevel, oldZoomLevel);
+        Q_EMIT zoomLevelChanged(newZoomLevel, oldZoomLevel);
     }
 }
 
@@ -278,7 +278,7 @@ void DolphinView::setHiddenFilesShown(bool show)
     props.setHiddenFilesShown(show);
 
     m_model->setShowHiddenFiles(show);
-    emit hiddenFilesShownChanged(show);
+    Q_EMIT hiddenFilesShownChanged(show);
 }
 
 bool DolphinView::hiddenFilesShown() const
@@ -298,7 +298,7 @@ void DolphinView::setGroupedSorting(bool grouped)
 
     m_container->controller()->model()->setGroupedSorting(grouped);
 
-    emit groupedSortingChanged(grouped);
+    Q_EMIT groupedSortingChanged(grouped);
 }
 
 bool DolphinView::groupedSorting() const
@@ -379,7 +379,7 @@ void DolphinView::setZoomLevel(int level)
     m_view->setZoomLevel(level);
     if (zoomLevel() != oldZoomLevel) {
         hideToolTip();
-        emit zoomLevelChanged(zoomLevel(), oldZoomLevel);
+        Q_EMIT zoomLevelChanged(zoomLevel(), oldZoomLevel);
     }
 }
 
@@ -435,7 +435,7 @@ void DolphinView::setVisibleRoles(const QList<QByteArray>& roles)
     m_visibleRoles = roles;
     m_view->setVisibleRoles(roles);
 
-    emit visibleRolesChanged(m_visibleRoles, previousRoles);
+    Q_EMIT visibleRolesChanged(m_visibleRoles, previousRoles);
 }
 
 QList<QByteArray> DolphinView::visibleRoles() const
@@ -469,7 +469,7 @@ void DolphinView::readSettings()
 
     const int newZoomLevel = m_view->zoomLevel();
     if (newZoomLevel != oldZoomLevel) {
-        emit zoomLevelChanged(newZoomLevel, oldZoomLevel);
+        Q_EMIT zoomLevelChanged(newZoomLevel, oldZoomLevel);
     }
 }
 
@@ -591,7 +591,7 @@ void DolphinView::setUrl(const QUrl& url)
     applyViewProperties();
     loadDirectory(url);
 
-    emit urlChanged(url);
+    Q_EMIT urlChanged(url);
 }
 
 void DolphinView::selectAll()
@@ -809,7 +809,7 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event)
         if (GeneralSettings::useTabForSwitchingSplitView()) {
             QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
             if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) {
-                emit toggleActiveViewRequested();
+                Q_EMIT toggleActiveViewRequested();
                 return true;
             }
         }
@@ -889,7 +889,7 @@ void DolphinView::slotItemActivated(int index)
 
     const KFileItem item = m_model->fileItem(index);
     if (!item.isNull()) {
-        emit itemActivated(item);
+        Q_EMIT itemActivated(item);
     }
 }
 
@@ -915,16 +915,16 @@ void DolphinView::slotItemsActivated(const KItemSet& indexes)
         const QUrl& url = openItemAsFolderUrl(item);
 
         if (!url.isEmpty()) { // Open folders in new tabs
-            emit tabRequested(url, DolphinTabWidget::AfterLastTab);
+            Q_EMIT tabRequested(url, DolphinTabWidget::AfterLastTab);
         } else {
             items.append(item);
         }
     }
 
     if (items.count() == 1) {
-        emit itemActivated(items.first());
+        Q_EMIT itemActivated(items.first());
     } else if (items.count() > 1) {
-        emit itemsActivated(items);
+        Q_EMIT itemsActivated(items);
     }
 }
 
@@ -933,9 +933,9 @@ void DolphinView::slotItemMiddleClicked(int index)
     const KFileItem& item = m_model->fileItem(index);
     const QUrl& url = openItemAsFolderUrl(item);
     if (!url.isEmpty()) {
-        emit tabRequested(url, DolphinTabWidget::AfterCurrentTab);
+        Q_EMIT tabRequested(url, DolphinTabWidget::AfterCurrentTab);
     } else if (isTabsForFilesEnabled()) {
-        emit tabRequested(item.url(), DolphinTabWidget::AfterCurrentTab);
+        Q_EMIT tabRequested(item.url(), DolphinTabWidget::AfterCurrentTab);
     }
 }
 
@@ -948,12 +948,12 @@ void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos)
     }
 
     const KFileItem item = m_model->fileItem(index);
-    emit requestContextMenu(pos.toPoint(), item, url(), QList<QAction*>());
+    Q_EMIT requestContextMenu(pos.toPoint(), item, url(), QList<QAction*>());
 }
 
 void DolphinView::slotViewContextMenuRequested(const QPointF& pos)
 {
-    emit requestContextMenu(pos.toPoint(), KFileItem(), url(), QList<QAction*>());
+    Q_EMIT requestContextMenu(pos.toPoint(), KFileItem(), url(), QList<QAction*>());
 }
 
 void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos)
@@ -1106,14 +1106,14 @@ void DolphinView::slotItemHovered(int index)
 #endif
     }
 
-    emit requestItemInfo(item);
+    Q_EMIT requestItemInfo(item);
 }
 
 void DolphinView::slotItemUnhovered(int index)
 {
     Q_UNUSED(index)
     hideToolTip();
-    emit requestItemInfo(KFileItem());
+    Q_EMIT requestItemInfo(KFileItem());
 }
 
 void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event)
@@ -1180,9 +1180,9 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons
     hideToolTip();
 
     if (buttons & Qt::BackButton) {
-        emit goBackRequested();
+        Q_EMIT goBackRequested();
     } else if (buttons & Qt::ForwardButton) {
-        emit goForwardRequested();
+        Q_EMIT goForwardRequested();
     }
 }
 
@@ -1215,7 +1215,7 @@ void DolphinView::slotItemCreated(const QUrl& url)
 void DolphinView::slotJobResult(KJob *job)
 {
     if (job->error()) {
-        emit errorMessage(job->errorString());
+        Q_EMIT errorMessage(job->errorString());
     }
     if (!m_selectedUrls.isEmpty()) {
         m_selectedUrls = KDirModel::simplifiedUrlList(m_selectedUrls);
@@ -1239,7 +1239,7 @@ void DolphinView::slotSelectionChanged(const KItemSet& current, const KItemSet&
 void DolphinView::emitSelectionChangedSignal()
 {
     m_selectionChangedTimer->stop();
-    emit selectionChanged(selectedItems());
+    Q_EMIT selectionChanged(selectedItems());
 }
 
 void DolphinView::updateSortRole(const QByteArray& role)
@@ -1250,7 +1250,7 @@ void DolphinView::updateSortRole(const QByteArray& role)
     KItemModelBase* model = m_container->controller()->model();
     model->setSortRole(role);
 
-    emit sortRoleChanged(role);
+    Q_EMIT sortRoleChanged(role);
 }
 
 void DolphinView::updateSortOrder(Qt::SortOrder order)
@@ -1260,7 +1260,7 @@ void DolphinView::updateSortOrder(Qt::SortOrder order)
 
     m_model->setSortOrder(order);
 
-    emit sortOrderChanged(order);
+    Q_EMIT sortOrderChanged(order);
 }
 
 void DolphinView::updateSortFoldersFirst(bool foldersFirst)
@@ -1270,7 +1270,7 @@ void DolphinView::updateSortFoldersFirst(bool foldersFirst)
 
     m_model->setSortDirectoriesFirst(foldersFirst);
 
-    emit sortFoldersFirstChanged(foldersFirst);
+    Q_EMIT sortFoldersFirstChanged(foldersFirst);
 }
 
 QPair<bool, QString> DolphinView::pasteInfo() const
@@ -1430,7 +1430,7 @@ void DolphinView::observeCreatedItem(const QUrl& url)
 void DolphinView::slotDirectoryRedirection(const QUrl& oldUrl, const QUrl& newUrl)
 {
     if (oldUrl.matches(url(), QUrl::StripTrailingSlash)) {
-        emit redirection(oldUrl, newUrl);
+        Q_EMIT redirection(oldUrl, newUrl);
         m_url = newUrl; // #186947
     }
 }
@@ -1561,18 +1561,18 @@ void DolphinView::slotTwoClicksRenamingTimerTimeout()
 void DolphinView::slotTrashFileFinished(KJob* job)
 {
     if (job->error() == 0) {
-        emit operationCompletedMessage(i18nc("@info:status", "Trash operation completed."));
+        Q_EMIT operationCompletedMessage(i18nc("@info:status", "Trash operation completed."));
     } else if (job->error() != KIO::ERR_USER_CANCELED) {
-        emit errorMessage(job->errorString());
+        Q_EMIT errorMessage(job->errorString());
     }
 }
 
 void DolphinView::slotDeleteFileFinished(KJob* job)
 {
     if (job->error() == 0) {
-        emit operationCompletedMessage(i18nc("@info:status", "Delete operation completed."));
+        Q_EMIT operationCompletedMessage(i18nc("@info:status", "Delete operation completed."));
     } else if (job->error() != KIO::ERR_USER_CANCELED) {
-        emit errorMessage(job->errorString());
+        Q_EMIT errorMessage(job->errorString());
     }
 }
 
@@ -1598,10 +1598,10 @@ void DolphinView::slotDirectoryLoadingStarted()
     // in DolphinView::slotDirectoryLoadingCompleted()
     if (m_isFolderWritable) {
         m_isFolderWritable = false;
-        emit writeStateChanged(m_isFolderWritable);
+        Q_EMIT writeStateChanged(m_isFolderWritable);
     }
 
-    emit directoryLoadingStarted();
+    Q_EMIT directoryLoadingStarted();
 }
 
 void DolphinView::slotDirectoryLoadingCompleted()
@@ -1610,7 +1610,7 @@ void DolphinView::slotDirectoryLoadingCompleted()
     // because the view might not be in its final state yet.
     QTimer::singleShot(0, this, &DolphinView::updateViewState);
 
-    emit directoryLoadingCompleted();
+    Q_EMIT directoryLoadingCompleted();
 
     updateWritableState();
 }
@@ -1628,7 +1628,7 @@ void DolphinView::slotSortOrderChangedByHeader(Qt::SortOrder current, Qt::SortOr
     ViewProperties props(viewPropertiesUrl());
     props.setSortOrder(current);
 
-    emit sortOrderChanged(current);
+    Q_EMIT sortOrderChanged(current);
 }
 
 void DolphinView::slotSortRoleChangedByHeader(const QByteArray& current, const QByteArray& previous)
@@ -1639,7 +1639,7 @@ void DolphinView::slotSortRoleChangedByHeader(const QByteArray& current, const Q
     ViewProperties props(viewPropertiesUrl());
     props.setSortRole(current);
 
-    emit sortRoleChanged(current);
+    Q_EMIT sortRoleChanged(current);
 }
 
 void DolphinView::slotVisibleRolesChangedByHeader(const QList<QByteArray>& current,
@@ -1655,7 +1655,7 @@ void DolphinView::slotVisibleRolesChangedByHeader(const QList<QByteArray>& curre
     ViewProperties props(viewPropertiesUrl());
     props.setVisibleRoles(m_visibleRoles);
 
-    emit visibleRolesChanged(m_visibleRoles, previousVisibleRoles);
+    Q_EMIT visibleRolesChanged(m_visibleRoles, previousVisibleRoles);
 }
 
 void DolphinView::slotRoleEditingCanceled()
@@ -1738,9 +1738,9 @@ void DolphinView::loadDirectory(const QUrl& url, bool reload)
     if (!url.isValid()) {
         const QString location(url.toDisplayString(QUrl::PreferLocalFile));
         if (location.isEmpty()) {
-            emit errorMessage(i18nc("@info:status", "The location is empty."));
+            Q_EMIT errorMessage(i18nc("@info:status", "The location is empty."));
         } else {
-            emit errorMessage(i18nc("@info:status", "The location '%1' is invalid.", location));
+            Q_EMIT errorMessage(i18nc("@info:status", "The location '%1' is invalid.", location));
         }
         return;
     }
@@ -1773,41 +1773,41 @@ void DolphinView::applyViewProperties(const ViewProperties& props)
         const int oldZoomLevel = m_view->zoomLevel();
         applyModeToView();
 
-        emit modeChanged(m_mode, previousMode);
+        Q_EMIT modeChanged(m_mode, previousMode);
 
         if (m_view->zoomLevel() != oldZoomLevel) {
-            emit zoomLevelChanged(m_view->zoomLevel(), oldZoomLevel);
+            Q_EMIT zoomLevelChanged(m_view->zoomLevel(), oldZoomLevel);
         }
     }
 
     const bool hiddenFilesShown = props.hiddenFilesShown();
     if (hiddenFilesShown != m_model->showHiddenFiles()) {
         m_model->setShowHiddenFiles(hiddenFilesShown);
-        emit hiddenFilesShownChanged(hiddenFilesShown);
+        Q_EMIT hiddenFilesShownChanged(hiddenFilesShown);
     }
 
     const bool groupedSorting = props.groupedSorting();
     if (groupedSorting != m_model->groupedSorting()) {
         m_model->setGroupedSorting(groupedSorting);
-        emit groupedSortingChanged(groupedSorting);
+        Q_EMIT groupedSortingChanged(groupedSorting);
     }
 
     const QByteArray sortRole = props.sortRole();
     if (sortRole != m_model->sortRole()) {
         m_model->setSortRole(sortRole);
-        emit sortRoleChanged(sortRole);
+        Q_EMIT sortRoleChanged(sortRole);
     }
 
     const Qt::SortOrder sortOrder = props.sortOrder();
     if (sortOrder != m_model->sortOrder()) {
         m_model->setSortOrder(sortOrder);
-        emit sortOrderChanged(sortOrder);
+        Q_EMIT sortOrderChanged(sortOrder);
     }
 
     const bool sortFoldersFirst = props.sortFoldersFirst();
     if (sortFoldersFirst != m_model->sortDirectoriesFirst()) {
         m_model->setSortDirectoriesFirst(sortFoldersFirst);
-        emit sortFoldersFirstChanged(sortFoldersFirst);
+        Q_EMIT sortFoldersFirstChanged(sortFoldersFirst);
     }
 
     const QList<QByteArray> visibleRoles = props.visibleRoles();
@@ -1815,7 +1815,7 @@ void DolphinView::applyViewProperties(const ViewProperties& props)
         const QList<QByteArray> previousVisibleRoles = m_visibleRoles;
         m_visibleRoles = visibleRoles;
         m_view->setVisibleRoles(visibleRoles);
-        emit visibleRolesChanged(m_visibleRoles, previousVisibleRoles);
+        Q_EMIT visibleRolesChanged(m_visibleRoles, previousVisibleRoles);
     }
 
     const bool previewsShown = props.previewsShown();
@@ -1823,11 +1823,11 @@ void DolphinView::applyViewProperties(const ViewProperties& props)
         const int oldZoomLevel = zoomLevel();
 
         m_view->setPreviewsShown(previewsShown);
-        emit previewsShownChanged(previewsShown);
+        Q_EMIT previewsShownChanged(previewsShown);
 
         // Changing the preview-state might result in a changed zoom-level
         if (oldZoomLevel != zoomLevel()) {
-            emit zoomLevelChanged(zoomLevel(), oldZoomLevel);
+            Q_EMIT zoomLevelChanged(zoomLevel(), oldZoomLevel);
         }
     }
 
@@ -1915,7 +1915,7 @@ void DolphinView::updateWritableState()
     m_isFolderWritable = capabilities.supportsWriting();
 
     if (m_isFolderWritable != wasFolderWritable) {
-        emit writeStateChanged(m_isFolderWritable);
+        Q_EMIT writeStateChanged(m_isFolderWritable);
     }
 }
 
@@ -1974,5 +1974,5 @@ void DolphinView::slotDecreaseZoom()
 
 void DolphinView::slotSwipeUp()
 {
-    emit goUpRequested();
+    Q_EMIT goUpRequested();
 }
index 5975146ff8606e6a221e26813cf28a66602fdefa..a2cb89a585f2458502ee967c06b81bca69c8089c 100644 (file)
@@ -381,25 +381,25 @@ void DolphinViewActionHandler::slotViewModeActionTriggered(QAction* action)
 
 void DolphinViewActionHandler::slotRename()
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->renameSelectedItems();
 }
 
 void DolphinViewActionHandler::slotTrashActivated()
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->trashSelectedItems();
 }
 
 void DolphinViewActionHandler::slotDeleteItems()
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->deleteSelectedItems();
 }
 
 void DolphinViewActionHandler::togglePreview(bool show)
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->setPreviewsShown(show);
 }
 
@@ -498,7 +498,7 @@ void DolphinViewActionHandler::slotSortFoldersFirstChanged(bool foldersFirst)
 
 void DolphinViewActionHandler::toggleVisibleRole(QAction* action)
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
 
     const QByteArray toggledRole = action->data().toByteArray();
 
@@ -546,7 +546,7 @@ void DolphinViewActionHandler::slotGroupedSortingChanged(bool groupedSorting)
 
 void DolphinViewActionHandler::toggleShowHiddenFiles(bool show)
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->setHiddenFilesShown(show);
 }
 
@@ -673,7 +673,7 @@ void DolphinViewActionHandler::slotSortTriggered(QAction* action)
 
 void DolphinViewActionHandler::slotAdjustViewProperties()
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     QPointer<ViewPropertiesDialog> dialog = new ViewPropertiesDialog(m_currentView);
     dialog->exec();
     delete dialog;
@@ -681,7 +681,7 @@ void DolphinViewActionHandler::slotAdjustViewProperties()
 
 void DolphinViewActionHandler::slotDuplicate()
 {
-    emit actionBeingHandled();
+    Q_EMIT actionBeingHandled();
     m_currentView->duplicateSelectedItems();
 }
 
index 359ae0152bd02c06078e134339629f1358c626ca..c66c639c87fbdd86b92aec1edf01966d546c6fbb 100644 (file)
@@ -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,
index baad21a65de41b2ed87ded0e99f7de58520e3254..4bdd8321a264360b20095fe39a1e4477e467c7ae 100644 (file)
@@ -32,14 +32,14 @@ void ViewModeController::redirectToUrl(const QUrl& url)
 
 void ViewModeController::indicateActivationChange(bool active)
 {
-    emit activationChanged(active);
+    Q_EMIT activationChanged(active);
 }
 
 void ViewModeController::setNameFilter(const QString& nameFilter)
 {
     if (nameFilter != m_nameFilter) {
         m_nameFilter = nameFilter;
-        emit nameFilterChanged(nameFilter);
+        Q_EMIT nameFilterChanged(nameFilter);
     }
 }
 
@@ -54,7 +54,7 @@ void ViewModeController::setZoomLevel(int level)
     Q_ASSERT(level <= ZoomLevelInfo::maximumLevel());
     if (level != m_zoomLevel) {
         m_zoomLevel = level;
-        emit zoomLevelChanged(m_zoomLevel);
+        Q_EMIT zoomLevelChanged(m_zoomLevel);
     }
 }
 
@@ -67,8 +67,8 @@ void ViewModeController::setUrl(const QUrl& url)
 {
     if (m_url != url) {
         m_url = url;
-        emit cancelPreviews();
-        emit urlChanged(url);
+        Q_EMIT cancelPreviews();
+        Q_EMIT urlChanged(url);
     }
 }