How to avoid the "enumeral mismatch" error in eikmenup.h

in
Platforms:

Symbian SDKs since release 8.1a suffers from an annoying warning when compiling with GCCE compiler and it is just incredible that nobody at Symbian or Nokia just even bother to fix it since.

If you get several warning like the following when compiling your applicatin for the GCCE target:

/Symbian/9.2/S60_3rd_FP1/EPOC32/include/eikmenup.h: In member function `TBool CEikMenuPaneItem::IsScaleableText(const TDesC&) const':
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/eikmenup.h:242: warning: enumeral mismatch in conditional expression: `TFalse' vs `TTrue'

Then you may want to apply a little fix in the eikmenup.h file located in the /epoc32/include directory of your SDK. Open the file and locate the following code:

inline TBool CEikMenuPaneItem::IsScaleableText(const TDesC& aText) const
   {
   return (aText.Locate(TChar(KScaleableTextSeparator)) == KErrNotFound ? EFalse : ETrue);
   }

(it should be around line 107 for the S60 v2 FP3 SDK and line 240 for the S60 v3 FP1 SDK) and replace it by the following:

inline TBool CEikMenuPaneItem::IsScaleableText(const TDesC& aText) const
   {
   return (aText.Locate(TChar(KScaleableTextSeparator)) == KErrNotFound ? (TBool)EFalse : (TBool)ETrue);
   }


How to avoid the "enumeral mismatch" error in eikmenup.h

How about simply:

inline TBool CEikMenuPaneItem::IsScaleableText(const TDesC& aText) const
   
   return aText.Locate(TChar(KScaleableTextSeparator)) != KErrNotFound;
   

How to avoid the "enumeral mismatch" error in eikmenup.h

This is really funny. Symbian and Nokia are big companies. Changing one line of code should take < 5 minutes. How come they don't even try to fix this small problem. Is someone from Symbian or Nokia listening?

How to avoid the "enumeral mismatch" error in eikmenup.h

Employees at Nokia and Symbian probably use the Realview compiler so they might not be that bothered by this problem themselves.

Re: How to avoid the "enumeral mismatch" error in eikmenup.h

Or they simply have better things to do Smiling

Have people told this to Symbian?

I haven''t seen a message to this effect seen in one of the newsgroup on the Symbian DevNet fora. So if you find a defect, report it to Symbian and/or Nokia in one of the fora they have established for defect reporting.

Sander van der Wal
www.mBrainSoftware.com