comparison tools/duic/d/dwriteinitialization.cpp @ 76:454e4b4beb59

duic: fix #4
author SokoL_SD
date Sun, 24 May 2009 11:24:57 +0000
parents d5a6b6269f44
children 3d465c0a4f98
comparison
equal deleted inserted replaced
75:44a75b467197 76:454e4b4beb59
730 if (const DomProperty *picon = attributes.value(QLatin1String("icon"))) { 730 if (const DomProperty *picon = attributes.value(QLatin1String("icon"))) {
731 icon += QLatin1String(", "); 731 icon += QLatin1String(", ");
732 icon += iconCall(picon); 732 icon += iconCall(picon);
733 } 733 }
734 734
735 m_output << m_option.indent << parentWidget << ".addTab(" << varName << icon << ", " << "QString());\n"; 735 m_output << m_option.indent << parentWidget << ".addTab(" << varName << icon << ", " << "\"\");\n";
736 736
737 m_refreshOut << m_option.indent << parentWidget << ".setTabText(" 737 m_refreshOut << m_option.indent << parentWidget << ".setTabText("
738 << parentWidget << ".indexOf(" << varName << "), " << trCall(title) << ");\n"; 738 << parentWidget << ".indexOf(" << varName << "), " << trCall(title) << ");\n";
739 739
740 #ifndef QT_NO_TOOLTIP 740 #ifndef QT_NO_TOOLTIP
2006 iconValue = iconCall(icon); 2006 iconValue = iconCall(icon);
2007 2007
2008 m_output << m_option.indent << varName << ".addItem("; 2008 m_output << m_option.indent << varName << ".addItem(";
2009 if (icon) 2009 if (icon)
2010 m_output << iconValue << ", "; 2010 m_output << iconValue << ", ";
2011 m_output << "QString());\n"; 2011 m_output << "\"\");\n";
2012 2012
2013 if (!toString(text->elementString()).isEmpty()) 2013 if (!toString(text->elementString()).isEmpty())
2014 m_refreshOut << m_option.indent << varName << ".setItemText(" << i << ", " << trCall(text->elementString()) << ");\n"; 2014 m_refreshOut << m_option.indent << varName << ".setItemText(" << i << ", " << trCall(text->elementString()) << ");\n";
2015 } 2015 }
2016 m_refreshOut << "\n"; 2016 m_refreshOut << "\n";
2267 } 2267 }
2268 2268
2269 QString WriteInitialization::trCall(const QString &str, const QString &commentHint) const 2269 QString WriteInitialization::trCall(const QString &str, const QString &commentHint) const
2270 { 2270 {
2271 if (str.isEmpty()) 2271 if (str.isEmpty())
2272 return QLatin1String("QString()"); 2272 return QLatin1String("\"\"");
2273 2273
2274 QString result; 2274 QString result;
2275 const QString comment = commentHint.isEmpty() ? QString("null") : fixString(commentHint, m_option.indent); 2275 const QString comment = commentHint.isEmpty() ? QString("null") : fixString(commentHint, m_option.indent);
2276 2276
2277 if (m_option.translateFunction.isEmpty()) { 2277 if (m_option.translateFunction.isEmpty()) {