* qt/: Update to Subversion r548032.

This includes a big reorganisation of the files inside the
	subdir.

We really need a version control system that supports moving of
files. I'm not bothering with history anyways anymore, since the
bindings will be moved out to git. The history should be restored from
Subversion when that happens.
This commit is contained in:
Thiago Macieira 2006-06-04 15:52:05 +00:00
parent 435c7af9b6
commit edbf2bfc10
54 changed files with 66943 additions and 122 deletions

View file

@ -1,3 +1,9 @@
2006-06-04 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/: Update to Subversion r548032.
This includes a big reorganisation of the files inside the
subdir.
2006-05-30 Sjoerd Simons <sjoerd@luon.net>
* dbus/dbus-sysdeps.c: Make tcp socket connection error somewhat more

View file

@ -23,14 +23,14 @@ PROJECT_NAME = QtDBus
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.60
PROJECT_NUMBER = 0.62
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = ../doc/api
OUTPUT_DIRECTORY = doc/api
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@ -287,7 +287,7 @@ HIDE_IN_BODY_DOCS = NO
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
INTERNAL_DOCS = YES
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
# file names in lower-case letters. If set to YES upper-case letters are also
@ -459,7 +459,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = .
INPUT = src
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@ -512,14 +512,13 @@ EXCLUDE_PATTERNS = Makefile.* \
magic \
NOTES \
TODO \
THANKS \
*_p.h
THANKS
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH =
EXAMPLE_PATH = examples
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@ -1029,7 +1028,8 @@ PREDEFINED = DBUS_BEGIN_DECLS= \
DOXYGEN_SHOULD_SKIP_THIS \
_DBUS_DEFINE_GLOBAL_LOCK(name)= \
_DBUS_GNUC_PRINTF(from,to)= \
Q_DECLARE_FLAGS(flags,theenum)=
Q_DECLARE_FLAGS(flags,theenum)= \
Q_QDOC
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
@ -1065,7 +1065,7 @@ SKIP_FUNCTION_MACROS = YES
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
TAGFILES = /home/tjmaciei/troll/qt-4.1/doc/qt.tag=http://doc.trolltech.com/4.1
TAGFILES = ./qt.tag=http://doc.trolltech.com/4.1
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.

View file

@ -1,80 +1,7 @@
SUBDIRS = . examples
DIST_SUBDIRS = src tools examples
if HAVE_QT
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
lib_LTLIBRARIES=libdbus-qt4-1.la
dbusincludedir=$(includedir)/dbus-1.0/dbus
dbusinclude_HEADERS= \
qdbusbus.h \
qdbusmacros.h \
qdbuserror.h \
qdbusmessage.h \
qdbusserver.h \
qdbusconnection.h \
qdbusabstractinterface.h \
qdbusinterface.h \
qdbusutil.h \
qdbusabstractadaptor.h \
qdbusreply.h \
qdbustypehelper_p.h
noinst_HEADERS= \
qdbusabstractadaptor_p.h \
qdbusabstractinterface_p.h \
qdbusconnection_p.h \
qdbusinterface_p.h \
qdbusintrospection_p.h \
qdbusmarshall_p.h \
qdbusmessage_p.h \
qdbusmetaobject_p.h \
qdbustype_p.h \
qdbusxmlparser_p.h
libdbus_qt4_1_la_SOURCES = \
qdbusbus.cpp \
qdbusconnection.cpp \
qdbuserror.cpp \
qdbusintegrator.cpp \
qdbusmarshall.cpp \
qdbusmessage.cpp \
qdbusserver.cpp \
qdbustype.cpp \
qdbusabstractinterface.cpp \
qdbusinterface.cpp \
qdbusxmlparser.cpp \
qdbusutil.cpp \
qdbusintrospection.cpp \
qdbusabstractadaptor.cpp \
qdbusthread.cpp \
qdbusinternalfilters.cpp \
qdbusmetaobject.cpp \
qdbusmisc.cpp \
qdbusxmlgenerator.cpp
bin_PROGRAMS = dbusidl2cpp dbuscpp2xml
dbusidl2cpp_SOURCES = dbusidl2cpp.cpp
dbusidl2cpp_LDFLAGS = -no-undefined
dbusidl2cpp_LDADD = $(DBUS_QT_LIBS) libdbus-qt4-1.la
dbuscpp2xml_SOURCES = dbuscpp2xml.cpp
dbuscpp2xml_LDFLAGS = -no-undefined
dbuscpp2xml_LDADD = $(DBUS_QT_LIBS) libdbus-qt4-1.la
qdbusabstractadaptor.lo: qdbusabstractadaptor.moc qdbusabstractadaptor_p.moc
qdbusabstractinterface.lo: qdbusabstractinterface.moc
qdbusbus.lo: qdbusbus.moc
qdbusserver.lo: qdbusserver.moc
qdbusintegrator.lo: qdbusconnection_p.moc
CLEANFILES=qdbusabstractadaptor.moc qdbusserver.moc qdbusconnection_p.moc qdbusconnection_p.moc qdbusabstractadaptor_p.moc qdbusbus.moc qdbusabstractinterface.moc
libdbus_qt4_1_la_LIBADD= $(DBUS_QT_LIBS) $(top_builddir)/dbus/libdbus-1.la
libdbus_qt4_1_la_LDFLAGS= -version-info 1:0 -no-undefined
libdbus_qt4_1_la_CPPFLAGS= -DQDBUS_MAKEDLL
EXTRA_DIST = qt-dbus.qdocconf
%.moc: %.h
$(QT_MOC) $< > $@
QT_SUBDIRS = src tools examples
endif
SUBDIRS = $(QT_SUBDIRS)

