diff options
Diffstat (limited to 'src/gui/opengl')
| -rw-r--r-- | src/gui/opengl/platform/egl/qeglconvenience.cpp | 8 | ||||
| -rw-r--r-- | src/gui/opengl/qopengl.cpp | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/opengl/platform/egl/qeglconvenience.cpp b/src/gui/opengl/platform/egl/qeglconvenience.cpp index 5124e2e5dc5..4af50d72f2c 100644 --- a/src/gui/opengl/platform/egl/qeglconvenience.cpp +++ b/src/gui/opengl/platform/egl/qeglconvenience.cpp @@ -88,13 +88,12 @@ QList<EGLint> q_createConfigAttributesFromFormat(const QSurfaceFormat &format) bool q_reduceConfigAttributes(QList<EGLint> *configAttributes) { - int i = -1; // Reduce the complexity of a configuration request to ask for less // because the previous request did not result in success. Returns // true if the complexity was reduced, or false if no further // reductions in complexity are possible. - i = configAttributes->indexOf(EGL_SWAP_BEHAVIOR); + qsizetype i = configAttributes->indexOf(EGL_SWAP_BEHAVIOR); if (i >= 0) { configAttributes->remove(i,2); } @@ -258,7 +257,7 @@ EGLConfig QEglConfigChooser::chooseConfig() // Fetch all of the matching configurations and find the // first that matches the pixel format we wanted. - int i = configureAttributes.indexOf(EGL_RED_SIZE); + qsizetype i = configureAttributes.indexOf(EGL_RED_SIZE); m_confAttrRed = configureAttributes.at(i+1); i = configureAttributes.indexOf(EGL_GREEN_SIZE); m_confAttrGreen = configureAttributes.at(i+1); @@ -268,7 +267,8 @@ EGLConfig QEglConfigChooser::chooseConfig() m_confAttrAlpha = i == -1 ? 0 : configureAttributes.at(i+1); QList<EGLConfig> configs(matching); - eglChooseConfig(display(), configureAttributes.constData(), configs.data(), configs.size(), &matching); + eglChooseConfig(display(), configureAttributes.constData(), configs.data(), + EGLint(configs.size()), &matching); if (!cfg && matching > 0) cfg = configs.first(); diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index 7c997103d59..587975085ad 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -385,7 +385,8 @@ static bool readGpuFeatures(const QOpenGLConfig::Gpu &gpu, QJsonParseError error; const QJsonDocument document = QJsonDocument::fromJson(jsonAsciiData, &error); if (document.isNull()) { - const int lineNumber = 1 + jsonAsciiData.left(error.offset).count('\n'); + const qsizetype lineNumber = + QByteArrayView(jsonAsciiData).left(error.offset).count('\n') + 1; QTextStream str(errorMessage); str << "Failed to parse data: \"" << error.errorString() << "\" at line " << lineNumber << " (offset: " |
