[Interest] Aligning QProgressBar inside a QSplashScreen

Alex Malyushytskyy alexmalvtk at gmail.com
Thu Oct 4 00:50:30 CEST 2012


> That's not so good; Q_CHECK_PTR will print "Out of memory" upon seeing a

Q_ASSERT just prints an assert information in debug

Q_CHECK_PTR terminates execution if you can't process,
and this is the case, cause this pointer had to be initialized before
the function is called.

Code can't recover from it. This should not happen, Stop is the best you can do.

Alex

On Wed, Oct 3, 2012 at 1:32 AM, Jan Kundrát <jkt at flaska.net> wrote:
> On 10/02/12 05:07, Alex Malyushytskyy wrote:
>> You would save a lot of time if u properly initialized  this->progress to null
>
> Agreed, that's always a very good idea.
>
>> and used Q_CHECK_PTR in drawContents as below
>
> That's not so good; Q_CHECK_PTR will print "Out of memory" upon seeing a
> null pointer. Q_ASSERT is what has served me well here (and I don't care
> about it being optimized out in release).
>
> With kind regards,
> Jan
> --
> Trojita, a fast e-mail client -- http://trojita.flaska.net/
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list