Port away from deprecated QHash/QMultiHash methods

wilder-5.24
Alexander Lohnau 4 years ago
parent a06c68ed54
commit af10fcdaa9
  1. 2
      gmenu-dbusmenu-proxy/window.cpp
  2. 3
      gmenu-dbusmenu-proxy/window.h
  3. 6
      libtaskmanager/xwindowtasksmodel.cpp

@ -426,7 +426,7 @@ uint Window::GetLayout(int parentId, int recursionDepth, const QStringList &prop
if (!m_currentMenu->hasSubscription(subscription)) { if (!m_currentMenu->hasSubscription(subscription)) {
// let's serve multiple similar requests in one go once we've processed them // let's serve multiple similar requests in one go once we've processed them
m_pendingGetLayouts.insertMulti(subscription, message()); m_pendingGetLayouts.insert(subscription, message());
setDelayedReply(true); setDelayedReply(true);
m_currentMenu->start(subscription); m_currentMenu->start(subscription);

@ -7,6 +7,7 @@
#pragma once #pragma once
#include <QDBusContext> #include <QDBusContext>
#include <QMultiHash>
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QVector> #include <QVector>
@ -111,7 +112,7 @@ private:
QString m_proxyObjectPath; // our object path on this proxy app QString m_proxyObjectPath; // our object path on this proxy app
QHash<int, QDBusMessage> m_pendingGetLayouts; QMultiHash<int, QDBusMessage> m_pendingGetLayouts;
Menu *m_applicationMenu = nullptr; Menu *m_applicationMenu = nullptr;
Menu *m_menuBar = nullptr; Menu *m_menuBar = nullptr;

@ -217,7 +217,7 @@ void XWindowTasksModel::Private::addWindow(WId window)
// Update demands attention state for leader. // Update demands attention state for leader.
if (info.hasState(NET::DemandsAttention) && windows.contains(leader)) { if (info.hasState(NET::DemandsAttention) && windows.contains(leader)) {
transientsDemandingAttention.insertMulti(leader, window); transientsDemandingAttention.insert(leader, window);
dataChanged(leader, QVector<int>{IsDemandingAttention}); dataChanged(leader, QVector<int>{IsDemandingAttention});
} }
@ -279,7 +279,7 @@ void XWindowTasksModel::Private::transientChanged(WId window, NET::Properties pr
if (info.hasState(NET::DemandsAttention)) { if (info.hasState(NET::DemandsAttention)) {
if (!transientsDemandingAttention.values(leader).contains(window)) { if (!transientsDemandingAttention.values(leader).contains(window)) {
transientsDemandingAttention.insertMulti(leader, window); transientsDemandingAttention.insert(leader, window);
dataChanged(leader, QVector<int>{IsDemandingAttention}); dataChanged(leader, QVector<int>{IsDemandingAttention});
} }
} else if (transientsDemandingAttention.remove(window)) { } else if (transientsDemandingAttention.remove(window)) {
@ -297,7 +297,7 @@ void XWindowTasksModel::Private::transientChanged(WId window, NET::Properties pr
if (leader != oldLeader) { if (leader != oldLeader) {
transientsDemandingAttention.remove(oldLeader, window); transientsDemandingAttention.remove(oldLeader, window);
transientsDemandingAttention.insertMulti(leader, window); transientsDemandingAttention.insert(leader, window);
dataChanged(oldLeader, QVector<int>{IsDemandingAttention}); dataChanged(oldLeader, QVector<int>{IsDemandingAttention});
dataChanged(leader, QVector<int>{IsDemandingAttention}); dataChanged(leader, QVector<int>{IsDemandingAttention});
} }

Loading…
Cancel
Save