Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions reader/widgets/ShortCutShow.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -57,17 +56,26 @@ void ShortCutShow::show()
for(ShortCutType type : listType)
{
QJsonObject group;
group.insert("groupName", tr("Settings"));
QJsonArray items;

QString strType;
switch (type) {
case ShortCutType::Settings: strType = tr("Settings"); break;
case ShortCutType::File: strType = tr("File"); break;
case ShortCutType::Display: strType = tr("Display"); break;
case ShortCutType::Tools: strType = tr("Tools"); break;
case ShortCutType::Edit: strType = tr("Edit"); break;
}
group.insert("groupName", strType);

QJsonArray items;
for (const auto &d : m_shortcutMap[type]) {
QJsonObject jsonItem;
jsonItem.insert("name", d.second);
jsonItem.insert("value", d.first);
items.append(jsonItem);
}

group.insert("groupItems", items);

jsonGroups.append(group);
}

Expand Down
Loading