summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-09 17:47:56 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-09 17:47:56 (GMT)
commit9227f8606c85ad9a472628a8a06c312452d69f14 (patch)
tree004e193bd008fb5bf3c33d128223f425a0e8d614 /tools
parente06d011cc08de370ece3b0c324b0a735a2625820 (diff)
parent0edda17e2edb4da968b026ac6658f740323d6dd5 (diff)
downloadQt-9227f8606c85ad9a472628a8a06c312452d69f14.zip
Qt-9227f8606c85ad9a472628a8a06c312452d69f14.tar.gz
Qt-9227f8606c85ad9a472628a8a06c312452d69f14.tar.bz2
Merge branch '4.7-cutoff' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7-cutoff' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (82 commits) Revert 12b6987031be9faee3886d7623888feb4e1762af Changed TEST_COMPILER from CC to CXX in configure script. doc: Fixed several qdoc errors. Carbon: Native filedialog does not apply filters on app-bundles Cocoa: Native filedialog does not apply filters on app-bundles Improve performance of QTimer::singleShot Add a benchmark comparing single shot timer with invokeMethod use Qt's private mac functions, reduce code redundancy Assistant: Fix compile warning for empty header. Doc: mark QEasingCurve support functions as new in 4.7. Modify the XML test suite not to use non-characters. Autotest: Fix failing QTextCodec tests Doc: mark methods as internal (as they were in previous releases) Doc: add image for Qt Quick to "What's New" page. qdoc: Clear a static multimap after each qdocconf file. qdoc: Added some debug output to track down a crash Fixed mouse wheel handling in scrollareas. Added two missing keys for X11 Carbon: usage of menu bars can cause exceptions to be thrown Mac: compile fix ...
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/assistant.pro16
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp8
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.cpp6
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.h6
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp6
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.h6
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp4
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h2
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp175
-rw-r--r--tools/qdoc3/generator.cpp1
-rw-r--r--tools/qdoc3/node.cpp13
-rw-r--r--tools/qdoc3/node.h1
12 files changed, 125 insertions, 119 deletions
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index ff0ecc5..bc4d495 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/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/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/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);
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp
index b08910a..ce18cb9 100644
--- a/tools/qdbus/qdbus/qdbus.cpp
+++ b/tools/qdbus/qdbus/qdbus.cpp
@@ -249,116 +249,123 @@ static QStringList readList(QStringList &args)
}
static int placeCall(const QString &service, const QString &path, const QString &interface,
- const QString &member, QStringList args, bool try_prop=true)
+ const QString &member, const QStringList& arguments, bool try_prop=true)
{
QDBusInterface iface(service, path, interface, connection);
// Don't check whether the interface is valid to allow DBus try to
// activate the service if possible.
+ QList<int> knownIds;
+ bool matchFound = false;
+ QStringList args = arguments;
QVariantList params;
if (!args.isEmpty()) {
const QMetaObject *mo = iface.metaObject();
QByteArray match = member.toLatin1();
match += '(';
- int midx = -1;
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
QMetaMethod mm = mo->method(i);
QByteArray signature = mm.signature();
- if (signature.startsWith(match)) {
- midx = i;
- break;
- }
+ if (signature.startsWith(match))
+ knownIds += i;
}
- if (midx == -1) {
- // Failed to set property after falling back?
- // Bail out without displaying an error
- if (!try_prop)
+
+ while (!matchFound) {
+ args = arguments; // reset
+ params.clear();
+ if (knownIds.isEmpty()) {
+ // Failed to set property after falling back?
+ // Bail out without displaying an error
+ if (!try_prop)
+ return 1;
+ if (try_prop && args.size() == 1) {
+ QStringList proparg;
+ proparg += interface;
+ proparg += member;
+ proparg += args.first();
+ if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Set", proparg, false))
+ return 0;
+ }
+ fprintf(stderr, "Cannot find '%s.%s' in object %s at %s\n",
+ qPrintable(interface), qPrintable(member), qPrintable(path),
+ qPrintable(service));
return 1;
- if (try_prop && args.size() == 1) {
- QStringList proparg;
- proparg += interface;
- proparg += member;
- proparg += args.first();
- if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Set", proparg, false))
- return 0;
}
- fprintf(stderr, "Cannot find '%s.%s' in object %s at %s\n",
- qPrintable(interface), qPrintable(member), qPrintable(path),
- qPrintable(service));
- return 1;
- }
- QMetaMethod mm = mo->method(midx);
- QList<QByteArray> types = mm.parameterTypes();
- for (int i = 0; i < types.count(); ++i) {
- if (types.at(i).endsWith('&')) {
- // reference (and not a reference to const): output argument
- // we're done with the inputs
- while (types.count() > i)
- types.removeLast();
- break;
+ QMetaMethod mm = mo->method(knownIds.takeFirst());
+ QList<QByteArray> types = mm.parameterTypes();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i).endsWith('&')) {
+ // reference (and not a reference to const): output argument
+ // we're done with the inputs
+ while (types.count() > i)
+ types.removeLast();
+ break;
+ }
}
- }
- for (int i = 0; !args.isEmpty() && i < types.count(); ++i) {
- int id = QVariant::nameToType(types.at(i));
- if (id == QVariant::UserType)
- id = QMetaType::type(types.at(i));
- Q_ASSERT(id);
-
- QVariant p;
- QString argument;
- if ((id == QVariant::List || id == QVariant::StringList)
- && args.at(0) == QLatin1String("("))
- p = readList(args);
- else
- p = argument = args.takeFirst();
-
- if (id == int(QMetaType::UChar)) {
- // special case: QVariant::convert doesn't convert to/from
- // UChar because it can't decide if it's a character or a number
- p = qVariantFromValue<uchar>(p.toUInt());
- } else if (id < int(QMetaType::User) && id != int(QVariant::Map)) {
- p.convert(QVariant::Type(id));
- if (p.type() == QVariant::Invalid) {
- fprintf(stderr, "Could not convert '%s' to type '%s'.\n",
- qPrintable(argument), types.at(i).constData());
- return 1 ;
- }
- } else if (id == qMetaTypeId<QDBusVariant>()) {
- QDBusVariant tmp(p);
- p = qVariantFromValue(tmp);
- } else if (id == qMetaTypeId<QDBusObjectPath>()) {
- QDBusObjectPath path(argument);
- if (path.path().isNull()) {
- fprintf(stderr, "Cannot pass argument '%s' because it is not a valid object path.\n",
- qPrintable(argument));
+ for (int i = 0; !args.isEmpty() && i < types.count(); ++i) {
+ int id = QVariant::nameToType(types.at(i));
+ if (id == QVariant::UserType)
+ id = QMetaType::type(types.at(i));
+ Q_ASSERT(id);
+
+ QVariant p;
+ QString argument;
+ if ((id == QVariant::List || id == QVariant::StringList)
+ && args.at(0) == QLatin1String("("))
+ p = readList(args);
+ else
+ p = argument = args.takeFirst();
+
+ if (id == int(QMetaType::UChar)) {
+ // special case: QVariant::convert doesn't convert to/from
+ // UChar because it can't decide if it's a character or a number
+ p = qVariantFromValue<uchar>(p.toUInt());
+ } else if (id < int(QMetaType::User) && id != int(QVariant::Map)) {
+ p.convert(QVariant::Type(id));
+ if (p.type() == QVariant::Invalid) {
+ fprintf(stderr, "Could not convert '%s' to type '%s'.\n",
+ qPrintable(argument), types.at(i).constData());
+ return 1 ;
+ }
+ } else if (id == qMetaTypeId<QDBusVariant>()) {
+ QDBusVariant tmp(p);
+ p = qVariantFromValue(tmp);
+ } else if (id == qMetaTypeId<QDBusObjectPath>()) {
+ QDBusObjectPath path(argument);
+ if (path.path().isNull()) {
+ fprintf(stderr, "Cannot pass argument '%s' because it is not a valid object path.\n",
+ qPrintable(argument));
+ return 1;
+ }
+ p = qVariantFromValue(path);
+ } else if (id == qMetaTypeId<QDBusSignature>()) {
+ QDBusSignature sig(argument);
+ if (sig.signature().isNull()) {
+ fprintf(stderr, "Cannot pass argument '%s' because it is not a valid signature.\n",
+ qPrintable(argument));
+ return 1;
+ }
+ p = qVariantFromValue(sig);
+ } else {
+ fprintf(stderr, "Sorry, can't pass arg of type '%s'.\n",
+ types.at(i).constData());
return 1;
}
- p = qVariantFromValue(path);
- } else if (id == qMetaTypeId<QDBusSignature>()) {
- QDBusSignature sig(argument);
- if (sig.signature().isNull()) {
- fprintf(stderr, "Cannot pass argument '%s' because it is not a valid signature.\n",
- qPrintable(argument));
- return 1;
- }
- p = qVariantFromValue(sig);
- } else {
- fprintf(stderr, "Sorry, can't pass arg of type '%s'.\n",
- types.at(i).constData());
+ params += p;
+ }
+ if (params.count() == types.count() && args.isEmpty())
+ matchFound = true;
+ else if (knownIds.isEmpty()) {
+ fprintf(stderr, "Invalid number of parameters\n");
return 1;
}
- params += p;
- }
- if (params.count() != types.count() || !args.isEmpty()) {
- fprintf(stderr, "Invalid number of parameters\n");
- return 1;
- }
- }
+ } // while (!matchFound)
+ } // if (!args.isEmpty()
QDBusMessage reply = iface.callWithArgumentList(QDBus::Block, member, params);
if (reply.type() == QDBusMessage::ErrorMessage) {
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index c8a39ef..80f7e45 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -226,6 +226,7 @@ void Generator::terminate()
imageFiles.clear();
imageDirs.clear();
outDir = "";
+ QmlClassNode::clear();
}
Generator *Generator::generatorForFormat(const QString& format)
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 5415559..d4e4196 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1284,6 +1284,15 @@ QmlClassNode::~QmlClassNode()
}
/*!
+ Clear the multimap so that subsequent runs don't try to use
+ nodes from a previous run.
+ */
+void QmlClassNode::clear()
+{
+ inheritedBy.clear();
+}
+
+/*!
The base file name for this kind of node has "qml_"
prepended to it.
@@ -1305,8 +1314,8 @@ QString QmlClassNode::fileBase() const
*/
void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
{
- //qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name();
inheritedBy.insert(base,sub);
+ qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name() << inheritedBy.size();
}
/*!
@@ -1318,7 +1327,7 @@ void QmlClassNode::subclasses(const QString& base, NodeList& subs)
if (inheritedBy.count(base) > 0) {
subs = inheritedBy.values(base);
qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base
- << "subs:" << subs.size();
+ << "subs:" << subs.size() << "total size:" << inheritedBy.size();
}
}
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index fd39698..1017813 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -385,6 +385,7 @@ class QmlClassNode : public FakeNode
virtual QString fileBase() const;
static void addInheritedBy(const QString& base, Node* sub);
static void subclasses(const QString& base, NodeList& subs);
+ static void clear();
public:
static bool qmlOnly;