summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-25 19:27:05 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-25 19:27:05 (GMT)
commit986873b239f15df43a3ebbc88a38f8ff8d6d07bf (patch)
tree946f585f390d3abb835a3280bbdc6bc90724977c /src/gui/text
parentb7f48eee301e973fcfae08dfd8997538b6dbe251 (diff)
parent3671dbf34940e166b747b6f8f3f5758fd486073c (diff)
downloadQt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.zip
Qt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.tar.gz
Qt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.tar.bz2
Merge remote branch 'origin/4.7' into 4.7
Conflicts: tools/qdoc3/generator.cpp tools/qdoc3/node.cpp
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp8
-rw-r--r--src/gui/text/qtextdocument_p.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp9
3 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index bb1e60d..b1ab478 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -41,9 +41,9 @@
#include <qplatformdefs.h>
-#include <qdatetime.h>
#include <qdebug.h>
#include <qpaintdevice.h>
+#include <qelapsedtimer.h>
#include <private/qt_x11_p.h>
#include "qx11info_x11.h"
@@ -1218,7 +1218,7 @@ static void load(const QString &family = QString(), int script = -1, bool forceX
}
#ifdef QFONTDATABASE_DEBUG
- QTime t;
+ QElapsedTimer t;
t.start();
#endif
@@ -1301,7 +1301,7 @@ static void initializeDb()
if (!db || db->count)
return;
- QTime t;
+ QElapsedTimer t;
t.start();
#ifndef QT_NO_FONTCONFIG
@@ -1314,7 +1314,7 @@ static void initializeDb()
}
loadFontConfig();
- FD_DEBUG("QFontDatabase: loaded FontConfig: %d ms", t.elapsed());
+ FD_DEBUG("QFontDatabase: loaded FontConfig: %d ms", int(t.elapsed()));
#endif
t.start();
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 969d5b4..302a349 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
// The VxWorks DIAB compiler crashes when initializing the anonymouse union with { a7 }
#if !defined(Q_CC_DIAB)
# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \
- QTextUndoCommand c = { a1, a2, 0, 0, a3, a4, a5, a6, { a7 }, a8 }
+ QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, a5, a6, { a7 }, a8 }
#else
# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \
QTextUndoCommand c = { a1, a2, 0, 0, a3, a4, a5, a6 }; c.blockFormat = a7; c.revision = a8
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 8dded4e..7dc2c26 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1298,10 +1298,10 @@ QTextEngine::QTextEngine()
}
QTextEngine::QTextEngine(const QString &str, const QFont &f)
- : fnt(f)
+ : text(str),
+ fnt(f)
{
init(this);
- text = str;
}
QTextEngine::~QTextEngine()
@@ -2609,10 +2609,9 @@ void QTextEngine::resolveAdditionalFormats() const
}
QStackTextEngine::QStackTextEngine(const QString &string, const QFont &f)
- : _layoutData(string, _memory, MemSize)
+ : QTextEngine(string, f),
+ _layoutData(string, _memory, MemSize)
{
- fnt = f;
- text = string;
stackEngine = true;
layoutData = &_layoutData;
}