diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-12-18 11:25:44 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-12-19 21:24:39 +0100 |
commit | 23d4c0c34b37d9d6d94fedd2fc7316c34a66f10d (patch) | |
tree | 57c9c0f0e86a3cad046f6f9c2aea768f3c4d1142 /src/widgets/dialogs | |
parent | 9d6b4d11424cdcd6c572cdcc50b3b790b6e673c0 (diff) |
Remove some uses of QImage::setAlphaChannel
Remove once where it did nothing, and once where using composition mode
masking avoids first creating a masking image.
Change-Id: Ia4c93eac6ebb11fcdab34d306d943a7f87906b7e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 914c845565..d658f7fe0c 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -948,9 +948,8 @@ QVariant QFileSystemModel::headerData(int section, Qt::Orientation orientation, if (section == 0) { // ### TODO oh man this is ugly and doesn't even work all the way! // it is still 2 pixels off - QImage pixmap(16, 1, QImage::Format_Mono); - pixmap.fill(0); - pixmap.setAlphaChannel(pixmap.createAlphaMask()); + QImage pixmap(16, 1, QImage::Format_ARGB32_Premultiplied); + pixmap.fill(Qt::transparent); return pixmap; } break; |