On that last line you're indexing a QList which takes an int for its
argument.

https://doc.qt.io/qt-5/qlist.html#operator-5b-5d

On Fri, May 3, 2019 at 9:44 AM Jason H <jh...@gmx.com> wrote:

> Given the code below:
> QMap<uint, uint> reverseHistogram;
> ...
> QList<uint> reverseKeys = reverseHistogram.keys();
> int foregroundIndex = reverseHistogram.size()-2;           // arg,
> QMap::size() returns signed
> uint foregroundPixels = reverseKeys[foregroundIndex];
> uint foregroundColor = reverseKeys[foregroundPixels];
> uint foregroundColor = reverseKeys[foregroundPixels]; //main.cpp:66:37:
> warning: implicit conversion changes signedness: 'uint' (aka 'unsigned
> int') to 'int'
>
> Where is the "signed" conversion happening?
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to