View file

@ -1,6 +1,5 @@
if HAVE_QT
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
LDADD = ../libdbus-qt4-1.la
INCLUDES=-I$(top_srcdir)/qt $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
LDADD = ../src/libdbus-qt4-1.la
if HAVE_QT_GUI
chat_LDADD = $(LDADD) $(DBUS_QT_GUI_LIBS)
@ -10,7 +9,7 @@ chat.o: chatmainwindow.h chatsetnickname.h chatinterface.h chatadaptor.h chat.mo
chatmainwindow.h: chatmainwindow.ui
chatsetnickname.h: chatsetnickname.ui
chatinterface.cpp chatinterface.h: com.trolltech.ChatInterface.xml
../dbusidl2cpp -m -p chatinterface $?
../tools/dbusidl2cpp -m -p chatinterface $?
$(QT_MOC) -o chatinterface.moc chatinterface.h
CHAT=chat
@ -41,5 +40,4 @@ CLEANFILES = chat.moc chatadaptor.moc complexping.moc complexpong.moc pong.moc \
$(QT_MOC) $< > $@
%.h: %.ui
$(QT_UIC) -o $@ $?
endif

View file

@ -28,7 +28,7 @@ class Pong: public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
Q_PROPERTY(QString value READ value WRITE setValue);
Q_PROPERTY(QString value READ value WRITE setValue)
public:
QString m_value;
QString value() const;

66720
qt/qt.tag Normal file

File diff suppressed because it is too large Load diff

11
qt/src/.cvsignore Normal file
View file

@ -0,0 +1,11 @@
.deps
.libs
Makefile
Makefile.in
*.lo
*.la
*.bb
*.bbg
*.da
*.gcov
*.moc

70
qt/src/Makefile.am Normal file
View file

