Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Show First 20 Lines • Show All 2717 Lines • ▼ Show 20 Line(s) | 2715 | foreach (const QStringList &encodingsForScript, KCharsets::charsets()->encodingsByScript()) { | |||
---|---|---|---|---|---|
2718 | for (i = 1; i < encodingsForScript.size(); ++i) { | 2718 | for (i = 1; i < encodingsForScript.size(); ++i) { | ||
2719 | tmp->addAction(encodingsForScript.at(i)); | 2719 | tmp->addAction(encodingsForScript.at(i)); | ||
2720 | } | 2720 | } | ||
2721 | q->connect(tmp, SIGNAL(triggered(QAction*)), q, SLOT(_k_subActionTriggered(QAction*))); | 2721 | q->connect(tmp, SIGNAL(triggered(QAction*)), q, SLOT(_k_subActionTriggered(QAction*))); | ||
2722 | //tmp->setCheckable(true); | 2722 | //tmp->setCheckable(true); | ||
2723 | actions << tmp; | 2723 | actions << tmp; | ||
2724 | } | 2724 | } | ||
2725 | std::sort(actions.begin(), actions.end(), lessThanAction); | 2725 | std::sort(actions.begin(), actions.end(), lessThanAction); | ||
2726 | foreach (KSelectAction *action, actions) { | 2726 | for (KSelectAction *action : qAsConst(actions)) { | ||
2727 | q->addAction(action); | 2727 | q->addAction(action); | ||
2728 | } | 2728 | } | ||
2729 | } | 2729 | } | ||
2730 | 2730 | | |||
2731 | void KateViewEncodingAction::Private::_k_subActionTriggered(QAction *action) | 2731 | void KateViewEncodingAction::Private::_k_subActionTriggered(QAction *action) | ||
2732 | { | 2732 | { | ||
2733 | if (currentSubAction == action) { | 2733 | if (currentSubAction == action) { | ||
2734 | return; | 2734 | return; | ||
▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines |