summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-17 14:43:34 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-07-17 14:43:34 +0000
commitdcc301abfa7b6535199d028ad1afc15daa2d1200 (patch)
tree44a4688bc490f0d57d31a361455b8bde1ffd3dbf /src/gui
parent5443da6c2795255db55697471190b3eba16b28dc (diff)
parentb2603b76655ac819e43c063bb6f16bc95f358083 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into HEAD" into refs/staging/dev
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp2
-rw-r--r--src/gui/image/qimage_conversions.cpp2
-rw-r--r--src/gui/image/qjpeghandler.cpp5
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/opengl/qopengltexture.cpp2
-rw-r--r--src/gui/opengl/qopengltexturehelper.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp2
7 files changed, 11 insertions, 6 deletions
diff --git a/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
index ab8ee67929..368a5085d4 100644
--- a/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
+++ b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
@@ -43,7 +43,7 @@ QOpenGLShader shader(QOpenGLShader::Vertex);
shader.compileSourceCode(code);
QOpenGLShaderProgram program(context);
-program.addShader(shader);
+program.addShader(&shader);
program.link();
program.bind();
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index e0ca2c5331..02f32aa34b 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -1103,7 +1103,7 @@ static bool mask_alpha_converter_rgbx_inplace(QImageData *data, Qt::ImageConvers
}
rgb_data += pad;
}
- data->format = DestFormat;
+ data->format = QImage::Format_RGBX8888;
return true;
#endif
}
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index c0fda647aa..e29f9783a6 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -710,6 +710,7 @@ public:
enum State {
Ready,
ReadHeader,
+ ReadingEnd,
Error
};
@@ -958,7 +959,7 @@ bool QJpegHandlerPrivate::read(QImage *image)
for (int i = 0; i < readTexts.size()-1; i+=2)
image->setText(readTexts.at(i), readTexts.at(i+1));
- state = Ready;
+ state = ReadingEnd;
return true;
}
@@ -1006,7 +1007,7 @@ bool QJpegHandler::canRead() const
if(d->state == QJpegHandlerPrivate::Ready && !canRead(device()))
return false;
- if (d->state != QJpegHandlerPrivate::Error) {
+ if (d->state != QJpegHandlerPrivate::Error && d->state != QJpegHandlerPrivate::ReadingEnd) {
setFormat("jpeg");
return true;
}
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b56a9da255..2a451453d0 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1889,7 +1889,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
#if !defined(Q_OS_OSX)
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
- if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode))
+ if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount))
return;
#endif // Q_OS_OSX
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index baa702a982..5edaddcd6a 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -1112,6 +1112,7 @@ void QOpenGLTexturePrivate::setData(int mipLevel, int layer, QOpenGLTexture::Cub
mipLevelSize(mipLevel, dimensions[0]),
1,
sourceFormat, sourceType, data, options);
+ break;
case QOpenGLTexture::Target2D:
Q_UNUSED(layer);
@@ -1210,6 +1211,7 @@ void QOpenGLTexturePrivate::setCompressedData(int mipLevel, int layer, QOpenGLTe
mipLevelSize(mipLevel, dimensions[0]),
1,
format, dataSize, data, options);
+ break;
case QOpenGLTexture::Target2D:
Q_UNUSED(layer);
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp
index 440fdad081..bf8b514449 100644
--- a/src/gui/opengl/qopengltexturehelper.cpp
+++ b/src/gui/opengl/qopengltexturehelper.cpp
@@ -101,6 +101,8 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
// Use our own DSA emulation
TextureParameteri = &QOpenGLTextureHelper::qt_TextureParameteri;
TextureParameteriv = &QOpenGLTextureHelper::qt_TextureParameteriv;
+ TextureParameterf = &QOpenGLTextureHelper::qt_TextureParameterf;
+ TextureParameterfv = &QOpenGLTextureHelper::qt_TextureParameterfv;
GenerateTextureMipmap = &QOpenGLTextureHelper::qt_GenerateTextureMipmap;
TextureStorage3D = &QOpenGLTextureHelper::qt_TextureStorage3D;
TextureStorage2D = &QOpenGLTextureHelper::qt_TextureStorage2D;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index e87711ef99..d2174c5e06 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1256,7 +1256,7 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
// scaling the advances for this particular version
if (actualFontEngine->fontDef.stretch != 100
&& QSysInfo::MacintoshVersion != QSysInfo::MV_10_6) {
- QFixed stretch = QFixed(actualFontEngine->fontDef.stretch) / QFixed(100);
+ QFixed stretch = QFixed(int(actualFontEngine->fontDef.stretch)) / QFixed(100);
for (uint i = 0; i < num_glyphs; ++i)
g.advances[i] *= stretch;
}