Hi again!

I think I've found a problem:
QtCreator can't resolve FT_CONFIG_OPTION_SUBPIXEL_RENDERING define.
It's easy to check: in case of [1] you'll get 3 lines greyed out, in
case of [2] - only 1. I suppose it's because of crazy freetype defines
like this: #define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>,
and plus QtCreator can't "go to declaration" in case of
FT_CONFIG_OPTION_SUBPIXEL_RENDERING, while I can see it defined when
opening ftoption.h.

Also, text.pri used freetype from 3rdparty folder, after removing that
folder and adding INCLUDES += /usr/include/freetype2 FT_LCD_FILTER_H
define works now.

[1]
#if defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING)
#if defined(FT_LCD_FILTER_H)
#define QT_USE_FREETYPE_LCDFILTER
#endif
#endif

[2]
#if defined(FT_LCD_FILTER_H)
#if defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING)
#define QT_USE_FREETYPE_LCDFILTER
#endif
#endif

On Thu, Jul 14, 2011 at 11:58 AM, Leandro T. C. Melo
<[email protected]> wrote:
> On 7/13/2011 11:20 PM, ext Aekold Helbrass wrote:
>> Good day All!
>>
>> Explain me please how QtCreator is handling blocks inside #ifdef. I
>> expected that current system configuration should be analyzed and
>> ifdef false blocks should be greyed out. But from time to time I see
>> different story. Take a look at qfontengine_ft.cpp from Qt source
>> code, we can see that block [1] is greyed out, and it's right. But
>> then [2] is greyed out too while I have freetype 2.4.4, and [3] is
>> greyed out too while I am sure I have FT_LCD_FILTER_H defined. So my
>> question is: is there something wrong with QtCreator or something is
>> wrong in my system?
>>
>>
>> [1]:
>> # if 0
>>       ... a lot of source code here .....
>> #endif
>>
>> [2]
>> #if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH)>  20103
>>      if (FT_IS_SFNT(face)) {
>>          FT_ULong len = *length;
>>          result = FT_Load_Sfnt_Table(face, tag, 0, buffer,&len) == FT_Err_Ok;
>>          *length = len;
>>      }
>> #endif
>>
>> [3]
>> #if defined(FT_LCD_FILTER_H)
>>      lcdFilterType = (int)((quintptr) FT_LCD_FILTER_DEFAULT);
>> #endif
>> _______________________________________________
>>
>
> Hi,
>
> how you see the defines (greyed out or not) depend on a few things. The
> basic idea is that such information is session-based in Creator and
> shared across projects (all defines are merged together). So you might
> get some "conflicting" situations if you have, for example, more than
> one project open using different Qt versions.
>
> Cheers,
> Leandro
>
> --
> Leandro T. C. Melo
> Software Engineer
> Nokia, Qt Development Frameworks
>
> Nokia gate5 GmbH
> Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
> Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B
> Umsatzsteueridentifikationsnummer: DE 812 845 193
> Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
>
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.qt.nokia.com/mailman/listinfo/qt-creator
>
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to