From edcaa583aa9232f48c92d7c78a7b3e6c71212bc1 Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 5 Nov 2010 10:40:44 +0000 Subject: used official descriptor to QString conversion The OpenFileL code now uses qt_TDesC2QString to convert from the TFileName to a QString. Task-number: QTBUG-15015 Reviewed-by: Shane Kearns --- src/gui/s60framework/qs60maindocument.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/s60framework/qs60maindocument.cpp b/src/gui/s60framework/qs60maindocument.cpp index 071aa5b..95effbc 100644 --- a/src/gui/s60framework/qs60maindocument.cpp +++ b/src/gui/s60framework/qs60maindocument.cpp @@ -43,6 +43,7 @@ #include "qs60maindocument.h" #include "qcoreapplication.h" #include "qevent.h" +#include "private/qcore_symbian_p.h" #include @@ -114,7 +115,7 @@ CFileStore *QS60MainDocument::OpenFileL(TBool aDoOpen, const TDesC &aFilename, R { if (aDoOpen) { QCoreApplication* app = QCoreApplication::instance(); - QString qname((QChar*)aFilename.Ptr(), aFilename.Length()); + QString qname = qt_TDesC2QString(aFilename); QFileOpenEvent* event = new QFileOpenEvent(qname); app->postEvent(app, event); } @@ -129,7 +130,7 @@ void QS60MainDocument::OpenFileL(CFileStore *&aFileStore, RFile &aFile) QCoreApplication* app = QCoreApplication::instance(); TFileName name; aFile.FullName(name); - QString qname((QChar*)name.Ptr(), name.Length()); + QString qname = qt_TDesC2QString(name); QFileOpenEvent* event = new QFileOpenEvent(qname); app->postEvent(app, event); aFileStore = 0; -- cgit v0.12