summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/accessible.pri1
-rw-r--r--src/gui/accessible/qaccessible2_p.h45
-rw-r--r--src/gui/kernel/qkeysequence_p.h1
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp2
-rw-r--r--src/gui/kernel/qplatformtheme.cpp28
-rw-r--r--src/gui/opengl/qopengltexturehelper.cpp2
-rw-r--r--src/gui/text/qfont.cpp9
-rw-r--r--src/gui/text/qfont_p.h5
-rw-r--r--src/gui/text/qfontengine_ft.cpp46
-rw-r--r--src/gui/text/qfontengine_ft_p.h2
-rw-r--r--src/gui/text/qtextdocument.cpp2
-rw-r--r--src/gui/text/qtextdocument_p.cpp76
-rw-r--r--src/gui/text/qtextdocument_p.h2
-rw-r--r--src/gui/text/qtextlist.cpp4
-rw-r--r--src/gui/text/qtexttable.cpp14
-rw-r--r--src/gui/text/text.pri144
16 files changed, 198 insertions, 185 deletions
diff --git a/src/gui/accessible/accessible.pri b/src/gui/accessible/accessible.pri
index 9453ac20d0..615323dbec 100644
--- a/src/gui/accessible/accessible.pri
+++ b/src/gui/accessible/accessible.pri
@@ -4,7 +4,6 @@ contains(QT_CONFIG, accessibility) {
HEADERS += \
accessible/qaccessible.h \
accessible/qaccessiblecache_p.h \
- accessible/qaccessible2_p.h \
accessible/qaccessibleobject.h \
accessible/qaccessibleplugin.h \
accessible/qplatformaccessibility.h
diff --git a/src/gui/accessible/qaccessible2_p.h b/src/gui/accessible/qaccessible2_p.h
deleted file mode 100644
index bb5ddf6edf..0000000000
--- a/src/gui/accessible/qaccessible2_p.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QACCESSIBLE2_H
-#define QACCESSIBLE2_H
-
-#endif
diff --git a/src/gui/kernel/qkeysequence_p.h b/src/gui/kernel/qkeysequence_p.h
index eac0d4b0a6..3751660500 100644
--- a/src/gui/kernel/qkeysequence_p.h
+++ b/src/gui/kernel/qkeysequence_p.h
@@ -69,6 +69,7 @@ struct Q_AUTOTEST_EXPORT QKeyBinding
class Q_AUTOTEST_EXPORT QKeySequencePrivate
{
public:
+ enum { MaxKeyCount = 4 }; // used in QKeySequenceEdit
inline QKeySequencePrivate() : ref(1)
{
key[0] = key[1] = key[2] = key[3] = 0;
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp
index e2306050dd..ce913a98af 100644
--- a/src/gui/kernel/qoffscreensurface.cpp
+++ b/src/gui/kernel/qoffscreensurface.cpp
@@ -160,6 +160,8 @@ void QOffscreenSurface::create()
d->platformOffscreenSurface = QGuiApplicationPrivate::platformIntegration()->createPlatformOffscreenSurface(this);
// No platform offscreen surface, fallback to an invisible window
if (!d->platformOffscreenSurface) {
+ if (QThread::currentThread() != qGuiApp->thread())
+ qWarning("Attempting to create QWindow-based QOffscreenSurface outside the gui thread. Expect failures.");
d->offscreenWindow = new QWindow(d->screen);
d->offscreenWindow->setSurfaceType(QWindow::OpenGLSurface);
d->offscreenWindow->setFormat(d->requestedFormat);
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index 562df1c913..1844232efe 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -50,6 +50,7 @@
#include <qtextformat.h>
#include <private/qiconloader_p.h>
#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
QT_BEGIN_NAMESPACE
@@ -399,7 +400,32 @@ QPixmap QPlatformTheme::fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &
QVariant QPlatformTheme::themeHint(ThemeHint hint) const
{
- return QPlatformTheme::defaultThemeHint(hint);
+ // For theme hints which mirror platform integration style hints, query
+ // the platform integration. The base QPlatformIntegration::styleHint()
+ // function will in turn query QPlatformTheme::defaultThemeHint() if there
+ // is no custom value.
+ switch (hint) {
+ case QPlatformTheme::CursorFlashTime:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime);
+ case QPlatformTheme::KeyboardInputInterval:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval);
+ case QPlatformTheme::KeyboardAutoRepeatRate:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate);
+ case QPlatformTheme::MouseDoubleClickInterval:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval);
+ case QPlatformTheme::StartDragDistance:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance);
+ case QPlatformTheme::StartDragTime:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime);
+ case QPlatformTheme::StartDragVelocity:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity);
+ case QPlatformTheme::PasswordMaskDelay:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay);
+ case QPlatformTheme::PasswordMaskCharacter:
+ return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter);
+ default:
+ return QPlatformTheme::defaultThemeHint(hint);
+ }
}
QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp
index 7cd7ca54b2..676c0802de 100644
--- a/src/gui/opengl/qopengltexturehelper.cpp
+++ b/src/gui/opengl/qopengltexturehelper.cpp
@@ -148,7 +148,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
}
#endif
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(QT_OPENGL_ES_2)
HMODULE handle = GetModuleHandleA("opengl32.dll");
// OpenGL 1.0
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index a410004c06..49b5a9ba46 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -208,7 +208,7 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
QMutexLocker locker(qt_fontdatabase_mutex());
if (script <= QChar::Script_Latin)
script = QChar::Script_Common;
- if (engineData && engineData->fontCache != QFontCache::instance()) {
+ if (engineData && engineData->fontCacheId != QFontCache::instance()->id()) {
// throw out engineData that came from a different thread
if (!engineData->ref.deref())
delete engineData;
@@ -317,7 +317,7 @@ void QFontPrivate::resolve(uint mask, const QFontPrivate *other)
QFontEngineData::QFontEngineData()
- : ref(0), fontCache(QFontCache::instance())
+ : ref(0), fontCacheId(QFontCache::instance()->id())
{
memset(engines, 0, QChar::ScriptCount * sizeof(QFontEngine *));
}
@@ -2638,9 +2638,12 @@ void QFontCache::cleanup()
}
#endif // QT_NO_THREAD
+QBasicAtomicInt font_cache_id = Q_BASIC_ATOMIC_INITIALIZER(1);
+
QFontCache::QFontCache()
: QObject(), total_cost(0), max_cost(min_cost),
- current_timestamp(0), fast(false), timer_id(-1)
+ current_timestamp(0), fast(false), timer_id(-1),
+ m_id(font_cache_id.fetchAndAddRelaxed(1))
{
}
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 115e866f24..5b7f918e21 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -140,7 +140,7 @@ public:
~QFontEngineData();
QAtomicInt ref;
- QFontCache *fontCache;
+ const int fontCacheId;
QFontEngine *engines[QChar::ScriptCount];
@@ -206,6 +206,8 @@ public:
QFontCache();
~QFontCache();
+ int id() const { return m_id; }
+
void clear();
struct Key {
@@ -263,6 +265,7 @@ private:
uint current_timestamp;
bool fast;
int timer_id;
+ const int m_id;
};
Q_GUI_EXPORT int qt_defaultDpiX();
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 5f53a36629..42cf15ee3b 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -112,7 +112,7 @@ QT_BEGIN_NAMESPACE
#endif
#define FLOOR(x) ((x) & -64)
-#define CEIL(x) (((x)+63) & -64)
+#define CEIL(x) (((x)+63) & -64)
#define TRUNC(x) ((x) >> 6)
#define ROUND(x) (((x)+32) & -64)
@@ -124,11 +124,21 @@ public:
QtFreetypeData()
: library(0)
{ }
+ ~QtFreetypeData();
FT_Library library;
QHash<QFontEngine::FaceId, QFreetypeFace *> faces;
};
+QtFreetypeData::~QtFreetypeData()
+{
+ for (QHash<QFontEngine::FaceId, QFreetypeFace *>::ConstIterator iter = faces.begin(); iter != faces.end(); ++iter)
+ iter.value()->cleanup();
+ faces.clear();
+ FT_Done_FreeType(library);
+ library = 0;
+}
+
#ifdef QT_NO_THREAD
Q_GLOBAL_STATIC(QtFreetypeData, theFreetypeData)
@@ -292,23 +302,35 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
return freetype;
}
+void QFreetypeFace::cleanup()
+{
+ if (hbFace && hbFace_destroy_func) {
+ hbFace_destroy_func(hbFace);
+ hbFace = 0;
+ }
+ FT_Done_Face(face);
+ face = 0;
+}
+
void QFreetypeFace::release(const QFontEngine::FaceId &face_id)
{
- QtFreetypeData *freetypeData = qt_getFreetypeData();
if (!ref.deref()) {
- if (hbFace && hbFace_destroy_func) {
- hbFace_destroy_func(hbFace);
- hbFace = 0;
+ if (face) {
+ QtFreetypeData *freetypeData = qt_getFreetypeData();
+
+ cleanup();
+
+ if (freetypeData->faces.contains(face_id))
+ freetypeData->faces.take(face_id);
+
+ if (freetypeData->faces.isEmpty()) {
+ FT_Done_FreeType(freetypeData->library);
+ freetypeData->library = 0;
+ }
}
- FT_Done_Face(face);
- if(freetypeData->faces.contains(face_id))
- freetypeData->faces.take(face_id);
+
delete this;
}
- if (freetypeData->faces.isEmpty()) {
- FT_Done_FreeType(freetypeData->library);
- freetypeData->library = 0;
- }
}
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index e64fec2f27..7df66b9678 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -114,9 +114,11 @@ public:
private:
friend class QFontEngineFT;
+ friend class QtFreetypeData;
friend struct QScopedPointerDeleter<QFreetypeFace>;
QFreetypeFace() : _lock(QMutex::Recursive) {}
~QFreetypeFace() {}
+ void cleanup();
QAtomicInt ref;
QMutex _lock;
QByteArray fontData;
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 30e0f32547..4a34f0d3c3 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2491,7 +2491,7 @@ static bool isOrderedList(int style)
|| style == QTextListFormat::ListUpperAlpha
|| style == QTextListFormat::ListUpperRoman
|| style == QTextListFormat::ListLowerRoman
- ;
+ ;
}
void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block)
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index f0910dd52d..4b6ce667fa 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -632,7 +632,7 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O
blockRevision);
if (key+1 != blocks.position(b)) {
-// qDebug("remove_string from %d length %d", key, X->size_array[0]);
+// qDebug("remove_string from %d length %d", key, X->size_array[0]);
Q_ASSERT(noBlockInString(text.mid(X->stringPosition, X->size_array[0])));
w = remove_string(key, X->size_array[0], op);
@@ -641,7 +641,7 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O
dstKey += X->size_array[0];
}
} else {
-// qDebug("remove_block at %d", key);
+// qDebug("remove_block at %d", key);
Q_ASSERT(X->size_array[0] == 1 && isValidBlockSeparator(text.at(X->stringPosition)));
b = blocks.previous(b);
B = 0;
@@ -779,7 +779,7 @@ void QTextDocumentPrivate::setCharFormat(int pos, int length, const QTextCharFor
}
void QTextDocumentPrivate::setBlockFormat(const QTextBlock &from, const QTextBlock &to,
- const QTextBlockFormat &newFormat, FormatChangeMode mode)
+ const QTextBlockFormat &newFormat, FormatChangeMode mode)
{
beginEditBlock();
@@ -795,7 +795,7 @@ void QTextDocumentPrivate::setBlockFormat(const QTextBlock &from, const QTextBlo
QTextBlock it = from;
QTextBlock end = to;
if (end.isValid())
- end = end.next();
+ end = end.next();
for (; it != end; it = it.next()) {
int oldFormat = block(it)->format;
@@ -820,8 +820,8 @@ void QTextDocumentPrivate::setBlockFormat(const QTextBlock &from, const QTextBlo
if (group)
group->blockInserted(it);
} else if (group) {
- group->blockFormatChanged(it);
- }
+ group->blockFormatChanged(it);
+ }
}
documentChange(from.position(), to.position() + to.length() - from.position());
@@ -892,14 +892,14 @@ int QTextDocumentPrivate::undoRedo(bool undo)
QTextUndoCommand &c = undoStack[undoState];
int resetBlockRevision = c.pos;
- switch(c.command) {
+ switch (c.command) {
case QTextUndoCommand::Inserted:
remove(c.pos, c.length, (QTextUndoCommand::Operation)c.operation);
PMDEBUG(" erase: from %d, length %d", c.pos, c.length);
c.command = QTextUndoCommand::Removed;
editPos = c.pos;
editLength = 0;
- break;
+ break;
case QTextUndoCommand::Removed:
PMDEBUG(" insert: format %d (from %d, length %d, strpos=%d)", c.format, c.pos, c.length, c.strPos);
insert_string(c.pos, c.strPos, c.length, c.format, (QTextUndoCommand::Operation)c.operation);
@@ -908,33 +908,33 @@ int QTextDocumentPrivate::undoRedo(bool undo)
editLength = 0;
editPos = c.pos;
editLength += c.length;
- break;
- case QTextUndoCommand::BlockInserted:
- case QTextUndoCommand::BlockAdded:
+ break;
+ case QTextUndoCommand::BlockInserted:
+ case QTextUndoCommand::BlockAdded:
remove_block(c.pos, &c.blockFormat, c.command, (QTextUndoCommand::Operation)c.operation);
PMDEBUG(" blockremove: from %d", c.pos);
- if (c.command == QTextUndoCommand::BlockInserted)
- c.command = QTextUndoCommand::BlockRemoved;
- else
- c.command = QTextUndoCommand::BlockDeleted;
+ if (c.command == QTextUndoCommand::BlockInserted)
+ c.command = QTextUndoCommand::BlockRemoved;
+ else
+ c.command = QTextUndoCommand::BlockDeleted;
editPos = c.pos;
editLength = 0;
- break;
- case QTextUndoCommand::BlockRemoved:
- case QTextUndoCommand::BlockDeleted:
+ break;
+ case QTextUndoCommand::BlockRemoved:
+ case QTextUndoCommand::BlockDeleted:
PMDEBUG(" blockinsert: charformat %d blockformat %d (pos %d, strpos=%d)", c.format, c.blockFormat, c.pos, c.strPos);
insert_block(c.pos, c.strPos, c.format, c.blockFormat, (QTextUndoCommand::Operation)c.operation, c.command);
resetBlockRevision += 1;
- if (c.command == QTextUndoCommand::BlockRemoved)
- c.command = QTextUndoCommand::BlockInserted;
- else
- c.command = QTextUndoCommand::BlockAdded;
+ if (c.command == QTextUndoCommand::BlockRemoved)
+ c.command = QTextUndoCommand::BlockInserted;
+ else
+ c.command = QTextUndoCommand::BlockAdded;
if (editPos != (int)c.pos)
editLength = 0;
editPos = c.pos;
editLength += 1;
- break;
- case QTextUndoCommand::CharFormatChanged: {
+ break;
+ case QTextUndoCommand::CharFormatChanged: {
resetBlockRevision = -1; // ## TODO
PMDEBUG(" charFormat: format %d (from %d, length %d)", c.format, c.pos, c.length);
FragmentIterator it = find(c.pos);
@@ -947,9 +947,9 @@ int QTextDocumentPrivate::undoRedo(bool undo)
editLength = 0;
editPos = c.pos;
editLength += c.length;
- break;
- }
- case QTextUndoCommand::BlockFormatChanged: {
+ break;
+ }
+ case QTextUndoCommand::BlockFormatChanged: {
resetBlockRevision = -1; // ## TODO
PMDEBUG(" blockformat: format %d pos %d", c.format, c.pos);
QTextBlock it = blocksFind(c.pos);
@@ -970,9 +970,9 @@ int QTextDocumentPrivate::undoRedo(bool undo)
}
documentChange(it.position(), it.length());
editPos = -1;
- break;
- }
- case QTextUndoCommand::GroupFormatChange: {
+ break;
+ }
+ case QTextUndoCommand::GroupFormatChange: {
resetBlockRevision = -1; // ## TODO
PMDEBUG(" group format change");
QTextObject *object = objectForIndex(c.objectIndex);
@@ -980,22 +980,22 @@ int QTextDocumentPrivate::undoRedo(bool undo)
changeObjectFormat(object, c.format);
c.format = oldFormat;
editPos = -1;
- break;
- }
+ break;
+ }
case QTextUndoCommand::CursorMoved:
editPos = c.pos;
editLength = 0;
break;
- case QTextUndoCommand::Custom:
+ case QTextUndoCommand::Custom:
resetBlockRevision = -1; // ## TODO
if (undo)
c.custom->undo();
else
c.custom->redo();
editPos = -1;
- break;
- default:
- Q_ASSERT(false);
+ break;
+ default:
+ Q_ASSERT(false);
}
if (resetBlockRevision >= 0) {
@@ -1315,9 +1315,9 @@ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOr
int removed = qMax(0, -addedOrRemoved);
int diff = 0;
- if(from + removed < docChangeFrom)
+ if (from + removed < docChangeFrom)
diff = docChangeFrom - from - removed;
- else if(from > docChangeFrom + docChangeLength)
+ else if (from > docChangeFrom + docChangeLength)
diff = from - (docChangeFrom + docChangeLength);
int overlap_start = qMax(from, docChangeFrom);
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index 1394e88465..8d4cab30ae 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -194,7 +194,7 @@ public:
void setCharFormat(int pos, int length, const QTextCharFormat &newFormat, FormatChangeMode mode = SetFormat);
void setBlockFormat(const QTextBlock &from, const QTextBlock &to,
- const QTextBlockFormat &newFormat, FormatChangeMode mode = SetFormat);
+ const QTextBlockFormat &newFormat, FormatChangeMode mode = SetFormat);
void emitUndoAvailable(bool available);
void emitRedoAvailable(bool available);
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index f969f66006..15c16f1ec0 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -265,8 +265,8 @@ QString QTextList::itemText(const QTextBlock &blockIt) const
result = QLatin1String("?");
}
- }
- break;
+ }
+ break;
default:
Q_ASSERT(false);
}
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index d77cbf9671..045fe7f957 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -355,12 +355,12 @@ QTextTable *QTextTablePrivate::createTable(QTextDocumentPrivate *pieceTable, int
for (int i = 1; i < rows*cols; ++i) {
d->cells.append(pieceTable->insertBlock(QTextBeginningOfFrame, pos, cellIdx, charIdx));
-// qDebug(" addCell at %d", pos);
+// qDebug(" addCell at %d", pos);
++pos;
}
d->fragment_end = pieceTable->insertBlock(QTextEndOfFrame, pos, cellIdx, charIdx);
-// qDebug(" addEOR at %d", pos);
+// qDebug(" addEOR at %d", pos);
++pos;
d->blockFragmentUpdates = false;
@@ -482,7 +482,7 @@ void QTextTablePrivate::update() const
for (int jj = 0; jj < colspan; ++jj) {
Q_ASSERT(grid[(r+ii)*nCols + c+jj] == 0);
grid[(r+ii)*nCols + c+jj] = fragment;
-// qDebug(" setting cell %d span=%d/%d at %d/%d", fragment, rowspan, colspan, r+ii, c+jj);
+// qDebug(" setting cell %d span=%d/%d at %d/%d", fragment, rowspan, colspan, r+ii, c+jj);
}
}
}
@@ -654,7 +654,7 @@ void QTextTable::resize(int rows, int cols)
int nCols = this->columns();
if (rows == nRows && cols == nCols)
- return;
+ return;
d->pieceTable->beginEditBlock();
@@ -682,7 +682,7 @@ void QTextTable::insertRows(int pos, int num)
{
Q_D(QTextTable);
if (num <= 0)
- return;
+ return;
if (d->dirty)
d->update();
@@ -744,7 +744,7 @@ void QTextTable::insertColumns(int pos, int num)
{
Q_D(QTextTable);
if (num <= 0)
- return;
+ return;
if (d->dirty)
d->update();
@@ -932,7 +932,7 @@ void QTextTable::removeColumns(int pos, int num)
// qDebug() << "-------- removeCols" << pos << num;
if (num <= 0 || pos < 0)
- return;
+ return;
if (d->dirty)
d->update();
if (pos >= d->nCols)
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 59a6f346e2..2a0e4eff32 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -1,89 +1,89 @@
# Qt kernel module
HEADERS += \
- text/qfont.h \
- text/qfontdatabase.h \
- text/qfontengine_p.h \
- text/qfontengineglyphcache_p.h \
- text/qfontinfo.h \
- text/qfontmetrics.h \
- text/qfont_p.h \
- text/qfontsubset_p.h \
- text/qtextengine_p.h \
- text/qtextlayout.h \
- text/qtextformat.h \
- text/qtextformat_p.h \
- text/qtextobject.h \
- text/qtextobject_p.h \
- text/qtextoption.h \
- text/qfragmentmap_p.h \
- text/qtextdocument.h \
- text/qtextdocument_p.h \
- text/qtexthtmlparser_p.h \
- text/qabstracttextdocumentlayout.h \
- text/qtextdocumentlayout_p.h \
- text/qtextcursor.h \
- text/qtextcursor_p.h \
- text/qtextdocumentfragment.h \
- text/qtextdocumentfragment_p.h \
- text/qtextimagehandler_p.h \
- text/qtexttable.h \
- text/qtextlist.h \
- text/qsyntaxhighlighter.h \
- text/qtextdocumentwriter.h \
- text/qcssparser_p.h \
- text/qtexttable_p.h \
- text/qzipreader_p.h \
- text/qzipwriter_p.h \
- text/qtextodfwriter_p.h \
- text/qstatictext_p.h \
- text/qstatictext.h \
- text/qrawfont.h \
- text/qrawfont_p.h \
+ text/qfont.h \
+ text/qfontdatabase.h \
+ text/qfontengine_p.h \
+ text/qfontengineglyphcache_p.h \
+ text/qfontinfo.h \
+ text/qfontmetrics.h \
+ text/qfont_p.h \
+ text/qfontsubset_p.h \
+ text/qtextengine_p.h \
+ text/qtextlayout.h \
+ text/qtextformat.h \
+ text/qtextformat_p.h \
+ text/qtextobject.h \
+ text/qtextobject_p.h \
+ text/qtextoption.h \
+ text/qfragmentmap_p.h \
+ text/qtextdocument.h \
+ text/qtextdocument_p.h \
+ text/qtexthtmlparser_p.h \
+ text/qabstracttextdocumentlayout.h \
+ text/qtextdocumentlayout_p.h \
+ text/qtextcursor.h \
+ text/qtextcursor_p.h \
+ text/qtextdocumentfragment.h \
+ text/qtextdocumentfragment_p.h \
+ text/qtextimagehandler_p.h \
+ text/qtexttable.h \
+ text/qtextlist.h \
+ text/qsyntaxhighlighter.h \
+ text/qtextdocumentwriter.h \
+ text/qcssparser_p.h \
+ text/qtexttable_p.h \
+ text/qzipreader_p.h \
+ text/qzipwriter_p.h \
+ text/qtextodfwriter_p.h \
+ text/qstatictext_p.h \
+ text/qstatictext.h \
+ text/qrawfont.h \
+ text/qrawfont_p.h \
text/qglyphrun.h \
text/qglyphrun_p.h \
text/qdistancefield_p.h
SOURCES += \
- text/qfont.cpp \
- text/qfontengine.cpp \
- text/qfontsubset.cpp \
- text/qfontmetrics.cpp \
- text/qfontdatabase.cpp \
- text/qtextengine.cpp \
- text/qtextlayout.cpp \
- text/qtextformat.cpp \
- text/qtextobject.cpp \
- text/qtextoption.cpp \
- text/qfragmentmap.cpp \
- text/qtextdocument.cpp \
- text/qtextdocument_p.cpp \
- text/qtexthtmlparser.cpp \
- text/qabstracttextdocumentlayout.cpp \
- text/qtextdocumentlayout.cpp \
- text/qtextcursor.cpp \
- text/qtextdocumentfragment.cpp \
- text/qtextimagehandler.cpp \
- text/qtexttable.cpp \
- text/qtextlist.cpp \
- text/qtextdocumentwriter.cpp \
- text/qsyntaxhighlighter.cpp \
- text/qcssparser.cpp \
- text/qzip.cpp \
- text/qtextodfwriter.cpp \
- text/qstatictext.cpp \
- text/qrawfont.cpp \
+ text/qfont.cpp \
+ text/qfontengine.cpp \
+ text/qfontsubset.cpp \
+ text/qfontmetrics.cpp \
+ text/qfontdatabase.cpp \
+ text/qtextengine.cpp \
+ text/qtextlayout.cpp \
+ text/qtextformat.cpp \
+ text/qtextobject.cpp \
+ text/qtextoption.cpp \
+ text/qfragmentmap.cpp \
+ text/qtextdocument.cpp \
+ text/qtextdocument_p.cpp \
+ text/qtexthtmlparser.cpp \
+ text/qabstracttextdocumentlayout.cpp \
+ text/qtextdocumentlayout.cpp \
+ text/qtextcursor.cpp \
+ text/qtextdocumentfragment.cpp \
+ text/qtextimagehandler.cpp \
+ text/qtexttable.cpp \
+ text/qtextlist.cpp \
+ text/qtextdocumentwriter.cpp \
+ text/qsyntaxhighlighter.cpp \
+ text/qcssparser.cpp \
+ text/qzip.cpp \
+ text/qtextodfwriter.cpp \
+ text/qstatictext.cpp \
+ text/qrawfont.cpp \
text/qglyphrun.cpp \
text/qdistancefield.cpp
SOURCES += \
- text/qfont_qpa.cpp \
- text/qfontengine_qpa.cpp \
- text/qplatformfontdatabase.cpp \
- text/qrawfont_qpa.cpp
+ text/qfont_qpa.cpp \
+ text/qfontengine_qpa.cpp \
+ text/qplatformfontdatabase.cpp \
+ text/qrawfont_qpa.cpp
HEADERS += \
- text/qplatformfontdatabase.h
+ text/qplatformfontdatabase.h
contains(QT_CONFIG, harfbuzz)|contains(QT_CONFIG, system-harfbuzz) {
DEFINES += QT_ENABLE_HARFBUZZ_NG