Use Q_EMIT instead of emit

In C++20 there are new classes that have member functions named emit().
c.f.:
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
https://en.cppreference.com/w/cpp/io/basic_osyncstream/emit

GIT_SILENT
This commit is contained in:
Ahmad Samir 2021-01-18 13:08:40 +02:00
parent 108939c420
commit 34a8b79aa7
46 changed files with 294 additions and 294 deletions

View File

@ -485,7 +485,7 @@ void IconItemTest::implicitSize()
KIconLoader::global()->reconfigure(QString());
// merely changing the setting and calling reconfigure won't emit this signal,
// the KCM uses a method "newIconLoader" method which does that but it's deprecated
emit KIconLoader::global()->iconLoaderSettingsChanged();
Q_EMIT KIconLoader::global()->iconLoaderSettingsChanged();
QCOMPARE(widthSpy.count(), 1);
QCOMPARE(heightSpy.count(), 1);

View File

@ -45,12 +45,12 @@ void Calendar::setDisplayedDate(const QDate &dateTime)
// m_dayHelper->setDate(m_displayedDate.year(), m_displayedDate.month());
updateData();
emit displayedDateChanged();
Q_EMIT displayedDateChanged();
if (oldMonth != m_displayedDate.month()) {
emit monthNameChanged();
Q_EMIT monthNameChanged();
}
if (oldYear != m_displayedDate.year()) {
emit yearChanged();
Q_EMIT yearChanged();
}
}
@ -79,14 +79,14 @@ void Calendar::setToday(const QDateTime &dateTime)
// if the resetToToday() was called
updateData();
}
emit todayChanged();
Q_EMIT todayChanged();
}
void Calendar::resetToToday()
{
m_displayedDate = m_today;
updateData();
emit displayedDateChanged();
Q_EMIT displayedDateChanged();
}
int Calendar::types() const
@ -103,7 +103,7 @@ void Calendar::setTypes(int types)
// m_types = static_cast<Types>(types);
// updateTypes();
emit typesChanged();
Q_EMIT typesChanged();
}
int Calendar::days()
@ -116,7 +116,7 @@ void Calendar::setDays(int days)
if (m_days != days) {
m_days = days;
updateData();
emit daysChanged();
Q_EMIT daysChanged();
}
}
@ -130,7 +130,7 @@ void Calendar::setWeeks(int weeks)
if (m_weeks != weeks) {
m_weeks = weeks;
updateData();
emit weeksChanged();
Q_EMIT weeksChanged();
}
}
@ -156,7 +156,7 @@ void Calendar::setFirstDayOfWeek(int day)
}
updateData();
emit firstDayOfWeekChanged();
Q_EMIT firstDayOfWeekChanged();
}
}
@ -292,7 +292,7 @@ void Calendar::updateData()
const DayData &data = m_dayList.at(i);
m_weekList.append(QDate(data.yearNumber, data.monthNumber, data.dayNumber).weekNumber());
}
emit weeksModelChanged();
Q_EMIT weeksModelChanged();
m_daysModel->update();
// qDebug() << "---------------------------------------------------------------";

View File

@ -41,7 +41,7 @@ void CalendarData::setStartDate(const QDate &dateTime)
m_startDate = dateTime;
// m_filteredList->setStartDate(m_startDate);
emit startDateChanged();
Q_EMIT startDateChanged();
}
QDate CalendarData::endDate() const
@ -57,7 +57,7 @@ void CalendarData::setEndDate(const QDate &dateTime)
m_endDate = dateTime;
// m_filteredList->setEndDate(m_endDate);
emit endDateChanged();
Q_EMIT endDateChanged();
}
int CalendarData::types() const

View File

@ -92,7 +92,7 @@ void DaysModel::update()
}
// We always have 42 items (or weeks * num of days in week) so we only have to tell the view that the data changed.
emit dataChanged(index(0, 0), index(m_data->count() - 1, 0));
Q_EMIT dataChanged(index(0, 0), index(m_data->count() - 1, 0));
}
void DaysModel::onDataReady(const QMultiHash<QDate, CalendarEvents::EventData> &data)
@ -105,7 +105,7 @@ void DaysModel::onDataReady(const QMultiHash<QDate, CalendarEvents::EventData> &
}
// only the containsEventItems roles may have changed
emit dataChanged(index(0, 0), index(m_data->count() - 1, 0),
Q_EMIT dataChanged(index(0, 0), index(m_data->count() - 1, 0),
{containsEventItems, containsMajorEventItems, containsMinorEventItems});
Q_EMIT agendaUpdated(QDate::currentDate());

View File

@ -105,7 +105,7 @@ public:
m_manager->m_enabledPlugins.removeOne(pluginPath);
}
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
return true;
}

View File

@ -191,7 +191,7 @@ void ColorScope::setInherit(bool inherit)
return;
}
m_inherit = inherit;
emit inheritChanged();
Q_EMIT inheritChanged();
checkColorGroupChanged();
}

View File

@ -79,7 +79,7 @@ void SortFilterModel::setModel(QAbstractItemModel *model)
syncRoleNames();
}
emit sourceModelChanged(model);
Q_EMIT sourceModelChanged(model);
}
bool SortFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
@ -189,7 +189,7 @@ void SortFilterModel::setSortColumn(int column)
return;
}
sort(column, sortOrder());
emit sortColumnChanged();
Q_EMIT sortColumnChanged();
}
QVariantMap SortFilterModel::get(int row) const
@ -434,7 +434,7 @@ void DataModel::setItems(const QString &sourceName, const QVariantList &list)
} else if (delta < 0) {
endRemoveRows();
}
emit dataChanged(createIndex(sourceIndex, 0),
Q_EMIT dataChanged(createIndex(sourceIndex, 0),
createIndex(sourceIndex + qMin(list.length(), oldLength), 0));
}

View File

@ -42,7 +42,7 @@ void DataSource::setConnectedSources(const QStringList &sources)
if (m_dataEngine) {
m_connectedSources.append(source);
m_dataEngine->connectSource(source, this, m_interval, m_intervalAlignment);
emit sourceConnected(source);
Q_EMIT sourceConnected(source);
}
}
}
@ -53,14 +53,14 @@ void DataSource::setConnectedSources(const QStringList &sources)
sourcesChanged = true;
if (m_dataEngine) {
m_dataEngine->disconnectSource(source, this);
emit sourceDisconnected(source);
Q_EMIT sourceDisconnected(source);
}
}
}
if (sourcesChanged) {
m_connectedSources = sources;
emit connectedSourcesChanged();
Q_EMIT connectedSourcesChanged();
}
}
@ -73,7 +73,7 @@ void DataSource::setEngine(const QString &e)
m_engine = e;
if (m_engine.isEmpty()) {
emit engineChanged();
Q_EMIT engineChanged();
return;
}
@ -81,7 +81,7 @@ void DataSource::setEngine(const QString &e)
Plasma::DataEngine *engine = dataEngine(m_engine);
if (!engine) {
qWarning() << "DataEngine" << m_engine << "not found";
emit engineChanged();
Q_EMIT engineChanged();
return;
}
@ -112,7 +112,7 @@ void DataSource::setEngine(const QString &e)
updateSources();
emit engineChanged();
Q_EMIT engineChanged();
}
void DataSource::setInterval(const int interval)
@ -123,7 +123,7 @@ void DataSource::setInterval(const int interval)
m_interval = interval;
setupData();
emit intervalChanged();
Q_EMIT intervalChanged();
}
void DataSource::setIntervalAlignment(Plasma::Types::IntervalAlignment intervalAlignment)
@ -134,7 +134,7 @@ void DataSource::setIntervalAlignment(Plasma::Types::IntervalAlignment intervalA
m_intervalAlignment = intervalAlignment;
setupData();
emit intervalAlignmentChanged();
Q_EMIT intervalAlignmentChanged();
}
void DataSource::setupData()
@ -150,7 +150,7 @@ void DataSource::setupData()
for (const QString &source : qAsConst(m_connectedSources)) {
m_dataEngine->connectSource(source, this, m_interval, m_intervalAlignment);
emit sourceConnected(source);
Q_EMIT sourceConnected(source);
}
}
@ -159,8 +159,8 @@ void DataSource::dataUpdated(const QString &sourceName, const Plasma::DataEngine
//it can arrive also data we don't explicitly connected a source
if (m_connectedSources.contains(sourceName)) {
m_data->insert(sourceName, data);
emit dataChanged();
emit newData(sourceName, data);
Q_EMIT dataChanged();
Q_EMIT newData(sourceName, data);
} else if (m_dataEngine) {
m_dataEngine->disconnectSource(sourceName, this);
}
@ -188,8 +188,8 @@ void DataSource::removeSource(const QString &source)
//TODO: emit those signals as last thing
if (m_connectedSources.contains(source)) {
m_connectedSources.removeAll(source);
emit sourceDisconnected(source);
emit connectedSourcesChanged();
Q_EMIT sourceDisconnected(source);
Q_EMIT connectedSourcesChanged();
}
if (m_dataEngine) {
@ -223,8 +223,8 @@ void DataSource::connectSource(const QString &source)
m_connectedSources.append(source);
if (m_dataEngine) {
m_dataEngine->connectSource(source, this, m_interval, m_intervalAlignment);
emit sourceConnected(source);
emit connectedSourcesChanged();
Q_EMIT sourceConnected(source);
Q_EMIT connectedSourcesChanged();
}
}
@ -233,8 +233,8 @@ void DataSource::disconnectSource(const QString &source)
if (m_dataEngine && m_connectedSources.contains(source)) {
m_connectedSources.removeAll(source);
m_dataEngine->disconnectSource(source, this);
emit sourceDisconnected(source);
emit connectedSourcesChanged();
Q_EMIT sourceDisconnected(source);
Q_EMIT connectedSourcesChanged();
}
}
@ -247,7 +247,7 @@ void DataSource::updateSources()
if (sources != m_sources) {
m_sources = sources;
emit sourcesChanged();
Q_EMIT sourcesChanged();
}
}

