diff options
author | Timothy Pearson <[email protected]> | 2012-02-28 22:31:39 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-02-28 22:31:39 -0600 |
commit | 41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch) | |
tree | 6d4d5407c000add30aa78630e009c0e5d633e440 /src/kernel/qfontdatabase_x11.cpp | |
parent | 1740cd279522c060e738bbbffacab83355d2b794 (diff) | |
download | tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip |
Automated conversion from qt3
Diffstat (limited to 'src/kernel/qfontdatabase_x11.cpp')
-rw-r--r-- | src/kernel/qfontdatabase_x11.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/kernel/qfontdatabase_x11.cpp b/src/kernel/qfontdatabase_x11.cpp index c027bfc41..ba768d811 100644 --- a/src/kernel/qfontdatabase_x11.cpp +++ b/src/kernel/qfontdatabase_x11.cpp @@ -65,9 +65,9 @@ #endif #ifdef TQFONTDATABASE_DEBUG -# define FD_DEBUG qDebug +# define FD_DEBUG tqDebug #else -# define FD_DEBUG if (FALSE) qDebug +# define FD_DEBUG if (FALSE) tqDebug #endif // TQFONTDATABASE_DEBUG // from qfont_x11.cpp @@ -450,7 +450,7 @@ const int numEncodings = sizeof( xlfd_encoding ) / sizeof( XlfdEncoding ) - 1; int qt_xlfd_encoding_id( const char *encoding ) { - // qDebug("looking for encoding id for '%s'", encoding ); + // tqDebug("looking for encoding id for '%s'", encoding ); int len = strlen( encoding ); if ( len < 4 ) return -1; @@ -468,11 +468,11 @@ int qt_xlfd_encoding_id( const char *encoding ) const char *n = enc->name; const char *e = encoding; while ( 1 ) { - // qDebug("bol: *e='%c', *n='%c'", *e, *n ); + // tqDebug("bol: *e='%c', *n='%c'", *e, *n ); if ( *e == '\0' ) { if ( *n ) break; - // qDebug( "found encoding id %d", enc->id ); + // tqDebug( "found encoding id %d", enc->id ); return enc->id; } if ( *e == *n ) { @@ -483,12 +483,12 @@ int qt_xlfd_encoding_id( const char *encoding ) if ( *n != '*' ) break; ++n; - // qDebug("skip: *e='%c', *n='%c'", *e, *n ); + // tqDebug("skip: *e='%c', *n='%c'", *e, *n ); while ( *e && *e != *n ) ++e; } } - // qDebug( "couldn't find encoding %s", encoding ); + // tqDebug( "couldn't find encoding %s", encoding ); return -1; } @@ -706,7 +706,7 @@ static TQtFontStyle::Key getStyle( char ** tokens ) } -extern bool qt_has_xft; // defined in qfont_x11.cpp +extern bool tqt_has_xft; // defined in qfont_x11.cpp static bool xlfdsFullyLoaded = FALSE; static unsigned char encodingLoaded[numEncodings]; @@ -722,7 +722,7 @@ static void loadXlfds( const char *reqFamily, int encoding_id ) return; #ifdef QT_XFT2 - if ( !qt_has_xft ) { + if ( !tqt_has_xft ) { #endif // QT_XFT2 int fontCount; // force the X server to give us XLFDs @@ -734,7 +734,7 @@ static void loadXlfds( const char *reqFamily, int encoding_id ) char **fontList = XListFonts( TQPaintDevice::x11AppDisplay(), xlfd_pattern.data(), 0xffff, &fontCount ); - // qDebug("requesting xlfd='%s', got %d fonts", xlfd_pattern.data(), fontCount ); + // tqDebug("requesting xlfd='%s', got %d fonts", xlfd_pattern.data(), fontCount ); char *tokens[NFontFields]; @@ -787,9 +787,9 @@ static void loadXlfds( const char *reqFamily, int encoding_id ) TQtFontStyle *style = foundry->style( styleKey, TRUE ); delete [] style->weightName; - style->weightName = qstrdup( tokens[Weight] ); + style->weightName = tqstrdup( tokens[Weight] ); delete [] style->setwidthName; - style->setwidthName = qstrdup( tokens[Width] ); + style->setwidthName = tqstrdup( tokens[Width] ); if ( smooth_scalable ) { style->smoothScalable = TRUE; @@ -849,7 +849,7 @@ static int getXftWeight(int xftweight) static void loadXft() { - if (!qt_has_xft) + if (!tqt_has_xft) return; #ifdef QT_XFT2 @@ -1095,7 +1095,7 @@ static Q_UINT16 getGlyphIndex( unsigned char *table, Q_UINT16 format, unsigned s if ( unicode < 256 ) return (int) *(table+6+unicode); } else if ( format == 2 ) { - qWarning("format 2 encoding table for Unicode, not implemented!"); + tqWarning("format 2 encoding table for Unicode, not implemented!"); } else if ( format == 4 ) { Q_UINT16 segCountX2 = getUShort( table + 6 ); unsigned char *ends = table + 14; @@ -1137,7 +1137,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) TQCString ext = family->fontFilename.mid( family->fontFilename.findRev( '.' ) ).lower(); if ( family->fontFileIndex == 0 && ( ext == ".ttf" || ext == ".otf" ) ) { void *map; - // qDebug("using own ttf code coverage checking of '%s'!", family->name.latin1() ); + // tqDebug("using own ttf code coverage checking of '%s'!", family->name.latin1() ); int fd = open( family->fontFilename.data(), O_RDONLY ); size_t pagesize = getpagesize(); off_t offset = 0; @@ -1152,7 +1152,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) unsigned char *ttf = (unsigned char *)map; Q_UINT32 version = getUInt( ttf ); if ( version != 0x00010000 ) { - // qDebug("file has wrong version %x", version ); + // tqDebug("file has wrong version %x", version ); goto error1; } Q_UINT16 numTables = getUShort( ttf+4 ); @@ -1169,7 +1169,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) } } if ( !cmap_offset ) { - // qDebug("no cmap found" ); + // tqDebug("no cmap found" ); goto error1; } @@ -1186,7 +1186,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) version = getUShort( cmap ); if ( version != 0 ) { - // qDebug("wrong cmap version" ); + // tqDebug("wrong cmap version" ); goto error1; } numTables = getUShort( cmap + 2 ); @@ -1205,7 +1205,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) } if ( !unicode_table ) { - // qDebug("no unicode table found" ); + // tqDebug("no unicode table found" ); goto error1; } @@ -1230,7 +1230,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) } } if ( supported ){ - // qDebug("font can render script %d", i ); + // tqDebug("font can render script %d", i ); family->scripts[i] = TQtFontFamily::Supported; } else { family->scripts[i] |= TQtFontFamily::UnSupported_Xft; @@ -1293,7 +1293,7 @@ static void load( const TQString &family = TQString::null, int script = -1 ) if ( family.isNull() ) { #ifndef QT_NO_XFTFREETYPE static bool xft_readall_done = false; - if (qt_has_xft && !xft_readall_done) { + if (tqt_has_xft && !xft_readall_done) { xft_readall_done = true; XftFontSet *fonts = XftListFonts(TQPaintDevice::x11AppDisplay(), @@ -1313,7 +1313,7 @@ static void load( const TQString &family = TQString::null, int script = -1 ) XftFontSetDestroy (fonts); } #ifdef QT_XFT2 - if (qt_has_xft) + if (tqt_has_xft) return; #endif #endif // QT_NO_XFTFREETYPE @@ -1330,7 +1330,7 @@ static void load( const TQString &family = TQString::null, int script = -1 ) if ( !f->fullyLoaded ) { #ifndef QT_NO_XFTFREETYPE - if (qt_has_xft) { + if (tqt_has_xft) { TQString mfamily = family; redo: XftFontSet *fonts = @@ -1419,7 +1419,7 @@ static void initializeDb() #ifdef TQFONTDATABASE_DEBUG #ifdef QT_XFT2 - if (!qt_has_xft) + if (!tqt_has_xft) #endif // load everything at startup in debug mode. loadXlfds( 0, -1 ); @@ -1451,7 +1451,7 @@ static void initializeDb() else if ( style->bitmapScalable ) FD_DEBUG("\t\t\t\tbitmap scalable" ); if ( style->pixelSizes ) { - qDebug("\t\t\t\t%d pixel sizes", style->count ); + tqDebug("\t\t\t\t%d pixel sizes", style->count ); for ( int z = 0; z < style->count; ++z ) { TQtFontSize *size = style->pixelSizes + z; for ( int e = 0; e < size->count; ++e ) { @@ -1763,7 +1763,7 @@ static void parseFontName(const TQString &name, TQString &foundry, TQString &fam static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef &request, TQFont::Script script) { - if (!qt_has_xft) + if (!tqt_has_xft) return 0; TQStringList family_list; @@ -1809,7 +1809,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef double scale = addPatternProps(pattern, key, FALSE, TRUE, fp, request); #ifdef FONT_MATCH_DEBUG - qDebug("original pattern contains:"); + tqDebug("original pattern contains:"); FcPatternPrint(pattern); #endif @@ -1818,7 +1818,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef FcConfigSubstitute(0, pattern, FcMatchPattern); XftDefaultSubstitute(TQPaintDevice::x11AppDisplay(), TQPaintDevice::x11AppScreen(), pattern); -// qDebug("1: pattern contains:"); +// tqDebug("1: pattern contains:"); // FcPatternPrint(pattern); { @@ -1951,7 +1951,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef if ( !xftfs ) { // Xft couldn't find a font? - qDebug("couldn't open fontconfigs chosen font with Xft!!!"); + tqDebug("couldn't open fontconfigs chosen font with Xft!!!"); } else { fe = new TQFontEngineXft( xftfs, result, 0 ); if (fp->paintdevice |