diff options
author | axis <qt-info@nokia.com> | 2010-03-11 09:15:55 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-03-11 09:42:47 (GMT) |
commit | a375537d32bc33ba1154ec132f99f5a779bce067 (patch) | |
tree | 3c23e3b2c44fb52d7d62036fe7dd793e589841e8 /tools/assistant | |
parent | 02f6da62a42bd1059eb0da091d1f46efbb919750 (diff) | |
parent | 1e9552f826c05bf9884fb2893dedca265ead363b (diff) | |
download | Qt-a375537d32bc33ba1154ec132f99f5a779bce067.zip Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.gz Qt-a375537d32bc33ba1154ec132f99f5a779bce067.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts:
mkspecs/common/symbian/symbian.conf
qmake/generators/makefile.h
qmake/project.cpp
src/3rdparty/webkit/WebCore/WebCore.pro
src/src.pro
Diffstat (limited to 'tools/assistant')
19 files changed, 54 insertions, 47 deletions
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp index 235f737..bd8dc20 100644 --- a/tools/assistant/lib/qhelpcollectionhandler.cpp +++ b/tools/assistant/lib/qhelpcollectionhandler.cpp @@ -114,6 +114,9 @@ bool QHelpCollectionHandler::openCollectionFile() return false; } + m_query.exec(QLatin1String("PRAGMA synchronous=OFF")); + m_query.exec(QLatin1String("PRAGMA cache_size=3000")); + m_query.exec(QLatin1String("SELECT COUNT(*) FROM sqlite_master WHERE TYPE=\'table\'" "AND Name=\'NamespaceTable\'")); m_query.next(); @@ -163,6 +166,9 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName) return false; } + copyQuery->exec(QLatin1String("PRAGMA synchronous=OFF")); + copyQuery->exec(QLatin1String("PRAGMA cache_size=3000")); + if (!createTables(copyQuery)) { emit error(tr("Cannot copy collection file: %1").arg(colFile)); return false; @@ -582,6 +588,8 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName) } QSqlQuery query(db); + db.exec(QLatin1String("PRAGMA synchronous=OFF")); + db.exec(QLatin1String("PRAGMA cache_size=3000")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS NameIndex ON IndexTable(Name)")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileNameIndex ON FileNameTable(Name)")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileIdIndex ON FileNameTable(FileId)")); diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp index 783f016..85bdd75 100644 --- a/tools/assistant/lib/qhelpgenerator.cpp +++ b/tools/assistant/lib/qhelpgenerator.cpp @@ -191,6 +191,9 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData, return false; } + d->query->exec(QLatin1String("PRAGMA synchronous=OFF")); + d->query->exec(QLatin1String("PRAGMA cache_size=3000")); + addProgress(1.0); createTables(); insertFileNotFoundFile(); diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp index d9dcec5..4baa376 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp @@ -586,7 +586,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, this->m_indexFilesFolder = indexFilesFolder; mutex.unlock(); - start(QThread::NormalPriority); + start(QThread::LowestPriority); } void QHelpSearchIndexWriter::optimizeIndex() diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp index cb3e49c..827d145 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp @@ -191,7 +191,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, this->m_collectionFile = collectionFile; this->m_indexFilesFolder = indexFilesFolder; - start(QThread::NormalPriority); + start(QThread::LowestPriority); } void QHelpSearchIndexWriter::run() diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp index 8e476d5..2f5489b 100644 --- a/tools/assistant/lib/qhelpsearchresultwidget.cpp +++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp @@ -304,7 +304,7 @@ private: last = resultLastToShow > count ? count : resultLastToShow; } } - hitsLabel->setText(QHelpSearchResultWidget::tr("%1 - %2 of %3 Hits").arg(first).arg(last).arg(count)); + hitsLabel->setText(QHelpSearchResultWidget::tr("%1 - %2 of %n Hits", 0, count).arg(first).arg(last)); } private: diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro index cd343bd..eb8cc51 100644 --- a/tools/assistant/tools/assistant/assistant.pro +++ b/tools/assistant/tools/assistant/assistant.pro @@ -30,8 +30,6 @@ HEADERS += aboutdialog.h \ filternamedialog.h \ helpenginewrapper.h \ helpviewer.h \ - helpviewer_qtb.h \ - helpviewer_qwv.h \ indexwindow.h \ installdialog.h \ mainwindow.h \ @@ -43,6 +41,11 @@ HEADERS += aboutdialog.h \ tracer.h \ xbelsupport.h \ ../shared/collectionconfiguration.h +contains(QT_CONFIG, webkit) { + HEADERS += helpviewer_qwv.h +} else { + HEADERS += helpviewer_qtb.h + } win32:HEADERS += remotecontrol_win.h SOURCES += aboutdialog.cpp \ @@ -59,8 +62,6 @@ SOURCES += aboutdialog.cpp \ filternamedialog.cpp \ helpenginewrapper.cpp \ helpviewer.cpp \ - helpviewer_qtb.cpp \ - helpviewer_qwv.cpp \ indexwindow.cpp \ installdialog.cpp \ main.cpp \ @@ -71,7 +72,12 @@ SOURCES += aboutdialog.cpp \ searchwidget.cpp \ topicchooser.cpp \ xbelsupport.cpp \ - ../shared/collectionconfiguration.cpp \ + ../shared/collectionconfiguration.cpp + contains(QT_CONFIG, webkit) { + SOURCES += helpviewer_qwv.cpp +} else { + SOURCES += helpviewer_qtb.cpp +} FORMS += bookmarkdialog.ui \ bookmarkmanagerwidget.ui \ diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp index 70f562e..b9a1b0e 100644 --- a/tools/assistant/tools/assistant/bookmarkmanager.cpp +++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp @@ -148,7 +148,7 @@ void BookmarkManager::takeBookmarksMenu(QMenu* menu) void BookmarkManager::addBookmark(const QString &title, const QString &url) { TRACE_OBJ - showBookmarkDialog(title.isEmpty() ? tr("Untiled") : title, + showBookmarkDialog(title.isEmpty() ? tr("Untitled") : title, url.isEmpty() ? QLatin1String("about:blank") : url); } diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index f56e9e3..2359479 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -43,12 +43,16 @@ #include "centralwidget.h" #include "findwidget.h" #include "helpenginewrapper.h" -#include "helpviewer_qtb.h" -#include "helpviewer_qwv.h" #include "searchwidget.h" #include "mainwindow.h" #include "../shared/collectionconfiguration.h" +#if defined(QT_NO_WEBKIT) +#include "helpviewer_qtb.h" +#else +#include "helpviewer_qwv.h" +#endif // QT_NO_WEBKIT + #include <QtCore/QTimer> #include <QtGui/QApplication> diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp index bbc0c37..b6c0beb 100644 --- a/tools/assistant/tools/assistant/cmdlineparser.cpp +++ b/tools/assistant/tools/assistant/cmdlineparser.cpp @@ -167,10 +167,10 @@ void CmdLineParser::handleCollectionFileOption() const QString &fileName = nextArg(); m_collectionFile = getFileName(fileName); if (m_collectionFile.isEmpty()) - m_error = tr("The collection file '%1' does not exist!"). + m_error = tr("The collection file '%1' does not exist."). arg(fileName); } else { - m_error = tr("Missing collection file!"); + m_error = tr("Missing collection file."); } } @@ -183,9 +183,9 @@ void CmdLineParser::handleShowUrlOption() if (url.isValid()) { m_url = url; } else - m_error = tr("Invalid URL '%1'!").arg(urlString); + m_error = tr("Invalid URL '%1'.").arg(urlString); } else { - m_error = tr("Missing URL!"); + m_error = tr("Missing URL."); } } @@ -223,7 +223,7 @@ void CmdLineParser::handleShowOrHideOrActivateOption(ShowState state) else m_error = tr("Unknown widget: %1").arg(widget); } else { - m_error = tr("Missing widget!"); + m_error = tr("Missing widget."); } } @@ -246,11 +246,11 @@ void CmdLineParser::handleRegisterOrUnregisterOption(RegisterState state) const QString &fileName = nextArg(); m_helpFile = getFileName(fileName); if (m_helpFile.isEmpty()) - m_error = tr("The Qt help file '%1' does not exist!").arg(fileName); + m_error = tr("The Qt help file '%1' does not exist.").arg(fileName); else m_register = state; } else { - m_error = tr("Missing help file!"); + m_error = tr("Missing help file."); } } @@ -260,7 +260,7 @@ void CmdLineParser::handleSetCurrentFilterOption() if (hasMoreArgs()) m_currentFilter = nextArg(); else - m_error = tr("Missing filter argument!"); + m_error = tr("Missing filter argument."); } QString CmdLineParser::getFileName(const QString &fileName) diff --git a/tools/assistant/tools/assistant/findwidget.cpp b/tools/assistant/tools/assistant/findwidget.cpp index 2e40ab0..60318d4 100644 --- a/tools/assistant/tools/assistant/findwidget.cpp +++ b/tools/assistant/tools/assistant/findwidget.cpp @@ -72,6 +72,7 @@ FindWidget::FindWidget(QWidget *parent) toolClose = setupToolButton(QLatin1String(""), resourcePath + QLatin1String("/closetab.png")); hboxLayout->addWidget(toolClose); + connect(toolClose, SIGNAL(clicked()), SLOT(hide())); editFind = new QLineEdit(this); hboxLayout->addWidget(editFind); diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp index e21e95d..41ad633 100644 --- a/tools/assistant/tools/assistant/helpenginewrapper.cpp +++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp @@ -167,6 +167,13 @@ HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile) HelpEngineWrapper::~HelpEngineWrapper() { TRACE_OBJ + const QStringList &namespaces = d->m_helpEngine->registeredDocumentations(); + foreach (const QString &nameSpace, namespaces) { + const QString &docFile + = d->m_helpEngine->documentationFileName(nameSpace); + d->m_qchWatcher->removePath(docFile); + } + delete d; } diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h index 0bfe904..9e8f5f4 100644 --- a/tools/assistant/tools/assistant/helpviewer.h +++ b/tools/assistant/tools/assistant/helpviewer.h @@ -53,7 +53,7 @@ class AbstractHelpViewer { public: AbstractHelpViewer(); - ~AbstractHelpViewer(); + virtual ~AbstractHelpViewer(); virtual QFont viewerFont() const = 0; virtual void setViewerFont(const QFont &font) = 0; diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.cpp b/tools/assistant/tools/assistant/helpviewer_qtb.cpp index bba2850..07b89eb 100644 --- a/tools/assistant/tools/assistant/helpviewer_qtb.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qtb.cpp @@ -40,8 +40,6 @@ ****************************************************************************/ #include "helpviewer_qtb.h" -#if defined(QT_NO_WEBKIT) - #include "centralwidget.h" #include "helpenginewrapper.h" #include "tracer.h" @@ -287,7 +285,3 @@ bool HelpViewer::eventFilter(QObject *obj, QEvent *event) return true; return QTextBrowser::eventFilter(obj, event); } - -QT_END_NAMESPACE - -#endif // QT_NO_WEBKIT diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.h b/tools/assistant/tools/assistant/helpviewer_qtb.h index 5b38870..a05782c 100644 --- a/tools/assistant/tools/assistant/helpviewer_qtb.h +++ b/tools/assistant/tools/assistant/helpviewer_qtb.h @@ -41,10 +41,6 @@ #ifndef HELPVIEWERQTB_H #define HELPVIEWERQTB_H -#include <QtCore/qglobal.h> - -#if defined(QT_NO_WEBKIT) - #include "helpviewer.h" #include <QtCore/QUrl> @@ -111,6 +107,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_WEBKIT - #endif // HELPVIEWERQTB_H diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index 9bb66e1..582d013 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -41,8 +41,6 @@ #include "helpviewer_qwv.h" -#if !defined(QT_NO_WEBKIT) - #include "centralwidget.h" #include "helpenginewrapper.h" #include "tracer.h" @@ -223,7 +221,7 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *, if (type == QWebPage::NavigationTypeLinkClicked && (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)) { - if (HelpViewer* viewer = centralWidget->newEmptyTab()) + if (centralWidget->newEmptyTab()) centralWidget->setSource(url); m_pressedButtons = Qt::NoButton; m_keyboardModifiers = Qt::NoModifier; @@ -385,5 +383,3 @@ void HelpViewer::setLoadFinished(bool ok) } QT_END_NAMESPACE - -#endif // !QT_NO_WEBKIT diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h index fbfbaac..41ee553 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.h +++ b/tools/assistant/tools/assistant/helpviewer_qwv.h @@ -42,10 +42,6 @@ #ifndef HELPVIEWERQWV_H #define HELPVIEWERQWV_H -#include <QtCore/qglobal.h> - -#if !defined(QT_NO_WEBKIT) - #include "helpviewer.h" #include <QtGui/QAction> @@ -120,6 +116,4 @@ private: QT_END_NAMESPACE -#endif // !QT_NO_WEBKIT - #endif // HELPVIEWERQWV_H diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 77e5e7c..51ea9f9 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -292,7 +292,7 @@ void setupTranslation(const QString &fileName, const QString &dir) QTranslator *translator = new QTranslator(QCoreApplication::instance()); if (translator->load(fileName, dir)) { QCoreApplication::installTranslator(translator); - } else { + } else if (!fileName.endsWith(QLatin1String("en_US"))) { qWarning("Could not load translation file %s in directory %s.", qPrintable(fileName), qPrintable(dir)); } diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 8096218..687e6bc 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -341,7 +341,7 @@ void MainWindow::lookForNewQtDocumentation() m_qtDocInstaller = new QtDocInstaller(qtDocInfos); connect(m_qtDocInstaller, SIGNAL(docsInstalled(bool)), this, - SLOT(qtDocumentationInstalled(bool))); + SLOT(qtDocumentationInstalled())); connect(m_qtDocInstaller, SIGNAL(qchFileNotFound(QString)), this, SLOT(resetQtDocInfo(QString))); connect(m_qtDocInstaller, SIGNAL(registerDocumentation(QString, QString)), @@ -351,7 +351,7 @@ void MainWindow::lookForNewQtDocumentation() m_qtDocInstaller->installDocs(); } -void MainWindow::qtDocumentationInstalled(bool newDocsInstalled) +void MainWindow::qtDocumentationInstalled() { TRACE_OBJ statusBar()->clearMessage(); diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h index 40ca624..8e4276d 100644 --- a/tools/assistant/tools/assistant/mainwindow.h +++ b/tools/assistant/tools/assistant/mainwindow.h @@ -112,7 +112,7 @@ private slots: void lookForNewQtDocumentation(); void indexingStarted(); void indexingFinished(); - void qtDocumentationInstalled(bool newDocsInstalled); + void qtDocumentationInstalled(); void registerDocumentation(const QString &component, const QString &absFileName); void resetQtDocInfo(const QString &component); |