bool cTextureFont::Load( const Uint32& TexId, const std::string& CoordinatesDatPath ) { if ( FileSystem::FileExists( CoordinatesDatPath ) ) { cIOStreamFile IOS( CoordinatesDatPath, std::ios::in | std::ios::binary ); return LoadFromStream( TexId, IOS ); } else if ( cPackManager::instance()->FallbackToPacks() ) { std::string tPath( CoordinatesDatPath ); cPack * tPack = cPackManager::instance()->Exists( tPath ); if ( NULL != tPack ) { return LoadFromPack( TexId, tPack, tPath ); } } return false; }
// static bool WidgetUnzipUtilityS60::unzip(const QString& aFileName, const QString& aTempFilePath, unsigned long& size) { // Qt handles paths using /-separator so make sure that paths are in native format. QString fileName = QDir::toNativeSeparators(aFileName); QString tempFilePath = QDir::toNativeSeparators(aTempFilePath); // perform syncronous unzip TPtrC16 fName(reinterpret_cast<const TUint16*>(fileName.utf16())); TPtrC16 tPath(reinterpret_cast<const TUint16*>(tempFilePath.utf16())); WidgetUnzipUtilityS60* wUnzip = NULL; TRAP_IGNORE(wUnzip = WidgetUnzipUtilityS60::NewL(fName, tPath, EFalse)); if (wUnzip) { QEventLoop loop; while (wUnzip->RunUnzip()) { loop.processEvents(QEventLoop::AllEvents, 100); } size = wUnzip->size(); } delete wUnzip; return (size > 0); }