Martin Walch (ccdccb7d) at 23 Dec 11:24
with > Settings
> Multiple Ships
In a game with many ships that may not border each other, it is possible to place them one by one in a way that it is impossible to place all of them.
There is a test for this case to get out of this situation, but it yields false positives if horizontal placing is not possible, because the part for the vertical placement is broken. The user needs to start over, although proper placement would be possible.
The bug is in the test for vertically placing a ship: row/column coordinates are swapped. Fix it by unswapping them.
Martin Walch (9a408717) at 22 Dec 20:16
Fix test for placing a ship vertically
Adjust the layout such that
Note that this changes lskat themes in a not fully compatible way: fontWidthUpper
is replaced with fontWidthName
and fontWidthPoints
.
Thanks for contributing this, can you please actually edit the commit so it has the cherry pick information in it?
Appended manually.
Just to confirm this is just to some BMP files look more correct, right? Not a security issue
Yes, this is only about more accurate decoding, not a security issue. I came across this in gwenview and kolourpaint and started looking for a defect in the input data of the bitmap generator. It took me a while to identify it as a defect in the decoder.
Without this patch scaling to 8 bits from a lower bit depth is done by filling the less significant bits with only 0
, e.g. a five-bit sample 0b11100
becomes 0b11100000
. The brightest value you can get this is way is (obviously) 0b11111000
. The other way round scaling more than 8 bits down to 8 is even worse and discards the more significant bits, yielding garbage.
Scaling up exactly is not possible in the general case, because for n
bits the highest value is always 2^n - 1
(and not 2^n
). As far as I can tell, there are two accepted approaches to determine approximate values: One is to pad additional bits with the input pattern, e.g. 0b11100
becomes 0b11100111
. This is what ImageMagick does and this is also implemented by this patch. The other approach is to apply the rule of three and round the resulting value (usually implemented with integer arithmetic only). In that case 0b11100 = 28
and 28 * (255 / 31) ≈ 230,3
, i.e. the result is 230 = 0b11100110
. That is what GIMP does.
Bitmaps with color channel depths other than 8 bits do not scale properly, i.e. they decode to inadequate colors. For example the brightest color from a bitmap with 5 bits per channel is not white (#FFFFFF), but a light gray (#F8F8F8).
Scale samples up by periodically repeating the bit pattern of each value to fill up the lower bits instead of padding them with 0.
Vice versa truncate samples that exceed the bit depth of QRgb.
Change-Id: I777519e359932f52e54a33073a1ff297a76f620c
Reviewed-by: Eirik Aavitsland eirik.aavitsland@qt.io
(cherry-picked from commit 1fee7adc)
The board "mobile phone" is easy to solve. Set the difficulty accordingly.
/* Preliminary checks
* Do not match anything in any of these cases:
* 1. The number of streaks in any direction exceeds the solution.
* 2. A completely filled line does not match exactly the number of streaks.
* The second case fixes https://bugs.kde.org/435211
*/
Streak checks happen in normal and in reverse order. On full lines this means that all streaks are matched twice against the solution, yielding markers that may feel counter-intuitive.
In particular, a solution that consists of two identical sub-patterns is marked as completely satisfied on a full line that contains the sub-pattern only once. A board may even seem completely solved, while it is not.
To prevent this, extend the preliminary checks to completely reject full lines with the wrong number of streaks.
A timer periodically triggers updates of the time display in the status bar. The timer stops at the end of the game without updating the status bar for a last time, leaving a potentially stale time display.
Fix it by explicitly updating the status bar after stopping the timer.
Commit 5c43f663.
Yes, of course. But for today it is too late.
Update kconfig.xml according to the updates in Linux 5.13.
Use common language in the name attributes of itemData elements.