View File

@ -236,7 +236,7 @@ QVector<qreal> FrameSvgItemMargins::margins() const
void FrameSvgItemMargins::update()
{
emit marginsChanged();
Q_EMIT marginsChanged();
}
void FrameSvgItemMargins::setFixed(bool fixed)
@ -246,7 +246,7 @@ void FrameSvgItemMargins::setFixed(bool fixed)
}
m_fixed = fixed;
emit marginsChanged();
Q_EMIT marginsChanged();
}
bool FrameSvgItemMargins::isFixed() const
@ -261,7 +261,7 @@ void FrameSvgItemMargins::setInset(bool inset)
}
m_inset = inset;
emit marginsChanged();
Q_EMIT marginsChanged();
}
bool FrameSvgItemMargins::isInset() const
@ -333,7 +333,7 @@ void FrameSvgItem::setImagePath(const QString &path)
setImplicitHeight(m_frameSvg->marginSize(Plasma::Types::TopMargin) + m_frameSvg->marginSize(Plasma::Types::BottomMargin));
}
emit imagePathChanged();
Q_EMIT imagePathChanged();
if (isComponentComplete()) {
applyPrefixes();
@ -378,7 +378,7 @@ void FrameSvgItem::setPrefix(const QVariant &prefixes)
setImplicitHeight(m_frameSvg->marginSize(Plasma::Types::TopMargin) + m_frameSvg->marginSize(Plasma::Types::BottomMargin));
}
emit prefixChanged();
Q_EMIT prefixChanged();
if (isComponentComplete()) {
m_frameSvg->resizeFrame(QSizeF(width(), height()));
@ -431,7 +431,7 @@ void FrameSvgItem::setColorGroup(Plasma::Theme::ColorGroup group)
m_frameSvg->setColorGroup(group);
emit colorGroupChanged();
Q_EMIT colorGroupChanged();
}
Plasma::Theme::ColorGroup FrameSvgItem::colorGroup() const
@ -463,7 +463,7 @@ void FrameSvgItem::setEnabledBorders(const Plasma::FrameSvg::EnabledBorders bord
CheckMarginsChange checkMargins(m_oldMargins, m_margins);
m_frameSvg->setEnabledBorders(borders);
emit enabledBordersChanged();
Q_EMIT enabledBordersChanged();
m_textureChanged = true;
update();
}
@ -498,7 +498,7 @@ void FrameSvgItem::geometryChanged(const QRectF &newGeometry,
// the above only triggers updatePaintNode, so we have to inform subscribers
// about the potential change of the mask explicitly here
if (isComponentComplete) {
emit maskChanged();
Q_EMIT maskChanged();
}
}
@ -538,8 +538,8 @@ void FrameSvgItem::doUpdate()
update();
emit maskChanged();
emit repaintNeeded();
Q_EMIT maskChanged();
Q_EMIT repaintNeeded();
}
Plasma::FrameSvg *FrameSvgItem::frameSvg() const
@ -689,7 +689,7 @@ void FrameSvgItem::applyPrefixes()
if (m_prefixes.isEmpty()) {
m_frameSvg->setElementPrefix(QString());
if (oldPrefix != m_frameSvg->prefix()) {
emit usedPrefixChanged();
Q_EMIT usedPrefixChanged();
}
return;
}
@ -707,7 +707,7 @@ void FrameSvgItem::applyPrefixes()
m_frameSvg->setElementPrefix(m_prefixes.constLast());
}
if (oldPrefix != m_frameSvg->prefix()) {
emit usedPrefixChanged();
Q_EMIT usedPrefixChanged();
}
}

View File

@ -384,10 +384,10 @@ void IconItem::setSource(const QVariant &source)
updateImplicitSize();
emit sourceChanged();
Q_EMIT sourceChanged();
if (isValid() != oldValid) {
emit validChanged();
Q_EMIT validChanged();
}
}
@ -403,7 +403,7 @@ void IconItem::setColorGroup(Plasma::Theme::ColorGroup group)
}
m_colorGroup = group;
emit colorGroupChanged();
Q_EMIT colorGroupChanged();
}
Plasma::Theme::ColorGroup IconItem::colorGroup() const
@ -419,7 +419,7 @@ void IconItem::setOverlays(const QStringList &overlays)
}
m_overlays = overlays;
schedulePixmapUpdate();
emit overlaysChanged();
Q_EMIT overlaysChanged();
}
QStringList IconItem::overlays() const
@ -445,7 +445,7 @@ void IconItem::setActive(bool active)
m_allowNextAnimation = true;
schedulePixmapUpdate();
}
emit activeChanged();
Q_EMIT activeChanged();
}
bool IconItem::isAnimated() const
@ -460,7 +460,7 @@ void IconItem::setAnimated(bool animated)
}
m_animated = animated;
emit animatedChanged();
Q_EMIT animatedChanged();
}
bool IconItem::usesPlasmaTheme() const
@ -482,7 +482,7 @@ void IconItem::setUsesPlasmaTheme(bool usesPlasmaTheme)
setSource(src);
update();
emit usesPlasmaThemeChanged();
Q_EMIT usesPlasmaThemeChanged();
}
bool IconItem::roundToIconSize() const
@ -499,10 +499,10 @@ void IconItem::setRoundToIconSize(bool roundToIconSize)
const QSize oldPaintedSize = paintedSize();
m_roundToIconSize = roundToIconSize;
emit roundToIconSizeChanged();
Q_EMIT roundToIconSizeChanged();
if (oldPaintedSize != paintedSize()) {
emit paintedSizeChanged();
Q_EMIT paintedSizeChanged();
}
schedulePixmapUpdate();
@ -559,7 +559,7 @@ void IconItem::setStatus(Plasma::Svg::Status status)
}
m_status = status;
emit statusChanged();
Q_EMIT statusChanged();
}
Plasma::Svg::Status IconItem::status() const
@ -571,14 +571,14 @@ void IconItem::setImplicitHeight2(int height)
{
m_implicitHeightSetByUser = true;
setImplicitHeight(height);
emit implicitHeightChanged2();
Q_EMIT implicitHeightChanged2();
}
void IconItem::setImplicitWidth2(int width)
{
m_implicitWidthSetByUser = true;
setImplicitWidth(width);
emit implicitWidthChanged2();
Q_EMIT implicitWidthChanged2();
}
void IconItem::updatePolish()
@ -735,7 +735,7 @@ void IconItem::loadPixmap()
m_textureChanged = true;
if (oldPaintedSize != paintedSize()) {
emit paintedSizeChanged();
Q_EMIT paintedSizeChanged();
}
//don't animate initial setting
@ -792,7 +792,7 @@ void IconItem::geometryChanged(const QRectF &newGeometry,
}
if (paintedSize(oldGeometry.size()) != paintedSize(newGeometry.size())) {
emit paintedSizeChanged();
Q_EMIT paintedSizeChanged();
}
}

View File

@ -32,7 +32,7 @@ void ServiceOperationStatus::setService(Plasma::Service *service)
m_service = service;
updateStatus();
emit serviceChanged();
Q_EMIT serviceChanged();
}
Plasma::Service *ServiceOperationStatus::service() const
@ -48,7 +48,7 @@ void ServiceOperationStatus::setOperation(const QString &operation)
m_operation = operation;
updateStatus();
emit operationChanged();
Q_EMIT operationChanged();
}
QString ServiceOperationStatus::operation() const
@ -64,7 +64,7 @@ void ServiceOperationStatus::setEnabled(bool enabled)
m_enabled = enabled;
updateStatus();
emit enabledChanged();
Q_EMIT enabledChanged();
}
bool ServiceOperationStatus::isEnabled() const
@ -81,7 +81,7 @@ void ServiceOperationStatus::updateStatus()
bool enabled = m_service.data()->isOperationEnabled(m_operation);
if (enabled != m_enabled) {
m_enabled = enabled;
emit enabledChanged();
Q_EMIT enabledChanged();
}
}

View File

@ -47,8 +47,8 @@ void SvgItem::setElementId(const QString &elementID)
}
m_elementID = elementID;
emit elementIdChanged();
emit naturalSizeChanged();
Q_EMIT elementIdChanged();
Q_EMIT naturalSizeChanged();
scheduleImageUpdate();
}
@ -92,8 +92,8 @@ void SvgItem::setSvg(Plasma::Svg *svg)
scheduleImageUpdate();
emit svgChanged();
emit naturalSizeChanged();
Q_EMIT svgChanged();
Q_EMIT naturalSizeChanged();
}
Plasma::Svg *SvgItem::svg() const

View File

