-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add HID error message upon failed open #14184
base: main
Are you sure you want to change the base?
fix: add HID error message upon failed open #14184
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the most straight forward way for formatting is using QString.arg() and %1 ...
|
||
class LegacyControllerMapping; | ||
|
||
namespace { | ||
constexpr size_t kMaxHidErrorMessageSize = 512; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} // namespace |
<< m_deviceInfo.getVendorId() << m_deviceInfo.getProductId() | ||
<< m_deviceInfo.getSerialNumber(); | ||
qCWarning(m_logBase) | ||
<< "Failed. Trying to open with make, model & serial no:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make, model is hard to understand for me. How about:
<< "Failed. Trying to open with make, model & serial no:" | |
<< "Failed to open with ID (vendor product "serial"): |
<< "(This may only open the first of multiple identical devices.)"; | ||
qCWarning(m_logBase) | ||
<< "Unable to open specific HID device" << getName() | ||
<< "Trying now with just make and model." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<< "Trying now with just make and model." | |
<< "Trying now with just vendor and product ID." |
Before this fix
With this fix
I'm not very expert with
QDebug
formatting, so all ears for some improvement there! (remove the"
or space at the left of:
for example)