MCPcopy Create free account
hub / github.com/KDE/kdiff3 / slotSelectEncoding

Method slotSelectEncoding

src/difftextwindow.cpp:2202–2217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2200}
2201
2202void EncodingLabel::slotSelectEncoding()
2203{
2204 QAction* pAction = qobject_cast<QAction*>(sender());
2205 if(pAction)
2206 {
2207 QByteArray codecName = pAction->data().toByteArray();
2208 QString s{QLatin1String(codecName)};
2209 RecentItems<maxNofRecentCodecs>& recentEncodings = gOptions->m_recentEncodings;
2210 if(s != "UTF-8" && s != "System")
2211 {
2212 recentEncodings.push_front(s);
2213 }
2214
2215 Q_EMIT encodingChanged(codecName);
2216 }
2217}
2218
2219#include "difftextwindow.moc"

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
push_frontMethod · 0.80

Tested by

no test coverage detected