diff options
author | Roman Lacko <backup.rlacko@gmail.com> | 2012-01-10 16:47:15 +0100 |
---|---|---|
committer | Roman Lacko <backup.rlacko@gmail.com> | 2012-01-10 16:47:15 +0100 |
commit | d085b29e937441d949c4918d7fab915dd6fcf90b (patch) | |
tree | 740352f84a4216bb91d5470a536b238f39415f43 /pylupdate | |
parent | e9df59462198429d2bac013028b72393a233a126 (diff) |
rcc - fix problem with non-utf8 characters in header + pysideuic - py3k port. Original author Miroslav Jezek.
Diffstat (limited to 'pylupdate')
-rw-r--r-- | pylupdate/main.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/pylupdate/main.cpp b/pylupdate/main.cpp index 8bcb15b..453f41e 100644 --- a/pylupdate/main.cpp +++ b/pylupdate/main.cpp @@ -101,34 +101,6 @@ static void updateTsFiles( const MetaTranslator& fetchedTor, } } -/* The filename may contain double quotes when passing filenames with - * whitespaces. So we need to make it proper to be called with fopen() - * function. Handle them properly. -*/ -static inline const QStringList parseFileNames(const QString& line) -{ - QStringList retval; - - QString s; - unsigned int count = 0; - foreach(QChar c, line) { - if (c == '"') { /* we're still walking through the path... */ - count++; - } else if (c.isSpace() && !(count % 2)) { /* path is done! */ - /* append it to our list */ - retval << s; - s.clear(); - } else { - s += c; - } - } - - if (s.size()) - retval << s; /* append the last path to our list */ - - return retval; -} - int main( int argc, char **argv ) { QString defaultContext = "@default"; @@ -208,9 +180,9 @@ int main( int argc, char **argv ) QMap<QString, QString>::Iterator it; for ( it = tagMap.begin(); it != tagMap.end(); ++it ) { - QStringList toks = parseFileNames(it.value()); - + QStringList toks = it.value().split(' '); QStringList::Iterator t; + for ( t = toks.begin(); t != toks.end(); ++t ) { if ( it.key() == "SOURCES" ) { fetchtr_py( (*t).toAscii(), &fetchedTor, defaultContext.toAscii(), true, codecForSource ); |