@ -0,0 +1,70 @@
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
lib_LTLIBRARIES=libdbus-qt4-1.la
dbusincludedir=$(includedir)/dbus-1.0/dbus
dbusinclude_HEADERS= \
qdbusbus.h \
qdbusmacros.h \
qdbuserror.h \
qdbusmessage.h \
qdbusserver.h \
qdbusconnection.h \
qdbusabstractinterface.h \
qdbusinterface.h \
qdbusutil.h \
qdbusabstractadaptor.h \
qdbusreply.h \
qdbustypehelper_p.h
noinst_HEADERS= \
qdbusabstractadaptor_p.h \
qdbusabstractinterface_p.h \
qdbusconnection_p.h \
qdbusinterface_p.h \
qdbusintrospection_p.h \
qdbusmarshall_p.h \
qdbusmessage_p.h \
qdbusmetaobject_p.h \
qdbustype_p.h \
qdbusxmlparser_p.h
MOCS = qdbusabstractadaptor.moc qdbusserver.moc qdbusconnection_p.moc qdbusconnection_p.moc qdbusabstractadaptor_p.moc qdbusbus.moc qdbusabstractinterface.moc
CLEANFILES = $(MOCS)
BUILT_SOURCES = $(MOCS)
libdbus_qt4_1_la_SOURCES = \
qdbusbus.cpp \
qdbusconnection.cpp \
qdbuserror.cpp \
qdbusintegrator.cpp \
qdbusmarshall.cpp \
qdbusmessage.cpp \
qdbusserver.cpp \
qdbustype.cpp \
qdbusabstractinterface.cpp \
qdbusinterface.cpp \
qdbusxmlparser.cpp \
qdbusutil.cpp \
qdbusintrospection.cpp \
qdbusabstractadaptor.cpp \
qdbusthread.cpp \
qdbusinternalfilters.cpp \
qdbusmetaobject.cpp \
qdbusmisc.cpp \
qdbusxmlgenerator.cpp
qdbusabstractadaptor.lo: qdbusabstractadaptor.moc qdbusabstractadaptor_p.moc
qdbusabstractinterface.lo: qdbusabstractinterface.moc
qdbusbus.lo: qdbusbus.moc
qdbusserver.lo: qdbusserver.moc
qdbusintegrator.lo: qdbusconnection_p.moc
libdbus_qt4_1_la_LIBADD= $(DBUS_QT_LIBS) $(top_builddir)/dbus/libdbus-1.la
libdbus_qt4_1_la_LDFLAGS= -version-info 1:0 -no-undefined
libdbus_qt4_1_la_CPPFLAGS= -DQDBUS_MAKEDLL
EXTRA_DIST = qt-dbus.qdocconf
%.moc: %.h
$(QT_MOC) $< > $@

52
qt/src/qdbus.h Normal file
View file