@ -103,7 +103,7 @@ void ToolTip::setMainItem(QQuickItem *mainItem)
if (m_mainItem.data() != mainItem) {
m_mainItem = mainItem;
emit mainItemChanged();
Q_EMIT mainItemChanged();
if (!isValid() && s_dialog && s_dialog->owner() == this) {
s_dialog->setVisible(false);
@ -117,7 +117,7 @@ void ToolTip::showToolTip()
return;
}
emit aboutToShow();
Q_EMIT aboutToShow();
ToolTipDialog *dlg = tooltipDialogInstance();
@ -166,7 +166,7 @@ void ToolTip::setMainText(const QString &mainText)
}
m_mainText = mainText;
emit mainTextChanged();
Q_EMIT mainTextChanged();
if (!isValid() && s_dialog && s_dialog->owner() == this) {
s_dialog->setVisible(false);
@ -185,7 +185,7 @@ void ToolTip::setSubText(const QString &subText)
}
m_subText = subText;
emit subTextChanged();
Q_EMIT subTextChanged();
if (!isValid() && s_dialog && s_dialog->owner() == this) {
s_dialog->setVisible(false);
@ -204,7 +204,7 @@ void ToolTip::setTextFormat(int format)
}
m_textFormat = format;
emit textFormatChanged();
Q_EMIT textFormatChanged();
}
Plasma::Types::Location ToolTip::location() const
@ -218,7 +218,7 @@ void ToolTip::setLocation(Plasma::Types::Location location)
return;
}
m_location = location;
emit locationChanged();
Q_EMIT locationChanged();
}
void ToolTip::setActive(bool active)
@ -231,7 +231,7 @@ void ToolTip::setActive(bool active)
if (!active) {
tooltipDialogInstance()->dismiss();
}
emit activeChanged();
Q_EMIT activeChanged();
}
void ToolTip::setInteractive(bool interactive)
@ -242,7 +242,7 @@ void ToolTip::setInteractive(bool interactive)
m_interactive = interactive;
emit interactiveChanged();
Q_EMIT interactiveChanged();
}
void ToolTip::setTimeout(int timeout)
@ -272,7 +272,7 @@ void ToolTip::setIcon(const QVariant &icon)
}
m_icon = icon;
emit iconChanged();
Q_EMIT iconChanged();
}
QVariant ToolTip::image() const
@ -291,7 +291,7 @@ void ToolTip::setImage(const QVariant &image)
}
m_image = image;
emit imageChanged();
Q_EMIT imageChanged();
}
bool ToolTip::containsMouse() const
@ -303,7 +303,7 @@ void ToolTip::setContainsMouse(bool contains)
{
if (m_containsMouse != contains) {
m_containsMouse = contains;
emit containsMouseChanged();
Q_EMIT containsMouseChanged();
}
if (!contains) {
tooltipDialogInstance()->dismiss();

View File

@ -35,7 +35,7 @@ bool SharedAppFilter::eventFilter(QObject *watched, QEvent *event)
{
if (watched == QCoreApplication::instance()) {
if (event->type() == QEvent::ApplicationFontChange) {
emit fontChanged();
Q_EMIT fontChanged();
}
}
return QObject::eventFilter(watched, event);
@ -101,7 +101,7 @@ void Units::updateAnimationSpeed()
if (longDuration != m_longDuration) {
m_longDuration = longDuration;
emit durationChanged();
Q_EMIT durationChanged();
}
}
@ -121,8 +121,8 @@ void Units::iconLoaderSettingsChanged()
m_iconSizeHints->insert(QStringLiteral("panel"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Panel)));
m_iconSizeHints->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop)));
emit iconSizesChanged();
emit iconSizeHintsChanged();
Q_EMIT iconSizesChanged();
Q_EMIT iconSizeHintsChanged();
}
QQmlPropertyMap *Units::iconSizes() const
@ -214,7 +214,7 @@ void Units::updateDevicePixelRatio()
// that magic ratio follows the definition of "device independent pixel" by Microsoft
m_devicePixelRatio = (qreal)dpi / (qreal)96;
iconLoaderSettingsChanged();
emit devicePixelRatioChanged();
Q_EMIT devicePixelRatioChanged();
}
int Units::gridUnit() const
@ -241,13 +241,13 @@ void Units::updateSpacing()
}
if (gridUnit != m_gridUnit) {
m_gridUnit = gridUnit;
emit gridUnitChanged();
Q_EMIT gridUnitChanged();
}
if (gridUnit != m_largeSpacing) {
m_smallSpacing = qMax(2, (int)(gridUnit / 4)); // 1/4 of gridUnit, at least 2
m_largeSpacing = gridUnit; // msize.height
emit spacingChanged();
Q_EMIT spacingChanged();
}
}

View File

@ -281,7 +281,7 @@ void WindowThumbnail::setWinId(uint32_t winId)
startRedirecting();
}
emit winIdChanged();
Q_EMIT winIdChanged();
}
qreal WindowThumbnail::paintedWidth() const
@ -316,7 +316,7 @@ QSGNode *WindowThumbnail::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
const QSizeF size(node->texture()->textureSize().scaled(boundingRect().size().toSize(), Qt::KeepAspectRatio));
if (size != m_paintedSize) {
m_paintedSize = size;
emit paintedSizeChanged();
Q_EMIT paintedSizeChanged();
}
const qreal x = boundingRect().x() + (boundingRect().width() - size.width()) / 2;
const qreal y = boundingRect().y() + (boundingRect().height() - size.height()) / 2;
@ -897,7 +897,7 @@ void WindowThumbnail::setThumbnailAvailable(bool thumbnailAvailable)
{
if (m_thumbnailAvailable != thumbnailAvailable) {
m_thumbnailAvailable = thumbnailAvailable;
emit thumbnailAvailableChanged();
Q_EMIT thumbnailAvailableChanged();
}
}

View File

@ -34,7 +34,7 @@ QMenuProxy::QMenuProxy(QObject *parent)
connect(m_menu, &QMenu::triggered, this, &QMenuProxy::itemTriggered);
connect(m_menu, &QMenu::aboutToHide, this, [ = ]() {
m_status = DialogStatus::Closed;
emit statusChanged();
Q_EMIT statusChanged();
});
}
}
@ -105,7 +105,7 @@ void QMenuProxy::setVisualParent(QObject *parent)
}
m_visualParent = parent;
emit visualParentChanged();
Q_EMIT visualParentChanged();
}
QWindow *QMenuProxy::transientParent()
@ -123,7 +123,7 @@ void QMenuProxy::setTransientParent(QWindow *parent)
}
m_menu->windowHandle()->setTransientParent(parent);
emit transientParentChanged();
Q_EMIT transientParentChanged();
}
Plasma::Types::PopupPlacement QMenuProxy::placement() const
@ -136,7 +136,7 @@ void QMenuProxy::setPlacement(Plasma::Types::PopupPlacement placement)
if (m_placement != placement) {
m_placement = placement;
emit placementChanged();
Q_EMIT placementChanged();
}
}
@ -150,7 +150,7 @@ void QMenuProxy::setMinimumWidth(int width)
if (m_menu->minimumWidth() != width) {
m_menu->setMinimumWidth(width);
emit minimumWidthChanged();
Q_EMIT minimumWidthChanged();
}
}
@ -164,7 +164,7 @@ void QMenuProxy::setMaximumWidth(int width)
if (m_menu->maximumWidth() != width) {
m_menu->setMaximumWidth(width);
emit maximumWidthChanged();
Q_EMIT maximumWidthChanged();
}
}
@ -271,8 +271,8 @@ void QMenuProxy::itemTriggered(QAction *action)
for (int i = 0; i < m_items.count(); ++i) {
QMenuItem *item = m_items.at(i);
if (item->action() == action) {
emit triggered(item);
emit triggeredIndex(i);
Q_EMIT triggered(item);
Q_EMIT triggeredIndex(i);
break;
}
@ -453,7 +453,7 @@ void QMenuProxy::openInternal(QPoint pos)
m_menu->popup(pos);
m_status = DialogStatus::Open;
emit statusChanged();
Q_EMIT statusChanged();
}
QQuickItem *QMenuProxy::parentItem() const

View File

@ -55,7 +55,7 @@ void QMenuItem::setAction(QAction *a)
if (m_action->parent() != this) {
m_action = new QAction(this);
m_action->setVisible(false);
emit actionChanged();
Q_EMIT actionChanged();
}
});
@ -63,7 +63,7 @@ void QMenuItem::setAction(QAction *a)
connect(this, &QQuickItem::enabledChanged, this, &QMenuItem::updateAction);
connect(this, &QObject::destroyed, this, &QMenuItem::deleteLater);
emit actionChanged();
Q_EMIT actionChanged();
}
}
@ -80,7 +80,7 @@ void QMenuItem::setIcon(const QVariant &i)
} else if (i.canConvert<QString>()) {
m_action->setIcon(QIcon::fromTheme(i.toString()));
}
emit iconChanged();
Q_EMIT iconChanged();
}
bool QMenuItem::separator() const

View File

@ -145,10 +145,10 @@ void QRangeModelPrivate::emitValueAndPositionIfChanged(const qreal oldValue, con
const qreal newValue = q->value();
const qreal newPosition = q->position();
if (!qFuzzyCompare(newValue, oldValue)) {
emit q->valueChanged(newValue);
Q_EMIT q->valueChanged(newValue);
}
if (!qFuzzyCompare(newPosition, oldPosition)) {
emit q->positionChanged(newPosition);
Q_EMIT q->positionChanged(newPosition);
}
}
@ -215,10 +215,10 @@ void QRangeModel::setPositionRange(qreal min, qreal max)
d->pos = d->equivalentPosition(d->value);
if (emitPosAtMinChanged) {
emit positionAtMinimumChanged(d->posatmin);
Q_EMIT positionAtMinimumChanged(d->posatmin);
}
if (emitPosAtMaxChanged) {
emit positionAtMaximumChanged(d->posatmax);
Q_EMIT positionAtMaximumChanged(d->posatmax);
}
d->emitValueAndPositionIfChanged(value(), oldPosition);
@ -250,10 +250,10 @@ void QRangeModel::setRange(qreal min, qreal max)
d->pos = d->equivalentPosition(d->value);
if (emitMinimumChanged) {
emit minimumChanged(d->minimum);
Q_EMIT minimumChanged(d->minimum);
}
if (emitMaximumChanged) {
emit maximumChanged(d->maximum);
Q_EMIT maximumChanged(d->maximum);
}
d->emitValueAndPositionIfChanged(oldValue, oldPosition);
@ -320,7 +320,7 @@ void QRangeModel::setStepSize(qreal stepSize)
const qreal oldPosition = position();
d->stepSize = stepSize;
emit stepSizeChanged(d->stepSize);
Q_EMIT stepSizeChanged(d->stepSize);
d->emitValueAndPositionIfChanged(oldValue, oldPosition);
}
@ -485,7 +485,7 @@ void QRangeModel::setInverted(bool inverted)
}
d->inverted = inverted;
emit invertedChanged(d->inverted);
Q_EMIT invertedChanged(d->inverted);
// After updating the internal value, the position property can change.
setPosition(d->equivalentPosition(d->value));

