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()); KIconLoader::global()->reconfigure(QString());
// merely changing the setting and calling reconfigure won't emit this signal, // 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 // 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(widthSpy.count(), 1);
QCOMPARE(heightSpy.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()); // m_dayHelper->setDate(m_displayedDate.year(), m_displayedDate.month());
updateData(); updateData();
emit displayedDateChanged(); Q_EMIT displayedDateChanged();
if (oldMonth != m_displayedDate.month()) { if (oldMonth != m_displayedDate.month()) {
emit monthNameChanged(); Q_EMIT monthNameChanged();
} }
if (oldYear != m_displayedDate.year()) { 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 // if the resetToToday() was called
updateData(); updateData();
} }
emit todayChanged(); Q_EMIT todayChanged();
} }
void Calendar::resetToToday() void Calendar::resetToToday()
{ {
m_displayedDate = m_today; m_displayedDate = m_today;
updateData(); updateData();
emit displayedDateChanged(); Q_EMIT displayedDateChanged();
} }
int Calendar::types() const int Calendar::types() const
@ -103,7 +103,7 @@ void Calendar::setTypes(int types)
// m_types = static_cast<Types>(types); // m_types = static_cast<Types>(types);
// updateTypes(); // updateTypes();
emit typesChanged(); Q_EMIT typesChanged();
} }
int Calendar::days() int Calendar::days()
@ -116,7 +116,7 @@ void Calendar::setDays(int days)
if (m_days != days) { if (m_days != days) {
m_days = days; m_days = days;
updateData(); updateData();
emit daysChanged(); Q_EMIT daysChanged();
} }
} }
@ -130,7 +130,7 @@ void Calendar::setWeeks(int weeks)
if (m_weeks != weeks) { if (m_weeks != weeks) {
m_weeks = weeks; m_weeks = weeks;
updateData(); updateData();
emit weeksChanged(); Q_EMIT weeksChanged();
} }
} }
@ -156,7 +156,7 @@ void Calendar::setFirstDayOfWeek(int day)
} }
updateData(); updateData();
emit firstDayOfWeekChanged(); Q_EMIT firstDayOfWeekChanged();
} }
} }
@ -292,7 +292,7 @@ void Calendar::updateData()
const DayData &data = m_dayList.at(i); const DayData &data = m_dayList.at(i);
m_weekList.append(QDate(data.yearNumber, data.monthNumber, data.dayNumber).weekNumber()); m_weekList.append(QDate(data.yearNumber, data.monthNumber, data.dayNumber).weekNumber());
} }
emit weeksModelChanged(); Q_EMIT weeksModelChanged();
m_daysModel->update(); m_daysModel->update();
// qDebug() << "---------------------------------------------------------------"; // qDebug() << "---------------------------------------------------------------";

View File

@ -41,7 +41,7 @@ void CalendarData::setStartDate(const QDate &dateTime)
m_startDate = dateTime; m_startDate = dateTime;
// m_filteredList->setStartDate(m_startDate); // m_filteredList->setStartDate(m_startDate);
emit startDateChanged(); Q_EMIT startDateChanged();
} }
QDate CalendarData::endDate() const QDate CalendarData::endDate() const
@ -57,7 +57,7 @@ void CalendarData::setEndDate(const QDate &dateTime)
m_endDate = dateTime; m_endDate = dateTime;
// m_filteredList->setEndDate(m_endDate); // m_filteredList->setEndDate(m_endDate);
emit endDateChanged(); Q_EMIT endDateChanged();
} }
int CalendarData::types() const 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. // 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) 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 // 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}); {containsEventItems, containsMajorEventItems, containsMinorEventItems});
Q_EMIT agendaUpdated(QDate::currentDate()); Q_EMIT agendaUpdated(QDate::currentDate());

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -281,7 +281,7 @@ void WindowThumbnail::setWinId(uint32_t winId)
startRedirecting(); startRedirecting();
} }
emit winIdChanged(); Q_EMIT winIdChanged();
} }
qreal WindowThumbnail::paintedWidth() const 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)); const QSizeF size(node->texture()->textureSize().scaled(boundingRect().size().toSize(), Qt::KeepAspectRatio));
if (size != m_paintedSize) { if (size != m_paintedSize) {
m_paintedSize = size; m_paintedSize = size;
emit paintedSizeChanged(); Q_EMIT paintedSizeChanged();
} }
const qreal x = boundingRect().x() + (boundingRect().width() - size.width()) / 2; const qreal x = boundingRect().x() + (boundingRect().width() - size.width()) / 2;
const qreal y = boundingRect().y() + (boundingRect().height() - size.height()) / 2; const qreal y = boundingRect().y() + (boundingRect().height() - size.height()) / 2;
@ -897,7 +897,7 @@ void WindowThumbnail::setThumbnailAvailable(bool thumbnailAvailable)
{ {
if (m_thumbnailAvailable != thumbnailAvailable) { if (m_thumbnailAvailable != thumbnailAvailable) {
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::triggered, this, &QMenuProxy::itemTriggered);
connect(m_menu, &QMenu::aboutToHide, this, [ = ]() { connect(m_menu, &QMenu::aboutToHide, this, [ = ]() {
m_status = DialogStatus::Closed; m_status = DialogStatus::Closed;
emit statusChanged(); Q_EMIT statusChanged();
}); });
} }
} }
@ -105,7 +105,7 @@ void QMenuProxy::setVisualParent(QObject *parent)
} }
m_visualParent = parent; m_visualParent = parent;
emit visualParentChanged(); Q_EMIT visualParentChanged();
} }
QWindow *QMenuProxy::transientParent() QWindow *QMenuProxy::transientParent()
@ -123,7 +123,7 @@ void QMenuProxy::setTransientParent(QWindow *parent)
} }
m_menu->windowHandle()->setTransientParent(parent); m_menu->windowHandle()->setTransientParent(parent);
emit transientParentChanged(); Q_EMIT transientParentChanged();
} }
Plasma::Types::PopupPlacement QMenuProxy::placement() const Plasma::Types::PopupPlacement QMenuProxy::placement() const
@ -136,7 +136,7 @@ void QMenuProxy::setPlacement(Plasma::Types::PopupPlacement placement)
if (m_placement != placement) { if (m_placement != placement) {
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) { if (m_menu->minimumWidth() != width) {
m_menu->setMinimumWidth(width); m_menu->setMinimumWidth(width);
emit minimumWidthChanged(); Q_EMIT minimumWidthChanged();
} }
} }
@ -164,7 +164,7 @@ void QMenuProxy::setMaximumWidth(int width)
if (m_menu->maximumWidth() != width) { if (m_menu->maximumWidth() != width) {
m_menu->setMaximumWidth(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) { for (int i = 0; i < m_items.count(); ++i) {
QMenuItem *item = m_items.at(i); QMenuItem *item = m_items.at(i);
if (item->action() == action) { if (item->action() == action) {
emit triggered(item); Q_EMIT triggered(item);
emit triggeredIndex(i); Q_EMIT triggeredIndex(i);
break; break;
} }
@ -453,7 +453,7 @@ void QMenuProxy::openInternal(QPoint pos)
m_menu->popup(pos); m_menu->popup(pos);
m_status = DialogStatus::Open; m_status = DialogStatus::Open;
emit statusChanged(); Q_EMIT statusChanged();
} }
QQuickItem *QMenuProxy::parentItem() const QQuickItem *QMenuProxy::parentItem() const

View File

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

View File

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

View File

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

View File

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

View File

@ -126,7 +126,7 @@ Applet::~Applet()
d->resetConfigurationObject(); d->resetConfigurationObject();
} }
//let people know that i will die //let people know that i will die
emit appletDeleted(this); Q_EMIT appletDeleted(this);
// ConfigLoader is deleted when AppletPrivate closes not Applet // ConfigLoader is deleted when AppletPrivate closes not Applet
// It saves on closure and emits a signal. // It saves on closure and emits a signal.
@ -220,9 +220,9 @@ void Applet::restore(KConfigGroup &group)
if (ok) { if (ok) {
d->userBackgroundHints = Plasma::Types::BackgroundHints(value); d->userBackgroundHints = Plasma::Types::BackgroundHints(value);
d->userBackgroundHintsInitialized = true; d->userBackgroundHintsInitialized = true;
emit userBackgroundHintsChanged(); Q_EMIT userBackgroundHintsChanged();
if (d->backgroundHints & Plasma::Types::ConfigurableBackground) { 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 void Applet::saveState(KConfigGroup &group) const
{ {
if (d->script) { if (d->script) {
emit d->script->saveState(group); Q_EMIT d->script->saveState(group);
} }
if (group.config()->name() != config().config()->name()) { if (group.config()->name() != config().config()->name()) {
@ -368,7 +368,7 @@ void Applet::setTitle(const QString &title)
} }
d->customTitle = title; d->customTitle = title;
emit titleChanged(title); Q_EMIT titleChanged(title);
} }
QString Applet::icon() const QString Applet::icon() const
@ -383,7 +383,7 @@ void Applet::setIcon(const QString &icon)
} }
d->icon = icon; d->icon = icon;
emit iconChanged(icon); Q_EMIT iconChanged(icon);
} }
bool Applet::isBusy() const bool Applet::isBusy() const
@ -398,7 +398,7 @@ void Applet::setBusy(bool busy)
} }
d->busy = busy; d->busy = busy;
emit busyChanged(busy); Q_EMIT busyChanged(busy);
} }
Plasma::Types::BackgroundHints Applet::backgroundHints() const Plasma::Types::BackgroundHints Applet::backgroundHints() const
@ -415,10 +415,10 @@ void Applet::setBackgroundHints(Plasma::Types::BackgroundHints hint)
Plasma::Types::BackgroundHints oldeffectiveHints = effectiveBackgroundHints(); Plasma::Types::BackgroundHints oldeffectiveHints = effectiveBackgroundHints();
d->backgroundHints = hint; d->backgroundHints = hint;
emit backgroundHintsChanged(); Q_EMIT backgroundHintsChanged();
if (oldeffectiveHints != effectiveBackgroundHints()) { if (oldeffectiveHints != effectiveBackgroundHints()) {
emit effectiveBackgroundHintsChanged(); Q_EMIT effectiveBackgroundHintsChanged();
} }
} }
@ -451,10 +451,10 @@ void Applet::setUserBackgroundHints(Plasma::Types::BackgroundHints hint)
containment()->corona()->requestConfigSync(); containment()->corona()->requestConfigSync();
} }
emit userBackgroundHintsChanged(); Q_EMIT userBackgroundHintsChanged();
if (d->backgroundHints & Plasma::Types::ConfigurableBackground) { 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->needsConfig = needsConfig;
d->configurationRequiredReason = reason; d->configurationRequiredReason = reason;
emit configurationRequiredChanged(needsConfig, reason); Q_EMIT configurationRequiredChanged(needsConfig, reason);
} }
bool Applet::isUserConfiguring() const bool Applet::isUserConfiguring() const
@ -564,7 +564,7 @@ void Applet::setUserConfiguring(bool configuring)
} }
d->userConfiguring = configuring; d->userConfiguring = configuring;
emit userConfiguringChanged(configuring); Q_EMIT userConfiguringChanged(configuring);
} }
Types::ItemStatus Applet::status() const Types::ItemStatus Applet::status() const
@ -578,7 +578,7 @@ void Applet::setStatus(const Types::ItemStatus status)
return; return;
} }
d->itemStatus = status; d->itemStatus = status;
emit statusChanged(status); Q_EMIT statusChanged(status);
} }
void Applet::flushPendingConstraintsEvents() void Applet::flushPendingConstraintsEvents()
@ -645,7 +645,7 @@ void Applet::flushPendingConstraintsEvents()
//an immutable constraint will always happen at startup //an immutable constraint will always happen at startup
//make sure don't emit a change signal for nothing //make sure don't emit a change signal for nothing
if (d->oldImmutability != immutability()) { if (d->oldImmutability != immutability()) {
emit immutabilityChanged(immutability()); Q_EMIT immutabilityChanged(immutability());
} }
d->oldImmutability = immutability(); d->oldImmutability = immutability();
} }
@ -671,11 +671,11 @@ void Applet::flushPendingConstraintsEvents()
} }
if (c & Plasma::Types::FormFactorConstraint) { if (c & Plasma::Types::FormFactorConstraint) {
emit formFactorChanged(formFactor()); Q_EMIT formFactorChanged(formFactor());
} }
if (c & Plasma::Types::LocationConstraint) { if (c & Plasma::Types::LocationConstraint) {
emit locationChanged(location()); Q_EMIT locationChanged(location());
} }
} }
@ -892,7 +892,7 @@ void Applet::timerEvent(QTimerEvent *event)
KConfigGroup cg; KConfigGroup cg;
save(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 //HACK: this is valid only in the systray case
connect(this, &Containment::configureRequested, this, [=] (Plasma::Applet *a) { connect(this, &Containment::configureRequested, this, [=] (Plasma::Applet *a) {
if (Plasma::Applet *p = qobject_cast<Plasma::Applet *>(parent())) { 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; d->type = type;
emit containmentTypeChanged(); Q_EMIT containmentTypeChanged();
} }
Corona *Containment::corona() const Corona *Containment::corona() const
@ -339,8 +339,8 @@ void Containment::setFormFactor(Types::FormFactor formFactor)
KConfigGroup c = config(); KConfigGroup c = config();
c.writeEntry("formfactor", (int)formFactor); c.writeEntry("formfactor", (int)formFactor);
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
emit formFactorChanged(formFactor); Q_EMIT formFactorChanged(formFactor);
} }
void Containment::setContainmentDisplayHints(Types::ContainmentDisplayHints hints) void Containment::setContainmentDisplayHints(Types::ContainmentDisplayHints hints)
@ -350,7 +350,7 @@ void Containment::setContainmentDisplayHints(Types::ContainmentDisplayHints hint
} }
d->containmentDisplayHints = hints; d->containmentDisplayHints = hints;
emit containmentDisplayHintsChanged(hints); Q_EMIT containmentDisplayHintsChanged(hints);
} }
void Containment::setLocation(Types::Location location) void Containment::setLocation(Types::Location location)
@ -369,15 +369,15 @@ void Containment::setLocation(Types::Location location)
KConfigGroup c = config(); KConfigGroup c = config();
c.writeEntry("location", (int)location); c.writeEntry("location", (int)location);
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
emit locationChanged(location); Q_EMIT locationChanged(location);
} }
Applet *Containment::createApplet(const QString &name, const QVariantList &args) Applet *Containment::createApplet(const QString &name, const QVariantList &args)
{ {
Plasma::Applet *applet = d->createApplet(name, args); Plasma::Applet *applet = d->createApplet(name, args);
if (applet) { if (applet) {
emit appletCreated(applet); Q_EMIT appletCreated(applet);
} }
return applet; return applet;
} }
@ -404,7 +404,7 @@ void Containment::addApplet(Applet *applet)
Containment *currentContainment = applet->containment(); Containment *currentContainment = applet->containment();
if (currentContainment && currentContainment != this) { if (currentContainment && currentContainment != this) {
emit currentContainment->appletRemoved(applet); Q_EMIT currentContainment->appletRemoved(applet);
disconnect(applet, nullptr, currentContainment, nullptr); disconnect(applet, nullptr, currentContainment, nullptr);
connect(currentContainment, nullptr, applet, nullptr); connect(currentContainment, nullptr, applet, nullptr);
@ -464,7 +464,7 @@ void Containment::addApplet(Applet *applet)
if (isNew) { if (isNew) {
applet->save(*applet->d->mainConfigGroup()); applet->save(*applet->d->mainConfigGroup());
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
} }
//FIXME: an on-appear animation would be nice to have again //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->updateConstraints(Plasma::Types::AllConstraints);
applet->flushPendingConstraintsEvents(); applet->flushPendingConstraintsEvents();
emit appletAdded(applet); Q_EMIT appletAdded(applet);
if (!currentContainment) { if (!currentContainment) {
applet->updateConstraints(Plasma::Types::StartupCompletedConstraint); applet->updateConstraints(Plasma::Types::StartupCompletedConstraint);
@ -509,8 +509,8 @@ void Containment::setWallpaper(const QString &pluginName)
KConfigGroup cfg = config(); KConfigGroup cfg = config();
cfg.writeEntry("wallpaperplugin", d->wallpaper); cfg.writeEntry("wallpaperplugin", d->wallpaper);
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
emit wallpaperChanged(); 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() QHash<QString, ContainmentActions *> &Containment::containmentActions()
@ -578,8 +578,8 @@ void Containment::setActivity(const QString &activityId)
KConfigGroup c = config(); KConfigGroup c = config();
c.writeEntry("activityId", activityId); c.writeEntry("activityId", activityId);
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
emit activityChanged(activityId); Q_EMIT activityChanged(activityId);
} }
QString Containment::activity() const QString Containment::activity() const
@ -595,10 +595,10 @@ void Containment::reactToScreenChange()
d->lastScreen = newScreen; d->lastScreen = newScreen;
KConfigGroup c = config(); KConfigGroup c = config();
c.writeEntry("lastScreen", d->lastScreen); c.writeEntry("lastScreen", d->lastScreen);
emit configNeedsSaving(); Q_EMIT configNeedsSaving();
} }
emit screenChanged(newScreen); Q_EMIT screenChanged(newScreen);
} }
} // Plasma namespace } // Plasma namespace

