diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-09-24 22:00:19 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-09-24 22:00:19 (GMT) |
commit | 81d25b1c69dc186eaa3d3993e74ae132cc8f582a (patch) | |
tree | 7034202e9b2108c2d0ced275448e8ececf816612 /tools | |
parent | 84d278501a19eaccf9a77cccd95ca5d17a2dcd2b (diff) | |
parent | f28d3e2f6c09abe7629779a8b10f3caa9007c468 (diff) | |
download | Qt-81d25b1c69dc186eaa3d3993e74ae132cc8f582a.zip Qt-81d25b1c69dc186eaa3d3993e74ae132cc8f582a.tar.gz Qt-81d25b1c69dc186eaa3d3993e74ae132cc8f582a.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
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 |
8 files changed, 26 insertions, 11 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); |