View File

@ -26,7 +26,7 @@ void FallbackComponent::setBasePath(const QString &basePath)
{
if (basePath != m_basePath) {
m_basePath = basePath;
emit basePathChanged();
Q_EMIT basePathChanged();
}
}
@ -38,7 +38,7 @@ QStringList FallbackComponent::candidates() const
void FallbackComponent::setCandidates(const QStringList &candidates)
{
m_candidates = candidates;
emit candidatesChanged();
Q_EMIT candidatesChanged();
}
QString FallbackComponent::filePath(const QString &key)

View File

@ -71,7 +71,7 @@ void Application::setApplication(const QString &application)
d->application = application;
emit applicationChanged(application);
Q_EMIT applicationChanged(application);
if (d->running) {
start();

View File

@ -126,7 +126,7 @@ Applet::~Applet()
d->resetConfigurationObject();
}
//let people know that i will die
emit appletDeleted(this);
Q_EMIT appletDeleted(this);
// ConfigLoader is deleted when AppletPrivate closes not Applet
// It saves on closure and emits a signal.
@ -220,9 +220,9 @@ void Applet::restore(KConfigGroup &group)
if (ok) {
d->userBackgroundHints = Plasma::Types::BackgroundHints(value);
d->userBackgroundHintsInitialized = true;
emit userBackgroundHintsChanged();
Q_EMIT userBackgroundHintsChanged();
if (d->backgroundHints & Plasma::Types::ConfigurableBackground) {
emit effectiveBackgroundHintsChanged();
Q_EMIT effectiveBackgroundHintsChanged();
}
}
}
@ -240,7 +240,7 @@ void Applet::setLaunchErrorMessage(const QString &message)
void Applet::saveState(KConfigGroup &group) const
{
if (d->script) {
emit d->script->saveState(group);
Q_EMIT d->script->saveState(group);
}
if (group.config()->name() != config().config()->name()) {
@ -368,7 +368,7 @@ void Applet::setTitle(const QString &title)
}
d->customTitle = title;
emit titleChanged(title);
Q_EMIT titleChanged(title);
}
QString Applet::icon() const
@ -383,7 +383,7 @@ void Applet::setIcon(const QString &icon)
}
d->icon = icon;
emit iconChanged(icon);
Q_EMIT iconChanged(icon);
}
bool Applet::isBusy() const
@ -398,7 +398,7 @@ void Applet::setBusy(bool busy)
}
d->busy = busy;
emit busyChanged(busy);
Q_EMIT busyChanged(busy);
}
Plasma::Types::BackgroundHints Applet::backgroundHints() const
@ -415,10 +415,10 @@ void Applet::setBackgroundHints(Plasma::Types::BackgroundHints hint)
Plasma::Types::BackgroundHints oldeffectiveHints = effectiveBackgroundHints();
d->backgroundHints = hint;
emit backgroundHintsChanged();
Q_EMIT backgroundHintsChanged();
if (oldeffectiveHints != effectiveBackgroundHints()) {
emit effectiveBackgroundHintsChanged();
Q_EMIT effectiveBackgroundHintsChanged();
}
}
@ -451,10 +451,10 @@ void Applet::setUserBackgroundHints(Plasma::Types::BackgroundHints hint)
containment()->corona()->requestConfigSync();
}
emit userBackgroundHintsChanged();
Q_EMIT userBackgroundHintsChanged();
if (d->backgroundHints & Plasma::Types::ConfigurableBackground) {
emit effectiveBackgroundHintsChanged();
Q_EMIT effectiveBackgroundHintsChanged();
}
}
@ -549,7 +549,7 @@ void Applet::setConfigurationRequired(bool needsConfig, const QString &reason)
d->needsConfig = needsConfig;
d->configurationRequiredReason = reason;
emit configurationRequiredChanged(needsConfig, reason);
Q_EMIT configurationRequiredChanged(needsConfig, reason);
}
bool Applet::isUserConfiguring() const
@ -564,7 +564,7 @@ void Applet::setUserConfiguring(bool configuring)
}
d->userConfiguring = configuring;
emit userConfiguringChanged(configuring);
Q_EMIT userConfiguringChanged(configuring);
}
Types::ItemStatus Applet::status() const
@ -578,7 +578,7 @@ void Applet::setStatus(const Types::ItemStatus status)
return;
}
d->itemStatus = status;
emit statusChanged(status);
Q_EMIT statusChanged(status);
}
void Applet::flushPendingConstraintsEvents()
@ -645,7 +645,7 @@ void Applet::flushPendingConstraintsEvents()
//an immutable constraint will always happen at startup
//make sure don't emit a change signal for nothing
if (d->oldImmutability != immutability()) {
emit immutabilityChanged(immutability());
Q_EMIT immutabilityChanged(immutability());
}
d->oldImmutability = immutability();
}
@ -671,11 +671,11 @@ void Applet::flushPendingConstraintsEvents()
}
if (c & Plasma::Types::FormFactorConstraint) {
emit formFactorChanged(formFactor());
Q_EMIT formFactorChanged(formFactor());
}
if (c & Plasma::Types::LocationConstraint) {
emit locationChanged(location());
Q_EMIT locationChanged(location());
}
}
@ -892,7 +892,7 @@ void Applet::timerEvent(QTimerEvent *event)
KConfigGroup cg;
save(cg);
emit configNeedsSaving();
Q_EMIT configNeedsSaving();
}
}

View File

@ -135,7 +135,7 @@ void Containment::init()
//HACK: this is valid only in the systray case
connect(this, &Containment::configureRequested, this, [=] (Plasma::Applet *a) {
if (Plasma::Applet *p = qobject_cast<Plasma::Applet *>(parent())) {
emit p->containment()->configureRequested(a);
Q_EMIT p->containment()->configureRequested(a);
}
});
}
@ -308,7 +308,7 @@ void Containment::setContainmentType(Plasma::Types::ContainmentType type)
}
d->type = type;
emit containmentTypeChanged();
Q_EMIT containmentTypeChanged();
}
Corona *Containment::corona() const
@ -339,8 +339,8 @@ void Containment::setFormFactor(Types::FormFactor formFactor)
KConfigGroup c = config();
c.writeEntry("formfactor", (int)formFactor);
emit configNeedsSaving();
emit formFactorChanged(formFactor);
Q_EMIT configNeedsSaving();
Q_EMIT formFactorChanged(formFactor);
}
void Containment::setContainmentDisplayHints(Types::ContainmentDisplayHints hints)
@ -350,7 +350,7 @@ void Containment::setContainmentDisplayHints(Types::ContainmentDisplayHints hint
}
d->containmentDisplayHints = hints;
emit containmentDisplayHintsChanged(hints);
Q_EMIT containmentDisplayHintsChanged(hints);
}
void Containment::setLocation(Types::Location location)
@ -369,15 +369,15 @@ void Containment::setLocation(Types::Location location)
KConfigGroup c = config();
c.writeEntry("location", (int)location);
emit configNeedsSaving();
emit locationChanged(location);
Q_EMIT configNeedsSaving();
Q_EMIT locationChanged(location);
}
Applet *Containment::createApplet(const QString &name, const QVariantList &args)
{
Plasma::Applet *applet = d->createApplet(name, args);
if (applet) {
emit appletCreated(applet);
Q_EMIT appletCreated(applet);
}
return applet;
}
@ -404,7 +404,7 @@ void Containment::addApplet(Applet *applet)
Containment *currentContainment = applet->containment();
if (currentContainment && currentContainment != this) {
emit currentContainment->appletRemoved(applet);
Q_EMIT currentContainment->appletRemoved(applet);
disconnect(applet, nullptr, currentContainment, nullptr);
connect(currentContainment, nullptr, applet, nullptr);
@ -464,7 +464,7 @@ void Containment::addApplet(Applet *applet)
if (isNew) {
applet->save(*applet->d->mainConfigGroup());
emit configNeedsSaving();
Q_EMIT configNeedsSaving();
}
//FIXME: an on-appear animation would be nice to have again
}
@ -472,7 +472,7 @@ void Containment::addApplet(Applet *applet)
applet->updateConstraints(Plasma::Types::AllConstraints);
applet->flushPendingConstraintsEvents();
emit appletAdded(applet);
Q_EMIT appletAdded(applet);
if (!currentContainment) {
applet->updateConstraints(Plasma::Types::StartupCompletedConstraint);
@ -509,8 +509,8 @@ void Containment::setWallpaper(const QString &pluginName)
KConfigGroup cfg = config();
cfg.writeEntry("wallpaperplugin", d->wallpaper);
emit configNeedsSaving();
emit wallpaperChanged();
Q_EMIT configNeedsSaving();
Q_EMIT wallpaperChanged();
}
}
@ -555,7 +555,7 @@ void Containment::setContainmentActions(const QString &trigger, const QString &p
}
}
emit configNeedsSaving();
Q_EMIT configNeedsSaving();
}
QHash<QString, ContainmentActions *> &Containment::containmentActions()
@ -578,8 +578,8 @@ void Containment::setActivity(const QString &activityId)
KConfigGroup c = config();
c.writeEntry("activityId", activityId);
emit configNeedsSaving();
emit activityChanged(activityId);
Q_EMIT configNeedsSaving();
Q_EMIT activityChanged(activityId);
}
QString Containment::activity() const
@ -595,10 +595,10 @@ void Containment::reactToScreenChange()
d->lastScreen = newScreen;
KConfigGroup c = config();
c.writeEntry("lastScreen", d->lastScreen);
emit configNeedsSaving();
Q_EMIT configNeedsSaving();
}
emit screenChanged(newScreen);
Q_EMIT screenChanged(newScreen);
}
} // Plasma namespace

