summaryrefslogtreecommitdiffstats
path: root/src/widgets/platforms
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-07-06 13:55:40 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-07-06 14:08:02 +0200
commit314fdbce8ce473eb3610be3658c61fab2fac0efb (patch)
tree98a24a6f53ea8d6a7f3fc6ad60ab84dd66ae2863 /src/widgets/platforms
parent8d7647e286e07690de15a6ff9189307ee1a3517c (diff)
parent83736a8d06a6ca2a1f165d6119ddaca90646e1f8 (diff)
Merge remote branch 'gerrit/master' into refactor
Conflicts: config.tests/unix/opengldesktop/opengldesktop.cpp examples/itemviews/interview/interview.pro examples/mainwindows/mainwindow/mainwindow.pro examples/openvg/README examples/richtext/textedit/textedit.pro examples/tools/undo/undo.pro src/corelib/global/qglobal.h src/corelib/kernel/qcoreapplication.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qmetatype.h src/gui/kernel/qevent.cpp src/gui/kernel/qevent.h src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qpaintengine_raster_p.h src/gui/text/qfontdatabase.cpp src/opengl/qgl.h src/openvg/qpaintengine_vg.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp tests/auto/qmainwindow/qmainwindow.pro Change-Id: I6bfb586740a68379bb99f4612ec993393a5f3234
Diffstat (limited to 'src/widgets/platforms')
-rw-r--r--src/widgets/platforms/mac/qfontdatabase_mac.cpp2
-rw-r--r--src/widgets/platforms/mac/qpaintengine_mac.cpp5
-rw-r--r--src/widgets/platforms/win/qprintengine_win.cpp3
-rw-r--r--src/widgets/platforms/x11/qfontdatabase_x11.cpp6
-rw-r--r--src/widgets/platforms/x11/qpaintengine_x11.cpp5
5 files changed, 8 insertions, 13 deletions
diff --git a/src/widgets/platforms/mac/qfontdatabase_mac.cpp b/src/widgets/platforms/mac/qfontdatabase_mac.cpp
index 724dbf6c4a..b7335d684e 100644
--- a/src/widgets/platforms/mac/qfontdatabase_mac.cpp
+++ b/src/widgets/platforms/mac/qfontdatabase_mac.cpp
@@ -106,12 +106,14 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i);
QCFString family_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute);
+ QCFString style_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute);
QtFontFamily *family = db->family(family_name, true);
for(int ws = 1; ws < QFontDatabase::WritingSystemsCount; ++ws)
family->writingSystems[ws] = QtFontFamily::Supported;
QtFontFoundry *foundry = family->foundry(foundry_name, true);
QtFontStyle::Key styleKey;
+ styleKey.styleName = style_name;
if(QCFType<CFDictionaryRef> styles = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)) {
if(CFNumberRef weight = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
Q_ASSERT(CFNumberIsFloatType(weight));
diff --git a/src/widgets/platforms/mac/qpaintengine_mac.cpp b/src/widgets/platforms/mac/qpaintengine_mac.cpp
index 802c455ab8..0d459a5d89 100644
--- a/src/widgets/platforms/mac/qpaintengine_mac.cpp
+++ b/src/widgets/platforms/mac/qpaintengine_mac.cpp
@@ -798,9 +798,6 @@ QCoreGraphicsPaintEngine::updateClipPath(const QPainterPath &p, Qt::ClipOperatio
} else if(op == Qt::IntersectClip) {
d->current.clip = d->current.clip.intersected(clipRegion);
d->setClip(&d->current.clip);
- } else if(op == Qt::UniteClip) {
- d->current.clip = d->current.clip.united(clipRegion);
- d->setClip(&d->current.clip);
}
}
}
@@ -822,8 +819,6 @@ QCoreGraphicsPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOp
d->current.clip = d->current.clip.intersected(clipRegion);
else if(op == Qt::ReplaceClip)
d->current.clip = clipRegion;
- else if(op == Qt::UniteClip)
- d->current.clip = d->current.clip.united(clipRegion);
d->setClip(&d->current.clip);
}
}
diff --git a/src/widgets/platforms/win/qprintengine_win.cpp b/src/widgets/platforms/win/qprintengine_win.cpp
index ebce404c3c..5ba33c043c 100644
--- a/src/widgets/platforms/win/qprintengine_win.cpp
+++ b/src/widgets/platforms/win/qprintengine_win.cpp
@@ -586,8 +586,7 @@ void QWin32PrintEngine::updateClipPath(const QPainterPath &clipPath, Qt::ClipOpe
const int ops[] = {
-1, // Qt::NoClip, covered above
RGN_COPY, // Qt::ReplaceClip
- RGN_AND, // Qt::IntersectClip
- RGN_OR // Qt::UniteClip
+ RGN_AND // Qt::IntersectClip
};
Q_ASSERT(op > 0 && unsigned(op) <= sizeof(ops) / sizeof(int));
SelectClipPath(d->hdc, ops[op]);
diff --git a/src/widgets/platforms/x11/qfontdatabase_x11.cpp b/src/widgets/platforms/x11/qfontdatabase_x11.cpp
index 958daa2506..ed94fa6be1 100644
--- a/src/widgets/platforms/x11/qfontdatabase_x11.cpp
+++ b/src/widgets/platforms/x11/qfontdatabase_x11.cpp
@@ -1034,13 +1034,14 @@ static void loadFontConfig()
FcChar8 *file_value;
int index_value;
FcChar8 *foundry_value;
+ FcChar8 *style_value;
FcBool scalable;
{
FcObjectSet *os = FcObjectSetCreate();
FcPattern *pattern = FcPatternCreate();
const char *properties [] = {
- FC_FAMILY, FC_WEIGHT, FC_SLANT,
+ FC_FAMILY, FC_STYLE, FC_WEIGHT, FC_SLANT,
FC_SPACING, FC_FILE, FC_INDEX,
FC_LANG, FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, FC_WEIGHT,
FC_WIDTH,
@@ -1085,6 +1086,8 @@ static void loadFontConfig()
scalable = FcTrue;
if (FcPatternGetString(fonts->fonts[i], FC_FOUNDRY, 0, &foundry_value) != FcResultMatch)
foundry_value = 0;
+ if (FcPatternGetString(fonts->fonts[i], FC_STYLE, 0, &style_value) != FcResultMatch)
+ style_value = 0;
QtFontFamily *family = db->family(familyName, true);
FcLangSet *langset = 0;
@@ -1142,6 +1145,7 @@ static void loadFontConfig()
family->fontFileIndex = index_value;
QtFontStyle::Key styleKey;
+ styleKey.styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString();
styleKey.style = (slant_value == FC_SLANT_ITALIC)
? QFont::StyleItalic
: ((slant_value == FC_SLANT_OBLIQUE)
diff --git a/src/widgets/platforms/x11/qpaintengine_x11.cpp b/src/widgets/platforms/x11/qpaintengine_x11.cpp
index a7ea84c918..6b480815cf 100644
--- a/src/widgets/platforms/x11/qpaintengine_x11.cpp
+++ b/src/widgets/platforms/x11/qpaintengine_x11.cpp
@@ -2078,11 +2078,6 @@ void QX11PaintEngine::updateClipRegion_dev(const QRegion &clipRegion, Qt::ClipOp
else
d->crgn = clipRegion;
break;
- case Qt::UniteClip:
- d->crgn |= clipRegion;
- if (!sysClip.isEmpty())
- d->crgn = d->crgn.intersected(sysClip);
- break;
default:
break;
}