diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-14 00:13:54 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-14 00:13:54 (GMT) |
commit | 78e4743fa1883153786bd46e6d29063839c8fe97 (patch) | |
tree | e8ff07eb16aeeef2cc8ceb3988139a5fec5276d6 /tools | |
parent | f4dc906af870b2ed0d1446bb223e70db31791e8b (diff) | |
parent | d012e5e808526e84507134656ca97c3884dae47b (diff) | |
download | Qt-78e4743fa1883153786bd46e6d29063839c8fe97.zip Qt-78e4743fa1883153786bd46e6d29063839c8fe97.tar.gz Qt-78e4743fa1883153786bd46e6d29063839c8fe97.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (25 commits)
run depend_command even if the binary has no absolute path
fix scaleFactor/totalScaleFactor in QPinchGestureRecognizer
Added velocity property to the QPanGesture.
Changed the speed property on QSwipeGesture to velocity
fix typos in comment
unbreak test
Don't add generic subdirs project twice.
Remove debug, quiet warnings.
Fix memory leaks and valgrind errors.
QStroker: Fix erroneous SvgMiterJoin behavior for parallel lines
Revert "Properly implement qobject_cast for const pointers."
Bearer management: Fix compilation with namespace.
fetch next token after class definition opening
delay next token fetching when opening namespace
don't let operator overloads confuse us
don't try to show source when no locations are given
Implement a private API for setting title widgets
Fix the bug for QSettings on Windows, to store qint32/quint32, qint64/quint64 in Windows registry.
fix CRLF
Added private API to install an x11EventFilter
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/linguist/mainwindow.cpp | 6 | ||||
-rw-r--r-- | tools/linguist/linguist/sourcecodeview.cpp | 2 | ||||
-rw-r--r-- | tools/linguist/lupdate/cpp.cpp | 19 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-html-templates.qdocconf | 2 |
4 files changed, 23 insertions, 6 deletions
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 265df05..18baa24 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -1522,7 +1522,7 @@ void MainWindow::selectedMessageChanged(const QModelIndex &sortedIndex, const QM } m_phraseView->setSourceText(-1, QString()); } - if (m) { + if (m && !m->fileName().isEmpty()) { if (hasFormPreview(m->fileName())) { m_sourceAndFormView->setCurrentWidget(m_formPreviewView); m_formPreviewView->setSourceContext(model, m); @@ -1577,7 +1577,7 @@ void MainWindow::updateTranslation(const QStringList &translations) return; m->setTranslations(translations); - if (hasFormPreview(m->fileName())) + if (!m->fileName().isEmpty() && hasFormPreview(m->fileName())) m_formPreviewView->setSourceContext(m_currentIndex.model(), m); updateDanger(m_currentIndex, true); @@ -1996,7 +1996,7 @@ void MainWindow::updateLatestModel(int model) if (m_currentIndex.isValid()) { if (MessageItem *item = m_dataModel->messageItem(m_currentIndex)) { - if (hasFormPreview(item->fileName())) + if (!item->fileName().isEmpty() && hasFormPreview(item->fileName())) m_formPreviewView->setSourceContext(model, item); if (enableRw && !item->isObsolete()) m_phraseView->setSourceText(model, item->text()); diff --git a/tools/linguist/linguist/sourcecodeview.cpp b/tools/linguist/linguist/sourcecodeview.cpp index b8dd9c0..d2eef56 100644 --- a/tools/linguist/linguist/sourcecodeview.cpp +++ b/tools/linguist/linguist/sourcecodeview.cpp @@ -64,7 +64,7 @@ void SourceCodeView::setSourceContext(const QString &fileName, const int lineNum m_fileToLoad.clear(); setToolTip(fileName); - if (fileName.isNull()) { + if (fileName.isEmpty()) { clear(); m_currentFileName.clear(); appendHtml(tr("<i>Source code not available</i>")); diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 970d44b..6ea7299 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -489,6 +489,7 @@ STRING(class); STRING(findMessage); STRING(friend); STRING(namespace); +STRING(operator); STRING(qtTrId); STRING(return); STRING(struct); @@ -753,6 +754,20 @@ uint CppParser::getToken() if (yyWord == strnamespace) return Tok_namespace; break; + case 'o': + if (yyWord == stroperator) { + // Operator overload declaration/definition. + // We need to prevent those characters from confusing the followup + // parsing. Actually using them does not add value, so just eat them. + while (isspace(yyCh)) + yyCh = getChar(); + while (yyCh == '+' || yyCh == '-' || yyCh == '*' || yyCh == '/' || yyCh == '%' + || yyCh == '=' || yyCh == '<' || yyCh == '>' || yyCh == '!' + || yyCh == '&' || yyCh == '|' || yyCh == '~' || yyCh == '^' + || yyCh == '[' || yyCh == ']') + yyCh = getChar(); + } + break; case 'q': if (yyWord == strqtTrId) return Tok_trid; @@ -1678,6 +1693,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) functionContextUnresolved.clear(); // Pointless prospectiveContext.clear(); pendingContext.clear(); + + yyTok = getToken(); } break; case Tok_namespace: @@ -1689,7 +1706,6 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) HashString ns = HashString(text); yyTok = getToken(); if (yyTok == Tok_LeftBrace) { - yyTok = getToken(); namespaceDepths.push(namespaces.count()); enterNamespace(&namespaces, ns); @@ -1697,6 +1713,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) functionContextUnresolved.clear(); prospectiveContext.clear(); pendingContext.clear(); + yyTok = getToken(); } else if (yyTok == Tok_Equals) { // e.g. namespace Is = OuterSpace::InnerSpace; QList<HashString> fullName; diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index dc56ac9..1203357 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -89,7 +89,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \ - " <li class=\"defaultLink\"><a href=\"qmlelements.html\">QML elements</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \ " </ul> \n" \ " </div>\n" \ " </div>\n" \ |