View File

@ -68,7 +68,7 @@ Plasma::Package Corona::package() const
void Corona::setPackage(const Plasma::Package &package)
{
setKPackage(*package.d->internalPackage);
emit packageChanged(package);
Q_EMIT packageChanged(package);
}
KPackage::Package Corona::kPackage() const
@ -79,7 +79,7 @@ KPackage::Package Corona::kPackage() const
void Corona::setKPackage(const KPackage::Package &package)
{
d->package = package;
emit kPackageChanged(package);
Q_EMIT kPackageChanged(package);
}
void Corona::saveLayout(const QString &configName) const
@ -344,7 +344,7 @@ void Corona::setImmutability(const Types::ImmutabilityType immutable)
d->immutability = immutable;
d->updateContainmentImmutability();
//tell non-containments that might care (like plasmaapp or a custom corona)
emit immutabilityChanged(immutable);
Q_EMIT immutabilityChanged(immutable);
//update our actions
QAction *action = d->actions.action(QStringLiteral("lock widgets"));
@ -410,7 +410,7 @@ void Corona::setEditMode(bool edit)
}
d->editMode = edit;
emit editModeChanged(edit);
Q_EMIT editModeChanged(edit);
}
bool Corona::isEditMode() const
@ -542,7 +542,7 @@ void CoronaPrivate::containmentDestroyed(QObject *obj)
void CoronaPrivate::syncConfig()
{
q->config()->sync();
emit q->configSynced();
Q_EMIT q->configSynced();
}
Containment *CoronaPrivate::addContainment(const QString &name, const QVariantList &args, uint id, int lastScreen, bool delayedInit)
@ -622,10 +622,10 @@ Containment *CoronaPrivate::addContainment(const QString &name, const QVariantLi
containment->save(cg);
q->requestConfigSync();
containment->flushPendingConstraintsEvents();
emit q->containmentAdded(containment);
Q_EMIT q->containmentAdded(containment);
//if id = 0 a new containment has been created, not restored
if (id == 0) {
emit q->containmentCreated(containment);
Q_EMIT q->containmentCreated(containment);
}
}
@ -706,7 +706,7 @@ void CoronaPrivate::notifyContainmentsReady()
}
if (containmentsStarting <= 0) {
emit q->startupCompleted();
Q_EMIT q->startupCompleted();
}
}
@ -717,7 +717,7 @@ void CoronaPrivate::containmentReady(bool ready)
}
--containmentsStarting;
if (containmentsStarting <= 0) {
emit q->startupCompleted();
Q_EMIT q->startupCompleted();
}
}

View File

@ -68,7 +68,7 @@ void DataContainer::setModel(QAbstractItemModel *model)
d->model = model;
model->setParent(this);
emit modelChanged(objectName(), model);
Q_EMIT modelChanged(objectName(), model);
}
QAbstractItemModel *DataContainer::model()
@ -338,7 +338,7 @@ void DataContainer::checkForUpdate()
{
//qCDebug(LOG_PLASMA) << objectName() << d->dirty;
if (d->dirty) {
emit dataUpdated(objectName(), d->data);
Q_EMIT dataUpdated(objectName(), d->data);
//copy as checkQueueing can result in deletion of the relay
const auto relays = d->relays;
@ -354,7 +354,7 @@ void DataContainer::forceImmediateUpdate()
{
if (d->dirty) {
d->dirty = false;
emit dataUpdated(objectName(), d->data);
Q_EMIT dataUpdated(objectName(), d->data);
}
for (SignalRelay *relay : qAsConst(d->relays)) {
@ -395,9 +395,9 @@ void DataContainer::timerEvent(QTimerEvent *event)
//NOTE: Notifying visualization of the model destruction before actual deletion avoids crashes in some edge cases
if (d->model) {
d->model.clear();
emit modelChanged(objectName(), nullptr);
Q_EMIT modelChanged(objectName(), nullptr);
}
emit becameUnused(objectName());
Q_EMIT becameUnused(objectName());
}
d->checkUsageTimer.stop();
} else if (event->timerId() == d->storageTimer.timerId()) {

View File

@ -177,7 +177,7 @@ void DataEngine::setData(const QString &source, const QString &key, const QVaria
s->setData(key, value);
if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source);
Q_EMIT sourceAdded(source);
}
d->scheduleSourcesUpdated();
@ -199,7 +199,7 @@ void DataEngine::setData(const QString &source, const QVariantMap &data)
}
if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source);
Q_EMIT sourceAdded(source);
}
d->scheduleSourcesUpdated();
@ -262,7 +262,7 @@ void DataEngine::addSource(DataContainer *source)
this, SLOT(internalUpdateSource(DataContainer*)));
QObject::connect(source, SIGNAL(destroyed(QObject*)), this, SLOT(sourceDestroyed(QObject*)));
d->sources.insert(source->objectName(), source);
emit sourceAdded(source->objectName());
Q_EMIT sourceAdded(source->objectName());
d->scheduleSourcesUpdated();
}
@ -295,7 +295,7 @@ void DataEngine::removeSource(const QString &source)
d->sources.erase(it);
s->disconnect(this);
s->deleteLater();
emit sourceRemoved(source);
Q_EMIT sourceRemoved(source);
}
}
@ -309,7 +309,7 @@ void DataEngine::removeAllSources()
it.remove();
s->disconnect(this);
s->deleteLater();
emit sourceRemoved(source);
Q_EMIT sourceRemoved(source);
}
}
@ -561,7 +561,7 @@ void DataEnginePrivate::sourceDestroyed(QObject *object)
while (it != sources.end()) {
if (it.value() == object) {
sources.erase(it);
emit q->sourceRemoved(object->objectName());
Q_EMIT q->sourceRemoved(object->objectName());
break;
}
++it;
@ -592,7 +592,7 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
*newSource = true;
}
QObject::connect(s, &DataContainer::becameUnused, q, &DataEngine::removeSource);
emit q->sourceAdded(sourceName);
Q_EMIT q->sourceAdded(sourceName);
}
}
waitingSourceRequest.clear();

View File

@ -910,7 +910,7 @@ void FrameSvgPrivate::updateAndSignalSizes()
return;
}
updateSizes(frame);
emit q->repaintNeeded();
Q_EMIT q->repaintNeeded();
}
QSizeF FrameSvgPrivate::frameSize(FrameData *frame) const

View File

@ -172,7 +172,7 @@ void AppletPrivate::init(const QString &_packagePath, const QVariantList &args)
q->actions()->addAction(QStringLiteral("alternatives"), a);
QObject::connect(a, &QAction::triggered, q, [this] {
if (q->containment()) {
emit q->containment()->appletAlternativesRequested(q);
Q_EMIT q->containment()->appletAlternativesRequested(q);
}
});
@ -219,7 +219,7 @@ void AppletPrivate::cleanUpAndDelete()
if (q->isContainment()) {
// prematurely emit our destruction if we are a Containment,
// giving Corona a chance to remove this Containment from its collection
emit q->QObject::destroyed(q);
Q_EMIT q->QObject::destroyed(q);
}
q->deleteLater();
@ -228,9 +228,9 @@ void AppletPrivate::cleanUpAndDelete()
void AppletPrivate::setDestroyed(bool destroyed)
{
transient = destroyed;
emit q->destroyedChanged(destroyed);
Q_EMIT q->destroyedChanged(destroyed);
//when an applet gets transient, it's "systemimmutable"
emit q->immutabilityChanged(q->immutability());
Q_EMIT q->immutabilityChanged(q->immutability());
Plasma::Containment *asContainment = qobject_cast<Plasma::Containment *>(q);
if (asContainment) {
@ -282,9 +282,9 @@ void AppletPrivate::askDestroy()
if (!q->isContainment() && q->containment()) {
Plasma::Applet *containmentApplet = static_cast<Plasma::Applet *>(q->containment());
if (containmentApplet && containmentApplet->d->deleteNotificationTimer) {
emit containmentApplet->destroyedChanged(false);
Q_EMIT containmentApplet->destroyedChanged(false);
//when an applet gets transient, it's "systemimmutable"
emit q->immutabilityChanged(q->immutability());
Q_EMIT q->immutabilityChanged(q->immutability());
delete containmentApplet->d->deleteNotificationTimer;
containmentApplet->d->deleteNotificationTimer = nullptr;
}
@ -294,7 +294,7 @@ void AppletPrivate::askDestroy()
return a1->id() < a2->id();
});
q->containment()->d->applets.insert(position, q);
emit q->containment()->appletAdded(q);
Q_EMIT q->containment()->appletAdded(q);
}
if (deleteNotification) {
deleteNotification->close();
@ -329,7 +329,7 @@ void AppletPrivate::askDestroy()
if (deleteNotification) {
deleteNotification->close();
} else {
emit q->destroyedChanged(true);
Q_EMIT q->destroyedChanged(true);
cleanUpAndDelete();
}
});
@ -337,7 +337,7 @@ void AppletPrivate::askDestroy()
}
if (!q->isContainment() && q->containment()) {
q->containment()->d->applets.removeAll(q);
emit q->containment()->appletRemoved(q);
Q_EMIT q->containment()->appletRemoved(q);
}
}
}
@ -391,7 +391,7 @@ KActionCollection *AppletPrivate::defaultActions(QObject *parent)
void AppletPrivate::requestConfiguration()
{
if (q->containment()) {
emit q->containment()->configureRequested(q);
Q_EMIT q->containment()->configureRequested(q);
}
}

View File

