MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / syncDisabledKeyboardList

Method syncDisabledKeyboardList

QKeyMapper/interception_worker.cpp:917–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915}
916
917void Interception_Worker::syncDisabledKeyboardList()
918{
919 for (int i = 0; i < KeyboardDeviceList.size(); ++i) {
920 InputDevice& inputDevice = KeyboardDeviceList[i];
921 QString hardwareid = inputDevice.deviceinfo.hardwareid;
922
923 // Check if hardwareid is empty
924 if (!hardwareid.isEmpty()) {
925 QString disabledDevice = inputDevice.deviceinfo.devicedesc + JOIN_DEVICE + hardwareid;
926
927 // Check if disabledKeyboardList contains disabledDevice
928 if (disabledKeyboardList.contains(disabledDevice)) {
929 if (inputDevice.disabled != true) {
930 inputDevice.disabled = true;
931#ifdef DEBUG_LOGOUT_ON
932 qDebug().nospace() << "[syncDisabledKeyboardList][Changed]" << " KeyboardDeviceList[" << i << "] disabled set TRUE";
933#endif
934 }
935 } else {
936 if (inputDevice.disabled != false) {
937 inputDevice.disabled = false;
938#ifdef DEBUG_LOGOUT_ON
939 qDebug().nospace() << "[syncDisabledKeyboardList][Changed]" << " KeyboardDeviceList[" << i << "] disabled set FALSE";
940#endif
941 }
942 }
943 }
944 }
945
946#ifdef DEBUG_LOGOUT_ON
947 /* Output All MouseDeviceList disabled status */
948 for (int i = 0; i < KeyboardDeviceList.size(); ++i) {
949 qDebug().nospace() << "[syncDisabledKeyboardList] KeyboardDeviceList[" << i << "] disabled: " << KeyboardDeviceList.at(i).disabled;
950 }
951#endif
952}
953
954void Interception_Worker::syncDisabledMouseList()
955{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
isEmptyMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected