MCPcopy Create free account
hub / github.com/Neverous/efibooteditor / fixShiftState

Method fixShiftState

src/efikeysequence.cpp:313–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void EFIKeySequence::fixShiftState()
314{
315 bool has_upper = false;
316 bool has_unicode = false;
317 for(auto &key: keys)
318 {
319 has_unicode |= key.isUnicode();
320 key = key.toUpper();
321 has_upper |= key.isUpper();
322 }
323
324 if(!has_unicode || has_upper)
325 shift_state.insert(Qt::Key_Shift);
326
327 else // has unicode chars but no uppercase -> no Shift press necessary
328 shift_state.remove(Qt::Key_Shift);
329}

Callers

nothing calls this directly

Calls 5

isUnicodeMethod · 0.80
toUpperMethod · 0.80
isUpperMethod · 0.80
insertMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected