Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
Qt
QtWinExtras
Commits
91524134
Commit
91524134
authored
9 years ago
by
Liang Qi
Browse files
Options
Download
Plain Diff
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Idd177eb0d33d08a1556858c8dc594c6ac38cbc18
parents
e5b35c47
1ed9193c
dev
5.10
5.11
5.12
5.12.1
5.12.10
5.12.11
5.12.12
5.12.2
5.12.3
5.12.4
5.12.5
5.12.6
5.12.7
5.12.8
5.12.9
5.13
5.13.0
5.13.1
5.13.2
5.14
5.14.0
5.14.1
5.14.2
5.15
5.15.0
5.15.1
5.15.2
5.7
5.8
5.9
5.9.8
wip/cmake
v5.15.0-alpha1
v5.14.1
v5.14.0
v5.14.0-rc2
v5.14.0-rc1
v5.14.0-beta3
v5.14.0-beta2
v5.14.0-beta1
v5.14.0-alpha1
v5.13.2
v5.13.1
v5.13.0
v5.13.0-rc3
v5.13.0-rc2
v5.13.0-rc1
v5.13.0-beta4
v5.13.0-beta3
v5.13.0-beta2
v5.13.0-beta1
v5.13.0-alpha1
v5.12.7
v5.12.6
v5.12.5
v5.12.4
v5.12.3
v5.12.2
v5.12.1
v5.12.0
v5.12.0-rc2
v5.12.0-rc1
v5.12.0-beta4
v5.12.0-beta3
v5.12.0-beta2
v5.12.0-beta1
v5.12.0-alpha1
v5.11.3
v5.11.2
v5.11.1
v5.11.0
v5.11.0-rc2
v5.11.0-rc1
v5.11.0-beta4
v5.11.0-beta3
v5.11.0-beta2
v5.11.0-beta1
v5.11.0-alpha1
v5.10.1
v5.10.0
v5.10.0-rc3
v5.10.0-rc2
v5.10.0-rc1
v5.10.0-beta4
v5.10.0-beta3
v5.10.0-beta2
v5.10.0-beta1
v5.10.0-alpha1
v5.9.9
v5.9.8
v5.9.7
v5.9.6
v5.9.5
v5.9.4
v5.9.3
v5.9.2
v5.9.1
v5.9.0
v5.9.0-rc2
v5.9.0-rc1
v5.9.0-beta4
v5.9.0-beta3
v5.9.0-beta2
v5.9.0-beta1
v5.9.0-alpha1
v5.8.0
v5.8.0-rc1
v5.8.0-beta1
v5.8.0-alpha1
v5.7.1
v5.7.0
v5.7.0-rc1
v5.7.0-beta1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/winextras/winextras.pro
+2
-2
src/winextras/winextras.pro
tests/auto/qpixmap/tst_qpixmap.cpp
+9
-7
tests/auto/qpixmap/tst_qpixmap.cpp
with
11 additions
and
9 deletions
src/winextras/winextras.pro
+
2
−
2
View file @
91524134
TARGET
=
QtWinExtras
load
(
qt_module
)
QT
+=
gui
-
private
core
-
private
SOURCES
+=
\
...
...
@@ -59,3 +57,5 @@ OTHER_FILES += \
doc
/
snippets
/
code
/
use
-
qtwinextras
.
cpp
\
doc
/
snippets
/
code
/
thumbbar
.
cpp
\
doc
/
snippets
/
code
/
thumbbar
.
qml
load
(
qt_module
)
This diff is collapsed.
Click to expand it.
tests/auto/qpixmap/tst_qpixmap.cpp
+
9
−
7
View file @
91524134
...
...
@@ -92,18 +92,18 @@ void tst_QPixmap::toHBITMAP()
QVERIFY
(
GetObject
(
bitmap
,
sizeof
(
BITMAP
),
&
bitmapInfo
));
QCOMPARE
(
100
,
(
int
)
bitmapInfo
.
bmWidth
);
QCOMPARE
(
100
,
(
int
)
bitmapInfo
.
bmHeight
);
QCOMPARE
(
LONG
(
100
),
bitmapInfo
.
bmWidth
);
QCOMPARE
(
LONG
(
100
),
bitmapInfo
.
bmHeight
);
const
HDC
displayDc
=
GetDC
(
0
);
const
HDC
bitmapDc
=
CreateCompatibleDC
(
displayDc
);
const
HBITMAP
nullBitmap
=
(
HBITMAP
)
SelectObject
(
bitmapDc
,
bitmap
);
const
HBITMAP
nullBitmap
=
static_cast
<
HBITMAP
>
(
SelectObject
(
bitmapDc
,
bitmap
)
)
;
const
COLORREF
pixel
=
GetPixel
(
bitmapDc
,
0
,
0
);
QCOMPARE
(
(
int
)
GetRValue
(
pixel
),
red
);
QCOMPARE
(
(
int
)
GetGValue
(
pixel
),
green
);
QCOMPARE
(
(
int
)
GetBValue
(
pixel
),
blue
);
QCOMPARE
(
int
(
GetRValue
(
pixel
)
)
,
red
);
QCOMPARE
(
int
(
GetGValue
(
pixel
)
)
,
green
);
QCOMPARE
(
int
(
GetBValue
(
pixel
)
)
,
blue
);
// Clean up
SelectObject
(
bitmapDc
,
nullBitmap
);
...
...
@@ -261,7 +261,9 @@ void tst_QPixmap::fromHICON()
const
QString
iconFileName
=
image
+
QStringLiteral
(
".ico"
);
QVERIFY2
(
QFileInfo
(
iconFileName
).
exists
(),
qPrintable
(
iconFileName
));
const
HICON
icon
=
(
HICON
)
LoadImage
(
0
,
(
wchar_t
*
)(
iconFileName
).
utf16
(),
IMAGE_ICON
,
width
,
height
,
LR_LOADFROMFILE
);
const
HICON
icon
=
static_cast
<
HICON
>
(
LoadImage
(
0
,
reinterpret_cast
<
const
wchar_t
*>
(
iconFileName
.
utf16
()),
IMAGE_ICON
,
width
,
height
,
LR_LOADFROMFILE
));
const
QImage
imageFromHICON
=
QtWin
::
fromHICON
(
icon
).
toImage
();
DestroyIcon
(
icon
);
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets