mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
use older methods to support legacy builds
This commit is contained in:
parent
9d6b8ff286
commit
1fe253bce2
@ -363,7 +363,8 @@ namespace Configs {
|
|||||||
bool Shortcuts::Save()
|
bool Shortcuts::Save()
|
||||||
{
|
{
|
||||||
keyVal.clear();
|
keyVal.clear();
|
||||||
for (auto [k, v] : shortcuts.asKeyValueRange())
|
auto mp = shortcuts.toStdMap();
|
||||||
|
for (const auto& [k, v] : mp)
|
||||||
{
|
{
|
||||||
if (v.isEmpty()) continue;
|
if (v.isEmpty()) continue;
|
||||||
keyVal << k << v.toString();
|
keyVal << k << v.toString();
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#include <include/global/GuiUtils.hpp>
|
#include <include/global/GuiUtils.hpp>
|
||||||
|
|
||||||
#include "include/ui/mainwindow_interface.h"
|
#include "include/ui/mainwindow_interface.h"
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
DialogHotkey::DialogHotkey(QWidget *parent, const QList<QAction*>& actions) : QDialog(parent), ui(new Ui::DialogHotkey) {
|
DialogHotkey::DialogHotkey(QWidget *parent, const QList<QAction*>& actions) : QDialog(parent), ui(new Ui::DialogHotkey) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -40,7 +41,8 @@ void DialogHotkey::accept()
|
|||||||
Configs::dataStore->hotkey_system_proxy_menu = ui->system_proxy->keySequence().toString();
|
Configs::dataStore->hotkey_system_proxy_menu = ui->system_proxy->keySequence().toString();
|
||||||
Configs::dataStore->hotkey_toggle_system_proxy = ui->toggle_proxy->keySequence().toString();
|
Configs::dataStore->hotkey_toggle_system_proxy = ui->toggle_proxy->keySequence().toString();
|
||||||
|
|
||||||
for (auto [kseq, actionID] : seqEdit2ID.asKeyValueRange())
|
auto mp = seqEdit2ID.toStdMap();
|
||||||
|
for (const auto& [kseq, actionID] : mp)
|
||||||
{
|
{
|
||||||
Configs::dataStore->shortcuts->shortcuts[actionID] = kseq->keySequence();
|
Configs::dataStore->shortcuts->shortcuts[actionID] = kseq->keySequence();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user