Project

General

Profile

Bug #869 » 0001-Liznoo-remove-assert-in-win32-part.patch

DJm00n, 10/18/2012 08:11 PM

View differences:

src/plugins/liznoo/fakeqwidgetwinapi.cpp
{
if(message->message == WM_POWERBROADCAST)
{
Q_ASSERT (message->wParam == PBT_POWERSETTINGCHANGE);
if (message->wParam == PBT_POWERSETTINGCHANGE)
{
const PPOWERBROADCAST_SETTING rcvd_setting =
reinterpret_cast<PPOWERBROADCAST_SETTING> (message->lParam);
const PPOWERBROADCAST_SETTING rcvd_setting =
reinterpret_cast<PPOWERBROADCAST_SETTING> (message->lParam);
if (sizeof (GUID) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_POWERSCHEME_PERSONALITY)
prepareSchemeChange (rcvd_setting);
else if (sizeof (int) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_ACDC_POWER_SOURCE)
preparePowerSourceChange (rcvd_setting);
else if (sizeof (int) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_BATTERY_PERCENTAGE_REMAINING)
prepareBatteryStateChange (rcvd_setting);
if (sizeof (GUID) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_POWERSCHEME_PERSONALITY)
prepareSchemeChange (rcvd_setting);
else if (sizeof (int) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_ACDC_POWER_SOURCE)
preparePowerSourceChange (rcvd_setting);
else if (sizeof (int) == rcvd_setting->DataLength &&
rcvd_setting->PowerSetting == GUID_BATTERY_PERCENTAGE_REMAINING)
prepareBatteryStateChange (rcvd_setting);
}
}
return QWidget::winEvent (message, result);
}
(6-6/13)