View File

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

View File

@ -68,7 +68,7 @@ void DataContainer::setModel(QAbstractItemModel *model)
d->model = model; d->model = model;
model->setParent(this); model->setParent(this);
emit modelChanged(objectName(), model); Q_EMIT modelChanged(objectName(), model);
} }
QAbstractItemModel *DataContainer::model() QAbstractItemModel *DataContainer::model()
@ -338,7 +338,7 @@ void DataContainer::checkForUpdate()
{ {
//qCDebug(LOG_PLASMA) << objectName() << d->dirty; //qCDebug(LOG_PLASMA) << objectName() << d->dirty;
if (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 //copy as checkQueueing can result in deletion of the relay
const auto relays = d->relays; const auto relays = d->relays;
@ -354,7 +354,7 @@ void DataContainer::forceImmediateUpdate()
{ {
if (d->dirty) { if (d->dirty) {
d->dirty = false; d->dirty = false;
emit dataUpdated(objectName(), d->data); Q_EMIT dataUpdated(objectName(), d->data);
} }
for (SignalRelay *relay : qAsConst(d->relays)) { 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 //NOTE: Notifying visualization of the model destruction before actual deletion avoids crashes in some edge cases
if (d->model) { if (d->model) {
d->model.clear(); d->model.clear();
emit modelChanged(objectName(), nullptr); Q_EMIT modelChanged(objectName(), nullptr);
} }
emit becameUnused(objectName()); Q_EMIT becameUnused(objectName());
} }
d->checkUsageTimer.stop(); d->checkUsageTimer.stop();
} else if (event->timerId() == d->storageTimer.timerId()) { } 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); s->setData(key, value);
if (isNew && source != d->waitingSourceRequest) { if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source); Q_EMIT sourceAdded(source);
} }
d->scheduleSourcesUpdated(); d->scheduleSourcesUpdated();
@ -199,7 +199,7 @@ void DataEngine::setData(const QString &source, const QVariantMap &data)
} }
if (isNew && source != d->waitingSourceRequest) { if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source); Q_EMIT sourceAdded(source);
} }
d->scheduleSourcesUpdated(); d->scheduleSourcesUpdated();
@ -262,7 +262,7 @@ void DataEngine::addSource(DataContainer *source)
this, SLOT(internalUpdateSource(DataContainer*))); this, SLOT(internalUpdateSource(DataContainer*)));
QObject::connect(source, SIGNAL(destroyed(QObject*)), this, SLOT(sourceDestroyed(QObject*))); QObject::connect(source, SIGNAL(destroyed(QObject*)), this, SLOT(sourceDestroyed(QObject*)));
d->sources.insert(source->objectName(), source); d->sources.insert(source->objectName(), source);
emit sourceAdded(source->objectName()); Q_EMIT sourceAdded(source->objectName());
d->scheduleSourcesUpdated(); d->scheduleSourcesUpdated();
} }
@ -295,7 +295,7 @@ void DataEngine::removeSource(const QString &source)
d->sources.erase(it); d->sources.erase(it);
s->disconnect(this); s->disconnect(this);
s->deleteLater(); s->deleteLater();
emit sourceRemoved(source); Q_EMIT sourceRemoved(source);
} }
} }
@ -309,7 +309,7 @@ void DataEngine::removeAllSources()
it.remove(); it.remove();
s->disconnect(this); s->disconnect(this);
s->deleteLater(); s->deleteLater();
emit sourceRemoved(source); Q_EMIT sourceRemoved(source);
} }
} }
@ -561,7 +561,7 @@ void DataEnginePrivate::sourceDestroyed(QObject *object)
while (it != sources.end()) { while (it != sources.end()) {
if (it.value() == object) { if (it.value() == object) {
sources.erase(it); sources.erase(it);
emit q->sourceRemoved(object->objectName()); Q_EMIT q->sourceRemoved(object->objectName());
break; break;
} }
++it; ++it;
@ -592,7 +592,7 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
*newSource = true; *newSource = true;
} }
QObject::connect(s, &DataContainer::becameUnused, q, &DataEngine::removeSource); QObject::connect(s, &DataContainer::becameUnused, q, &DataEngine::removeSource);
emit q->sourceAdded(sourceName); Q_EMIT q->sourceAdded(sourceName);
} }
} }
waitingSourceRequest.clear(); waitingSourceRequest.clear();

View File

@ -910,7 +910,7 @@ void FrameSvgPrivate::updateAndSignalSizes()
return; return;
} }
updateSizes(frame); updateSizes(frame);
emit q->repaintNeeded(); Q_EMIT q->repaintNeeded();
} }
QSizeF FrameSvgPrivate::frameSize(FrameData *frame) const 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); q->actions()->addAction(QStringLiteral("alternatives"), a);
QObject::connect(a, &QAction::triggered, q, [this] { QObject::connect(a, &QAction::triggered, q, [this] {
if (q->containment()) { if (q->containment()) {
emit q->containment()->appletAlternativesRequested(q); Q_EMIT q->containment()->appletAlternativesRequested(q);
} }
}); });
@ -219,7 +219,7 @@ void AppletPrivate::cleanUpAndDelete()
if (q->isContainment()) { if (q->isContainment()) {
// prematurely emit our destruction if we are a Containment, // prematurely emit our destruction if we are a Containment,
// giving Corona a chance to remove this Containment from its collection // giving Corona a chance to remove this Containment from its collection
emit q->QObject::destroyed(q); Q_EMIT q->QObject::destroyed(q);
} }
q->deleteLater(); q->deleteLater();
@ -228,9 +228,9 @@ void AppletPrivate::cleanUpAndDelete()
void AppletPrivate::setDestroyed(bool destroyed) void AppletPrivate::setDestroyed(bool destroyed)
{ {
transient = destroyed; transient = destroyed;
emit q->destroyedChanged(destroyed); Q_EMIT q->destroyedChanged(destroyed);
//when an applet gets transient, it's "systemimmutable" //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); Plasma::Containment *asContainment = qobject_cast<Plasma::Containment *>(q);
if (asContainment) { if (asContainment) {
@ -282,9 +282,9 @@ void AppletPrivate::askDestroy()
if (!q->isContainment() && q->containment()) { if (!q->isContainment() && q->containment()) {
Plasma::Applet *containmentApplet = static_cast<Plasma::Applet *>(q->containment()); Plasma::Applet *containmentApplet = static_cast<Plasma::Applet *>(q->containment());
if (containmentApplet && containmentApplet->d->deleteNotificationTimer) { if (containmentApplet && containmentApplet->d->deleteNotificationTimer) {
emit containmentApplet->destroyedChanged(false); Q_EMIT containmentApplet->destroyedChanged(false);
//when an applet gets transient, it's "systemimmutable" //when an applet gets transient, it's "systemimmutable"
emit q->immutabilityChanged(q->immutability()); Q_EMIT q->immutabilityChanged(q->immutability());
delete containmentApplet->d->deleteNotificationTimer; delete containmentApplet->d->deleteNotificationTimer;
containmentApplet->d->deleteNotificationTimer = nullptr; containmentApplet->d->deleteNotificationTimer = nullptr;
} }
@ -294,7 +294,7 @@ void AppletPrivate::askDestroy()
return a1->id() < a2->id(); return a1->id() < a2->id();
}); });
q->containment()->d->applets.insert(position, q); q->containment()->d->applets.insert(position, q);
emit q->containment()->appletAdded(q); Q_EMIT q->containment()->appletAdded(q);
} }
if (deleteNotification) { if (deleteNotification) {
deleteNotification->close(); deleteNotification->close();
@ -329,7 +329,7 @@ void AppletPrivate::askDestroy()
if (deleteNotification) { if (deleteNotification) {
deleteNotification->close(); deleteNotification->close();
} else { } else {
emit q->destroyedChanged(true); Q_EMIT q->destroyedChanged(true);
cleanUpAndDelete(); cleanUpAndDelete();
} }
}); });
@ -337,7 +337,7 @@ void AppletPrivate::askDestroy()
} }
if (!q->isContainment() && q->containment()) { if (!q->isContainment() && q->containment()) {
q->containment()->d->applets.removeAll(q); 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() void AppletPrivate::requestConfiguration()
{ {
if (q->containment()) { 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() void ContainmentPrivate::triggerShowAddWidgets()
{ {
emit q->showAddWidgetsInterface(QPointF()); Q_EMIT q->showAddWidgetsInterface(QPointF());
} }
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints constraints) void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints constraints)
@ -202,8 +202,8 @@ void ContainmentPrivate::appletDeleted(Plasma::Applet *applet)
{ {
applets.removeAll(applet); applets.removeAll(applet);
emit q->appletRemoved(applet); Q_EMIT q->appletRemoved(applet);
emit q->configNeedsSaving(); Q_EMIT q->configNeedsSaving();
} }
bool ContainmentPrivate::isPanelContainment() const bool ContainmentPrivate::isPanelContainment() const
@ -217,7 +217,7 @@ void ContainmentPrivate::setStarted()
q->Applet::d->started = true; q->Applet::d->started = true;
if (uiReady) { if (uiReady) {
emit q->uiReadyChanged(true); Q_EMIT q->uiReadyChanged(true);
} }
} }
} }
@ -228,7 +228,7 @@ void ContainmentPrivate::setUiReady()
if (!uiReady) { if (!uiReady) {
uiReady = true; uiReady = true;
if (q->Applet::d->started && (appletsUiReady || applets.isEmpty()) && loadingApplets.isEmpty()) { 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) { if (loadingApplets.isEmpty() && !appletsUiReady) {
appletsUiReady = true; appletsUiReady = true;
if (q->Applet::d->started && uiReady) { 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; //qCDebug(LOG_PLASMA) << m_queued;
if (m_queued) { if (m_queued) {
emit dataUpdated(dc->objectName(), d->data); Q_EMIT dataUpdated(dc->objectName(), d->data);
m_queued = false; m_queued = false;
//TODO: should we re-align our timer at this point, to avoid //TODO: should we re-align our timer at this point, to avoid
// constant queueing due to more-or-less constant time // constant queueing due to more-or-less constant time
@ -116,7 +116,7 @@ void SignalRelay::checkQueueing()
void SignalRelay::forceImmediateUpdate() void SignalRelay::forceImmediateUpdate()
{ {
emit dataUpdated(dc->objectName(), d->data); Q_EMIT dataUpdated(dc->objectName(), d->data);
} }
void SignalRelay::timerEvent(QTimerEvent *event) void SignalRelay::timerEvent(QTimerEvent *event)
@ -136,10 +136,10 @@ void SignalRelay::timerEvent(QTimerEvent *event)
checkAlignment(); checkAlignment();
} }
emit dc->updateRequested(dc); Q_EMIT dc->updateRequested(dc);
if (d->hasUpdates()) { if (d->hasUpdates()) {
//qCDebug(LOG_PLASMA) << "emitting data updated directly" << d->data; //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; m_queued = false;
} else { } else {
// the source wasn't actually updated; so let's put ourselves in the queue // 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(); bool nowEffectActive = isEffectActive();
if (m_effectActive != nowEffectActive) { if (m_effectActive != nowEffectActive) {
m_effectActive = nowEffectActive; m_effectActive = nowEffectActive;
emit effectChanged(m_effectActive); Q_EMIT effectChanged(m_effectActive);
} }
} }
return false; return false;

View File

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

View File

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

View File

@ -129,7 +129,7 @@ void Service::setName(const QString &name)
registerOperationsScheme(); registerOperationsScheme();
emit serviceReady(this); Q_EMIT serviceReady(this);
} }
void Service::setOperationEnabled(const QString &operation, bool enable) void Service::setOperationEnabled(const QString &operation, bool enable)
@ -144,7 +144,7 @@ void Service::setOperationEnabled(const QString &operation, bool enable)
d->disabledOperations.insert(operation); d->disabledOperations.insert(operation);
} }
emit operationEnabledChanged(operation, enable); Q_EMIT operationEnabledChanged(operation, enable);
} }
bool Service::isOperationEnabled(const QString &operation) const 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); fromCurrentTheme = !inIconTheme && isThemed && actualTheme()->currentThemeHasImage(imagePath);
if (fromCurrentTheme != oldFromCurrentTheme) { if (fromCurrentTheme != oldFromCurrentTheme) {
emit q->fromCurrentThemeChanged(fromCurrentTheme); Q_EMIT q->fromCurrentThemeChanged(fromCurrentTheme);
} }
if (inIconTheme) { if (inIconTheme) {
@ -490,7 +490,7 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
} }
q->resize(); q->resize();
emit q->imagePathChanged(); Q_EMIT q->imagePathChanged();
return updateNeeded; return updateNeeded;
} }
@ -842,7 +842,7 @@ void SvgPrivate::themeChanged()
q->resize(); q->resize();
//qCDebug(LOG_PLASMA) << themePath << ">>>>>>>>>>>>>>>>>> theme changed"; //qCDebug(LOG_PLASMA) << themePath << ">>>>>>>>>>>>>>>>>> theme changed";
emit q->repaintNeeded(); Q_EMIT q->repaintNeeded();
} }
void SvgPrivate::colorsChanged() void SvgPrivate::colorsChanged()
@ -854,7 +854,7 @@ void SvgPrivate::colorsChanged()
eraseRenderer(); eraseRenderer();
qCDebug(LOG_PLASMA) << "repaint needed from colorsChanged"; qCDebug(LOG_PLASMA) << "repaint needed from colorsChanged";
emit q->repaintNeeded(); Q_EMIT q->repaintNeeded();
} }
QHash<QString, SharedSvgRenderer::Ptr> SvgPrivate::s_renderers; QHash<QString, SharedSvgRenderer::Ptr> SvgPrivate::s_renderers;
@ -887,7 +887,7 @@ void Svg::setDevicePixelRatio(qreal ratio)
d->devicePixelRatio = floor(ratio); d->devicePixelRatio = floor(ratio);
emit repaintNeeded(); Q_EMIT repaintNeeded();
} }
qreal Svg::devicePixelRatio() qreal Svg::devicePixelRatio()
@ -918,8 +918,8 @@ void Svg::setScaleFactor(qreal ratio)
d->size = d->naturalSize; d->size = d->naturalSize;
emit repaintNeeded(); Q_EMIT repaintNeeded();
emit sizeChanged(); Q_EMIT sizeChanged();
} }
qreal Svg::scaleFactor() const qreal Svg::scaleFactor() const
@ -935,8 +935,8 @@ void Svg::setColorGroup(Plasma::Theme::ColorGroup group)
d->colorGroup = group; d->colorGroup = group;
d->renderer = nullptr; d->renderer = nullptr;
emit colorGroupChanged(); Q_EMIT colorGroupChanged();
emit repaintNeeded(); Q_EMIT repaintNeeded();
} }
Plasma::Theme::ColorGroup Svg::colorGroup() const Plasma::Theme::ColorGroup Svg::colorGroup() const
@ -1017,7 +1017,7 @@ void Svg::resize(const QSizeF &size)
} }
d->size = size; d->size = size;
emit sizeChanged(); Q_EMIT sizeChanged();
} }
void Svg::resize() void Svg::resize()
@ -1028,7 +1028,7 @@ void Svg::resize()
} }
d->size = d->naturalSize; d->size = d->naturalSize;
emit sizeChanged(); Q_EMIT sizeChanged();
} }
QSize Svg::elementSize(const QString &elementId) const QSize Svg::elementSize(const QString &elementId) const
@ -1083,7 +1083,7 @@ bool Svg::containsMultipleImages() const
void Svg::setImagePath(const QString &svgFilePath) void Svg::setImagePath(const QString &svgFilePath)
{ {
if (d->setImagePath(svgFilePath)) { if (d->setImagePath(svgFilePath)) {
emit repaintNeeded(); Q_EMIT repaintNeeded();
} }
} }
@ -1114,7 +1114,7 @@ void Svg::setUseSystemColors(bool system)
} }
d->useSystemColors = system; d->useSystemColors = system;
emit repaintNeeded(); Q_EMIT repaintNeeded();
} }
bool Svg::useSystemColors() const bool Svg::useSystemColors() const
@ -1150,8 +1150,8 @@ void Svg::setStatus(Plasma::Svg::Status status)
d->status = status; d->status = status;
d->eraseRenderer(); d->eraseRenderer();
emit statusChanged(status); Q_EMIT statusChanged(status);
emit repaintNeeded(); Q_EMIT repaintNeeded();
} }
Svg::Status Svg::status() const 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)); compactRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->createObjectFromComponent(compactRepresentation, QtQml::qmlContext(qmlObject->rootObject()), initialProperties));
emit q->compactRepresentationItemChanged(compactRepresentationItem); Q_EMIT q->compactRepresentationItemChanged(compactRepresentationItem);
return compactRepresentationItem; return compactRepresentationItem;
} }
@ -247,14 +247,14 @@ QQuickItem *AppletQuickItemPrivate::createFullRepresentationItem()
} else { } else {
fullRepresentation = qmlObject->mainComponent(); fullRepresentation = qmlObject->mainComponent();
fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->rootObject()); fullRepresentationItem = qobject_cast<QQuickItem*>(qmlObject->rootObject());
emit q->fullRepresentationChanged(fullRepresentation); Q_EMIT q->fullRepresentationChanged(fullRepresentation);
} }
if (!fullRepresentationItem) { if (!fullRepresentationItem) {
return nullptr; return nullptr;
} }
emit q->fullRepresentationItemChanged(fullRepresentationItem); Q_EMIT q->fullRepresentationItemChanged(fullRepresentationItem);
return fullRepresentationItem; return fullRepresentationItem;
} }
@ -382,7 +382,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
currentRepresentationItem = item; currentRepresentationItem = item;
connectLayoutAttached(item); connectLayoutAttached(item);
expanded = true; expanded = true;
emit q->expandedChanged(true); Q_EMIT q->expandedChanged(true);
} }
//Icon //Icon
@ -414,7 +414,7 @@ void AppletQuickItemPrivate::compactRepresentationCheck()
connectLayoutAttached(compactItem); connectLayoutAttached(compactItem);
expanded = false; expanded = false;
emit q->expandedChanged(false); Q_EMIT q->expandedChanged(false);
} }
} }
} }
@ -658,14 +658,14 @@ void AppletQuickItem::init()
d->fullRepresentation = d->qmlObject->mainComponent(); d->fullRepresentation = d->qmlObject->mainComponent();
d->fullRepresentationItem = qobject_cast<QQuickItem*>(d->qmlObject->rootObject()); 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 //default compactRepresentation is a simple icon provided by the shell package
if (!d->compactRepresentation) { if (!d->compactRepresentation) {
d->compactRepresentation = new QQmlComponent(engine, this); d->compactRepresentation = new QQmlComponent(engine, this);
d->compactRepresentation->loadUrl(d->coronaPackage.fileUrl("defaultcompactrepresentation")); 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 //default compactRepresentationExpander is the popup in which fullRepresentation goes
@ -752,7 +752,7 @@ void AppletQuickItem::setSwitchWidth(int width)
d->switchWidth = width; d->switchWidth = width;
d->compactRepresentationCheck(); d->compactRepresentationCheck();
emit switchWidthChanged(width); Q_EMIT switchWidthChanged(width);
} }
int AppletQuickItem::switchHeight() const int AppletQuickItem::switchHeight() const
@ -768,7 +768,7 @@ void AppletQuickItem::setSwitchHeight(int height)
d->switchHeight = height; d->switchHeight = height;
d->compactRepresentationCheck(); d->compactRepresentationCheck();
emit switchHeightChanged(height); Q_EMIT switchHeightChanged(height);
} }
QQmlComponent *AppletQuickItem::compactRepresentation() QQmlComponent *AppletQuickItem::compactRepresentation()
@ -783,7 +783,7 @@ void AppletQuickItem::setCompactRepresentation(QQmlComponent *component)
} }
d->compactRepresentation = component; d->compactRepresentation = component;
emit compactRepresentationChanged(component); Q_EMIT compactRepresentationChanged(component);
} }
QQmlComponent *AppletQuickItem::fullRepresentation() QQmlComponent *AppletQuickItem::fullRepresentation()
@ -815,7 +815,7 @@ void AppletQuickItem::setFullRepresentation(QQmlComponent *component)
} }
d->fullRepresentation = component; d->fullRepresentation = component;
emit fullRepresentationChanged(component); Q_EMIT fullRepresentationChanged(component);
} }
QQmlComponent *AppletQuickItem::preferredRepresentation() QQmlComponent *AppletQuickItem::preferredRepresentation()
@ -830,7 +830,7 @@ void AppletQuickItem::setPreferredRepresentation(QQmlComponent *component)
} }
d->preferredRepresentation = component; d->preferredRepresentation = component;
emit preferredRepresentationChanged(component); Q_EMIT preferredRepresentationChanged(component);
d->compactRepresentationCheck(); d->compactRepresentationCheck();
} }
@ -856,7 +856,7 @@ void AppletQuickItem::setExpanded(bool expanded)
} }
d->expanded = expanded; d->expanded = expanded;
emit expandedChanged(expanded); Q_EMIT expandedChanged(expanded);
} }
bool AppletQuickItem::isActivationTogglesExpanded() const bool AppletQuickItem::isActivationTogglesExpanded() const
@ -870,7 +870,7 @@ void AppletQuickItem::setActivationTogglesExpanded(bool activationTogglesExpande
return; return;
} }
d->activationTogglesExpanded = activationTogglesExpanded; d->activationTogglesExpanded = activationTogglesExpanded;
emit activationTogglesExpandedChanged(activationTogglesExpanded); Q_EMIT activationTogglesExpandedChanged(activationTogglesExpanded);
} }
////////////Internals ////////////Internals

View File

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

View File

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

View File

@ -72,13 +72,13 @@ void ContainmentViewPrivate::setContainment(Plasma::Containment *cont)
containment = cont; containment = cont;
if (oldLoc != location()) { if (oldLoc != location()) {
emit q->locationChanged(location()); Q_EMIT q->locationChanged(location());
} }
if (oldForm != formFactor()) { 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 //we are QuickViewSharedEngine::SizeRootObjectToView, but that's not enough, as
//the root object isn't immediately resized (done at the resizeEvent handler). //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 //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; d->visualParent = visualParent;
emit visualParentChanged(); Q_EMIT visualParentChanged();
if (visualParent) { if (visualParent) {
if (visualParent->window()) { if (visualParent->window()) {
setTransientParent(visualParent->window()); setTransientParent(visualParent->window());
@ -1067,7 +1067,7 @@ void Dialog::setLocation(Plasma::Types::Location location)
return; return;
} }
d->location = location; d->location = location;
emit locationChanged(); Q_EMIT locationChanged();
if (d->mainItem) { if (d->mainItem) {
d->syncToMainItemSize(); d->syncToMainItemSize();
@ -1090,7 +1090,7 @@ void Dialog::setFramelessFlags(Qt::WindowFlags flags)
flags |= Qt::Dialog; flags |= Qt::Dialog;
setFlags(Qt::FramelessWindowHint | flags); setFlags(Qt::FramelessWindowHint | flags);
d->applyType(); d->applyType();
emit flagsChanged(); Q_EMIT flagsChanged();
} }
void Dialog::adjustGeometry(const QRect &geom) void Dialog::adjustGeometry(const QRect &geom)
@ -1140,7 +1140,7 @@ void Dialog::setType(WindowType type)
d->type = type; d->type = type;
d->applyType(); d->applyType();
emit typeChanged(); Q_EMIT typeChanged();
} }
Dialog::WindowType Dialog::type() const Dialog::WindowType Dialog::type() const
@ -1178,7 +1178,7 @@ void Dialog::focusOutEvent(QFocusEvent *ev)
if (viewClicked || (!parentHasFocus && !childHasFocus)) { if (viewClicked || (!parentHasFocus && !childHasFocus)) {
setVisible(false); setVisible(false);
emit windowDeactivated(); Q_EMIT windowDeactivated();
} }
} }
@ -1373,7 +1373,7 @@ void Dialog::setHideOnWindowDeactivate(bool hide)
return; return;
} }
d->hideOnWindowDeactivate = hide; d->hideOnWindowDeactivate = hide;
emit hideOnWindowDeactivateChanged(); Q_EMIT hideOnWindowDeactivateChanged();
} }
bool Dialog::isOutputOnly() const bool Dialog::isOutputOnly() const
@ -1387,7 +1387,7 @@ void Dialog::setOutputOnly(bool outputOnly)
return; return;
} }
d->outputOnly = outputOnly; d->outputOnly = outputOnly;
emit outputOnlyChanged(); Q_EMIT outputOnlyChanged();
} }
void Dialog::setVisible(bool visible) void Dialog::setVisible(bool visible)
@ -1406,7 +1406,7 @@ void Dialog::setVisible(bool visible)
QQuickWindow::setVisible(visible); QQuickWindow::setVisible(visible);
//signal will be emitted and proxied from the QQuickWindow code //signal will be emitted and proxied from the QQuickWindow code
} else { } else {
emit visibleChangedProxy(); Q_EMIT visibleChangedProxy();
} }
} }
@ -1431,7 +1431,7 @@ void Dialog::setBackgroundHints(Dialog::BackgroundHints hints)
d->backgroundHints = hints; d->backgroundHints = hints;
d->updateTheme(); d->updateTheme();
emit backgroundHintsChanged(); Q_EMIT backgroundHintsChanged();
} }
} }

