summaryrefslogtreecommitdiff
path: root/src/gui/text/qfontdatabase_mac.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-07-06 11:50:58 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-07-06 12:37:30 +0200
commitdd0205e0fbacf340508686cc136d70eda7bf664d (patch)
tree8b9a1ebdbf2f47081e54d75f76b85d0f24d517b9 /src/gui/text/qfontdatabase_mac.cpp
parent83e93784a2da9e1898790e4455225da220f44d81 (diff)
downloadqt4-tools-dd0205e0fbacf340508686cc136d70eda7bf664d.tar.gz
Move styleName out of QtFontStyle::Key
Makes the code clearer and more explicit. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfontdatabase_mac.cpp')
-rw-r--r--src/gui/text/qfontdatabase_mac.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp
index 0f6d6bf5fd..fc8247dad2 100644
--- a/src/gui/text/qfontdatabase_mac.cpp
+++ b/src/gui/text/qfontdatabase_mac.cpp
@@ -113,7 +113,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
QtFontFoundry *foundry = family->foundry(foundry_name, true);
QtFontStyle::Key styleKey;
- styleKey.styleName = style_name;
+ QString styleName = style_name;
if(QCFType<CFDictionaryRef> styles = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)) {
if(CFNumberRef weight = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
Q_ASSERT(CFNumberIsFloatType(weight));
@@ -134,7 +134,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
}
}
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, styleName, true);
style->smoothScalable = true;
if(QCFType<CFNumberRef> size = (CFNumberRef)CTFontDescriptorCopyAttribute(font, kCTFontSizeAttribute)) {
//qDebug() << "WHEE";
@@ -207,7 +207,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
QtFontFamily *family = db->family(familyName, true);
QtFontFoundry *foundry = family->foundry(QString(), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->pixelSize(0, true);
style->smoothScalable = true;