Changeset 846 for trunk/src/tools/uic/cpp/cppwriteicondata.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/tools/uic/cpp/cppwriteicondata.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 115 115 void WriteIconData::acceptImage(DomImage *image) 116 116 { 117 writeImage(output, option.indent, image); 117 // Limit line length when writing code. 118 writeImage(output, option.indent, true, image); 118 119 } 119 120 120 void WriteIconData::writeImage(QTextStream &output, const QString &indent, DomImage *image) 121 void WriteIconData::writeImage(QTextStream &output, const QString &indent, 122 bool limitXPM_LineLength, const DomImage *image) 121 123 { 122 124 QString img = image->attributeName() + QLatin1String("_data"); … … 134 136 int column = 0; 135 137 bool inQuote = false; 136 output << indent << "static const char* const " << img << "[] = { \n"; 138 output << indent << "/* XPM */\n" 139 << indent << "static const char* const " << img << "[] = { \n"; 137 140 while (baunzip[a] != '\"') 138 141 a++; … … 145 148 } 146 149 147 if (column++ >= 511 && inQuote) { 150 column++; 151 if (limitXPM_LineLength && column >= 512 && inQuote) { 148 152 output << "\"\n\""; // be nice with MSVC & Co. 149 153 column = 1;
Note:
See TracChangeset
for help on using the changeset viewer.