Replace fromAscii() with fromLatin1()

This commit is contained in:
Jonas Kvinge 2018-07-03 19:31:49 +02:00
parent 1e4088b3e5
commit b0f86a38ca
1 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ private:
static bool resolveLibs() static bool resolveLibs()
{ {
if (!pDwmIsCompositionEnabled) { if (!pDwmIsCompositionEnabled) {
QLibrary dwmLib(QString::fromAscii("dwmapi")); QLibrary dwmLib(QString::toLatin1("dwmapi"));
pDwmIsCompositionEnabled =(PtrDwmIsCompositionEnabled)dwmLib.resolve("DwmIsCompositionEnabled"); pDwmIsCompositionEnabled =(PtrDwmIsCompositionEnabled)dwmLib.resolve("DwmIsCompositionEnabled");
pDwmExtendFrameIntoClientArea = (PtrDwmExtendFrameIntoClientArea)dwmLib.resolve("DwmExtendFrameIntoClientArea"); pDwmExtendFrameIntoClientArea = (PtrDwmExtendFrameIntoClientArea)dwmLib.resolve("DwmExtendFrameIntoClientArea");
pDwmEnableBlurBehindWindow = (PtrDwmEnableBlurBehindWindow)dwmLib.resolve("DwmEnableBlurBehindWindow"); pDwmEnableBlurBehindWindow = (PtrDwmEnableBlurBehindWindow)dwmLib.resolve("DwmEnableBlurBehindWindow");
@ -165,7 +165,7 @@ bool QtWin::extendFrameIntoClientArea(QWidget *widget, int left, int top, int ri
bool result = false; bool result = false;
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
if (resolveLibs()) { if (resolveLibs()) {
QLibrary dwmLib(QString::fromAscii("dwmapi")); QLibrary dwmLib(QString::toLatin1("dwmapi"));
HRESULT hr = S_OK; HRESULT hr = S_OK;
MARGINS m = {left, top, right, bottom}; MARGINS m = {left, top, right, bottom};
hr = pDwmExtendFrameIntoClientArea(widget->winId(), &m); hr = pDwmExtendFrameIntoClientArea(widget->winId(), &m);
@ -192,7 +192,7 @@ QColor QtWin::colorizatinColor()
if (resolveLibs()) { if (resolveLibs()) {
DWORD color = 0; DWORD color = 0;
BOOL opaque = FALSE; BOOL opaque = FALSE;
QLibrary dwmLib(QString::fromAscii("dwmapi")); QLibrary dwmLib(QString::toLatin1("dwmapi"));
HRESULT hr = S_OK; HRESULT hr = S_OK;
hr = pDwmGetColorizationColor(&color, &opaque); hr = pDwmGetColorizationColor(&color, &opaque);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))