@ -113,7 +113,7 @@ void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus)
void ContainmentPrivate::triggerShowAddWidgets()
{
emit q->showAddWidgetsInterface(QPointF());
Q_EMIT q->showAddWidgetsInterface(QPointF());
}
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints constraints)
@ -202,8 +202,8 @@ void ContainmentPrivate::appletDeleted(Plasma::Applet *applet)
{
applets.removeAll(applet);
emit q->appletRemoved(applet);
emit q->configNeedsSaving();
Q_EMIT q->appletRemoved(applet);
Q_EMIT q->configNeedsSaving();
}
bool ContainmentPrivate::isPanelContainment() const
@ -217,7 +217,7 @@ void ContainmentPrivate::setStarted()
q->Applet::d->started = true;
if (uiReady) {
emit q->uiReadyChanged(true);
Q_EMIT q->uiReadyChanged(true);
}
}
}
@ -228,7 +228,7 @@ void ContainmentPrivate::setUiReady()
if (!uiReady) {
uiReady = true;
if (q->Applet::d->started && (appletsUiReady || applets.isEmpty()) && loadingApplets.isEmpty()) {
emit q->uiReadyChanged(true);
Q_EMIT q->uiReadyChanged(true);
}
}
}
@ -240,7 +240,7 @@ void ContainmentPrivate::appletLoaded(Applet* applet)
if (loadingApplets.isEmpty() && !appletsUiReady) {
appletsUiReady = true;
if (q->Applet::d->started && uiReady) {
emit q->uiReadyChanged(true);
Q_EMIT q->uiReadyChanged(true);
}
}
}

View File

@ -97,7 +97,7 @@ void SignalRelay::checkQueueing()
{
//qCDebug(LOG_PLASMA) << m_queued;
if (m_queued) {
emit dataUpdated(dc->objectName(), d->data);
Q_EMIT dataUpdated(dc->objectName(), d->data);
m_queued = false;
//TODO: should we re-align our timer at this point, to avoid
// constant queueing due to more-or-less constant time
@ -116,7 +116,7 @@ void SignalRelay::checkQueueing()
void SignalRelay::forceImmediateUpdate()
{
emit dataUpdated(dc->objectName(), d->data);
Q_EMIT dataUpdated(dc->objectName(), d->data);
}
void SignalRelay::timerEvent(QTimerEvent *event)
@ -136,10 +136,10 @@ void SignalRelay::timerEvent(QTimerEvent *event)
checkAlignment();
}
emit dc->updateRequested(dc);
Q_EMIT dc->updateRequested(dc);
if (d->hasUpdates()) {
//qCDebug(LOG_PLASMA) << "emitting data updated directly" << d->data;
emit dataUpdated(dc->objectName(), d->data);
Q_EMIT dataUpdated(dc->objectName(), d->data);
m_queued = false;
} else {
// the source wasn't actually updated; so let's put ourselves in the queue

View File

@ -67,7 +67,7 @@ bool EffectWatcher::nativeEventFilter(const QByteArray &eventType, void *message
bool nowEffectActive = isEffectActive();
if (m_effectActive != nowEffectActive) {
m_effectActive = nowEffectActive;
emit effectChanged(m_effectActive);
Q_EMIT effectChanged(m_effectActive);
}
}
return false;

View File

@ -122,7 +122,7 @@ void StorageThread::save(QPointer<StorageJob> wcaller, const QVariantMap &params
if (!query.exec()) {
m_db.commit();
emit newResult(caller, false);
Q_EMIT newResult(caller, false);
return;
}
@ -178,7 +178,7 @@ void StorageThread::save(QPointer<StorageJob> wcaller, const QVariantMap &params
if (!query.exec()) {
//qCDebug(LOG_PLASMA) << "query failed:" << query.lastQuery() << query.lastError().text();
m_db.commit();
emit newResult(caller, false);
Q_EMIT newResult(caller, false);
return;
}
@ -186,7 +186,7 @@ void StorageThread::save(QPointer<StorageJob> wcaller, const QVariantMap &params
}
m_db.commit();
emit newResult(caller, true);
Q_EMIT newResult(caller, true);
}
void StorageThread::retrieve(QPointer<StorageJob> wcaller, const QVariantMap &params)
@ -259,7 +259,7 @@ void StorageThread::retrieve(QPointer<StorageJob> wcaller, const QVariantMap &pa
result = false;
}
emit newResult(caller, result);
Q_EMIT newResult(caller, result);
}
void StorageThread::deleteEntry(QPointer<StorageJob> wcaller, const QVariantMap &params)
@ -289,7 +289,7 @@ void StorageThread::deleteEntry(QPointer<StorageJob> wcaller, const QVariantMap
const bool success = query.exec();
m_db.commit();
emit newResult(caller, success);
Q_EMIT newResult(caller, success);
}
void StorageThread::expire(QPointer<StorageJob> wcaller, const QVariantMap &params)
@ -319,7 +319,7 @@ void StorageThread::expire(QPointer<StorageJob> wcaller, const QVariantMap &para
const bool success = query.exec();
emit newResult(caller, success);
Q_EMIT newResult(caller, success);
}
void StorageThread::run()

View File

@ -366,7 +366,7 @@ void ThemePrivate::colorsChanged()
tooltipColorScheme = KColorScheme(QPalette::Active, KColorScheme::Tooltip, colors);
palette = KColorScheme::createApplicationPalette(colors);
scheduleThemeChangeNotification(PixmapCache | SvgElementsCache);
emit applicationPaletteChange();
Q_EMIT applicationPaletteChange();
}
void ThemePrivate::scheduleThemeChangeNotification(CacheTypes caches)
@ -380,7 +380,7 @@ void ThemePrivate::notifyOfChanged()
//qCDebug(LOG_PLASMA) << cachesToDiscard;
discardCache(cachesToDiscard);
cachesToDiscard = NoCache;
emit themeChanged();
Q_EMIT themeChanged();
}
const QString ThemePrivate::processStyleSheet(const QString &css, Plasma::Svg::Status status)

View File

@ -78,7 +78,7 @@ void AppletScript::setLaunchErrorMessage(const QString &reason)
void AppletScript::configNeedsSaving() const
{
if (applet()) {
emit applet()->configNeedsSaving();
Q_EMIT applet()->configNeedsSaving();
}
}

View File

@ -129,7 +129,7 @@ void Service::setName(const QString &name)
registerOperationsScheme();
emit serviceReady(this);
Q_EMIT serviceReady(this);
}
void Service::setOperationEnabled(const QString &operation, bool enable)
@ -144,7 +144,7 @@ void Service::setOperationEnabled(const QString &operation, bool enable)
d->disabledOperations.insert(operation);
}
emit operationEnabledChanged(operation, enable);
Q_EMIT operationEnabledChanged(operation, enable);
}
bool Service::isOperationEnabled(const QString &operation) const

View File

@ -446,7 +446,7 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
fromCurrentTheme = !inIconTheme && isThemed && actualTheme()->currentThemeHasImage(imagePath);
if (fromCurrentTheme != oldFromCurrentTheme) {
emit q->fromCurrentThemeChanged(fromCurrentTheme);
Q_EMIT q->fromCurrentThemeChanged(fromCurrentTheme);
}
if (inIconTheme) {
@ -490,7 +490,7 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
}
q->resize();
emit q->imagePathChanged();
Q_EMIT q->imagePathChanged();
return updateNeeded;
}
@ -842,7 +842,7 @@ void SvgPrivate::themeChanged()
q->resize();
//qCDebug(LOG_PLASMA) << themePath << ">>>>>>>>>>>>>>>>>> theme changed";
emit q->repaintNeeded();
Q_EMIT q->repaintNeeded();
}
void SvgPrivate::colorsChanged()
@ -854,7 +854,7 @@ void SvgPrivate::colorsChanged()
eraseRenderer();
qCDebug(LOG_PLASMA) << "repaint needed from colorsChanged";
emit q->repaintNeeded();
Q_EMIT q->repaintNeeded();
}
QHash<QString, SharedSvgRenderer::Ptr> SvgPrivate::s_renderers;
@ -887,7 +887,7 @@ void Svg::setDevicePixelRatio(qreal ratio)
d->devicePixelRatio = floor(ratio);
emit repaintNeeded();
Q_EMIT repaintNeeded();
}
qreal Svg::devicePixelRatio()
@ -918,8 +918,8 @@ void Svg::setScaleFactor(qreal ratio)
d->size = d->naturalSize;
emit repaintNeeded();
emit sizeChanged();
Q_EMIT repaintNeeded();
Q_EMIT sizeChanged();
}
qreal Svg::scaleFactor() const
@ -935,8 +935,8 @@ void Svg::setColorGroup(Plasma::Theme::ColorGroup group)
d->colorGroup = group;
d->renderer = nullptr;
emit colorGroupChanged();
emit repaintNeeded();
Q_EMIT colorGroupChanged();
Q_EMIT repaintNeeded();
}
Plasma::Theme::ColorGroup Svg::colorGroup() const
@ -1017,7 +1017,7 @@ void Svg::resize(const QSizeF &size)
}
d->size = size;
emit sizeChanged();
Q_EMIT sizeChanged();
}
void Svg::resize()
@ -1028,7 +1028,7 @@ void Svg::resize()
}
d->size = d->naturalSize;
emit sizeChanged();
Q_EMIT sizeChanged();
}
QSize Svg::elementSize(const QString &elementId) const
@ -1083,7 +1083,7 @@ bool Svg::containsMultipleImages() const
void Svg::setImagePath(const QString &svgFilePath)
{
if (d->setImagePath(svgFilePath)) {
emit repaintNeeded();
Q_EMIT repaintNeeded();
}
}
@ -1114,7 +1114,7 @@ void Svg::setUseSystemColors(bool system)
}
d->useSystemColors = system;
emit repaintNeeded();
Q_EMIT repaintNeeded();
}
bool Svg::useSystemColors() const
@ -1150,8 +1150,8 @@ void Svg::setStatus(Plasma::Svg::Status status)
d->status = status;
d->eraseRenderer();
emit statusChanged(status);
emit repaintNeeded();
Q_EMIT statusChanged(status);
Q_EMIT repaintNeeded();
}
Svg::Status Svg::status() const

