mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-26 00:05:34 -04:00
Coding style fixes.
This commit is contained in:
parent
87468b648b
commit
315df0b8a8
1 changed files with 6 additions and 3 deletions
|
@ -209,23 +209,26 @@ QString AutoTypePlatformX11::windowTitle(Window window, bool useBlacklist)
|
||||||
unsigned long after;
|
unsigned long after;
|
||||||
unsigned char* data = Q_NULLPTR;
|
unsigned char* data = Q_NULLPTR;
|
||||||
|
|
||||||
|
// the window manager spec says we should read _NET_WM_NAME first, then fall back to WM_NAME
|
||||||
|
|
||||||
int retVal = XGetWindowProperty(m_dpy, window, m_atomNetWmName, 0, 1000, false, m_atomUtf8String,
|
int retVal = XGetWindowProperty(m_dpy, window, m_atomNetWmName, 0, 1000, false, m_atomUtf8String,
|
||||||
&type, &format, &nitems, &after, &data);
|
&type, &format, &nitems, &after, &data);
|
||||||
|
|
||||||
if (retVal == 0 && data) {
|
if ((retVal == 0) && data) {
|
||||||
title = QString::fromUtf8(reinterpret_cast<char*>(data));
|
title = QString::fromUtf8(reinterpret_cast<char*>(data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
XTextProperty textProp;
|
XTextProperty textProp;
|
||||||
retVal = XGetTextProperty(m_dpy, window, &textProp, m_atomWmName);
|
retVal = XGetTextProperty(m_dpy, window, &textProp, m_atomWmName);
|
||||||
if (retVal != 0 && textProp.value) {
|
if ((retVal != 0) && textProp.value) {
|
||||||
char** textList = Q_NULLPTR;
|
char** textList = Q_NULLPTR;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
if (textProp.encoding == m_atomUtf8String) {
|
if (textProp.encoding == m_atomUtf8String) {
|
||||||
title = QString::fromUtf8(reinterpret_cast<char*>(textProp.value));
|
title = QString::fromUtf8(reinterpret_cast<char*>(textProp.value));
|
||||||
}
|
}
|
||||||
else if (XmbTextPropertyToTextList(m_dpy, &textProp, &textList, &count) == 0 && textList && count > 0) {
|
else if ((XmbTextPropertyToTextList(m_dpy, &textProp, &textList, &count) == 0)
|
||||||
|
&& textList && (count > 0)) {
|
||||||
title = QString::fromLocal8Bit(textList[0]);
|
title = QString::fromLocal8Bit(textList[0]);
|
||||||
}
|
}
|
||||||
else if (textProp.encoding == m_atomString) {
|
else if (textProp.encoding == m_atomString) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue