refact: Compatible with Qt 6.2
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
parent
34a10bddb1
commit
6561747c7d
@ -459,7 +459,8 @@ void ApplicationService::removeAllInstance() noexcept
|
|||||||
|
|
||||||
QDBusObjectPath ApplicationService::findInstance(const QString &instanceId) const
|
QDBusObjectPath ApplicationService::findInstance(const QString &instanceId) const
|
||||||
{
|
{
|
||||||
for (const auto &[path, ptr] : m_Instances.asKeyValueRange()) {
|
for (auto it = m_Instances.constKeyValueBegin(); it != m_Instances.constKeyValueEnd(); ++it) {
|
||||||
|
const auto &[path, ptr] = *it;
|
||||||
if (ptr->instanceId() == instanceId) {
|
if (ptr->instanceId() == instanceId) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -237,9 +237,11 @@ bool DesktopEntry::checkMainEntryValidation() const noexcept
|
|||||||
auto type = it->find("Type");
|
auto type = it->find("Type");
|
||||||
if (type == it->end()) {
|
if (type == it->end()) {
|
||||||
qWarning() << "No Type.";
|
qWarning() << "No Type.";
|
||||||
for (const auto &[k, v] : it->asKeyValueRange()) {
|
for (auto tmp = it->constKeyValueBegin(); tmp != it->constKeyValueEnd(); ++tmp) {
|
||||||
|
const auto& [k,v] = *tmp;
|
||||||
qInfo() << "keyName:" << k;
|
qInfo() << "keyName:" << k;
|
||||||
for (const auto &[key, value] : v.asKeyValueRange()) {
|
for (auto valIt = v.constKeyValueBegin() ; valIt != v.constKeyValueEnd(); ++valIt) {
|
||||||
|
const auto &[key, value] = *valIt;
|
||||||
qInfo() << key << value;
|
qInfo() << key << value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,8 @@ ObjectMap dumpDBusObject(const QMap<QDBusObjectPath, QSharedPointer<T>> &map)
|
|||||||
{
|
{
|
||||||
ObjectMap objs;
|
ObjectMap objs;
|
||||||
|
|
||||||
for (const auto &[key, value] : map.asKeyValueRange()) {
|
for (auto it = map.constKeyValueBegin(); it != map.constKeyValueEnd(); ++it) {
|
||||||
|
const auto &[key, value] = *it;
|
||||||
auto interAndProps = getChildInterfacesAndPropertiesFromObject(value.data());
|
auto interAndProps = getChildInterfacesAndPropertiesFromObject(value.data());
|
||||||
objs.insert(key, interAndProps);
|
objs.insert(key, interAndProps);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
QStringList generateCommand(const QVariantMap &props) noexcept
|
QStringList generateCommand(const QVariantMap &props) noexcept
|
||||||
{
|
{
|
||||||
std::vector<std::unique_ptr<LaunchOption>> options;
|
std::vector<std::unique_ptr<LaunchOption>> options;
|
||||||
for (const auto &[key, value] : props.asKeyValueRange()) {
|
for (auto it = props.constKeyValueBegin(); it!= props.constKeyValueEnd(); ++it) {
|
||||||
|
const auto &[key, value] = *it;
|
||||||
if (key == setUserLaunchOption::key()) {
|
if (key == setUserLaunchOption::key()) {
|
||||||
options.push_back(std::make_unique<setUserLaunchOption>(value));
|
options.push_back(std::make_unique<setUserLaunchOption>(value));
|
||||||
} else if (key == setEnvLaunchOption::key()) {
|
} else if (key == setEnvLaunchOption::key()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user