View File

@ -229,7 +229,7 @@ QQuickItem *AppletQuickItemPrivate::createCompactRepresentationItem()
compactRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->createObjectFromComponent(compactRepresentation, QtQml::qmlContext(qmlObject->rootObject()), initialProperties));
emit q->compactRepresentationItemChanged(compactRepresentationItem);
Q_EMIT q->compactRepresentationItemChanged(compactRepresentationItem);
return compactRepresentationItem;
}
@ -247,14 +247,14 @@ QQuickItem *AppletQuickItemPrivate::createFullRepresentationItem()
} else {
fullRepresentation = qmlObject->mainComponent();
fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->rootObject());
emit q->fullRepresentationChanged(fullRepresentation);
Q_EMIT q->fullRepresentationChanged(fullRepresentation);
}
if (!fullRepresentationItem) {
return nullptr;
}
emit q->fullRepresentationItemChanged(fullRepresentationItem);
Q_EMIT q->fullRepresentationItemChanged(fullRepresentationItem);
return fullRepresentationItem;
}
@ -382,7 +382,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
currentRepresentationItem = item;
connectLayoutAttached(item);
expanded = true;
emit q->expandedChanged(true);
Q_EMIT q->expandedChanged(true);
}
//Icon
@ -414,7 +414,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
connectLayoutAttached(compactItem);
expanded = false;
emit q->expandedChanged(false);
Q_EMIT q->expandedChanged(false);
}
}
}
@ -658,14 +658,14 @@ void AppletQuickItem::init()
d->fullRepresentation = d->qmlObject->mainComponent();
d->fullRepresentationItem = qobject_cast<QQuickItem*>(d->qmlObject->rootObject());
emit fullRepresentationChanged(d->fullRepresentation);
Q_EMIT fullRepresentationChanged(d->fullRepresentation);
}
//default compactRepresentation is a simple icon provided by the shell package
if (!d->compactRepresentation) {
d->compactRepresentation = new QQmlComponent(engine, this);
d->compactRepresentation->loadUrl(d->coronaPackage.fileUrl("defaultcompactrepresentation"));
emit compactRepresentationChanged(d->compactRepresentation);
Q_EMIT compactRepresentationChanged(d->compactRepresentation);
}
//default compactRepresentationExpander is the popup in which fullRepresentation goes
@ -752,7 +752,7 @@ void AppletQuickItem::setSwitchWidth(int width)
d->switchWidth = width;
d->compactRepresentationCheck();
emit switchWidthChanged(width);
Q_EMIT switchWidthChanged(width);
}
int AppletQuickItem::switchHeight() const
@ -768,7 +768,7 @@ void AppletQuickItem::setSwitchHeight(int height)
d->switchHeight = height;
d->compactRepresentationCheck();
emit switchHeightChanged(height);
Q_EMIT switchHeightChanged(height);
}
QQmlComponent *AppletQuickItem::compactRepresentation()
@ -783,7 +783,7 @@ void AppletQuickItem::setCompactRepresentation(QQmlComponent *component)
}
d->compactRepresentation = component;
emit compactRepresentationChanged(component);
Q_EMIT compactRepresentationChanged(component);
}
QQmlComponent *AppletQuickItem::fullRepresentation()
@ -815,7 +815,7 @@ void AppletQuickItem::setFullRepresentation(QQmlComponent *component)
}
d->fullRepresentation = component;
emit fullRepresentationChanged(component);
Q_EMIT fullRepresentationChanged(component);
}
QQmlComponent *AppletQuickItem::preferredRepresentation()
@ -830,7 +830,7 @@ void AppletQuickItem::setPreferredRepresentation(QQmlComponent *component)
}
d->preferredRepresentation = component;
emit preferredRepresentationChanged(component);
Q_EMIT preferredRepresentationChanged(component);
d->compactRepresentationCheck();
}
@ -856,7 +856,7 @@ void AppletQuickItem::setExpanded(bool expanded)
}
d->expanded = expanded;
emit expandedChanged(expanded);
Q_EMIT expandedChanged(expanded);
}
bool AppletQuickItem::isActivationTogglesExpanded() const
@ -870,7 +870,7 @@ void AppletQuickItem::setActivationTogglesExpanded(bool activationTogglesExpande
return;
}
d->activationTogglesExpanded = activationTogglesExpanded;
emit activationTogglesExpandedChanged(activationTogglesExpanded);
Q_EMIT activationTogglesExpandedChanged(activationTogglesExpanded);
}
////////////Internals

View File

@ -117,7 +117,7 @@ void ConfigModelPrivate::clear()
categories.pop_front();
}
q->endResetModel();
emit q->countChanged();
Q_EMIT q->countChanged();
}
void ConfigModelPrivate::appendCategory(ConfigCategory *c)
@ -133,7 +133,7 @@ void ConfigModelPrivate::appendCategory(ConfigCategory *c)
const int row = categories.indexOf(c);
if (row > -1) {
QModelIndex modelIndex = q->index(row);
emit q->dataChanged(modelIndex, modelIndex);
Q_EMIT q->dataChanged(modelIndex, modelIndex);
}
};
@ -144,7 +144,7 @@ void ConfigModelPrivate::appendCategory(ConfigCategory *c)
QObject::connect(c, &ConfigCategory::visibleChanged, q, emitChange);
q->endInsertRows();
emit q->countChanged();
Q_EMIT q->countChanged();
}
void ConfigModelPrivate::removeCategory(ConfigCategory *c)
@ -169,7 +169,7 @@ void ConfigModelPrivate::removeCategoryAt(int index)
}
q->endRemoveRows();
emit q->countChanged();
Q_EMIT q->countChanged();
}
QVariant ConfigModelPrivate::get(int row) const

View File

@ -321,7 +321,7 @@ void ConfigView::setAppletGlobalShortcut(const QString &shortcut)
}
d->applet.data()->setGlobalShortcut(shortcut);
emit appletGlobalShortcutChanged();
Q_EMIT appletGlobalShortcutChanged();
}
//To emulate Qt::WA_DeleteOnClose that QWindow doesn't have

View File

@ -72,13 +72,13 @@ void ContainmentViewPrivate::setContainment(Plasma::Containment *cont)
containment = cont;
if (oldLoc != location()) {
emit q->locationChanged(location());
Q_EMIT q->locationChanged(location());
}
if (oldForm != formFactor()) {
emit q->formFactorChanged(formFactor());
Q_EMIT q->formFactorChanged(formFactor());
}
emit q->containmentChanged();
Q_EMIT q->containmentChanged();
//we are QuickViewSharedEngine::SizeRootObjectToView, but that's not enough, as
//the root object isn't immediately resized (done at the resizeEvent handler).

View File

@ -892,7 +892,7 @@ void Dialog::setMainItem(QQuickItem *mainItem)
}
//if this is called in Component.onCompleted we have to wait a loop the item is added to a scene
emit mainItemChanged();
Q_EMIT mainItemChanged();
}
}
@ -913,7 +913,7 @@ void Dialog::setVisualParent(QQuickItem *visualParent)
}
d->visualParent = visualParent;
emit visualParentChanged();
Q_EMIT visualParentChanged();
if (visualParent) {
if (visualParent->window()) {
setTransientParent(visualParent->window());
@ -1067,7 +1067,7 @@ void Dialog::setLocation(Plasma::Types::Location location)
return;
}
d->location = location;
emit locationChanged();
Q_EMIT locationChanged();
if (d->mainItem) {
d->syncToMainItemSize();
@ -1090,7 +1090,7 @@ void Dialog::setFramelessFlags(Qt::WindowFlags flags)
flags |= Qt::Dialog;
setFlags(Qt::FramelessWindowHint | flags);
d->applyType();
emit flagsChanged();
Q_EMIT flagsChanged();
}
void Dialog::adjustGeometry(const QRect &geom)
@ -1140,7 +1140,7 @@ void Dialog::setType(WindowType type)
d->type = type;
d->applyType();
emit typeChanged();
Q_EMIT typeChanged();
}
Dialog::WindowType Dialog::type() const
@ -1178,7 +1178,7 @@ void Dialog::focusOutEvent(QFocusEvent *ev)
if (viewClicked || (!parentHasFocus && !childHasFocus)) {
setVisible(false);
emit windowDeactivated();
Q_EMIT windowDeactivated();
}
}
@ -1373,7 +1373,7 @@ void Dialog::setHideOnWindowDeactivate(bool hide)
return;
}
d->hideOnWindowDeactivate = hide;
emit hideOnWindowDeactivateChanged();
Q_EMIT hideOnWindowDeactivateChanged();
}
bool Dialog::isOutputOnly() const
@ -1387,7 +1387,7 @@ void Dialog::setOutputOnly(bool outputOnly)
return;
}
d->outputOnly = outputOnly;
emit outputOnlyChanged();
Q_EMIT outputOnlyChanged();
}
void Dialog::setVisible(bool visible)
@ -1406,7 +1406,7 @@ void Dialog::setVisible(bool visible)
QQuickWindow::setVisible(visible);
//signal will be emitted and proxied from the QQuickWindow code
} else {
emit visibleChangedProxy();
Q_EMIT visibleChangedProxy();
}
}
@ -1431,7 +1431,7 @@ void Dialog::setBackgroundHints(Dialog::BackgroundHints hints)
d->backgroundHints = hints;
d->updateTheme();
emit backgroundHintsChanged();
Q_EMIT backgroundHintsChanged();
}
}

View File

