summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-10 18:58:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-10 18:58:48 (GMT)
commit0551521be2df929089f892dacce5bd64bc99096d (patch)
tree80ce18b7a620df94c2271beedb974271561bfba7 /tools
parent3dc18b19ee2a02b93cc509a9162bf0a3900c6fd0 (diff)
parente26cba5c15ae02ae0fba9b73ed90c9b1f7b5286b (diff)
downloadQt-0551521be2df929089f892dacce5bd64bc99096d.zip
Qt-0551521be2df929089f892dacce5bd64bc99096d.tar.gz
Qt-0551521be2df929089f892dacce5bd64bc99096d.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: 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 NTLM code: Save domain in different variable Update the error handling of invalid hostnames in QUrl. Remove unsupported code from qobject.h for MSVC < .NET 2003 Properly implement qobject_cast for const pointers. Revert "Doc: fixing page name bug caused by 07bbace404078dcfd82eff717daa97299b8ba52c changing qml elements page"
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/linguist/mainwindow.cpp6
-rw-r--r--tools/linguist/linguist/sourcecodeview.cpp2
-rw-r--r--tools/linguist/lupdate/cpp.cpp19
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
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" \