image/qvolatileimage.cpp
SOURCES += image/qpixmap_qpa.cpp
+win32: SOURCES += image/qpixmap_win.cpp
!symbian|contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2) {
SOURCES += image/qvolatileimagedata.cpp
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
**
****************************************************************************/
-#include "pixmaputils.h"
+#include "qpixmap.h"
+#include "qplatformpixmap_qpa.h"
+#include "qpixmap_raster_p.h"
-#include <QtGui/QBitmap>
-#include <QtGui/QImage>
-#include <QtGui/QPlatformPixmap>
-#include <QtGui/private/qpixmap_raster_p.h>
-
-#include <QtCore/QScopedArrayPointer>
-#include <QtCore/QDebug>
-
-#include <string.h>
+#include <qglobal.h>
+#include <qt_windows.h>
+#include <QScopedArrayPointer>
QT_BEGIN_NAMESPACE
-HBITMAP createIconMask(const QBitmap &bitmap)
+enum HBitmapFormat
+{
+ HBitmapNoAlpha,
+ HBitmapPremultipliedAlpha,
+ HBitmapAlpha
+};
+
+Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap)
{
QImage bm = bitmap.toImage().convertToFormat(QImage::Format_Mono);
const int w = bm.width();
return hbm;
}
-HBITMAP qPixmapToWinHBITMAP(const QPixmap &p, HBitmapFormat format)
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0)
{
if (p.isNull())
return 0;
QRasterPlatformPixmap *data = new QRasterPlatformPixmap(p.depth() == 1 ?
QRasterPlatformPixmap::BitmapType : QRasterPlatformPixmap::PixmapType);
data->fromImage(p.toImage(), Qt::AutoColor);
- return qPixmapToWinHBITMAP(QPixmap(data), format);
+ return qt_pixmapToWinHBITMAP(QPixmap(data), hbitmapFormat);
}
QRasterPlatformPixmap *d = static_cast<QRasterPlatformPixmap*>(p.handle());
// Copy over the data
QImage::Format imageFormat = QImage::Format_ARGB32;
- if (format == HBitmapAlpha)
+ if (hbitmapFormat == HBitmapAlpha)
imageFormat = QImage::Format_RGB32;
- else if (format == HBitmapPremultipliedAlpha)
+ else if (hbitmapFormat == HBitmapPremultipliedAlpha)
imageFormat = QImage::Format_ARGB32_Premultiplied;
const QImage image = rasterImage->convertToFormat(imageFormat);
const int bytes_per_line = w * 4;
return bitmap;
}
-QPixmap qPixmapFromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format)
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0)
{
// Verify size
BITMAP bitmap_info;
QImage::Format imageFormat = QImage::Format_ARGB32_Premultiplied;
uint mask = 0;
- if (format == HBitmapNoAlpha) {
+ if (hbitmapFormat == HBitmapNoAlpha) {
imageFormat = QImage::Format_RGB32;
mask = 0xff000000;
}
return QPixmap::fromImage(image);
}
-HICON qPixmapToWinHICON(const QPixmap &p)
+Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &p)
{
QBitmap maskBitmap = p.mask();
if (maskBitmap.isNull()) {
ICONINFO ii;
ii.fIcon = true;
- ii.hbmMask = createIconMask(maskBitmap);
- ii.hbmColor = qPixmapToWinHBITMAP(p, HBitmapAlpha);
+ ii.hbmMask = qt_createIconMask(maskBitmap);
+ ii.hbmColor = qt_pixmapToWinHBITMAP(p, HBitmapAlpha);
ii.xHotspot = 0;
ii.yHotspot = 0;
return hIcon;
}
-static QImage qImageFromWinHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h)
+Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h)
{
BITMAPINFO bmi;
memset(&bmi, 0, sizeof(bmi));
return image;
// Get bitmap bits
- QScopedPointer<uchar> data(new uchar [bmi.bmiHeader.biSizeImage]);
+ QScopedArrayPointer<uchar> data(new uchar [bmi.bmiHeader.biSizeImage]);
if (!GetDIBits(hdc, bitmap, 0, h, data.data(), &bmi, DIB_RGB_COLORS)) {
qErrnoWarning("%s: failed to get bitmap bits", __FUNCTION__);
return QImage();
return image;
}
-QPixmap qPixmapFromWinHICON(HICON icon)
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon)
{
bool foundAlpha = false;
HDC screenDevice = GetDC(0);
HBITMAP winBitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bitmapInfo, DIB_RGB_COLORS, (VOID**)&bits, NULL, 0);
HGDIOBJ oldhdc = (HBITMAP)SelectObject(hdc, winBitmap);
DrawIconEx( hdc, 0, 0, icon, iconinfo.xHotspot * 2, iconinfo.yHotspot * 2, 0, 0, DI_NORMAL);
- QImage image = qImageFromWinHBITMAP(hdc, winBitmap, w, h);
+ QImage image = qt_imageFromWinHBITMAP(hdc, winBitmap, w, h);
for (int y = 0 ; y < h && !foundAlpha ; y++) {
const QRgb *scanLine= reinterpret_cast<const QRgb *>(image.scanLine(y));
if (!foundAlpha) {
//If no alpha was found, we use the mask to set alpha values
DrawIconEx( hdc, 0, 0, icon, w, h, 0, 0, DI_MASK);
- const QImage mask = qImageFromWinHBITMAP(hdc, winBitmap, w, h);
+ const QImage mask = qt_imageFromWinHBITMAP(hdc, winBitmap, w, h);
for (int y = 0 ; y < h ; y++){
QRgb *scanlineImage = reinterpret_cast<QRgb *>(image.scanLine(y));
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef PIXMAPUTILS_H
-#define PIXMAPUTILS_H
-
-#include "qtwindows_additional.h"
-
-#include <QtCore/QtGlobal>
-
-QT_BEGIN_NAMESPACE
-
-class QBitmap;
-class QPixmap;
-
-enum HBitmapFormat
-{
- HBitmapNoAlpha,
- HBitmapPremultipliedAlpha,
- HBitmapAlpha
-};
-
-HBITMAP createIconMask(const QBitmap &bitmap);
-
-HBITMAP qPixmapToWinHBITMAP(const QPixmap &p, HBitmapFormat format);
-HICON qPixmapToWinHICON(const QPixmap &p);
-
-QPixmap qPixmapFromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format);
-QPixmap qPixmapFromWinHICON(HICON icon);
-
-QT_END_NAMESPACE
-
-#endif // PIXMAPUTILS_H
#include "qwindowscontext.h"
#include "qwindowswindow.h"
#include "qwindowsscreen.h"
-#include "pixmaputils.h"
#include <QtGui/QPixmap>
#include <QtGui/QImage>
QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
+Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap);
+
/*!
\class QWindowsCursor
\brief Platform cursor implementation
mask.fill(Qt::color1);
}
- HBITMAP ic = qPixmapToWinHBITMAP(pixmap, HBitmapAlpha);
- const HBITMAP im = createIconMask(mask);
+ HBITMAP ic = qt_pixmapToWinHBITMAP(pixmap, /* HBitmapAlpha */ 2);
+ const HBITMAP im = qt_createIconMask(mask);
ICONINFO ii;
ii.fIcon = 0;
#include "qwindowsscreen.h"
#include "qwindowscontext.h"
#include "qwindowswindow.h"
-#include "pixmaputils.h"
#include "qwindowscursor.h"
#include "qtwindows_additional.h"
QPixmap QWindowsScreen::grabWindow(WId window, int x, int y, int width, int height) const
{
+ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0);
+
if (QWindowsContext::verboseIntegration)
qDebug() << __FUNCTION__ << window << x << y << width << height;
RECT r;
SelectObject(bitmap_dc, null_bitmap);
DeleteDC(bitmap_dc);
- const QPixmap pixmap = qPixmapFromWinHBITMAP(bitmap, HBitmapNoAlpha);
+ const QPixmap pixmap = qt_pixmapFromWinHBITMAP(bitmap);
DeleteObject(bitmap);
ReleaseDC(0, display_dc);
qwindowsmime.cpp \
qwindowsdrag.cpp \
qwindowscursor.cpp \
- pixmaputils.cpp \
qwindowsinputcontext.cpp \
qwindowsaccessibility.cpp \
qwindowstheme.cpp \
qwindowsdrag.h \
qwindowsinternalmimedata.h \
qwindowscursor.h \
- pixmaputils.h \
array.h \
qwindowsinputcontext.h \
qwindowsaccessibility.h \
QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
extern QPainterPath qt_regionToPath(const QRegion ®ion);
// #define QT_DEBUG_DRAW
HBitmapAlpha
};
-HBITMAP qPixmapToWinHBITMAP(const QPixmap &p, HBitmapFormat format)
-{
- if (p.isNull())
- return 0;
-
- HBITMAP bitmap = 0;
- if (p.handle()->classId() != QPlatformPixmap::RasterClass) {
- QRasterPlatformPixmap *data = new QRasterPlatformPixmap(p.depth() == 1 ?
- QRasterPlatformPixmap::BitmapType : QRasterPlatformPixmap::PixmapType);
- data->fromImage(p.toImage(), Qt::AutoColor);
- return qPixmapToWinHBITMAP(QPixmap(data), format);
- }
-
- QRasterPlatformPixmap *d = static_cast<QRasterPlatformPixmap*>(p.handle());
- const QImage *rasterImage = d->buffer();
- const int w = rasterImage->width();
- const int h = rasterImage->height();
-
- HDC display_dc = GetDC(0);
-
- // Define the header
- BITMAPINFO bmi;
- memset(&bmi, 0, sizeof(bmi));
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bmi.bmiHeader.biWidth = w;
- bmi.bmiHeader.biHeight = -h;
- bmi.bmiHeader.biPlanes = 1;
- bmi.bmiHeader.biBitCount = 32;
- bmi.bmiHeader.biCompression = BI_RGB;
- bmi.bmiHeader.biSizeImage = w * h * 4;
-
- // Create the pixmap
- uchar *pixels = 0;
- bitmap = CreateDIBSection(display_dc, &bmi, DIB_RGB_COLORS, (void **) &pixels, 0, 0);
- ReleaseDC(0, display_dc);
- if (!bitmap) {
- qErrnoWarning("%s, failed to create dibsection", __FUNCTION__);
- return 0;
- }
- if (!pixels) {
- qErrnoWarning("%s, did not allocate pixel data", __FUNCTION__);
- return 0;
- }
-
- // Copy over the data
- QImage::Format imageFormat = QImage::Format_ARGB32;
- if (format == HBitmapAlpha)
- imageFormat = QImage::Format_RGB32;
- else if (format == HBitmapPremultipliedAlpha)
- imageFormat = QImage::Format_ARGB32_Premultiplied;
- const QImage image = rasterImage->convertToFormat(imageFormat);
- const int bytes_per_line = w * 4;
- for (int y=0; y < h; ++y)
- memcpy(pixels + y * bytes_per_line, image.scanLine(y), bytes_per_line);
-
- return bitmap;
-}
-
void QWin32PrintEngine::drawPixmap(const QRectF &targetRect,
const QPixmap &originalPixmap,
const QRectF &sourceRect)
}
QPixmap p = pixmap.copy(tileSize * x, tileSize * y, imgw, imgh);
- HBITMAP hbitmap = qPixmapToWinHBITMAP(p, HBitmapNoAlpha);
+ HBITMAP hbitmap = qt_pixmapToWinHBITMAP(p, HBitmapNoAlpha);
HDC display_dc = GetDC(0);
HDC hbitmap_hdc = CreateCompatibleDC(display_dc);
HGDIOBJ null_bitmap = SelectObject(hbitmap_hdc, hbitmap);
int dc_state = SaveDC(d->hdc);
HDC display_dc = GetDC(0);
- HBITMAP hbitmap = qPixmapToWinHBITMAP(pm, HBitmapNoAlpha);
+ HBITMAP hbitmap = qt_pixmapToWinHBITMAP(pm, HBitmapNoAlpha);
HDC hbitmap_hdc = CreateCompatibleDC(display_dc);
HGDIOBJ null_bitmap = SelectObject(hbitmap_hdc, hbitmap);
void QVistaHelper::drawTitleBar(QPainter *painter)
{
+ Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &);
+
Q_ASSERT(backButton_);
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
QBackingStore *backingStore = backButton_->backingStore();
QRect(titleOffset() - glowOffset, verticalCenter - textHeight / 2, textWidth, textHeight),
hdc);
- if (!wizard->windowIcon().isNull()) {
+ const QIcon windowIcon = wizard->windowIcon();
+ if (!windowIcon.isNull()) {
QRect rect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize());
- HICON hIcon = 0; //###FIXME wizard->windowIcon().pixmap(iconSize()).toWinHICON();
+ const HICON hIcon = qt_pixmapToWinHICON(windowIcon.pixmap(iconSize()));
DrawIconEx(hdc, rect.left(), rect.top(), hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT);
DestroyIcon(hIcon);
}
#include <qapplication.h>
#include <qdir.h>
#include <qpixmapcache.h>
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
# define _WIN32_IE 0x0500
# include <qt_windows.h>
# include <commctrl.h>
# include <objbase.h>
+
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
+
#elif defined(Q_WS_MAC)
# include <private/qt_cocoa_helpers_mac_p.h>
#endif
public:
QFileIconProviderPrivate();
QIcon getIcon(QStyle::StandardPixmap name) const;
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
QIcon getWinIcon(const QFileInfo &fi) const;
#elif defined(Q_WS_MAC)
QIcon getMacIcon(const QFileInfo &fi) const;
return QIcon();
}
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
{
QIcon retIcon;
}
if (pixmap.isNull()) {
#ifndef Q_OS_WINCE
- pixmap = QPixmap::fromWinHICON(info.hIcon);
+ pixmap = qt_pixmapFromWinHICON(info.hIcon);
#else
pixmap = QPixmap::fromWinHICON(ImageList_GetIcon((HIMAGELIST) val, info.iIcon, ILD_NORMAL));
#endif
key = QString::fromLatin1("qt_dir_%1").arg(info.iIcon);
}
#ifndef Q_OS_WINCE
- pixmap = QPixmap::fromWinHICON(info.hIcon);
+ pixmap = qt_pixmapFromWinHICON(info.hIcon);
#else
pixmap = QPixmap::fromWinHICON(ImageList_GetIcon((HIMAGELIST) val, info.iIcon, ILD_NORMAL));
#endif
QIcon retIcon = d->getMacIcon(info);
if (!retIcon.isNull())
return retIcon;
-#elif defined Q_WS_WIN
+#elif defined Q_OS_WIN
QIcon icon = d->getWinIcon(info);
if (!icon.isNull())
return icon;
#endif
if (info.isRoot())
-#if defined (Q_WS_WIN) && !defined(Q_WS_WINCE)
+#if defined (Q_OS_WIN) && !defined(Q_WS_WINCE)
{
UINT type = GetDriveType((wchar_t *)info.absoluteFilePath().utf16());
}
if (info.isDir())
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
return QApplication::translate("QFileDialog", "File Folder", "Match Windows Explorer");
#else
return QApplication::translate("QFileDialog", "Folder", "All other platforms");
# Qt/Windows only configuration file
# --------------------------------------------------------------------
- INCLUDEPATH += ../3rdparty/wintab
+INCLUDEPATH += ../3rdparty/wintab
+LIBS *= -lshell32
QT_BEGIN_NAMESPACE
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
QT_BEGIN_INCLUDE_NAMESPACE
#include "qt_windows.h"
typedef HRESULT (WINAPI *PtrSHGetStockIconInfo)(int siid, int uFlags, QSHSTOCKICONINFO *psii);
static PtrSHGetStockIconInfo pSHGetStockIconInfo = 0;
-#endif //Q_WS_WIN
+Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &);
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
+#endif //Q_OS_WIN
QT_BEGIN_INCLUDE_NAMESPACE
#include <limits.h>
QWindowsStylePrivate::QWindowsStylePrivate()
: alt_down(false), menuBarTimer(0), animationFps(10), animateTimer(0), animateStep(0)
{
-#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
QSystemLibrary shellLib(QLatin1String("shell32"));
{
}
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
static inline QRgb colorref2qrgb(COLORREF col)
{
return qRgb(GetRValue(col), GetGValue(col), GetBValue(col));
d->inactiveGradientCaptionColor = app->palette().dark().color();
d->inactiveCaptionText = app->palette().background().color();
-#if defined(Q_WS_WIN) //fetch native title bar colors
+#if defined(Q_OS_WIN) //fetch native title bar colors
if(app->desktopSettingsAware()){
DWORD activeCaption = GetSysColor(COLOR_ACTIVECAPTION);
DWORD gradientActiveCaption = GetSysColor(COLOR_GRADIENTACTIVECAPTION);
break;
#endif
case PM_MaximumDragDistance:
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
{
HDC hdcScreen = GetDC(0);
int dpi = GetDeviceCaps(hdcScreen, LOGPIXELSX);
#endif // QT_NO_MENU
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
case PM_TitleBarHeight:
if (widget && (widget->windowType() == Qt::Tool)) {
// MS always use one less than they say
ret = QCommonStyle::pixelMetric(pm, opt, widget);
}
break;
-#endif // Q_WS_WIN
+#endif // Q_OS_WIN
case PM_SplitterWidth:
ret = qMax(4, QApplication::globalStrut().width());
break;
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
case PM_MdiSubWindowFrameWidth:
#if defined(Q_OS_WINCE)
ret = GetSystemMetrics(SM_CYDLGFRAME);
#endif //QT_NO_IMAGEFORMAT_XPM
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
static QPixmap loadIconFromShell32( int resourceId, int size )
{
#ifdef Q_OS_WINCE
if( hmod ) {
HICON iconHandle = (HICON)LoadImage(hmod, MAKEINTRESOURCE(resourceId), IMAGE_ICON, size, size, 0);
if( iconHandle ) {
- QPixmap iconpixmap = QPixmap::fromWinHICON( iconHandle );
+ QPixmap iconpixmap = qt_pixmapFromWinHICON(iconHandle);
DestroyIcon(iconHandle);
return iconpixmap;
}
QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
const QWidget *widget) const
{
-#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
QPixmap desktopIcon;
switch(standardPixmap) {
case SP_DriveCDIcon:
case SP_MessageBoxInformation:
{
HICON iconHandle = LoadIcon(NULL, IDI_INFORMATION);
- desktopIcon = QPixmap::fromWinHICON( iconHandle );
+ desktopIcon = qt_pixmapFromWinHICON(iconHandle);
DestroyIcon(iconHandle);
break;
}
case SP_MessageBoxWarning:
{
HICON iconHandle = LoadIcon(NULL, IDI_WARNING);
- desktopIcon = QPixmap::fromWinHICON( iconHandle );
+ desktopIcon = qt_pixmapFromWinHICON(iconHandle);
DestroyIcon(iconHandle);
break;
}
case SP_MessageBoxCritical:
{
HICON iconHandle = LoadIcon(NULL, IDI_ERROR);
- desktopIcon = QPixmap::fromWinHICON( iconHandle );
+ desktopIcon = qt_pixmapFromWinHICON(iconHandle);
DestroyIcon(iconHandle);
break;
}
case SP_MessageBoxQuestion:
{
HICON iconHandle = LoadIcon(NULL, IDI_QUESTION);
- desktopIcon = QPixmap::fromWinHICON( iconHandle );
+ desktopIcon = qt_pixmapFromWinHICON(iconHandle);
DestroyIcon(iconHandle);
break;
}
memset(&iconInfo, 0, sizeof(iconInfo));
iconInfo.cbSize = sizeof(iconInfo);
if (pSHGetStockIconInfo(_SIID_SHIELD, _SHGFI_ICON | _SHGFI_SMALLICON, &iconInfo) == S_OK) {
- pixmap = QPixmap::fromWinHICON(iconInfo.hIcon);
+ pixmap = qt_pixmapFromWinHICON(iconInfo.hIcon);
DestroyIcon(iconInfo.hIcon);
return pixmap;
}
ret = 0;
break;
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
case SH_UnderlineShortcut:
{
ret = 1;
#endif // QT_NO_RUBBERBAND
case SH_LineEdit_PasswordCharacter:
{
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
if (widget && (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) {
const QFontMetrics &fm = widget->fontMetrics();
if (fm.inFont(QChar(0x25CF)))
{
QIcon icon;
QPixmap pixmap;
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
switch (standardIcon) {
case SP_FileDialogNewFolder:
{
memset(&iconInfo, 0, sizeof(iconInfo));
iconInfo.cbSize = sizeof(iconInfo);
if (pSHGetStockIconInfo(_SIID_SHIELD, _SHGFI_ICON | _SHGFI_LARGEICON, &iconInfo) == S_OK) {
- icon.addPixmap(QPixmap::fromWinHICON(iconInfo.hIcon));
+ icon.addPixmap(qt_pixmapFromWinHICON(iconInfo.hIcon));
DestroyIcon(iconInfo.hIcon);
}
}