diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-08 12:12:17 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-08 12:12:17 (GMT) |
commit | 21fef75cd50b00609a803f123cc27ad0ee9ba509 (patch) | |
tree | ca96462e89b9c4828c7792e62def95e77d69d277 /tools | |
parent | 11303c676166cda3aae33e7e97939e9d2942271f (diff) | |
parent | 61d1dcea0efa6b0809639b781bb49baf252b3aad (diff) | |
download | Qt-21fef75cd50b00609a803f123cc27ad0ee9ba509.zip Qt-21fef75cd50b00609a803f123cc27ad0ee9ba509.tar.gz Qt-21fef75cd50b00609a803f123cc27ad0ee9ba509.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/3rdparty/phonon/qt7/mediaobject.mm
src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
src/gui/text/qfontengine_win.cpp
tools/linguist/shared/cpp.cpp
Diffstat (limited to 'tools')
-rw-r--r-- | tools/assistant/lib/qhelpdbreader.cpp | 3 | ||||
-rw-r--r-- | tools/linguist/lupdate/cpp.cpp | 25 |
2 files changed, 23 insertions, 5 deletions
diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp index 76994a7..27bc4d7 100644 --- a/tools/assistant/lib/qhelpdbreader.cpp +++ b/tools/assistant/lib/qhelpdbreader.cpp @@ -92,6 +92,9 @@ bool QHelpDBReader::init() QSqlDatabase db = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), m_uniqueId); db.setDatabaseName(m_dbName); if (!db.open()) { + /*: The placeholders are: %1 - The name of the database which cannot be opened + %2 - The unique id for the connection + %3 - The actual error string */ m_error = tr("Cannot open database '%1' '%2': %3").arg(m_dbName, m_uniqueId, db.lastError().text()); QSqlDatabase::removeDatabase(m_uniqueId); return false; diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 9f28d1d..b9e8406 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -319,12 +319,27 @@ uint CppParser::getChar() if (yyInPos >= yyInStr.size()) return EOF; uint c = yyInStr[yyInPos++].unicode(); - if (c == '\\' && yyInPos < yyInStr.size() && yyInStr[yyInPos].unicode() == '\n') { - ++yyCurLineNo; - ++yyInPos; - continue; + if (c == '\\' && yyInPos < yyInStr.size()) { + if (yyInStr[yyInPos].unicode() == '\n') { + ++yyCurLineNo; + ++yyInPos; + continue; + } + if (yyInStr[yyInPos].unicode() == '\r') { + ++yyCurLineNo; + ++yyInPos; + if (yyInPos < yyInStr.size() && yyInStr[yyInPos].unicode() == '\n') + ++yyInPos; + continue; + } } - if (c == '\n') { + if (c == '\r') { + if (yyInPos < yyInStr.size() && yyInStr[yyInPos].unicode() == '\n') + ++yyInPos; + c = '\n'; + ++yyCurLineNo; + yyAtNewline = true; + } else if (c == '\n') { ++yyCurLineNo; yyAtNewline = true; } else if (c != ' ' && c != '\t' && c != '#') { |