@ -33,7 +33,7 @@ void ConfigCategory::setName(const QString &name)
}
m_name = name;
emit nameChanged();
Q_EMIT nameChanged();
}
QString ConfigCategory::icon() const
@ -48,7 +48,7 @@ void ConfigCategory::setIcon(const QString &icon)
}
m_icon = icon;
emit iconChanged();
Q_EMIT iconChanged();
}
QString ConfigCategory::source() const
@ -63,7 +63,7 @@ void ConfigCategory::setSource(const QString &source)
}
m_source = source;
emit sourceChanged();
Q_EMIT sourceChanged();
}
QString ConfigCategory::pluginName() const
@ -78,7 +78,7 @@ void ConfigCategory::setPluginName(const QString &name)
}
m_pluginName = name;
emit pluginNameChanged();
Q_EMIT pluginNameChanged();
}
bool ConfigCategory::visible() const
@ -93,7 +93,7 @@ void ConfigCategory::setVisible(bool visible)
}
m_visible = visible;
emit visibleChanged();
Q_EMIT visibleChanged();
}
}

View File

@ -77,13 +77,13 @@ void ViewPrivate::setContainment(Plasma::Containment *cont)
containment = cont;
if (oldLoc != location()) {
emit q->locationChanged(location());
Q_EMIT q->locationChanged(location());
}
if (oldForm != formFactor()) {
emit q->formFactorChanged(formFactor());
Q_EMIT q->formFactorChanged(formFactor());
}
emit q->containmentChanged();
Q_EMIT q->containmentChanged();
if (cont) {
cont->reactToScreenChange();

View File

@ -67,7 +67,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
connect(applet(), &Plasma::Applet::titleChanged,
this, [this]() {
if (m_toolTipMainText.isNull()) {
emit toolTipMainTextChanged();
Q_EMIT toolTipMainTextChanged();
}
});
@ -88,8 +88,8 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
[this](bool configurationRequired, const QString &reason) {
Q_UNUSED(configurationRequired);
Q_UNUSED(reason);
emit configurationRequiredChanged();
emit configurationRequiredReasonChanged();
Q_EMIT configurationRequiredChanged();
Q_EMIT configurationRequiredReasonChanged();
});
connect(applet(), &Plasma::Applet::activated,
@ -114,7 +114,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
connect(applet()->containment()->corona(), &Plasma::Corona::screenGeometryChanged, this, [this](int id) {
if (id == applet()->containment()->screen()) {
emit screenGeometryChanged();
Q_EMIT screenGeometryChanged();
}
});
@ -160,7 +160,7 @@ void AppletInterface::init()
AppletQuickItem::init();
geometryChanged(QRectF(), QRectF(x(), y(), width(), height()));
emit busyChanged();
Q_EMIT busyChanged();
updateUiReadyConstraint();
@ -182,9 +182,9 @@ void AppletInterface::init()
});
if (m_args.count() == 1) {
emit externalData(QString(), m_args.first());
Q_EMIT externalData(QString(), m_args.first());
} else if (!m_args.isEmpty()) {
emit externalData(QString(), m_args);
Q_EMIT externalData(QString(), m_args);
}
}
@ -311,7 +311,7 @@ void AppletInterface::setToolTipMainText(const QString &text)
m_toolTipMainText = text;
}
emit toolTipMainTextChanged();
Q_EMIT toolTipMainTextChanged();
}
QString AppletInterface::toolTipSubText() const
@ -336,7 +336,7 @@ void AppletInterface::setToolTipSubText(const QString &text)
m_toolTipSubText = text;
}
emit toolTipSubTextChanged();
Q_EMIT toolTipSubTextChanged();
}
int AppletInterface::toolTipTextFormat() const
@ -351,7 +351,7 @@ void AppletInterface::setToolTipTextFormat(int format)
}
m_toolTipTextFormat = format;
emit toolTipTextFormatChanged();
Q_EMIT toolTipTextFormatChanged();
}
QQuickItem *AppletInterface::toolTipItem() const
@ -369,7 +369,7 @@ void AppletInterface::setToolTipItem(QQuickItem *toolTipItem)
connect(m_toolTipItem.data(), &QObject::destroyed,
this, &AppletInterface::toolTipItemChanged);
emit toolTipItemChanged();
Q_EMIT toolTipItemChanged();
}
bool AppletInterface::isBusy() const
@ -582,7 +582,7 @@ void AppletInterface::setAssociatedApplication(const QString &string)
}
applet()->setAssociatedApplication(string);
emit associatedApplicationChanged();
Q_EMIT associatedApplicationChanged();
}
QString AppletInterface::associatedApplication() const
@ -597,7 +597,7 @@ void AppletInterface::setAssociatedApplicationUrls(const QList<QUrl> &urls)
}
applet()->setAssociatedApplicationUrls(urls);
emit associatedApplicationUrlsChanged();
Q_EMIT associatedApplicationUrlsChanged();
}
QList<QUrl> AppletInterface::associatedApplicationUrls() const
@ -636,7 +636,7 @@ void AppletInterface::setHideOnWindowDeactivate(bool hide)
{
if (m_hideOnDeactivate != hide) {
m_hideOnDeactivate = hide;
emit hideOnWindowDeactivateChanged();
Q_EMIT hideOnWindowDeactivateChanged();
}
}
@ -848,7 +848,7 @@ bool AppletInterface::event(QEvent *event)
void AppletInterface::prepareContextualActions()
{
emit applet()->contextualActionsAboutToShow();
Q_EMIT applet()->contextualActionsAboutToShow();
}
bool AppletInterface::eventFilter(QObject *watched, QEvent *event)

View File

@ -63,7 +63,7 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent, cons
this, &ContainmentInterface::editModeChanged);
if (!m_appletInterfaces.isEmpty()) {
emit appletsChanged();
Q_EMIT appletsChanged();
}
}
@ -76,7 +76,7 @@ void ContainmentInterface::init()
m_activityInfo = new KActivities::Info(m_containment->activity(), this);
connect(m_activityInfo, &KActivities::Info::nameChanged,
this, &ContainmentInterface::activityNameChanged);
emit activityNameChanged();
Q_EMIT activityNameChanged();
if (!m_containment->wallpaper().isEmpty()) {
loadWallpaper();
@ -147,7 +147,7 @@ void ContainmentInterface::init()
m_activityInfo = new KActivities::Info(m_containment->activity(), this);
connect(m_activityInfo, &KActivities::Info::nameChanged,
this, &ContainmentInterface::activityNameChanged);
emit activityNameChanged();
Q_EMIT activityNameChanged();
});
connect(m_containment.data(), &Plasma::Containment::wallpaperChanged,
this, &ContainmentInterface::loadWallpaper);
@ -198,8 +198,8 @@ Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const
blockSignals(false);
emit appletAdded(appletGraphicObject, geom.x(), geom.y());
emit appletsChanged();
Q_EMIT appletAdded(appletGraphicObject, geom.x(), geom.y());
Q_EMIT appletsChanged();
} else {
blockSignals(false);
}
@ -214,7 +214,7 @@ void ContainmentInterface::setAppletArgs(Plasma::Applet *applet, const QString &
AppletInterface *appletInterface = applet->property("_plasma_graphicObject").value<AppletInterface *>();
if (appletInterface) {
emit appletInterface->externalData(mimetype, data);
Q_EMIT appletInterface->externalData(mimetype, data);
}
}
@ -251,7 +251,7 @@ void ContainmentInterface::addApplet(AppletInterface *applet, int x, int y)
blockSignals(true);
m_containment->addApplet(applet->applet());
blockSignals(false);
emit appletAdded(applet, x, y);
Q_EMIT appletAdded(applet, x, y);
}
QPointF ContainmentInterface::mapFromApplet(AppletInterface *applet, int x, int y)
@ -757,8 +757,8 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
[this](QObject *obj) {
m_appletInterfaces.removeAll(obj);
});
emit appletAdded(appletGraphicObject, appletGraphicObject->m_positionBeforeRemoval.x(), appletGraphicObject->m_positionBeforeRemoval.y());
emit appletsChanged();
Q_EMIT appletAdded(appletGraphicObject, appletGraphicObject->m_positionBeforeRemoval.x(), appletGraphicObject->m_positionBeforeRemoval.y());
Q_EMIT appletsChanged();
}
void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
@ -768,8 +768,8 @@ void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
m_appletInterfaces.removeAll(appletGraphicObject);
appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
}
emit appletRemoved(appletGraphicObject);
emit appletsChanged();
Q_EMIT appletRemoved(appletGraphicObject);
Q_EMIT appletsChanged();
}
void ContainmentInterface::loadWallpaper()
@ -938,10 +938,10 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
m_contextMenu = desktopMenu;
emit m_containment->contextualActionsAboutToShow();
Q_EMIT m_containment->contextualActionsAboutToShow();
if (applet) {
emit applet->contextualActionsAboutToShow();
Q_EMIT applet->contextualActionsAboutToShow();
addAppletActions(desktopMenu, applet, event);
} else {
addContainmentActions(desktopMenu, event);

View File

@ -86,15 +86,15 @@ QString DeclarativeAppletScript::filePath(const QString &type, const QString &fi
void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
{
if (constraints & Plasma::Types::FormFactorConstraint) {
emit formFactorChanged();
Q_EMIT formFactorChanged();
}
if (constraints & Plasma::Types::LocationConstraint) {
emit locationChanged();
Q_EMIT locationChanged();
}
if (constraints & Plasma::Types::ContextConstraint) {
emit contextChanged();
Q_EMIT contextChanged();
}
}

View File

@ -173,8 +173,8 @@ void WallpaperInterface::loadFinished()
qWarning() << "Error loading the wallpaper, package not found";
}
emit packageChanged();
emit configurationChanged();
Q_EMIT packageChanged();
Q_EMIT configurationChanged();
}
QList<QAction *> WallpaperInterface::contextualActions() const