mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Compile with QT_NO_KEYWORDS
This commit is contained in:
parent
a24327cd50
commit
97415729c3
|
@ -17,6 +17,7 @@ remove_definitions(
|
|||
-DQT_NO_CAST_FROM_ASCII
|
||||
-DQT_NO_CAST_TO_ASCII
|
||||
-DQT_NO_FOREACH
|
||||
-DQT_NO_KEYWORDS
|
||||
)
|
||||
|
||||
##########################################
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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() :
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -122,7 +122,7 @@ void DolphinSettingsDialog::applySettings()
|
|||
page->applySettings();
|
||||
}
|
||||
|
||||
emit settingsChanged();
|
||||
Q_EMIT settingsChanged();
|
||||
|
||||
GeneralSettings* settings = GeneralSettings::self();
|
||||
if (settings->modifiedStartupSettings()) {
|
||||
|
|
|
@ -109,6 +109,6 @@ void ServiceItemDelegate::slotCheckBoxClicked(bool checked)
|
|||
|
||||
void ServiceItemDelegate::slotConfigureButtonClicked()
|
||||
{
|
||||
emit requestServiceConfiguration(focusedIndex());
|
||||
Q_EMIT requestServiceConfiguration(focusedIndex());
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ void StartupSettingsPage::slotSettingsChanged()
|
|||
|
||||
// Enable and disable home URL controls appropriately
|
||||
updateInitialViewOptions();
|
||||
emit changed();
|
||||
Q_EMIT changed();
|
||||
}
|
||||
|
||||
void StartupSettingsPage::updateInitialViewOptions()
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ void ViewPropertiesDialog::markAsDirty(bool isDirty)
|
|||
{
|
||||
if (m_isDirty != isDirty) {
|
||||
m_isDirty = isDirty;
|
||||
emit isDirtyChanged(isDirty);
|
||||
Q_EMIT isDirtyChanged(isDirty);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,6 @@ void SpaceInfoObserver::spaceInfoChanged(quint64 size, quint64 available)
|
|||
m_dataSize = size;
|
||||
m_dataAvailable = available;
|
||||
|
||||
emit valuesChanged();
|
||||
Q_EMIT valuesChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue