Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
e8666322
Commit
e8666322
authored
Aug 05, 2010
by
Thomas Hartmann
Browse files
QuickToolBar: avoid warnings
Do not use scaled on null pixmaps
parent
9c70e877
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/propertyeditor/contextpanewidgetimage.cpp
View file @
e8666322
...
...
@@ -360,6 +360,8 @@ void ContextPaneWidgetImage::setPixmap(const QString &fileName)
if
(
m_borderImage
)
{
if
(
QFile
(
fileName
).
exists
())
{
QPixmap
source
(
fileName
);
if
(
source
.
isNull
())
source
=
pix
;
previewDialog
()
->
setPixmap
(
source
,
previewDialog
()
->
zoom
());
uiBorderImage
->
sizeLabel
->
setText
(
QString
::
number
(
source
.
width
())
+
'x'
+
QString
::
number
(
source
.
height
()));
QPainter
p
(
&
pix
);
...
...
@@ -800,7 +802,10 @@ PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent)
void
PreviewDialog
::
setPixmap
(
const
QPixmap
&
p
,
int
zoom
)
{
m_pixmap
=
p
;
m_label
->
setPixmap
(
p
.
scaled
(
p
.
width
()
*
zoom
,
p
.
height
()
*
zoom
));
if
(
!
p
.
isNull
())
m_label
->
setPixmap
(
p
.
scaled
(
p
.
width
()
*
zoom
,
p
.
height
()
*
zoom
));
else
m_label
->
setPixmap
(
QPixmap
());
m_label
->
adjustSize
();
m_zoom
=
zoom
;
m_label
->
setZoom
(
m_zoom
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment