qmake/generators/symbian/symbiancommon.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   144     return result;
   144     return result;
   145 }
   145 }
   146 
   146 
   147 void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
   147 void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
   148 {
   148 {
   149     // When modifying this method check also application_icon.prf
   149     // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
   150     str.replace(QString("/"), QString("_"));
   150     str.replace(QString("/"), QString("_"));
   151     str.replace(QString("\\"), QString("_"));
   151     str.replace(QString("\\"), QString("_"));
   152     str.replace(QString(" "), QString("_"));
   152     str.replace(QString(" "), QString("_"));
   153 }
   153 }
   154 
   154 
   155 void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
   155 void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
   156 {
   156 {
   157     // When modifying this method check also application_icon.prf
   157     // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
   158     str.replace(QString("-"), QString("_"));
   158     str.replace(QString("-"), QString("_"));
   159     str.replace(QString(":"), QString("_"));
   159     str.replace(QString(":"), QString("_"));
   160     str.replace(QString("."), QString("_"));
   160     str.replace(QString("."), QString("_"));
   161     removeSpecialCharacters(str);
   161     removeSpecialCharacters(str);
   162 }
   162 }
   169 }
   169 }
   170 
   170 
   171 void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocBuild)
   171 void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocBuild)
   172 {
   172 {
   173     QMakeProject *project = generator->project;
   173     QMakeProject *project = generator->project;
   174     QString pkgTarget = project->first("QMAKE_ORIG_TARGET");
       
   175     if (pkgTarget.isEmpty())
       
   176         pkgTarget = project->first("TARGET");
       
   177     pkgTarget = generator->unescapeFilePath(pkgTarget);
       
   178     pkgTarget = removePathSeparators(pkgTarget);
       
   179     QString pkgFilename = Option::output_dir + QLatin1Char('/') +
   174     QString pkgFilename = Option::output_dir + QLatin1Char('/') +
   180                           QString("%1_template.pkg").arg(pkgTarget);
   175                           QString("%1_template.pkg").arg(fixedTarget);
   181 
   176 
   182     QFile pkgFile(pkgFilename);
   177     QFile pkgFile(pkgFilename);
   183     if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
   178     if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
   184         PRINT_FILE_CREATE_ERROR(pkgFilename);
   179         PRINT_FILE_CREATE_ERROR(pkgFilename);
   185         return;
   180         return;
   186     }
   181     }
   187 
   182 
   188     QString stubPkgFileName = Option::output_dir + QLatin1Char('/') +
   183     QString stubPkgFileName = Option::output_dir + QLatin1Char('/') +
   189                           QString("%1_stub.pkg").arg(pkgTarget);
   184                           QString("%1_stub.pkg").arg(fixedTarget);
   190 
   185 
   191     QFile stubPkgFile(stubPkgFileName);
   186     QFile stubPkgFile(stubPkgFileName);
   192     if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
   187     if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
   193         PRINT_FILE_CREATE_ERROR(stubPkgFileName);
   188         PRINT_FILE_CREATE_ERROR(stubPkgFileName);
   194         return;
   189         return;
   208 
   203 
   209     QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);
   204     QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);
   210 
   205 
   211     // Header info
   206     // Header info
   212     QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2")
   207     QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2")
   213                                  .arg(pkgTarget).arg("pkg");
   208                                  .arg(fixedTarget).arg("pkg");
   214 
   209 
   215     QString headerComment = "; %1 generated by qmake at %2\n"
   210     QString headerComment = "; %1 generated by qmake at %2\n"
   216         "; This file is generated by qmake and should not be modified by the user\n"
   211         "; This file is generated by qmake and should not be modified by the user\n"
   217         ";\n\n";
   212         ";\n\n";
   218     t << headerComment.arg(pkgFilename).arg(dateStr);
   213     t << headerComment.arg(pkgFilename).arg(dateStr);
   267 
   262 
   268     t << languageRules.join("\n") << endl;
   263     t << languageRules.join("\n") << endl;
   269     tw << languageRules.join("\n") << endl;
   264     tw << languageRules.join("\n") << endl;
   270     ts << languageRules.join("\n") << endl;
   265     ts << languageRules.join("\n") << endl;
   271 
   266 
   272     // name of application, UID and version
   267     // Determine application version. If version has missing component values,
   273     QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
   268     // those will default to zero.
       
   269     // If VERSION is missing altogether or is invalid, use "1,0,0"
       
   270     QStringList verNumList = project->first("VERSION").split('.');
       
   271     uint major = 0;
       
   272     uint minor = 0;
       
   273     uint patch = 0;
       
   274     bool success = false;
       
   275 
       
   276     if (verNumList.size() > 0) {
       
   277         major = verNumList[0].toUInt(&success);
       
   278         if (success && verNumList.size() > 1) {
       
   279             minor = verNumList[1].toUInt(&success);
       
   280             if (success && verNumList.size() > 2) {
       
   281                 patch = verNumList[2].toUInt(&success);
       
   282             }
       
   283         }
       
   284     }
       
   285 
       
   286     QString applicationVersion("1,0,0");
       
   287     if (success)
       
   288         applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch);
       
   289 
       
   290     // Append package build version number if it is set
       
   291     QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version");
       
   292     if (!pkgBuildVersion.isEmpty()) {
       
   293         success = false;
       
   294         uint build = pkgBuildVersion.toUInt(&success);
       
   295         if (success && build < 100) {
       
   296             if (pkgBuildVersion.size() == 1)
       
   297                 pkgBuildVersion.prepend(QLatin1Char('0'));
       
   298             applicationVersion.append(pkgBuildVersion);
       
   299         } else {
       
   300             fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion));
       
   301         }
       
   302     }
       
   303 
       
   304     // Package header
   274     QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
   305     QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
   275     QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
   306     QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
   276 
   307 
   277     visualTarget = removePathSeparators(visualTarget);
   308     visualTarget = removePathSeparators(visualTarget);
   278     QString wrapperTarget = visualTarget + " installer";
   309     QString wrapperTarget = visualTarget + " installer";
   517 
   548 
   518         twf << wrapperStreamBuffer << endl;
   549         twf << wrapperStreamBuffer << endl;
   519 
   550 
   520         // Wrapped files deployment
   551         // Wrapped files deployment
   521         QString currentPath = qmake_getpwd();
   552         QString currentPath = qmake_getpwd();
   522         QString sisName = QString("%1.sis").arg(pkgTarget);
   553         QString sisName = QString("%1.sis").arg(fixedTarget);
   523         twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl;
   554         twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl;
   524 
   555 
   525         QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
   556         QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
   526         bootStrapPath.append("/smartinstaller.sis");
   557         bootStrapPath.append("/smartinstaller.sis");
   527         QFileInfo fi(generator->fileInfo(bootStrapPath));
   558         QFileInfo fi(generator->fileInfo(bootStrapPath));
   534     QString ret = file;
   565     QString ret = file;
   535 
   566 
   536     if (QDir::separator().unicode() != '/')
   567     if (QDir::separator().unicode() != '/')
   537         ret.replace(QDir::separator(), QLatin1Char('/'));
   568         ret.replace(QDir::separator(), QLatin1Char('/'));
   538 
   569 
   539     if (ret.indexOf(QLatin1Char('/')) > 0)
   570     if (ret.indexOf(QLatin1Char('/')) >= 0)
   540         ret.remove(0, ret.lastIndexOf(QLatin1Char('/')) + 1);
   571         ret.remove(0, ret.lastIndexOf(QLatin1Char('/')) + 1);
   541 
   572 
   542     return ret;
   573     return ret;
   543 }
   574 }
   544 
   575 
   557         t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
   588         t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
   558         t << "// * This file is generated by qmake and should not be modified by the" << endl;
   589         t << "// * This file is generated by qmake and should not be modified by the" << endl;
   559         t << "// * user." << endl;
   590         t << "// * user." << endl;
   560         t << "// ============================================================================" << endl;
   591         t << "// ============================================================================" << endl;
   561         t << endl;
   592         t << endl;
   562         t << "#include <" << fixedTarget << ".rsg>" << endl;
   593         t << "#include <" << fixedTarget.toLower() << ".rsg>" << endl;
   563         t << "#include <appinfo.rh>" << endl;
   594         t << "#include <appinfo.rh>" << endl;
   564         foreach(QString item, userItems[RSS_TAG_HEADER])
   595         foreach(QString item, userItems[RSS_TAG_HEADER])
   565             t << item << endl;
   596             t << item << endl;
   566         t << endl;
   597         t << endl;
   567         t << "UID2 KUidAppRegistrationResourceFile" << endl;
   598         t << "UID2 KUidAppRegistrationResourceFile" << endl;
   637 		//QTP:
   668 		//QTP:
   638 		//t << "#include \"" << fixedTarget << ".loc\"" << endl;
   669 		//t << "#include \"" << fixedTarget << ".loc\"" << endl;
   639 		//QTP:
   670 		//QTP:
   640 		
   671 		
   641         //QTP: loc change start
   672         //QTP: loc change start
   642         t << "#include <" << translationFileName << ".loc>" << endl;
   673         t << "#include <" << translationFileName.toLower() << ".loc>" << endl;
   643         //QTP: loc change end
   674         //QTP: loc change end
   644         t << endl;
   675         t << endl;
   645         t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
   676         t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
   646         t << "\t{" << endl;
   677         t << "\t{" << endl;
   647         t << "\tshort_caption = STRING_r_short_caption;" << endl;
   678         t << "\tshort_caption = STRING_r_short_caption;" << endl;
   772 
   803 
   773 //QTP: loc changes start
   804 //QTP: loc changes start
   774 
   805 
   775 void SymbianCommonGenerator::writeSymbianLocFile(QStringList &symbianLangCodes)
   806 void SymbianCommonGenerator::writeSymbianLocFile(QStringList &symbianLangCodes)
   776 {	
   807 {	
   777     QMakeProject *project = generator->project;
   808 	QMakeProject *project = generator->project;
   778 	QString filename(translationFileName); 
   809 	// Loop through all the languages and generate language specific loc files.
   779 	foreach(QString lang, symbianLangCodes) {
   810 	foreach(QString lang, symbianLangCodes) {
   780         
   811 		QString locFilename(translationFileName); //Use first entry from pro files TRANSLATIONS field as the name of the loc file.
   781 		QString tsFilename(filename);  
   812     locFilename.append("_"+lang+".loc");
   782 		QString language = qt2S60LangMapTable.key(lang, QString("en"));
   813     if (!project->first("SYMBIANLOCFILESDIR").isEmpty()) {    
   783 		tsFilename.append("_"+language+".ts");
   814         locFilename.insert(0, lang+"/");
   784 	
   815         locFilename.insert(0, project->first("SYMBIANLOCFILESDIR"));
   785 		tsFilename.insert(0, project->first("SYMBIANTRANSLATIONSRCDIR")); 	
   816     } else {	
   786 		
   817         locFilename.insert(0, "/epoc32/include/platform/mw/loc/"+lang+"/");
   787         QString locFilename(filename); 
   818     }
   788         locFilename.append("_"+lang+".loc");
   819     QString shortCaption;
   789         if (!project->first("SYMBIANLOCFILESDIR").isEmpty()) {    
   820     QString longCaption;
   790             locFilename.insert(0, lang+"/");
   821 
   791             locFilename.insert(0, project->first("SYMBIANLOCFILESDIR"));
   822 		QStringList translationFilenames = project->values("TRANSLATIONS");
   792         } else {	
   823 		//  Read captions from all the ts files that exist on pro file. Use the caption that is found first. Print warning notes from duplicates.
   793             locFilename.insert(0, "/epoc32/include/platform/mw/loc/"+lang+"/");
   824   	foreach (QString tsFilename, translationFilenames)    {
   794         }
   825 			// add the path and current language identification to ts name and search if txt_short_caption_ or txt_long_caption_ is present
   795                 
   826 			//QString tsFilename(tempfilename);  
   796         QString shortCaption;
   827     	if (!tsFilename.isEmpty()) {
   797         QString longCaption;
   828         tsFilename = generator->fileInfo(tsFilename).completeBaseName();
   798         
   829         tsFilename = generator->unescapeFilePath(tsFilename);
   799         // get captions from ts file
   830         tsFilename = removePathSeparators(tsFilename);
   800         QFile tsFile(tsFilename);
   831     	}
   801         if (tsFile.exists()) {
   832 			QString language = qt2S60LangMapTable.key(lang, QString("en"));
   802             if (tsFile.open(QIODevice::ReadOnly)) {
   833 			tsFilename.append("_"+language+".ts");
   803                 QString shortCaptionId = QLatin1String("txt_short_caption_");
   834 			tsFilename.insert(0, project->first("SYMBIANTRANSLATIONSRCDIR")); 	
   804                 QString longCaptionId = QLatin1String("txt_long_caption_");
   835       QFile tsFile(tsFilename);
   805                 QXmlStreamReader xml(&tsFile);
   836       if (tsFile.exists()) {
   806                 while (!xml.atEnd()) {
   837       	if (tsFile.open(QIODevice::ReadOnly)) {
   807                     xml.readNext();
   838         QString shortCaptionId = QLatin1String("txt_short_caption_");
   808                     if (xml.isStartElement() && xml.name() == "context") {
   839         QString longCaptionId = QLatin1String("txt_long_caption_");
   809                         while (!(xml.isEndElement() && xml.name() == "context") && !xml.atEnd()) {
   840         QXmlStreamReader xml(&tsFile);
   810                             xml.readNext();  
   841         while (!xml.atEnd()) {
   811                             if (xml.isStartElement() && xml.name() == "message" 
   842         	xml.readNext();
   812 							    && xml.attributes().value("numerus") == "no" 
   843           if (xml.isStartElement() && xml.name() == "context") {
   813 								&& xml.attributes().value("id").toString().left(shortCaptionId.length()) == shortCaptionId) {
   844           	while (!(xml.isEndElement() && xml.name() == "context") && !xml.atEnd()) {
   814                                 while (!(xml.isEndElement() && xml.name() == "message") && !xml.atEnd()) {
   845             	xml.readNext();  
   815                                     xml.readNext();
   846             	if (xml.isStartElement() && xml.name() == "message" 
   816                                     if (xml.isStartElement() && xml.name() == "translation") {
   847 							&& xml.attributes().value("numerus") == "no" 
   817                             		   shortCaption = xml.readElementText();
   848 							&& xml.attributes().value("id").toString().left(shortCaptionId.length()) == shortCaptionId) {
   818                                     }
   849             		while (!(xml.isEndElement() && xml.name() == "message") && !xml.atEnd()) {
   819                                 }
   850               	xml.readNext();
   820                             }
   851 	              	if (xml.isStartElement() && xml.name() == "translation") {
   821                             if (xml.isStartElement() && xml.name() == "message" 
   852 	               		if (shortCaption.isEmpty()){
   822 							    && xml.attributes().value("numerus") == "no" 
   853   	                	shortCaption = xml.readElementText();
   823 								&& xml.attributes().value("id").toString().left(longCaptionId.length()) == longCaptionId) {
   854     	              } else {
   824                                 while (!(xml.isEndElement() && xml.name() == "message") && !xml.atEnd()) {   
   855       	            	fprintf(stderr, "Duplicate short caption field found from: '%s'.\n", qPrintable(tsFilename));
   825                                     xml.readNext();
   856         	          }
   826                                     if (xml.isStartElement() && xml.name() == "translation") {
   857           	      }
   827                                         longCaption = xml.readElementText();
   858             	  }
   828                                     }
   859             	}
   829                                 }
   860             	if (xml.isStartElement() && xml.name() == "message" 
   830                             }
   861 							&& xml.attributes().value("numerus") == "no" 
   831                         }
   862 							&& xml.attributes().value("id").toString().left(longCaptionId.length()) == longCaptionId) {
   832                     }         
   863               	while (!(xml.isEndElement() && xml.name() == "message") && !xml.atEnd()) {   
       
   864                 	xml.readNext();
       
   865                   if (xml.isStartElement() && xml.name() == "translation" ) {
       
   866                   	if (longCaption.isEmpty()){
       
   867                     	longCaption = xml.readElementText();
       
   868                   	} else {
       
   869                   		fprintf(stderr, "Duplicate long caption field found from: '%s'.\n", qPrintable(tsFilename));
       
   870                     }
       
   871                   }
   833                 }
   872                 }
   834                 if (shortCaption.isEmpty()) {
   873               }
   835                     fprintf(stderr, "Short caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
   874            }
   836                 }
   875          }         
   837                 if (longCaption.isEmpty()) {
   876        }
   838                     fprintf(stderr, "Warning: STRING_r_caption not generated from file '%s'.\n", qPrintable(tsFilename));
   877        if (shortCaption.isEmpty()) {
   839                     fprintf(stderr, "       : caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
   878        	 fprintf(stderr, "Short caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
   840                 }
   879        }
   841                 if (xml.hasError())
   880        if (longCaption.isEmpty()) {
   842                     fprintf(stderr, "ERROR: \"%s\" when parsing ts file\n", qPrintable(xml.errorString()));
   881          fprintf(stderr, "Warning: STRING_r_caption not generated from file '%s'.\n", qPrintable(tsFilename));
   843             } else {
   882          fprintf(stderr, "       : caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
   844                 fprintf(stderr, "Could not open ts file (%s)\n", qPrintable(tsFilename));
   883        }
   845             }
   884        if (xml.hasError())
       
   885          fprintf(stderr, "ERROR: \"%s\" when parsing ts file\n", qPrintable(xml.errorString()));
       
   886        } else {
       
   887          fprintf(stderr, "Could not open ts file (%s)\n", qPrintable(tsFilename));
       
   888        }
       
   889      } else {
       
   890        fprintf(stderr, "Warning: ts file does not exist: (%s)\n", qPrintable(tsFilename));
       
   891        fprintf(stderr, "       : short and long caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
       
   892        }
       
   893     }
       
   894     // generate language specific caption loc file
       
   895     QFile ft(locFilename);
       
   896     if (ft.open(QIODevice::WriteOnly)) {
       
   897         generatedFiles << ft.fileName();
       
   898         QTextStream t(&ft);
       
   899         t << "// ============================================================================" << endl;
       
   900         t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
       
   901         t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
       
   902         t << "// * This file is generated by qmake and should not be modified by the" << endl;
       
   903         t << "// * user." << endl;
       
   904         t << "// ============================================================================" << endl;
       
   905         t << endl;
       
   906         t <<"CHARACTER_SET UTF8"<<endl;
       
   907         if (!shortCaption.isEmpty()) {
       
   908             t << "#define STRING_r_short_caption \"" << shortCaption  << "\"" << endl;    
   846         } else {
   909         } else {
   847             fprintf(stderr, "Warning: ts file does not exist: (%s)\n", qPrintable(tsFilename));
   910             t << "#define STRING_r_short_caption \"" "#"<< fixedTarget  << "\"" << endl;
   848             fprintf(stderr, "       : short and long caption generated from target name '#%s'.\n", qPrintable(fixedTarget));
   911         }    
   849         }
   912         if (!longCaption.isEmpty()) {
   850 
   913             t << "#define STRING_r_caption \"" << longCaption  << "\"" << endl;  
   851         // generate language specific caption loc file
   914         } else {    
   852         QFile ft(locFilename);
   915             t << "#define STRING_r_caption \"" "#"<< fixedTarget  << "\"" << endl;
   853         if (ft.open(QIODevice::WriteOnly)) {
   916         }
   854             generatedFiles << ft.fileName();
   917         ft.close();
   855             QTextStream t(&ft);
   918     } else {
   856             t << "// ============================================================================" << endl;
   919         PRINT_FILE_CREATE_ERROR(locFilename);	
   857             t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
   920     }
   858             t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
   921   }
   859             t << "// * This file is generated by qmake and should not be modified by the" << endl;
       
   860             t << "// * user." << endl;
       
   861             t << "// ============================================================================" << endl;
       
   862             t << endl;
       
   863             if (!shortCaption.isEmpty()) {
       
   864                 t << "#define STRING_r_short_caption \"" << shortCaption  << "\"" << endl;    
       
   865             } else {
       
   866                 t << "#define STRING_r_short_caption \"" "#"<< fixedTarget  << "\"" << endl;
       
   867             }    
       
   868             if (!longCaption.isEmpty()) {
       
   869                 t << "#define STRING_r_caption \"" << longCaption  << "\"" << endl;  
       
   870             } else {    
       
   871                 t << "#define STRING_r_caption \"" "#"<< fixedTarget  << "\"" << endl;
       
   872             }
       
   873             ft.close();
       
   874         } else {
       
   875             PRINT_FILE_CREATE_ERROR(locFilename);	
       
   876 	    }
       
   877     }
       
   878 }
   922 }
   879 //QTP: loc change ends
   923 //QTP: loc change ends
   880 
   924 
   881 void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
   925 void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
   882                                             QString &iconFile, QMap<QString,
   926                                             QString &iconFile, QMap<QString,
  1227 
  1271 
  1228 //QTP: loc change start
  1272 //QTP: loc change start
  1229 void SymbianCommonGenerator::modifyQt2S60LangMapTable()
  1273 void SymbianCommonGenerator::modifyQt2S60LangMapTable()
  1230 {
  1274 {
  1231     QMakeProject *project = generator->project;
  1275     QMakeProject *project = generator->project;
  1232 	QString systemLanguagesIniFile = project->first("SYMBIANTRANSLATIONDIR").
  1276 
  1233                                      append(QLatin1String("system_languages.ini"));
  1277     QString systemLanguagesIniFile("/epoc32/include/system_languages.ini");
       
  1278    
  1234     QFileInfo systemLangFileInfo(systemLanguagesIniFile);
  1279     QFileInfo systemLangFileInfo(systemLanguagesIniFile);
  1235     if (systemLangFileInfo.exists()) {
  1280     if (systemLangFileInfo.exists()) {
  1236         QSettings systemLanguages(systemLanguagesIniFile, QSettings::IniFormat);
  1281         QSettings systemLanguages(systemLanguagesIniFile, QSettings::IniFormat);
  1237         QStringList keys = systemLanguages.allKeys();
  1282         QStringList keys = systemLanguages.allKeys();
  1238         foreach (const QString &qtlang, keys){
  1283         foreach (const QString &qtlang, keys){