summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-10-05 13:46:47 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-10-05 13:46:47 (GMT)
commitad04d96fdac0fea252096d5144abf684516cbb10 (patch)
tree50e9defb39955db39116677f2eef3d72e8053a26 /tools
parent1200bf9f82860d2f391a4b68ce25c606eb9a0831 (diff)
parentbbaf34b1f5ac4e6d425eab183112b504b9ed4e83 (diff)
downloadQt-ad04d96fdac0fea252096d5144abf684516cbb10.zip
Qt-ad04d96fdac0fea252096d5144abf684516cbb10.tar.gz
Qt-ad04d96fdac0fea252096d5144abf684516cbb10.tar.bz2
Merge remote branch 'qt/master' into lighthouse-master
Conflicts: src/gui/painting/qpdf.cpp
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp84
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.h4
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp7
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.h1
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.cpp9
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.h2
-rw-r--r--tools/assistant/tools/assistant/main.cpp12
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp9
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h2
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.cpp22
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp13
-rw-r--r--tools/assistant/tools/qhelpgenerator/main.cpp2
-rw-r--r--tools/assistant/tools/shared/collectionconfiguration.cpp14
-rw-r--r--tools/assistant/tools/shared/collectionconfiguration.h4
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp4
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp2
-rw-r--r--tools/linguist/lconvert/main.cpp2
-rw-r--r--tools/linguist/lrelease/main.cpp4
-rw-r--r--tools/linguist/lupdate/main.cpp2
-rw-r--r--tools/qdoc3/generator.cpp35
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf4
-rw-r--r--tools/qml/browser/Browser.qml50
-rw-r--r--tools/qml/main.cpp5
-rw-r--r--tools/qml/qmlruntime.cpp1
-rw-r--r--tools/qml/startup/Logo.qml2
-rw-r--r--tools/qml/startup/startup.qml2
27 files changed, 234 insertions, 66 deletions
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index 1634a0d..8e8b278 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -215,37 +215,36 @@ private:
queryHist->curQuery += addend;
const QList<QHelpSearchQuery> &query =
- queryHist->queries.at(queryHist->curQuery);
+ queryHist->queries.at(queryHist->curQuery);
foreach (const QHelpSearchQuery &queryPart, query) {
- QLineEdit *lineEdit = 0;
- switch (queryPart.fieldName) {
+ if (QLineEdit *lineEdit = lineEditFor(queryPart.fieldName))
+ lineEdit->setText(queryPart.wordList.join(" "));
+ }
+
+ if (queryHist->curQuery == maxOrMinIndex)
+ thisButton->setEnabled(false);
+ otherButton->setEnabled(true);
+ }
+
+ QLineEdit* lineEditFor(const QHelpSearchQuery::FieldName &fieldName) const
+ {
+ switch (fieldName) {
case QHelpSearchQuery::DEFAULT:
- lineEdit = defaultQuery;
- break;
+ return defaultQuery;
case QHelpSearchQuery::ALL:
- lineEdit = allQuery;
- break;
+ return allQuery;
case QHelpSearchQuery::ATLEAST:
- lineEdit = atLeastQuery;
- break;
+ return atLeastQuery;
case QHelpSearchQuery::FUZZY:
- lineEdit = similarQuery;
- break;
+ return similarQuery;
case QHelpSearchQuery::WITHOUT:
- lineEdit = withoutQuery;
- break;
+ return withoutQuery;
case QHelpSearchQuery::PHRASE:
- lineEdit = exactQuery;
- break;
+ return exactQuery;
default:
Q_ASSERT(0);
- }
- lineEdit->setText(queryPart.wordList.join(" "));
}
-
- if (queryHist->curQuery == maxOrMinIndex)
- thisButton->setEnabled(false);
- otherButton->setEnabled(true);
+ return 0;
}
void enableOrDisableToolButtons()
@@ -512,8 +511,27 @@ QHelpSearchQueryWidget::~QHelpSearchQueryWidget()
}
/*!
+ Expands the search query widget so that the extended search fields are shown.
+*/
+void QHelpSearchQueryWidget::expandExtendedSearch()
+{
+ if (d->simpleSearch)
+ d->showHideAdvancedSearch();
+}
+
+/*!
+ Collapses the search query widget so that only the default search field is
+ shown.
+*/
+void QHelpSearchQueryWidget::collapseExtendedSearch()
+{
+ if (!d->simpleSearch)
+ d->showHideAdvancedSearch();
+}
+
+/*!
Returns a list of queries to use in combination with the search engines
- search(QList<QHelpSearchQuery> &query) function.
+ search(QList<QHelpSearchQuery> &queryList) function.
*/
QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
{
@@ -524,6 +542,28 @@ QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
}
/*!
+ Sets the QHelpSearchQueryWidget input fields to the values specified by
+ \a queryList search field name. Please note that one has to call the search
+ engine's search(QList<QHelpSearchQuery> &queryList) function to perform the
+ actual search.
+*/
+void QHelpSearchQueryWidget::setQuery(const QList<QHelpSearchQuery> &queryList)
+{
+ QList<QLineEdit *> lineEdits;
+ lineEdits << d->defaultQuery << d->allQuery << d->atLeastQuery
+ << d->similarQuery << d->withoutQuery << d->exactQuery;
+ foreach (QLineEdit *lineEdit, lineEdits)
+ lineEdit->clear();
+
+ const QLatin1String space(" ");
+ foreach (const QHelpSearchQuery &q, queryList) {
+ if (QLineEdit *lineEdit = d->lineEditFor(q.fieldName))
+ lineEdit->setText(lineEdit->text() + q.wordList.join(space) + space);
+ }
+ d->searchRequested();
+}
+
+/*!
\reimp
*/
void QHelpSearchQueryWidget::focusInEvent(QFocusEvent *focusEvent)
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.h b/tools/assistant/lib/qhelpsearchquerywidget.h
index 2afc4b4..f3c290f 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.h
+++ b/tools/assistant/lib/qhelpsearchquerywidget.h
@@ -68,7 +68,11 @@ public:
QHelpSearchQueryWidget(QWidget *parent = 0);
~QHelpSearchQueryWidget();
+ void expandExtendedSearch();
+ void collapseExtendedSearch();
+
QList<QHelpSearchQuery> query() const;
+ void setQuery(const QList<QHelpSearchQuery> &queryList);
Q_SIGNALS:
void search();
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/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp
index 8a5bb9c..ba54dd6 100644
--- a/tools/assistant/tools/assistant/helpenginewrapper.cpp
+++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp
@@ -693,6 +693,7 @@ void HelpEngineWrapper::setBrowserWritingSystem(QFontDatabase::WritingSystem sys
void HelpEngineWrapper::handleCurrentFilterChanged(const QString &filter)
{
+ TRACE_OBJ
const QString &filterToReport
= filter == Unfiltered ? TrUnfiltered : filter;
emit currentFilterChanged(filterToReport);
@@ -700,14 +701,22 @@ void HelpEngineWrapper::handleCurrentFilterChanged(const QString &filter)
bool HelpEngineWrapper::showTabs() const
{
+ TRACE_OBJ
return d->m_helpEngine->customValue(ShowTabsKey, false).toBool();
}
void HelpEngineWrapper::setShowTabs(bool show)
{
+ TRACE_OBJ
d->m_helpEngine->setCustomValue(ShowTabsKey, show);
}
+bool HelpEngineWrapper::fullTextSearchFallbackEnabled() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::fullTextSearchFallbackEnabled(*d->m_helpEngine);
+}
+
// -- TimeoutForwarder
TimeoutForwarder::TimeoutForwarder(const QString &fileName)
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.h b/tools/assistant/tools/assistant/helpenginewrapper.h
index 7349015..38bde9b 100644
--- a/tools/assistant/tools/assistant/helpenginewrapper.h
+++ b/tools/assistant/tools/assistant/helpenginewrapper.h
@@ -189,6 +189,8 @@ public:
static const QString TrUnfiltered;
+ bool fullTextSearchFallbackEnabled() const;
+
signals:
// For asynchronous doc updates triggered by external actions.
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 537f867..48469d4 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -119,7 +119,7 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
HelpEngineWrapper::instance(collectionFile);
BookmarkManager *bookMarkManager = BookmarkManager::instance();
- if (!initHelpDB()) {
+ if (!initHelpDB(!cmdLine->collectionFileGiven())) {
qDebug("Fatal error: Help engine initialization failed. "
"Error message was: %s\nAssistant will now exit.",
qPrintable(HelpEngineWrapper::instance().error()));
@@ -313,13 +313,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 ea4ebd6..9b4dbce 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/assistant/tools/assistant/remotecontrol.cpp b/tools/assistant/tools/assistant/remotecontrol.cpp
index 06e5602..51bc733 100644
--- a/tools/assistant/tools/assistant/remotecontrol.cpp
+++ b/tools/assistant/tools/assistant/remotecontrol.cpp
@@ -58,6 +58,7 @@
#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpIndexWidget>
+#include <QtHelp/QHelpSearchQueryWidget>
#ifdef Q_OS_WIN
# include "remotecontrol_win.h"
@@ -260,8 +261,25 @@ void RemoteControl::handleActivateKeywordCommand(const QString &arg)
m_activateKeyword = arg;
} else {
m_mainWindow->setIndexString(arg);
- if (!arg.isEmpty())
- helpEngine.indexWidget()->activateCurrentItem();
+ if (!arg.isEmpty()) {
+ if (!helpEngine.indexWidget()->currentIndex().isValid()
+ && helpEngine.fullTextSearchFallbackEnabled()) {
+ if (QHelpSearchEngine *se = helpEngine.searchEngine()) {
+ m_mainWindow->setSearchVisible(true);
+ if (QHelpSearchQueryWidget *w = se->queryWidget()) {
+ w->collapseExtendedSearch();
+ QList<QHelpSearchQuery> queryList;
+ queryList << QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
+ QStringList(arg));
+ w->setQuery(queryList);
+ se->search(queryList);
+ }
+ }
+ } else {
+ m_mainWindow->setIndexVisible(true);
+ helpEngine.indexWidget()->activateCurrentItem();
+ }
+ }
}
}
diff --git a/tools/assistant/tools/qcollectiongenerator/main.cpp b/tools/assistant/tools/qcollectiongenerator/main.cpp
index 46e301c..7abbad1 100644
--- a/tools/assistant/tools/qcollectiongenerator/main.cpp
+++ b/tools/assistant/tools/qcollectiongenerator/main.cpp
@@ -97,6 +97,10 @@ public:
QString cacheDirectory() const { return m_cacheDirectory; }
bool cacheDirRelativeToCollection() const { return m_cacheDirRelativeToCollection; }
+ bool fullTextSearchFallbackEnabled() const {
+ return m_enableFullTextSearchFallback;
+ }
+
private:
void raiseErrorWithLine();
void readConfig();
@@ -125,6 +129,7 @@ private:
QStringList m_filesToRegister;
QString m_cacheDirectory;
bool m_cacheDirRelativeToCollection;
+ bool m_enableFullTextSearchFallback;
};
void CollectionConfigReader::raiseErrorWithLine()
@@ -139,6 +144,7 @@ void CollectionConfigReader::readData(const QByteArray &contents)
m_enableAddressBar = true;
m_hideAddressBar = true;
m_enableDocumentationManager = true;
+ m_enableFullTextSearchFallback = false;
addData(contents);
while (!atEnd()) {
@@ -212,6 +218,9 @@ void CollectionConfigReader::readAssistantSettings()
attributes().value(QLatin1String("base"))
== QLatin1String("collection");
m_cacheDirectory = readElementText();
+ } else if (name() == QLatin1String("enableFullTextSearchFallback")) {
+ if (readElementText() == QLatin1String("true"))
+ m_enableFullTextSearchFallback = true;
} else {
raiseErrorWithLine();
}
@@ -354,6 +363,7 @@ int main(int argc, char *argv[])
bool showVersion = false;
QCoreApplication app(argc, argv);
+#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
QTranslator qt_helpTranslator;
@@ -366,6 +376,7 @@ int main(int argc, char *argv[])
app.installTranslator(&qtTranslator);
app.installTranslator(&qt_helpTranslator);
}
+#endif // Q_OS_WIN32
for (int i=1; i<argc; ++i) {
arg = QString::fromLocal8Bit(argv[i]);
@@ -511,6 +522,8 @@ int main(int argc, char *argv[])
!config.hideAddressBar());
CollectionConfiguration::setCreationTime(helpEngine,
QDateTime::currentDateTime().toTime_t());
+ CollectionConfiguration::setFullTextSearchFallbackEnabled(helpEngine,
+ config.fullTextSearchFallbackEnabled());
if (!config.applicationIcon().isEmpty()) {
QFile icon(absoluteFileName(basePath, config.applicationIcon()));
diff --git a/tools/assistant/tools/qhelpgenerator/main.cpp b/tools/assistant/tools/qhelpgenerator/main.cpp
index 637786c..5e20b4e 100644
--- a/tools/assistant/tools/qhelpgenerator/main.cpp
+++ b/tools/assistant/tools/qhelpgenerator/main.cpp
@@ -68,6 +68,7 @@ int main(int argc, char *argv[])
bool checkLinks = false;
QCoreApplication app(argc, argv);
+#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
QTranslator qt_helpTranslator;
@@ -80,6 +81,7 @@ int main(int argc, char *argv[])
app.installTranslator(&qtTranslator);
app.installTranslator(&qt_helpTranslator);
}
+#endif // Q_OS_WIN32
for (int i = 1; i < argc; ++i) {
arg = QString::fromLocal8Bit(argv[i]);
diff --git a/tools/assistant/tools/shared/collectionconfiguration.cpp b/tools/assistant/tools/shared/collectionconfiguration.cpp
index e3944b6..2272c64 100644
--- a/tools/assistant/tools/shared/collectionconfiguration.cpp
+++ b/tools/assistant/tools/shared/collectionconfiguration.cpp
@@ -71,6 +71,7 @@ namespace {
#endif
));
const QString WindowTitleKey(QLatin1String("WindowTitle"));
+ const QString FullTextSearchFallbackKey(QLatin1String("FullTextSearchFallback"));
} // anonymous namespace
const QString CollectionConfiguration::DefaultZoomFactor(QLatin1String("0.0"));
@@ -308,6 +309,19 @@ void CollectionConfiguration::copyConfiguration(const QHelpEngineCore &source,
setAboutTexts(target, aboutTexts(source));
setAboutImages(target, aboutImages(source));
setDefaultHomePage(target, defaultHomePage(source));
+ setFullTextSearchFallbackEnabled(target, fullTextSearchFallbackEnabled(source));
+}
+
+bool CollectionConfiguration:: fullTextSearchFallbackEnabled(
+ const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(FullTextSearchFallbackKey, false).toBool();
+}
+
+void CollectionConfiguration::setFullTextSearchFallbackEnabled(
+ QHelpEngineCore &helpEngine, bool on)
+{
+ helpEngine.setCustomValue(FullTextSearchFallbackKey, on);
}
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/shared/collectionconfiguration.h b/tools/assistant/tools/shared/collectionconfiguration.h
index b7bf247..aeb636f 100644
--- a/tools/assistant/tools/shared/collectionconfiguration.h
+++ b/tools/assistant/tools/shared/collectionconfiguration.h
@@ -136,6 +136,10 @@ public:
static const QDateTime lastRegisterTime(const QHelpEngineCore &helpEngine);
static void updateLastRegisterTime(QHelpEngineCore &helpEngine);
+ static bool fullTextSearchFallbackEnabled(const QHelpEngineCore &helpEngine);
+ static void setFullTextSearchFallbackEnabled(QHelpEngineCore &helpEngine,
+ bool on);
+
static const QString DefaultZoomFactor;
static const QString ListSeparator;
};
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 391bcf8..31c115a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2131,7 +2131,7 @@ bool Configure::checkAvailability(const QString &part)
available = findFile("BuildConsole.exe") && findFile("xgConsole.exe");
else if (part == "XMLPATTERNS")
available = dictionary.value("EXCEPTIONS") == "yes";
- } else if (part == "PHONON") {
+ else if (part == "PHONON") {
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
available = true;
} else {
@@ -2436,7 +2436,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 6cfc286..dee75c3 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/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index d691548..2e397ad 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -140,6 +140,7 @@ struct File
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
+#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
QString sysLocale = QLocale::system().name();
@@ -149,6 +150,7 @@ int main(int argc, char *argv[])
app.installTranslator(&translator);
app.installTranslator(&qtTranslator);
}
+#endif // Q_OS_WIN32
QStringList args = app.arguments();
QList<File> inFiles;
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp
index 19377ef..5e6edb4 100644
--- a/tools/linguist/lrelease/main.cpp
+++ b/tools/linguist/lrelease/main.cpp
@@ -191,6 +191,7 @@ int main(int argc, char **argv)
);
#else
QCoreApplication app(argc, argv);
+#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
QString sysLocale = QLocale::system().name();
@@ -200,7 +201,8 @@ int main(int argc, char **argv)
app.installTranslator(&translator);
app.installTranslator(&qtTranslator);
}
-#endif
+#endif // Q_OS_WIN32
+#endif // QT_BOOTSTRAPPED
ConversionData cd;
cd.m_verbose = true; // the default is true starting with Qt 4.2
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index d96e205..49906e0 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -412,6 +412,7 @@ static void processProjects(
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
+#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
QString sysLocale = QLocale::system().name();
@@ -421,6 +422,7 @@ int main(int argc, char **argv)
app.installTranslator(&translator);
app.installTranslator(&qtTranslator);
}
+#endif // Q_OS_WIN32
m_defaultExtensions = QLatin1String("java,jui,ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx,js,qs,qml");
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 b3bf764..af4bfe3 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -40,7 +40,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\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 UI's &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qtquick.html\">Device UIs &amp; 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" \
@@ -94,7 +94,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div id=\"list002\" class=\"list\">\n" \
" <ul id=\"ul002\" >\n" \
" <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UI's &amp; Qt Quick</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
diff --git a/tools/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml
index ff2bb47..ebed72f 100644
--- a/tools/qml/browser/Browser.qml
+++ b/tools/qml/browser/Browser.qml
@@ -39,12 +39,12 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
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;
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 78cd64d..00d43c1 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -89,6 +89,9 @@ QString warnings;
void showWarnings()
{
if (!warnings.isEmpty()) {
+ int argc = 0; char **argv = 0;
+ QApplication application(argc, argv); // QApplication() in main has been destroyed already.
+ Q_UNUSED(application)
QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings);
}
}
@@ -516,7 +519,7 @@ int main(int argc, char ** argv)
#if defined (Q_OS_WIN)
// Debugging output is not visible by default on Windows -
- // therefore show modal dialog with errors instad.
+ // therefore show modal dialog with errors instead.
atexit(showWarnings);
#endif
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index c59621a..5e169d8 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1532,6 +1532,7 @@ void QDeclarativeViewer::registerTypes()
if (!registered) {
// registering only for exposing the DeviceOrientation::Orientation enum
qmlRegisterUncreatableType<DeviceOrientation>("Qt",4,7,"Orientation","");
+ qmlRegisterUncreatableType<DeviceOrientation>("QtQuick",1,0,"Orientation","");
registered = true;
}
}
diff --git a/tools/qml/startup/Logo.qml b/tools/qml/startup/Logo.qml
index 8d9708d..aa5648f 100644
--- a/tools/qml/startup/Logo.qml
+++ b/tools/qml/startup/Logo.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Rectangle {
id: myApp
diff --git a/tools/qml/startup/startup.qml b/tools/qml/startup/startup.qml
index ddc7217..9ca50a3 100644
--- a/tools/qml/startup/startup.qml
+++ b/tools/qml/startup/startup.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import Qt 4.7
+import QtQuick 1.0
Rectangle {
id: treatsApp