diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-09-28 11:06:54 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-09-28 11:06:54 (GMT) |
commit | ce1355dbb219688b1cb3c0b5539f40425a59ae84 (patch) | |
tree | bf2b244347977e663650e65116bf4740703f2b5e /tools | |
parent | b0792a5c548c600443edbeaa3c4b0612e0eb4045 (diff) | |
parent | 30c5f0d8cc52d0945256e91af85143629f85ff50 (diff) | |
download | Qt-ce1355dbb219688b1cb3c0b5539f40425a59ae84.zip Qt-ce1355dbb219688b1cb3c0b5539f40425a59ae84.tar.gz Qt-ce1355dbb219688b1cb3c0b5539f40425a59ae84.tar.bz2 |
Merge branch '4.7' into newSearch
Diffstat (limited to 'tools')
-rw-r--r-- | tools/assistant/tools/assistant/cmdlineparser.cpp | 7 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/cmdlineparser.h | 1 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/main.cpp | 12 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/mainwindow.cpp | 9 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/mainwindow.h | 2 | ||||
-rw-r--r-- | tools/configure/configure.pro | 2 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 2 | ||||
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp | 2 | ||||
-rw-r--r-- | tools/qdoc3/generator.cpp | 35 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-html-templates.qdocconf | 31 | ||||
-rw-r--r-- | tools/qml/browser/Browser.qml | 48 |
11 files changed, 86 insertions, 65 deletions
diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp index 1cf2915..181abe2 100644 --- a/tools/assistant/tools/assistant/cmdlineparser.cpp +++ b/tools/assistant/tools/assistant/cmdlineparser.cpp @@ -300,6 +300,13 @@ QString CmdLineParser::collectionFile() const return m_collectionFile; } +bool CmdLineParser::collectionFileGiven() const +{ + TRACE_OBJ + return m_arguments.contains(QLatin1String("-collectionfile"), + Qt::CaseInsensitive); +} + QUrl CmdLineParser::url() const { TRACE_OBJ diff --git a/tools/assistant/tools/assistant/cmdlineparser.h b/tools/assistant/tools/assistant/cmdlineparser.h index db66494..9fc36b3 100644 --- a/tools/assistant/tools/assistant/cmdlineparser.h +++ b/tools/assistant/tools/assistant/cmdlineparser.h @@ -61,6 +61,7 @@ public: void setCollectionFile(const QString &file); QString collectionFile() const; + bool collectionFileGiven() const; QString cloneFile() const; QUrl url() const; bool enableRemoteControl() const; diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index bb86bfe..e3eef34 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -420,16 +420,18 @@ int main(int argc, char *argv[]) cachedCollection.setCurrentFilter(cmd.currentFilter()); } - /* - * We need to be careful here: The main window has to be deleted before - * the help engine wrapper, which has to be deleted before the - * QApplication. - */ if (collectionFileGiven) cmd.setCollectionFile(cachedCollectionFile); + MainWindow *w = new MainWindow(&cmd); w->show(); a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); + + /* + * We need to be careful here: The main window has to be deleted before + * the help engine wrapper, which has to be deleted before the + * QApplication. + */ const int retval = a.exec(); delete w; HelpEngineWrapper::removeInstance(); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 65a58c0..68343a4 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -161,7 +161,7 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent) setupActions(); statusBar()->show(); - if (initHelpDB()) { + if (initHelpDB(!cmdLine->collectionFileGiven())) { setupFilterToolbar(); setupAddressToolbar(); @@ -281,13 +281,18 @@ void MainWindow::closeEvent(QCloseEvent *e) QMainWindow::closeEvent(e); } -bool MainWindow::initHelpDB() +bool MainWindow::initHelpDB(bool registerInternalDoc) { TRACE_OBJ HelpEngineWrapper &helpEngineWrapper = HelpEngineWrapper::instance(); if (!helpEngineWrapper.setupData()) return false; + if (!registerInternalDoc) { + if (helpEngineWrapper.defaultHomePage() == QLatin1String("help")) + helpEngineWrapper.setDefaultHomePage(QLatin1String("about:blank")); + return true; + } bool assistantInternalDocRegistered = false; QString intern(QLatin1String("com.trolltech.com.assistantinternal-")); foreach (const QString &ns, helpEngineWrapper.registeredDocumentations()) { diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h index 8219140..26726ee 100644 --- a/tools/assistant/tools/assistant/mainwindow.h +++ b/tools/assistant/tools/assistant/mainwindow.h @@ -121,7 +121,7 @@ private slots: void documentationUpdated(const QString &namespaceName); private: - bool initHelpDB(); + bool initHelpDB(bool registerInternalDoc); void setupActions(); void closeEvent(QCloseEvent *e); void activateDockWidget(QWidget *w); diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index 8a62fe1..810f006 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -1,5 +1,5 @@ TARGET = configure -DESTDIR = ../.. +DESTDIR = $$PWD/../.. # build directly in source dir CONFIG += console flat CONFIG -= moc qt diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 17bbadf..3808c4e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2421,7 +2421,7 @@ void Configure::generateBuildKey() + buildSymbianKey + "\"\n" "#else\n" // Debug builds - "# if (!QT_NO_DEBUG)\n" + "# if !defined(QT_NO_DEBUG)\n" "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" + build64Key.arg("debug") + "\"\n" "# else\n" diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index 5547761..794722e 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -724,7 +724,7 @@ SignalSlotEditorWindow::SignalSlotEditorWindow(QDesignerFormEditorInterface *cor | QAbstractItemView::EditKeyPressed); m_view->setRootIsDecorated(false); m_view->setTextElideMode (Qt::ElideMiddle); - connect(m_view, SIGNAL(activated(QModelIndex)), this, SLOT(updateUi())); + connect(m_view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(updateUi())); connect(m_view->header(), SIGNAL(sectionDoubleClicked(int)), m_view, SLOT(resizeColumnToContents(int))); QVBoxLayout *layout = new QVBoxLayout(this); diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 7f39be2..f1eaddc 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -981,23 +981,26 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker) NodeList nonreentrant; NodeList::ConstIterator c = innerNode->childNodes().begin(); while (c != innerNode->childNodes().end()) { - switch ((*c)->threadSafeness()) { - case Node::Reentrant: - reentrant.append(*c); - if (threadSafeness == Node::ThreadSafe) - exceptions = true; - break; - case Node::ThreadSafe: - threadsafe.append(*c); - if (threadSafeness == Node::Reentrant) + + if ((*c)->status() != Node::Obsolete){ + switch ((*c)->threadSafeness()) { + case Node::Reentrant: + reentrant.append(*c); + if (threadSafeness == Node::ThreadSafe) + exceptions = true; + break; + case Node::ThreadSafe: + threadsafe.append(*c); + if (threadSafeness == Node::Reentrant) + exceptions = true; + break; + case Node::NonReentrant: + nonreentrant.append(*c); exceptions = true; - break; - case Node::NonReentrant: - nonreentrant.append(*c); - exceptions = true; - break; - default: - break; + break; + default: + break; + } } ++c; } diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 0d6cb8d..47b1e5f 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -26,37 +26,6 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " </a></li>\n" \ " </ul>\n" \ " </div>\n" \ - " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \ - " <li><a href=\"#\">API Lookup</a> \n" \ - " <ul id=\"topmenuLook\"> \n" \ - " <li><a href=\"classes.html\">Class index</a></li> \n" \ - " <li><a href=\"functions.html\">Function index</a></li> \n" \ - " <li><a href=\"modules.html\">Modules</a></li> \n" \ - " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \ - " <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \ - " <li><a href=\"licensing.html\">Licenses and Credits</a></li> \n" \ - " </ul> \n" \ - " </li> \n" \ - " <li><a href=\"#\">Qt Topics</a> \n" \ - " <ul id=\"topmenuTopic\"> \n" \ - " <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \ - " <li><a href=\"qtquick.html\">Device UIs & Qt Quick</a></li> \n" \ - " <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \ - " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \ - " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \ - " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \ - " <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \ - " </ul> \n" \ - " </li> \n" \ - " <li><a href=\"#\">Examples</a> \n" \ - " <ul id=\"topmenuexample\"> \n" \ - " <li><a href=\"all-examples.html\">Examples</a></li> \n" \ - " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \ - " <li><a href=\"demos.html\">Demos</a></li> \n" \ - " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \ - " </ul> \n" \ - " </li> \n" \ - " </ul> \n" \ " </div>\n" \ " </div>\n" \ " <div class=\"wrapper\">\n" \ diff --git a/tools/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml index ff2bb47..279c42f 100644 --- a/tools/qml/browser/Browser.qml +++ b/tools/qml/browser/Browser.qml @@ -44,7 +44,7 @@ import Qt.labs.folderlistmodel 1.0 Rectangle { id: root - property bool keyPressed: false + property bool showFocusHighlight: false property variant folders: folders1 property variant view: view1 width: 320 @@ -95,6 +95,19 @@ Rectangle { view.focus = true; folders.folder = path; } + function keyPressed(key) { + switch (key) { + case Qt.Key_Up: + case Qt.Key_Down: + case Qt.Key_Left: + case Qt.Key_Right: + root.showFocusHighlight = true; + break; + default: + // do nothing + break; + } + } Component { id: folderDelegate @@ -113,6 +126,7 @@ Rectangle { Rectangle { id: highlight; visible: false anchors.fill: parent + color: palette.highlight gradient: Gradient { GradientStop { id: t1; position: 0.0; color: palette.highlight } GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } @@ -128,12 +142,16 @@ Rectangle { text: fileName anchors.leftMargin: 54 font.pixelSize: 32 - color: (wrapper.ListView.isCurrentItem && root.keyPressed) ? palette.highlightedText : palette.windowText + color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : palette.windowText elide: Text.ElideRight } MouseArea { id: mouseRegion anchors.fill: parent + onPressed: { + root.showFocusHighlight = false; + wrapper.ListView.view.currentIndex = index; + } onClicked: { if (folders == wrapper.ListView.view.model) launch() } } states: [ @@ -155,7 +173,15 @@ Rectangle { width: parent.width model: folders1 delegate: folderDelegate - highlight: Rectangle { color: palette.highlight; visible: root.keyPressed && view1.count != 0 } + highlight: Rectangle { + color: palette.highlight + visible: root.showFocusHighlight && view1.count != 0 + gradient: Gradient { + GradientStop { id: t1; position: 0.0; color: palette.highlight } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } + } + width: view1.currentItem.width + } highlightMoveSpeed: 1000 pressDelay: 100 focus: true @@ -186,7 +212,7 @@ Rectangle { NumberAnimation { properties: "x"; duration: 250 } } ] - Keys.onPressed: { root.keyPressed = true; } + Keys.onPressed: root.keyPressed(event.key) } ListView { @@ -197,7 +223,15 @@ Rectangle { width: parent.width model: folders2 delegate: folderDelegate - highlight: Rectangle { color: palette.highlight; visible: root.keyPressed && view2.count != 0 } + highlight: Rectangle { + color: palette.highlight + visible: root.showFocusHighlight && view2.count != 0 + gradient: Gradient { + GradientStop { id: t1; position: 0.0; color: palette.highlight } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } + } + width: view1.currentItem.width + } highlightMoveSpeed: 1000 pressDelay: 100 states: [ @@ -225,11 +259,11 @@ Rectangle { NumberAnimation { properties: "x"; duration: 250 } } ] - Keys.onPressed: { root.keyPressed = true; } + Keys.onPressed: root.keyPressed(event.key) } Keys.onPressed: { - root.keyPressed = true; + root.keyPressed(event.key); if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) { view.currentItem.launch(); event.accepted = true; |