summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-08-02 18:09:12 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-08-02 18:09:12 (GMT)
commitdb6eb60eb0246b1c938e22012be15a317fa64342 (patch)
tree8091b0112cd481b44c5e5ea477bbe5b189f337b1
parent5e61d763ec24016a92bb91e5eb39c54d9e28b913 (diff)
parent41ae34d84a2d5024b5d42a25a2bf97b6a6dd8412 (diff)
downloadQt-db6eb60eb0246b1c938e22012be15a317fa64342.zip
Qt-db6eb60eb0246b1c938e22012be15a317fa64342.tar.gz
Qt-db6eb60eb0246b1c938e22012be15a317fa64342.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rwxr-xr-xconfigure8
-rw-r--r--demos/qtdemo/examplecontent.cpp4
-rw-r--r--doc/src/index.qdoc6
-rw-r--r--src/gui/text/qfontengine_mac.mm32
4 files changed, 42 insertions, 8 deletions
diff --git a/configure b/configure
index c61250b..52a4063 100755
--- a/configure
+++ b/configure
@@ -2397,6 +2397,14 @@ if [ "$OPT_SHADOW" = "yes" ]; then
ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
rm -f "$outpath/mkspecs/default"
+ # Special case for mkspecs/features directory.
+ # To be able to place .prf files into a shadow build directory,
+ # we're creating links for files only. The directory structure is reproduced.
+ # A simple "cp -rs" doesn't work on Mac. :(
+ rm -rf "$outpath/mkspecs/features"
+ find "$relpath/mkspecs/features" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
+ find "$relpath/mkspecs/features" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%"
+
# symlink the doc directory
rm -rf "$outpath/doc"
ln -s "$relpath/doc" "$outpath/doc"
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
index 19be3e0..65c078d 100644
--- a/demos/qtdemo/examplecontent.cpp
+++ b/demos/qtdemo/examplecontent.cpp
@@ -91,8 +91,8 @@ QString ExampleContent::loadDescription()
if (paragraphs.length() < 1 && Colors::verbose)
qDebug() << "- ExampleContent::loadDescription(): Could not load description:"
<< MenuManager::instance()->info[this->name]["docfile"];
- QString description = Colors::contentColor +
- QLatin1String("Could not load description. Ensure that the documentation for Qt is built.");
+ QString description = Colors::contentColor + QLatin1String("");
+ //QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); // QTBUG-12522: If there is no description why show an error to the user when qDebug above communications the issue (if it is indeed an issue at all) when demos are built?
for (int p = 0; p < int(paragraphs.length()); ++p) {
description = this->extractTextFromParagraph(paragraphs.item(p));
if (this->isSummary(description)) {
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 55c7545..7efd1e6 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -94,12 +94,12 @@
</div>
<div class="section sectionlist">
<ul>
- <li><a href="http://doc.qt.nokia.com/qtcreator-2.0/index.html">Qt Creator</a></li>
+ <li><a href="http://doc.qt.nokia.com/qtcreator-2.0/index.html">Qt Creator</a> (online document)</li>
<li><a href="designer-manual.html">Qt Designer</a></li>
<li><a href="linguist-manual.html">Qt Linguist</a></li>
<li><a href="assistant-manual.html">Qt Assistant</a></li>
- <li><a href="http://doc.qt.nokia.com/qtsimulator-1.0/simulator-description.html">Qt Simulator</a></li>
- <li><a href="http://qt.nokia.com/developer/eclipse-integration">Integration</a> and <a href="http://qt.nokia.com/products/appdev">add-ins</a></li>
+ <li><a href="http://doc.qt.nokia.com/qtsimulator-1.0/simulator-description.html">Qt Simulator</a> (online document)</li>
+ <li><a href="http://qt.nokia.com/developer/eclipse-integration">Integration</a> (online document) and <a href="http://qt.nokia.com/products/appdev">add-ins</a> (online document)</li>
<li><a href="qvfb.html">Virtual Framebuffer</a></li>
</ul>
</div>
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index deaad57..91b6082 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -349,11 +349,32 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
int *nglyphs, QTextEngine::ShaperFlags flags) const
{
*nglyphs = len;
+ QCFType<CFStringRef> cfstring;
+
QVarLengthArray<CGGlyph> cgGlyphs(len);
CTFontGetGlyphsForCharacters(ctfont, (const UniChar*)str, cgGlyphs.data(), len);
- for (int i = 0; i < len; ++i)
- glyphs->glyphs[i] = cgGlyphs[i];
+ for (int i = 0; i < len; ++i) {
+ if (cgGlyphs[i]) {
+ glyphs->glyphs[i] = cgGlyphs[i];
+ } else {
+ if (!cfstring)
+ cfstring = CFStringCreateWithCharactersNoCopy(0, reinterpret_cast<const UniChar *>(str), len, kCFAllocatorNull);
+ QCFType<CTFontRef> substituteFont = CTFontCreateForString(ctfont, cfstring, CFRangeMake(i, 1));
+ CGGlyph substituteGlyph = 0;
+ CTFontGetGlyphsForCharacters(substituteFont, (const UniChar*)str + i, &substituteGlyph, 1);
+ if (substituteGlyph) {
+ const uint fontIndex = (fontIndexForFont(substituteFont) << 24);
+ glyphs->glyphs[i] = substituteGlyph | fontIndex;
+ if (!(flags & QTextEngine::GlyphIndicesOnly)) {
+ CGSize advance;
+ CTFontGetAdvancesForGlyphs(substituteFont, kCTFontHorizontalOrientation, &substituteGlyph, &advance, 1);
+ glyphs->advances_x[i] = QFixed::fromReal(advance.width);
+ glyphs->advances_y[i] = QFixed::fromReal(advance.height);
+ }
+ }
+ }
+ }
if (flags & QTextEngine::GlyphIndicesOnly)
return true;
@@ -362,9 +383,14 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
CTFontGetAdvancesForGlyphs(ctfont, kCTFontHorizontalOrientation, cgGlyphs.data(), advances.data(), len);
for (int i = 0; i < len; ++i) {
+ if (glyphs->glyphs[i] & 0xff000000)
+ continue;
glyphs->advances_x[i] = QFixed::fromReal(advances[i].width);
glyphs->advances_y[i] = QFixed::fromReal(advances[i].height);
- if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+ }
+
+ if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+ for (int i = 0; i < len; ++i) {
glyphs->advances_x[i] = glyphs->advances_x[i].round();
glyphs->advances_y[i] = glyphs->advances_y[i].round();
}