Expand debug to contain more than 31 cases

Kornel Benko kornel at lyx.org
Tue Apr 26 15:18:25 UTC 2022


Am Tue, 26 Apr 2022 16:12:25 +0200
schrieb Pavel Sanda <sanda at lyx.org>:

> On Tue, Apr 26, 2022 at 03:35:30PM +0200, Jean-Marc Lasgouttes wrote:
> > Le 26/04/2022 ?? 14:58, Pavel Sanda a écrit :  
> > >On Tue, Apr 26, 2022 at 02:28:08PM +0200, Pavel Sanda wrote:  
> > >>>I read somewhere that 64 bit for long long was a 'should' and not a 'must'.  
> > >
> > >There is subtlety here, which might be the source of confusion. The standard does
> > >not tell you long long needs to be *implemented* by 64bits. It just tells you to
> > >contain the range of 2^64. So standard does not prohibit you to write compiler which
> > >uses 65 bits for long long.  
> > 
> > And if I understand correctly, C++11 tells you that 'long long' has to
> > exist, which was not the case before if I am not mistaken.  
> 
> Yes, 1998 version of C++ Standard does not know long long, while C++11
> knows it and introduces <climits> with LLONG_MAX, but leaving the definition
> on Standard C library header <limits.h>.
> 
> Pavel

I was about to propose
	#ifndef UNINT64_MAX
		// Make sure the type unit64_t exists
		#include <stdint.h>
	#endif
but QVariant does not know about uint64, only 'qulonglong type'.
So in the end using 'long long' is the way.
(The problem shows at GuiProgressView.cpp:113
	item->setData(0, Qt::UserRole, dit->first);
 where we would have to use qulonglong(dit->first)
)

	Kornel
-- 
lyx-devel mailing list
lyx-devel at lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220426/89efb472/attachment.asc>


More information about the lyx-devel mailing list