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

Method getDeviceDescription

QKeyMapper/interception_worker.cpp:810–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808}
809
810QString Interception_Worker::getDeviceDescription(InterceptionDevice device)
811{
812 QString hardware_id_str;
813 QString devicedesc;
814 WCHAR hardware_id[MAX_PATH];
815 size_t length = interception_get_hardware_id(s_InterceptionContext, device, hardware_id, sizeof(hardware_id));
816 if(length > 0 && length < sizeof(hardware_id)) {
817 hardware_id_str = QString::fromWCharArray(hardware_id);
818 devicedesc = getDeviceDescriptionByHardwareID(hardware_id_str);
819#ifdef DEBUG_LOGOUT_ON
820 qDebug().nospace() << "[getDeviceDescription] Device[" << device << "] -> HardwareID: " << hardware_id_str << ", DeviceDescription: " << devicedesc;
821 if (devicedesc.isEmpty()) {
822 qDebug().nospace() << "[getDeviceDescription] No DeviceDescription[" << device << "]";
823 }
824#endif
825 }
826 else {
827#ifdef DEBUG_LOGOUT_ON
828 qDebug().nospace() << "[getDeviceDescription] No HardwareId[" << device << "]";
829#endif
830 }
831
832 return devicedesc;
833
834}
835
836void Interception_Worker::setInputDeviceDisabled(InterceptionDevice device, bool disabled)
837{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected