Changeset 846 for trunk/src/gui/text/qfontdatabase.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/text/qfontdatabase.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 149 149 struct QtFontSize 150 150 { 151 unsigned short pixelSize;152 153 151 #ifdef Q_WS_X11 154 int count;155 152 QtFontEncoding *encodings; 156 153 QtFontEncoding *encodingID(int id, uint xpoint = 0, uint xres = 0, 157 154 uint yres = 0, uint avgwidth = 0, bool add = false); 155 158 156 #endif // Q_WS_X11 159 157 #ifdef Q_WS_PM … … 164 162 int fileIndex; 165 163 #endif // defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) 164 165 166 166 }; 167 167 … … 294 294 return 0; 295 295 296 if (!(count % 8)) { 296 if (!pixelSizes) { 297 // Most style have only one font size, we avoid waisting memory 298 QtFontSize *newPixelSizes = (QtFontSize *)malloc(sizeof(QtFontSize)); 299 Q_CHECK_PTR(newPixelSizes); 300 pixelSizes = newPixelSizes; 301 } else if (!(count % 8) || count == 1) { 297 302 QtFontSize *newPixelSizes = (QtFontSize *) 298 303 realloc(pixelSizes, … … 421 426 #endif 422 427 #ifdef Q_WS_X11 423 bool symbol_checked ;428 bool symbol_checked; 424 429 #endif 425 430 … … 635 640 ~QFontDatabasePrivate() { 636 641 free(); 642 643 644 645 637 646 } 638 647 QtFontFamily *family(const QString &f, bool = false); … … 643 652 families = 0; 644 653 count = 0; 645 #if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)646 if (symbianExtras) {647 delete symbianExtras;648 symbianExtras = 0;649 }650 #endif651 654 // don't clear the memory fonts! 652 655 } … … 664 667 #elif defined(Q_WS_MAC) 665 668 ATSFontContainerRef handle; 669 670 671 672 666 673 #endif 667 674 QStringList families; … … 691 698 QStringList fallbackFamilies; 692 699 #elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) 693 constQSymbianFontDatabaseExtras *symbianExtras;700 QSymbianFontDatabaseExtras *symbianExtras; 694 701 #endif 695 702 … … 2592 2599 currently not supported. 2593 2600 2601 2602 2594 2603 \sa addApplicationFontFromData(), applicationFontFamilies(), removeApplicationFont() 2595 2604 */ … … 2622 2631 currently not supported. 2623 2632 2633 2634 2624 2635 \sa addApplicationFont(), applicationFontFamilies(), removeApplicationFont() 2625 2636 */
Note:
See TracChangeset
for help on using the changeset viewer.