summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qtableview.cpp8
-rw-r--r--src/gui/text/qfontengine_mac.mm15
-rw-r--r--src/gui/text/qtextcontrol.cpp4
3 files changed, 20 insertions, 7 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 80334a6..4492e53 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -2145,8 +2145,8 @@ int QTableView::sizeHintForRow(int row) const
ensurePolished();
- int left = qMax(0, columnAt(0));
- int right = columnAt(d->viewport->width());
+ int left = qMax(0, d->horizontalHeader->visualIndexAt(0));
+ int right = d->horizontalHeader->visualIndexAt(d->viewport->width());
if (right == -1) // the table don't have enough columns to fill the viewport
right = d->model->columnCount(d->root) - 1;
@@ -2204,8 +2204,8 @@ int QTableView::sizeHintForColumn(int column) const
ensurePolished();
- int top = qMax(0, rowAt(0));
- int bottom = rowAt(d->viewport->height());
+ int top = qMax(0, d->verticalHeader->visualIndexAt(0));
+ int bottom = d->verticalHeader->visualIndexAt(d->viewport->height());
if (!isVisible() || bottom == -1) // the table don't have enough rows to fill the viewport
bottom = d->model->rowCount(d->root) - 1;
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 0bfdbc0..a6510cb 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -226,8 +226,19 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
QFixed *outAdvances_y = glyphs->advances_y;
glyph_t *initialGlyph = outGlyphs;
- if (arraySize == 0)
- return false;
+ if (arraySize == 0) {
+ // CoreText failed to shape the text we gave it, so we assume one glyph
+ // per character and build a list of invalid glyphs with zero advance
+ *nglyphs = len;
+ for (int i = 0; i < len; ++i) {
+ outGlyphs[i] = 0;
+ logClusters[i] = i;
+ outAdvances_x[i] = QFixed();
+ outAdvances_y[i] = QFixed();
+ outAttributes[i].clusterStart = true;
+ }
+ return true;
+ }
const bool rtl = (CTRunGetStatus(static_cast<CTRunRef>(CFArrayGetValueAtIndex(array, 0))) & kCTRunStatusRightToLeft);
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 3c596e5..a2ee659 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -885,8 +885,10 @@ void QTextControl::processEvent(QEvent *e, const QPointF &coordinateOffset, QWid
void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget)
{
Q_D(QTextControl);
- if (d->interactionFlags & Qt::NoTextInteraction)
+ if (d->interactionFlags == Qt::NoTextInteraction) {
+ e->ignore();
return;
+ }
d->contextWidget = contextWidget;