View File

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

View File

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

View File

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

View File

@ -63,7 +63,7 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent, cons
this, &ContainmentInterface::editModeChanged); this, &ContainmentInterface::editModeChanged);
if (!m_appletInterfaces.isEmpty()) { 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); m_activityInfo = new KActivities::Info(m_containment->activity(), this);
connect(m_activityInfo, &KActivities::Info::nameChanged, connect(m_activityInfo, &KActivities::Info::nameChanged,
this, &ContainmentInterface::activityNameChanged); this, &ContainmentInterface::activityNameChanged);
emit activityNameChanged(); Q_EMIT activityNameChanged();
if (!m_containment->wallpaper().isEmpty()) { if (!m_containment->wallpaper().isEmpty()) {
loadWallpaper(); loadWallpaper();
@ -147,7 +147,7 @@ void ContainmentInterface::init()
m_activityInfo = new KActivities::Info(m_containment->activity(), this); m_activityInfo = new KActivities::Info(m_containment->activity(), this);
connect(m_activityInfo, &KActivities::Info::nameChanged, connect(m_activityInfo, &KActivities::Info::nameChanged,
this, &ContainmentInterface::activityNameChanged); this, &ContainmentInterface::activityNameChanged);
emit activityNameChanged(); Q_EMIT activityNameChanged();
}); });
connect(m_containment.data(), &Plasma::Containment::wallpaperChanged, connect(m_containment.data(), &Plasma::Containment::wallpaperChanged,
this, &ContainmentInterface::loadWallpaper); this, &ContainmentInterface::loadWallpaper);
@ -198,8 +198,8 @@ Plasma::Applet *ContainmentInterface::createApplet(const QString &plugin, const
blockSignals(false); blockSignals(false);
emit appletAdded(appletGraphicObject, geom.x(), geom.y()); Q_EMIT appletAdded(appletGraphicObject, geom.x(), geom.y());
emit appletsChanged(); Q_EMIT appletsChanged();
} else { } else {
blockSignals(false); blockSignals(false);
} }
@ -214,7 +214,7 @@ void ContainmentInterface::setAppletArgs(Plasma::Applet *applet, const QString &
AppletInterface *appletInterface = applet->property("_plasma_graphicObject").value<AppletInterface *>(); AppletInterface *appletInterface = applet->property("_plasma_graphicObject").value<AppletInterface *>();
if (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); blockSignals(true);
m_containment->addApplet(applet->applet()); m_containment->addApplet(applet->applet());
blockSignals(false); blockSignals(false);
emit appletAdded(applet, x, y); Q_EMIT appletAdded(applet, x, y);
} }
QPointF ContainmentInterface::mapFromApplet(AppletInterface *applet, int x, int y) QPointF ContainmentInterface::mapFromApplet(AppletInterface *applet, int x, int y)
@ -757,8 +757,8 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
[this](QObject *obj) { [this](QObject *obj) {
m_appletInterfaces.removeAll(obj); m_appletInterfaces.removeAll(obj);
}); });
emit appletAdded(appletGraphicObject, appletGraphicObject->m_positionBeforeRemoval.x(), appletGraphicObject->m_positionBeforeRemoval.y()); Q_EMIT appletAdded(appletGraphicObject, appletGraphicObject->m_positionBeforeRemoval.x(), appletGraphicObject->m_positionBeforeRemoval.y());
emit appletsChanged(); Q_EMIT appletsChanged();
} }
void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet) void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
@ -768,8 +768,8 @@ void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
m_appletInterfaces.removeAll(appletGraphicObject); m_appletInterfaces.removeAll(appletGraphicObject);
appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF()); appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
} }
emit appletRemoved(appletGraphicObject); Q_EMIT appletRemoved(appletGraphicObject);
emit appletsChanged(); Q_EMIT appletsChanged();
} }
void ContainmentInterface::loadWallpaper() void ContainmentInterface::loadWallpaper()
@ -938,10 +938,10 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
m_contextMenu = desktopMenu; m_contextMenu = desktopMenu;
emit m_containment->contextualActionsAboutToShow(); Q_EMIT m_containment->contextualActionsAboutToShow();
if (applet) { if (applet) {
emit applet->contextualActionsAboutToShow(); Q_EMIT applet->contextualActionsAboutToShow();
addAppletActions(desktopMenu, applet, event); addAppletActions(desktopMenu, applet, event);
} else { } else {
addContainmentActions(desktopMenu, event); 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) void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
{ {
if (constraints & Plasma::Types::FormFactorConstraint) { if (constraints & Plasma::Types::FormFactorConstraint) {
emit formFactorChanged(); Q_EMIT formFactorChanged();
} }
if (constraints & Plasma::Types::LocationConstraint) { if (constraints & Plasma::Types::LocationConstraint) {
emit locationChanged(); Q_EMIT locationChanged();
} }
if (constraints & Plasma::Types::ContextConstraint) { 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"; qWarning() << "Error loading the wallpaper, package not found";
} }
emit packageChanged(); Q_EMIT packageChanged();
emit configurationChanged(); Q_EMIT configurationChanged();
} }
QList<QAction *> WallpaperInterface::contextualActions() const QList<QAction *> WallpaperInterface::contextualActions() const