summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qopenglwidget.cpp6
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm4
-rw-r--r--src/widgets/widgets/qcombobox.cpp12
-rw-r--r--src/widgets/widgets/qmainwindow.cpp1
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp5
5 files changed, 12 insertions, 16 deletions
diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp
index cbefb8a6bf..307d0bb909 100644
--- a/src/widgets/kernel/qopenglwidget.cpp
+++ b/src/widgets/kernel/qopenglwidget.cpp
@@ -170,12 +170,6 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *)
d->fbo = new QOpenGLFramebufferObject(size() * devicePixelRatio(), QOpenGLFramebufferObject::CombinedDepthStencil);
d->fbo->bind();
QOpenGLFunctions *funcs = d->context.functions();
- funcs->glBindTexture(GL_TEXTURE_2D, d->fbo->texture());
- funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-
resizeGL(width(), height());
paintGL();
funcs->glFlush();
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 252de5cd18..513848f7ab 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -3245,7 +3245,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
case PE_PanelStatusBar: {
// Fill the status bar with the titlebar gradient.
QLinearGradient linearGrad(0, opt->rect.top(), 0, opt->rect.bottom());
- if (opt->state & QStyle::State_Active) {
+ if (w ? qt_macWindowMainWindow(w->window()) : (opt->state & QStyle::State_Active)) {
linearGrad.setColorAt(0, titlebarGradientActiveBegin);
linearGrad.setColorAt(1, titlebarGradientActiveEnd);
} else {
@@ -3255,7 +3255,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
p->fillRect(opt->rect, linearGrad);
// Draw the black separator line at the top of the status bar.
- if (opt->state & QStyle::State_Active)
+ if (w ? qt_macWindowMainWindow(w->window()) : (opt->state & QStyle::State_Active))
p->setPen(titlebarSeparatorLineActive);
else
p->setPen(titlebarSeparatorLineInactive);
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 06258cb4a6..f857f4eac0 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -1000,11 +1000,11 @@ void QComboBoxPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIn
emit q->currentTextChanged(text);
}
q->update();
- }
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(q, QAccessible::NameChanged);
+ QAccessibleValueChangeEvent event(q, text);
QAccessible::updateAccessibility(&event);
#endif
+ }
}
void QComboBoxPrivate::_q_rowsInserted(const QModelIndex &parent, int start, int end)
@@ -1269,7 +1269,7 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
if (!lineEdit)
emit q->currentTextChanged(text);
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(q, QAccessible::NameChanged);
+ QAccessibleValueChangeEvent event(q, text);
QAccessible::updateAccessibility(&event);
#endif
}
@@ -2757,7 +2757,7 @@ void QComboBox::clear()
Q_D(QComboBox);
d->model->removeRows(0, d->model->rowCount(d->root), d->root);
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(this, QAccessible::NameChanged);
+ QAccessibleValueChangeEvent event(this, QString());
QAccessible::updateAccessibility(&event);
#endif
}
@@ -2771,7 +2771,7 @@ void QComboBox::clearEditText()
if (d->lineEdit)
d->lineEdit->clear();
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(this, QAccessible::NameChanged);
+ QAccessibleValueChangeEvent event(this, QString());
QAccessible::updateAccessibility(&event);
#endif
}
@@ -2785,7 +2785,7 @@ void QComboBox::setEditText(const QString &text)
if (d->lineEdit)
d->lineEdit->setText(text);
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(this, QAccessible::NameChanged);
+ QAccessibleValueChangeEvent event(this, text);
QAccessible::updateAccessibility(&event);
#endif
}
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 90cfb1d7cb..358569a5e4 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -1519,6 +1519,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
typedef void (*SetContentBorderEnabledFunction)(QWindow *window, bool enable);
(reinterpret_cast<SetContentBorderEnabledFunction>(function))(window()->windowHandle(), set);
+ update();
}
#endif
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index e41cb64463..df13085dee 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -284,14 +284,15 @@ void QPlainTextDocumentLayoutPrivate::relayout()
/*! \reimp
*/
-void QPlainTextDocumentLayout::documentChanged(int from, int /*charsRemoved*/, int charsAdded)
+void QPlainTextDocumentLayout::documentChanged(int from, int charsRemoved, int charsAdded)
{
Q_D(QPlainTextDocumentLayout);
QTextDocument *doc = document();
int newBlockCount = doc->blockCount();
+ int charsChanged = qMax(charsRemoved, charsAdded);
QTextBlock changeStartBlock = doc->findBlock(from);
- QTextBlock changeEndBlock = doc->findBlock(qMax(0, from + charsAdded - 1));
+ QTextBlock changeEndBlock = doc->findBlock(qMax(0, from + charsChanged - 1));
if (changeStartBlock == changeEndBlock && newBlockCount == d->blockCount) {
QTextBlock block = changeStartBlock;