summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/common/symbian/symbian.conf6
-rw-r--r--src/corelib/global/qglobal.h9
-rw-r--r--src/corelib/io/qprocess_symbian.cpp8
-rw-r--r--src/openvg/qpixmapdata_vg.cpp65
4 files changed, 48 insertions, 40 deletions
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 77b42a9..1d00b03 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -70,11 +70,15 @@ QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource -lfbscli -lbitgdi -lgdi
+QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon
+exists($${EPOCROOT}epoc32/include/platform/sgresource/sgimage.h) {
+ QMAKE_LIBS_OPENVG += -lsgresource
+}
+
contains(QMAKE_HOST.os,Windows) {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 82210f3..fcfeaf9 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -2414,12 +2414,15 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#define Q_SYMBIAN_FIXED_POINTER_CURSORS
#define Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
#define Q_SYMBIAN_WINDOW_SIZE_CACHE
-//enabling new graphics resources
-#define QT_SYMBIAN_SUPPORTS_SGIMAGE
#define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
+//enabling new graphics resources
+#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
+# define QT_SYMBIAN_SUPPORTS_SGIMAGE
+#endif
+
#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
-#define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+# define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
#endif
#endif
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index e37bdda..85c89d5 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -237,11 +237,15 @@ static void qt_create_symbian_commandline(const QStringList &arguments, QString
--i;
endQuote += QLatin1String("\\");
}
- commandLine += QLatin1String(" \"") + tmp.left(i) + endQuote;
+ commandLine += QLatin1String("\"") + tmp.left(i) + endQuote + QLatin1Char(' ');
} else {
- commandLine += QLatin1Char(' ') + tmp;
+ commandLine += tmp + QLatin1Char(' ');
}
}
+
+ // Chop the extra trailing space if any arguments were appended
+ if (arguments.size())
+ commandLine.chop(1);
}
static TInt qt_create_symbian_process(RProcess **proc, const QString &programName, const QStringList &arguments)
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 15a2712..cb5255d 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -45,10 +45,10 @@
#include "qvg_p.h"
#include "qvgimagepool_p.h"
-#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
#include <private/qt_s60_p.h>
#include <fbs.h>
-#include <graphics/sgimage.h>
+#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
+#include <sgresource/sgimage.h>
typedef EGLImageKHR (*pfnEglCreateImageKHR)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, EGLint*);
typedef EGLBoolean (*pfnEglDestroyImageKHR)(EGLDisplay, EGLImageKHR);
typedef VGImage (*pfnVgCreateEGLImageTargetKHR)(VGeglImageKHR);
@@ -473,23 +473,24 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
TInt err = 0;
- err = SgDriver::Open();
- if(err != KErrNone) {
+ RSgDriver driver;
+ err = driver.Open();
+ if (err != KErrNone) {
cleanup();
return;
}
- if(sgImage->IsNull()) {
+ if (sgImage->IsNull()) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
TSgImageInfo sgImageInfo;
err = sgImage->GetInfo(sgImageInfo);
- if(err != KErrNone) {
+ if (err != KErrNone) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -497,9 +498,9 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
pfnEglDestroyImageKHR eglDestroyImageKHR = (pfnEglDestroyImageKHR) eglGetProcAddress("eglDestroyImageKHR");
pfnVgCreateEGLImageTargetKHR vgCreateEGLImageTargetKHR = (pfnVgCreateEGLImageTargetKHR) eglGetProcAddress("vgCreateEGLImageTargetKHR");
- if(eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
+ if (eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -510,17 +511,17 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
(EGLClientBuffer)sgImage,
(EGLint*)KEglImageAttribs);
- if(eglGetError() != EGL_SUCCESS) {
+ if (eglGetError() != EGL_SUCCESS) {
cleanup();
- SgDriver::Close();
+ driver.Close();
return;
}
vgImage = vgCreateEGLImageTargetKHR(eglImage);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
cleanup();
eglDestroyImageKHR(QEglContext::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
return;
}
@@ -534,7 +535,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
setSerialNumber(++qt_vg_pixmap_serial);
// release stuff
eglDestroyImageKHR(QEglContext::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
@@ -592,29 +593,25 @@ void* QVGPixmapData::toNativeType(NativeType type)
if (type == QPixmapData::SgImage) {
toVGImage();
- if(!isValid() || vgImage == VG_INVALID_HANDLE)
+ if (!isValid() || vgImage == VG_INVALID_HANDLE)
return 0;
TInt err = 0;
- err = SgDriver::Open();
- if(err != KErrNone)
+ RSgDriver driver;
+ err = driver.Open();
+ if (err != KErrNone)
return 0;
TSgImageInfo sgInfo;
sgInfo.iPixelFormat = EUidPixelFormatARGB_8888_PRE;
sgInfo.iSizeInPixels.SetSize(w, h);
- sgInfo.iUsage = ESgUsageOpenVgImage | ESgUsageOpenVgTarget;
- sgInfo.iShareable = ETrue;
- sgInfo.iCpuAccess = ESgCpuAccessNone;
- sgInfo.iScreenId = KSgScreenIdMain; //KSgScreenIdAny;
- sgInfo.iUserAttributes = NULL;
- sgInfo.iUserAttributeCount = 0;
+ sgInfo.iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface;
RSgImage *sgImage = q_check_ptr(new RSgImage());
err = sgImage->Create(sgInfo, NULL, NULL);
- if(err != KErrNone) {
- SgDriver::Close();
+ if (err != KErrNone) {
+ driver.Close();
return 0;
}
@@ -622,8 +619,8 @@ void* QVGPixmapData::toNativeType(NativeType type)
pfnEglDestroyImageKHR eglDestroyImageKHR = (pfnEglDestroyImageKHR) eglGetProcAddress("eglDestroyImageKHR");
pfnVgCreateEGLImageTargetKHR vgCreateEGLImageTargetKHR = (pfnVgCreateEGLImageTargetKHR) eglGetProcAddress("vgCreateEGLImageTargetKHR");
- if(eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
- SgDriver::Close();
+ if (eglGetError() != EGL_SUCCESS || !eglCreateImageKHR || !eglDestroyImageKHR || !vgCreateEGLImageTargetKHR) {
+ driver.Close();
return 0;
}
@@ -633,17 +630,17 @@ void* QVGPixmapData::toNativeType(NativeType type)
EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)sgImage,
(EGLint*)KEglImageAttribs);
- if(eglGetError() != EGL_SUCCESS) {
+ if (eglGetError() != EGL_SUCCESS) {
sgImage->Close();
- SgDriver::Close();
+ driver.Close();
return 0;
}
VGImage dstVgImage = vgCreateEGLImageTargetKHR(eglImage);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
eglDestroyImageKHR(QEglContext::display(), eglImage);
sgImage->Close();
- SgDriver::Close();
+ driver.Close();
return 0;
}
@@ -651,14 +648,14 @@ void* QVGPixmapData::toNativeType(NativeType type)
vgImage, 0, 0,
w, h, VG_FALSE);
- if(vgGetError() != VG_NO_ERROR) {
+ if (vgGetError() != VG_NO_ERROR) {
sgImage->Close();
sgImage = 0;
}
// release stuff
vgDestroyImage(dstVgImage);
eglDestroyImageKHR(QEglContext::display(), eglImage);
- SgDriver::Close();
+ driver.Close();
return reinterpret_cast<void*>(sgImage);
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);