@ -0,0 +1,52 @@
/* qdbus.h precompiled header
*
* Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
*
* Licensed under the Academic Free License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef QDBUS_H
#define QDBUS_H
#include <QtCore/qglobal.h>
#if !defined(DBUS_COMPILATION)
# include <dbus/qdbusabstractadaptor.h>
# include <dbus/qdbusabstractinterface.h>
# include <dbus/qdbusbus.h>
# include <dbus/qdbusconnection.h>
# include <dbus/qdbuserror.h>
# include <dbus/qdbusinterface.h>
# include <dbus/qdbusmessage.h>
# include <dbus/qdbusreply.h>
# include <dbus/qdbusserver.h>
# include <dbus/qdbusutil.h>
#else
# include "qdbusabstractadaptor.h"
# include "qdbusabstractinterface.h"
# include "qdbusbus.h"
# include "qdbusconnection.h"
# include "qdbuserror.h"
# include "qdbusinterface.h"
# include "qdbusmessage.h"
# include "qdbusreply.h"
# include "qdbusserver.h"
# include "qdbusutil.h"
#endif
#endif

View file

@ -153,6 +153,6 @@ signals:
void nameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusBusService::RequestNameOptions);
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusBusService::RequestNameOptions)
#endif

View file

@ -49,7 +49,7 @@ private:
QHash<QString, QDBusConnectionPrivate *> connectionHash;
};
Q_GLOBAL_STATIC(QDBusConnectionManager, manager);
Q_GLOBAL_STATIC(QDBusConnectionManager, manager)
QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name) const
{
@ -275,13 +275,13 @@ QDBusConnection QDBusConnection::addConnection(BusType type, const QString &name
DBusConnection *c = 0;
switch (type) {
case SystemBus:
c = dbus_bus_get(DBUS_BUS_SYSTEM, &d->error);
c = dbus_bus_get_private(DBUS_BUS_SYSTEM, &d->error);
break;
case SessionBus:
c = dbus_bus_get(DBUS_BUS_SESSION, &d->error);
c = dbus_bus_get_private(DBUS_BUS_SESSION, &d->error);
break;
case ActivationBus:
c = dbus_bus_get(DBUS_BUS_STARTER, &d->error);
c = dbus_bus_get_private(DBUS_BUS_STARTER, &d->error);
break;
}
d->setConnection(c); //setConnection does the error handling for us
@ -632,7 +632,7 @@ QDBusBusService *QDBusConnection::busService() const
if (!d)
return 0;
return d->busService;
};
}
QDBusAbstractInterfacePrivate *
QDBusConnection::findInterface_helper(const QString &service, const QString &path,
@ -699,7 +699,7 @@ QString QDBusConnection::baseService() const
: QString();
}
Q_GLOBAL_STATIC(QMutex, defaultBussesMutex);
Q_GLOBAL_STATIC(QMutex, defaultBussesMutex)
static const char sessionBusName[] = "qt_default_session_bus";
static const char systemBusName[] = "qt_default_system_bus";
static QDBusConnection *sessionBus = 0;

View file

@ -61,7 +61,7 @@ public:
UnregisterTree
};
Q_DECLARE_FLAGS(RegisterOptions, RegisterOption);
Q_DECLARE_FLAGS(RegisterOptions, RegisterOption)
QDBusConnection(const QString &name);
QDBusConnection(const QDBusConnection &other);

View file

@ -60,13 +60,10 @@ class QDBusObjectPrivate;
class CallDeliveryEvent;
class QMetaMethod;
class QDBusInterfacePrivate;
class QDBusMetaObject;
struct QDBusMetaObject;
class QDBusAbstractInterface;
class QDBusBusService;
typedef struct DBusConnection;
typedef struct DBusServer;
class QDBusConnectionPrivate: public QObject
{
Q_OBJECT

View file

@ -46,8 +46,9 @@
int QDBusConnectionPrivate::messageMetaType = 0;
typedef void (*qDBusSpyHook)(const QDBusMessage&);
static qDBusSpyHook messageSpyHook;
typedef void (*QDBusSpyHook)(const QDBusMessage&);
typedef QVarLengthArray<QDBusSpyHook, 4> QDBusSpyHookList;
Q_GLOBAL_STATIC(QDBusSpyHookList, qDBusSpyHookList)
struct QDBusPendingCall
{
@ -220,10 +221,10 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *c, void *data
qDebug("SERVER: GOT A NEW CONNECTION"); // TODO
}
extern QDBUS_EXPORT void qDBusSetSpyHook(qDBusSpyHook);
void qDBusSetSpyHook(qDBusSpyHook hook)
extern QDBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
void qDBusAddSpyHook(QDBusSpyHook hook)
{
messageSpyHook = hook;
qDBusSpyHookList()->append(hook);
}
#if USE_OUTSIDE_DISPATCH
@ -271,9 +272,10 @@ DBusHandlerResult QDBusConnectionPrivate::messageFilter(DBusConnection *connecti
QDBusMessage amsg = QDBusMessage::fromDBusMessage(message, QDBusConnection(d->name));
qDebug() << "got message:" << amsg;
if (messageSpyHook) {
const QDBusSpyHookList *list = qDBusSpyHookList();
for (int i = 0; i < list->size(); ++i) {
qDebug() << "calling the message spy hook";
(*messageSpyHook)(amsg);
(*(*list)[i])(amsg);
}
bool handled = false;

View file

@ -41,7 +41,7 @@ public:
virtual int qt_metacall(QMetaObject::Call, int, void **);
private:
Q_DECLARE_PRIVATE(QDBusInterface);
Q_DECLARE_PRIVATE(QDBusInterface)
Q_DISABLE_COPY(QDBusInterface)
};

View file

@ -47,4 +47,14 @@
# define Q_ASYNC
#endif
#ifdef Q_CC_MSVC
#include <QtCore/qlist.h>
#include <QtCore/qset.h>
#include <QtCore/qhash.h>
#include <QtCore/qvector.h>
class QDBusType;
inline uint qHash(const QVariant&) { Q_ASSERT(0); return 0; }
inline uint qHash(const QDBusType&) { Q_ASSERT(0); return 0; }
#endif
#endif

View file

@ -331,7 +331,7 @@ static void qVariantToIteratorInternal(DBusMessageIter *it, const QVariant &var,
const QDBusType &type);
static void qListToIterator(DBusMessageIter *it, const QList<QVariant> &list,
const QDBusTypeList &list);
const QDBusTypeList &typelist);
template<typename T>
static void qIterAppend(DBusMessageIter *it, const QDBusType &type, T arg)

View file

@ -41,7 +41,7 @@
class QDBusError;
class QDBusMetaObjectPrivate;
struct QDBusMetaObjectPrivate;
struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
{
bool cached;

View file

@ -34,7 +34,7 @@
#include "qdbustypehelper_p.h"
template<typename T>
class QDBUS_EXPORT QDBusReply
class QDBusReply
{
typedef T Type;
public:

View file

@ -187,6 +187,8 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, con
else
xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
if (xml.isEmpty())
return QString(); // don't add an empty interface
return QString(QLatin1String(" <interface name=\"%1\">\n%2 </interface>\n"))
.arg(interface, xml);
}

11
qt/tools/.cvsignore Normal file
View file

@ -0,0 +1,11 @@
.deps
.libs
Makefile
Makefile.in
*.lo
*.la
*.bb
*.bbg
*.da
*.gcov
*.moc

10
qt/tools/Makefile.am Normal file
View file

@ -0,0 +1,10 @@
INCLUDES=-I$(top_srcdir)/qt $(DBUS_CLIENT_CFLAGS) $(DBUS_QT_CFLAGS) -DDBUS_COMPILATION
bin_PROGRAMS = dbusidl2cpp dbuscpp2xml
dbusidl2cpp_SOURCES = dbusidl2cpp.cpp
dbusidl2cpp_LDFLAGS = -no-undefined
dbusidl2cpp_LDADD = $(DBUS_QT_LIBS) ../src/libdbus-qt4-1.la
dbuscpp2xml_SOURCES = dbuscpp2xml.cpp
dbuscpp2xml_LDFLAGS = -no-undefined
dbuscpp2xml_LDADD = $(DBUS_QT_LIBS) ../src/libdbus-qt4-1.la

View file

@ -31,9 +31,14 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "qdbusconnection.h" // for the Export* flags
#include <dbus/dbus.h> // for the XML DOCTYPE declaration
#include "../src/qdbusconnection.h" // for the Export* flags
// copied from dbus-protocol.h:
static const char docTypeHeader[] =
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" "
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n";
// in qdbusxmlgenerator.cpp
extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
@ -43,7 +48,7 @@ extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const
#define PROGRAMVERSION "0.1"
#define PROGRAMCOPYRIGHT "Copyright (C) 2006 Trolltech AS. All rights reserved."
static const char cmdlineOptions[] = "psmaPSMAo:";
static const char cmdlineOptions[] = "psmaPSMAo:hV";
static const char *outputFile;
static int flags;
@ -336,7 +341,7 @@ int main(int argc, char **argv)
MocParser parser;
parseCmdLine(argc, argv);
for (int i = 1; i < argc; ++i) {
for (int i = optind; i < argc; ++i) {
FILE *in = fopen(argv[i], "r");
if (in == 0) {
fprintf(stderr, PROGRAMNAME ": could not open '%s': %s\n",
@ -390,7 +395,7 @@ int main(int argc, char **argv)
}
}
fprintf(output, "%s<node>\n", DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE);
fprintf(output, "%s<node>\n", docTypeHeader);
foreach (QMetaObject mo, parser.objects) {
QString xml = qDBusGenerateMetaObjectXml(QString(), &mo, &QObject::staticMetaObject,
flags);

View file

@ -33,8 +33,8 @@
#include <QtCore/qset.h>
#include <dbus/qdbus.h>
#include "qdbusmetaobject_p.h"
#include "qdbusintrospection_p.h"
#include "../src/qdbusmetaobject_p.h"
#include "../src/qdbusintrospection_p.h"
#define PROGRAMNAME "dbusidl2cpp"
#define PROGRAMVERSION "0.4"