summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2009-10-01 05:54:19 (GMT)
committerSarah Smith <sarah.j.smith@nokia.com>2009-10-01 05:54:19 (GMT)
commite5fcac23463702435136ee18f91668aa0d6601a3 (patch)
tree3188719b0cfcdb73d4630c40e65ade5f6ce7d3fe
parent059d40d3f918f658041ec20ba04f9d010cfc0fa7 (diff)
parent5da322990a5002d8c827578efad7b210716f1c15 (diff)
downloadQt-e5fcac23463702435136ee18f91668aa0d6601a3.zip
Qt-e5fcac23463702435136ee18f91668aa0d6601a3.tar.gz
Qt-e5fcac23463702435136ee18f91668aa0d6601a3.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp10
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
3 files changed, 7 insertions, 13 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 0fedbec..c8bb26d 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1172,7 +1172,7 @@ void VcprojGenerator::initDeploymentTool()
if (targetPath.isEmpty())
targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET");
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
- targetPath = targetPath.mid(0,targetPath.size()-1);
+ targetPath.chop(1);
// Only deploy Qt libs for shared build
if (!project->values("QMAKE_QT_DLL").isEmpty()) {
@@ -1261,13 +1261,7 @@ void VcprojGenerator::initDeploymentTool()
searchPath = info.absoluteFilePath();
} else {
nameFilter = source.split('\\').last();
- if (source.contains('*')) {
- source = source.split('*').first();
- info = QFileInfo(source);
- }
- searchPath = info.absolutePath();
- if (!info.exists())
- fprintf(stderr, "Deployment file is missing %s\n", source.toLatin1().constData());
+ searchPath = info.absolutePath();
}
int pathSize = searchPath.size();
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index eceed06..fcb20b4 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -78,7 +78,7 @@ const char* QGLEngineSharedShaders::qglEngineShaderSourceCode[] = {
};
QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context)
- : ctx(QGLContextPrivate::contextGroup(context))
+ : ctxGuard(context)
, blitShaderProg(0)
, simpleShaderProg(0)
{
@@ -223,7 +223,7 @@ QGLShader *QGLEngineSharedShaders::compileNamedShader(ShaderName name, QGLShader
return compiledShaders[name];
QByteArray source = qglEngineShaderSourceCode[name];
- QGLShader *newShader = new QGLShader(type, ctx->context(), this);
+ QGLShader *newShader = new QGLShader(type, ctxGuard.context(), this);
newShader->compile(source);
#if defined(QT_DEBUG)
@@ -245,7 +245,7 @@ QGLShader *QGLEngineSharedShaders::compileCustomShader(QGLCustomShaderStage *sta
if (newShader)
return newShader;
- newShader = new QGLShader(type, ctx->context(), this);
+ newShader = new QGLShader(type, ctxGuard.context(), this);
newShader->compile(source);
customShaderCache.insert(source, newShader);
@@ -273,7 +273,7 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
QGLEngineShaderProg &cached = cachedPrograms.last();
// If the shader program's not found in the cache, create it now.
- cached.program = new QGLShaderProgram(ctx->context(), this);
+ cached.program = new QGLShaderProgram(ctxGuard.context(), this);
cached.program->addShader(cached.mainVertexShader);
cached.program->addShader(cached.positionVertexShader);
cached.program->addShader(cached.mainFragShader);
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index 47d9a2a..fbb6d9c 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -361,7 +361,7 @@ private slots:
void shaderDestroyed(QObject *shader);
private:
- QGLContextGroup *ctx;
+ QGLSharedResourceGuard ctxGuard;
QGLShaderProgram *blitShaderProg;
QGLShaderProgram *simpleShaderProg;
QList<QGLEngineShaderProg> cachedPrograms;