mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
namespaced build fixes and enabled it by default
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
1a47673bdf
commit
41e5ddf421
63 changed files with 198 additions and 482 deletions
2
src/3rdparty/javascriptcore/wtf/Platform.h
vendored
2
src/3rdparty/javascriptcore/wtf/Platform.h
vendored
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
#include <qglobal.h>
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
/* ==== PLATFORM handles OS, operating environment, graphics API, and
|
/* ==== PLATFORM handles OS, operating environment, graphics API, and
|
||||||
CPU. This macro will be phased out in favor of platform adaptation
|
CPU. This macro will be phased out in favor of platform adaptation
|
||||||
macros, policy decision macros, and top-level port definitions. ==== */
|
macros, policy decision macros, and top-level port definitions. ==== */
|
||||||
|
|
|
@ -2499,9 +2499,7 @@ bool QInternal::callFunction(InternalFunction func, void **args)
|
||||||
into namespace \c ns.
|
into namespace \c ns.
|
||||||
|
|
||||||
\sa QT_BEGIN_NAMESPACE, QT_END_NAMESPACE,
|
\sa QT_BEGIN_NAMESPACE, QT_END_NAMESPACE,
|
||||||
QT_PREPEND_NAMESPACE, QT_USE_NAMESPACE,
|
QT_PREPEND_NAMESPACE, QT_BEGIN_INCLUDE_NAMESPACE, QT_END_INCLUDE_NAMESPACE
|
||||||
QT_BEGIN_INCLUDE_NAMESPACE, QT_END_INCLUDE_NAMESPACE,
|
|
||||||
QT_BEGIN_MOC_NAMESPACE, QT_END_MOC_NAMESPACE,
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -2600,26 +2598,6 @@ bool QInternal::callFunction(InternalFunction func, void **args)
|
||||||
\sa QT_NAMESPACE
|
\sa QT_NAMESPACE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\macro QT_BEGIN_MOC_NAMESPACE
|
|
||||||
\internal
|
|
||||||
|
|
||||||
This macro is output by moc at the beginning of
|
|
||||||
moc files. It is equivalent to \c QT_USE_NAMESPACE.
|
|
||||||
|
|
||||||
\sa QT_NAMESPACE
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\macro QT_END_MOC_NAMESPACE
|
|
||||||
\internal
|
|
||||||
|
|
||||||
This macro is output by moc at the beginning of
|
|
||||||
moc files. It expands to nothing.
|
|
||||||
|
|
||||||
\sa QT_NAMESPACE
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn bool qFuzzyCompare(double p1, double p2)
|
\fn bool qFuzzyCompare(double p1, double p2)
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
|
@ -137,72 +137,36 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NAMESPACE /* user namespace */
|
#if defined(__cplusplus) && !defined(QT_NO_USING_NAMESPACE)
|
||||||
|
|
||||||
# define QT_PREPEND_NAMESPACE(name) ::name
|
|
||||||
# define QT_USE_NAMESPACE
|
|
||||||
# define QT_BEGIN_NAMESPACE
|
|
||||||
# define QT_END_NAMESPACE
|
|
||||||
# define QT_BEGIN_INCLUDE_NAMESPACE
|
|
||||||
# define QT_END_INCLUDE_NAMESPACE
|
|
||||||
# define QT_BEGIN_MOC_NAMESPACE
|
|
||||||
# define QT_END_MOC_NAMESPACE
|
|
||||||
# define QT_FORWARD_DECLARE_CLASS(name) class name;
|
|
||||||
# define QT_FORWARD_DECLARE_STRUCT(name) struct name;
|
|
||||||
# define QT_MANGLE_NAMESPACE(name) name
|
|
||||||
|
|
||||||
#else /* user namespace */
|
|
||||||
|
|
||||||
|
# define QT_NAMESPACE Katie
|
||||||
# define QT_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
|
# define QT_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
|
||||||
|
# define QT_MANGLE_NAMESPACE(x) x
|
||||||
# define QT_USE_NAMESPACE using namespace ::QT_NAMESPACE;
|
# define QT_USE_NAMESPACE using namespace ::QT_NAMESPACE;
|
||||||
|
|
||||||
# define QT_BEGIN_NAMESPACE namespace QT_NAMESPACE {
|
# define QT_BEGIN_NAMESPACE namespace QT_NAMESPACE {
|
||||||
# define QT_END_NAMESPACE }
|
# define QT_END_NAMESPACE }
|
||||||
# define QT_BEGIN_INCLUDE_NAMESPACE }
|
# define QT_BEGIN_INCLUDE_NAMESPACE }
|
||||||
# define QT_END_INCLUDE_NAMESPACE namespace QT_NAMESPACE {
|
# define QT_END_INCLUDE_NAMESPACE namespace QT_NAMESPACE {
|
||||||
# define QT_BEGIN_MOC_NAMESPACE QT_USE_NAMESPACE
|
|
||||||
# define QT_END_MOC_NAMESPACE
|
|
||||||
# define QT_FORWARD_DECLARE_CLASS(name) \
|
|
||||||
QT_BEGIN_NAMESPACE class name; QT_END_NAMESPACE \
|
|
||||||
using QT_PREPEND_NAMESPACE(name);
|
|
||||||
|
|
||||||
# define QT_FORWARD_DECLARE_STRUCT(name) \
|
|
||||||
QT_BEGIN_NAMESPACE struct name; QT_END_NAMESPACE \
|
|
||||||
using QT_PREPEND_NAMESPACE(name);
|
|
||||||
|
|
||||||
# define QT_MANGLE_NAMESPACE0(x) x
|
|
||||||
# define QT_MANGLE_NAMESPACE1(a, b) a##_##b
|
|
||||||
# define QT_MANGLE_NAMESPACE2(a, b) QT_MANGLE_NAMESPACE1(a,b)
|
|
||||||
# define QT_MANGLE_NAMESPACE(name) QT_MANGLE_NAMESPACE2( \
|
|
||||||
QT_MANGLE_NAMESPACE0(name), QT_MANGLE_NAMESPACE0(QT_NAMESPACE))
|
|
||||||
|
|
||||||
namespace QT_NAMESPACE {}
|
namespace QT_NAMESPACE {}
|
||||||
|
|
||||||
# ifndef QT_BOOTSTRAPPED
|
#else /* QT_NO_USING_NAMESPACE && __cplusplus */
|
||||||
# ifndef QT_NO_USING_NAMESPACE
|
|
||||||
/*
|
|
||||||
This expands to a "using QT_NAMESPACE" also in _header files_.
|
|
||||||
It is the only way the feature can be used without too much
|
|
||||||
pain, but if people _really_ do not want it they can add
|
|
||||||
DEFINES += QT_NO_USING_NAMESPACE to their .pro files.
|
|
||||||
*/
|
|
||||||
QT_USE_NAMESPACE
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif /* user namespace */
|
# define QT_NAMESPACE
|
||||||
|
# define QT_PREPEND_NAMESPACE(name) ::name
|
||||||
#else /* __cplusplus */
|
# define QT_MANGLE_NAMESPACE(x) x
|
||||||
|
# define QT_USE_NAMESPACE
|
||||||
|
|
||||||
# define QT_BEGIN_NAMESPACE
|
# define QT_BEGIN_NAMESPACE
|
||||||
# define QT_END_NAMESPACE
|
# define QT_END_NAMESPACE
|
||||||
# define QT_USE_NAMESPACE
|
|
||||||
# define QT_BEGIN_INCLUDE_NAMESPACE
|
# define QT_BEGIN_INCLUDE_NAMESPACE
|
||||||
# define QT_END_INCLUDE_NAMESPACE
|
# define QT_END_INCLUDE_NAMESPACE
|
||||||
|
|
||||||
#endif /* __cplusplus */
|
#endif /* QT_NO_USING_NAMESPACE && __cplusplus */
|
||||||
|
|
||||||
#define QT_BEGIN_HEADER
|
#define QT_BEGIN_HEADER
|
||||||
#define QT_END_HEADER
|
#define QT_END_HEADER
|
||||||
|
|
|
@ -93,6 +93,8 @@ QT_END_NAMESPACE
|
||||||
|
|
||||||
#ifndef QT_NO_PROCESS
|
#ifndef QT_NO_PROCESS
|
||||||
|
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -2108,8 +2110,6 @@ bool QProcess::startDetached(const QString &program)
|
||||||
return QProcessPrivate::startDetached(prog, args);
|
return QProcessPrivate::startDetached(prog, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ QT_END_NAMESPACE
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -469,8 +470,6 @@ bool QProcessPrivate::createChannel(Channel &channel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
||||||
{
|
{
|
||||||
QProcessEnvironment env;
|
QProcessEnvironment env;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include "qstring.h"
|
#include "qstring.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L
|
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L
|
||||||
namespace {
|
namespace {
|
||||||
// There are two incompatible versions of strerror_r:
|
// There are two incompatible versions of strerror_r:
|
||||||
|
@ -31,4 +33,6 @@ static void report_error(int code, const char *where, const char *what)
|
||||||
qWarning("%s: %s failure: %s", where, what, qPrintable(qt_error_string(code)));
|
qWarning("%s: %s failure: %s", where, what, qPrintable(qt_error_string(code)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QCORECOMMON_P_H
|
#endif // QCORECOMMON_P_H
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
|
|
||||||
#include <qdbuserror.h>
|
#include <qdbuserror.h>
|
||||||
#include <qdbusconnection.h>
|
#include <qdbusconnection.h>
|
||||||
|
#include <qdbusmessage.h>
|
||||||
|
|
||||||
#include <QtCore/qatomic.h>
|
#include <QtCore/qatomic.h>
|
||||||
#include <QtCore/qhash.h>
|
#include <QtCore/qhash.h>
|
||||||
|
@ -66,8 +67,6 @@
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtCore/qvector.h>
|
#include <QtCore/qvector.h>
|
||||||
|
|
||||||
#include <qdbusmessage.h>
|
|
||||||
|
|
||||||
#ifndef QT_NO_DBUS
|
#ifndef QT_NO_DBUS
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
|
|
||||||
|
|
|
@ -137,13 +137,13 @@ static const int errorMessages_indices[] = {
|
||||||
static const int errorMessages_count = sizeof errorMessages_indices /
|
static const int errorMessages_count = sizeof errorMessages_indices /
|
||||||
sizeof errorMessages_indices[0];
|
sizeof errorMessages_indices[0];
|
||||||
|
|
||||||
static inline const char *get(QDBusError::ErrorType code)
|
static inline const char *getError(QDBusError::ErrorType code)
|
||||||
{
|
{
|
||||||
int intcode = qBound(0, int(code) - int(QDBusError::Other), errorMessages_count);
|
int intcode = qBound(0, int(code) - int(QDBusError::Other), errorMessages_count);
|
||||||
return errorMessages_string + errorMessages_indices[intcode];
|
return errorMessages_string + errorMessages_indices[intcode];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QDBusError::ErrorType get(const char *name)
|
static inline QDBusError::ErrorType getError(const char *name)
|
||||||
{
|
{
|
||||||
if (!name || !*name)
|
if (!name || !*name)
|
||||||
return QDBusError::NoError;
|
return QDBusError::NoError;
|
||||||
|
@ -248,7 +248,7 @@ QDBusError::QDBusError(const DBusError *error)
|
||||||
if (!error || !dbus_error_is_set(error))
|
if (!error || !dbus_error_is_set(error))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
code = ::get(error->name);
|
code = getError(error->name);
|
||||||
msg = QString::fromUtf8(error->message);
|
msg = QString::fromUtf8(error->message);
|
||||||
nm = QString::fromUtf8(error->name);
|
nm = QString::fromUtf8(error->name);
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ QDBusError::QDBusError(const QDBusMessage &qdmsg)
|
||||||
if (qdmsg.type() != QDBusMessage::ErrorMessage)
|
if (qdmsg.type() != QDBusMessage::ErrorMessage)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
code = ::get(qdmsg.errorName().toUtf8().constData());
|
code = getError(qdmsg.errorName().toUtf8().constData());
|
||||||
nm = qdmsg.errorName();
|
nm = qdmsg.errorName();
|
||||||
msg = qdmsg.errorMessage();
|
msg = qdmsg.errorMessage();
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ QDBusError::QDBusError(const QDBusMessage &qdmsg)
|
||||||
QDBusError::QDBusError(ErrorType error, const QString &mess)
|
QDBusError::QDBusError(ErrorType error, const QString &mess)
|
||||||
: code(error)
|
: code(error)
|
||||||
{
|
{
|
||||||
nm = QLatin1String(::get(error));
|
nm = QLatin1String(getError(error));
|
||||||
msg = mess;
|
msg = mess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ bool QDBusError::isValid() const
|
||||||
*/
|
*/
|
||||||
QString QDBusError::errorString(ErrorType error)
|
QString QDBusError::errorString(ErrorType error)
|
||||||
{
|
{
|
||||||
return QLatin1String(::get(error));
|
return QLatin1String(getError(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static QAtomicInt isDebugging = QAtomicInt(-1);
|
static QAtomicInt isDebugging = QAtomicInt(-1);
|
||||||
#define qDBusDebug if (::isDebugging == 0); else qDebug
|
#define qDBusDebug if (isDebugging == 0); else qDebug
|
||||||
|
|
||||||
static const QString orgFreedesktopDBusString = QLatin1String(DBUS_SERVICE_DBUS);
|
static const QString orgFreedesktopDBusString = QLatin1String(DBUS_SERVICE_DBUS);
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ static void huntAndEmit(DBusConnection *connection, DBusMessage *msg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
|
static int findMetaSlot(const QMetaObject *mo, const QByteArray &name, int flags,
|
||||||
const QString &signature_, QList<int>& metaTypes)
|
const QString &signature_, QList<int>& metaTypes)
|
||||||
{
|
{
|
||||||
QByteArray msgSignature = signature_.toLatin1();
|
QByteArray msgSignature = signature_.toLatin1();
|
||||||
|
@ -826,11 +826,11 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags, const QDBu
|
||||||
// find a slot that matches according to the rules above
|
// find a slot that matches according to the rules above
|
||||||
QDBusSlotCache::Data slotData;
|
QDBusSlotCache::Data slotData;
|
||||||
slotData.flags = flags;
|
slotData.flags = flags;
|
||||||
slotData.slotIdx = ::findSlot(mo, memberName, flags, msg.signature(), slotData.metaTypes);
|
slotData.slotIdx = findMetaSlot(mo, memberName, flags, msg.signature(), slotData.metaTypes);
|
||||||
if (slotData.slotIdx == -1) {
|
if (slotData.slotIdx == -1) {
|
||||||
// ### this is where we want to add the connection as an arg too
|
// ### this is where we want to add the connection as an arg too
|
||||||
// try with no parameters, but with a QDBusMessage
|
// try with no parameters, but with a QDBusMessage
|
||||||
slotData.slotIdx = ::findSlot(mo, memberName, flags, QString(), slotData.metaTypes);
|
slotData.slotIdx = findMetaSlot(mo, memberName, flags, QString(), slotData.metaTypes);
|
||||||
if (slotData.metaTypes.count() != 2 ||
|
if (slotData.metaTypes.count() != 2 ||
|
||||||
slotData.metaTypes.at(1) != QDBusMetaTypeId::message) {
|
slotData.metaTypes.at(1) != QDBusMetaTypeId::message) {
|
||||||
// not found
|
// not found
|
||||||
|
@ -976,12 +976,12 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
|
||||||
rootNode(QString(QLatin1Char('/')))
|
rootNode(QString(QLatin1Char('/')))
|
||||||
{
|
{
|
||||||
static const bool threads = dbus_threads_init_default();
|
static const bool threads = dbus_threads_init_default();
|
||||||
if (::isDebugging == -1)
|
if (isDebugging == -1)
|
||||||
::isDebugging = qgetenv("QDBUS_DEBUG").toInt();
|
isDebugging = qgetenv("QDBUS_DEBUG").toInt();
|
||||||
Q_UNUSED(threads)
|
Q_UNUSED(threads)
|
||||||
|
|
||||||
#if QDBUS_THREAD_DEBUG
|
#if QDBUS_THREAD_DEBUG
|
||||||
if (::isDebugging > 1)
|
if (isDebugging > 1)
|
||||||
qdbusThreadDebug = qdbusDefaultThreadDebug;
|
qdbusThreadDebug = qdbusDefaultThreadDebug;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
|
|
||||||
#ifndef QT_NO_DBUS
|
#ifndef QT_NO_DBUS
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QDBusPendingReply
|
\class QDBusPendingReply
|
||||||
\inmodule QtDBus
|
\inmodule QtDBus
|
||||||
|
@ -278,4 +280,6 @@ void QDBusPendingReplyData::setMetaTypes(int count, const int *types)
|
||||||
d->checkReceivedSignature();
|
d->checkReceivedSignature();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_DBUS
|
#endif // QT_NO_DBUS
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
|
|
||||||
#ifndef QT_NO_DBUS
|
#ifndef QT_NO_DBUS
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if !defined(QDBUS_THREAD_DEBUG) && defined(QT_BUILD_INTERNAL)
|
#if !defined(QDBUS_THREAD_DEBUG) && defined(QT_BUILD_INTERNAL)
|
||||||
# define QDBUS_THREAD_DEBUG 1
|
# define QDBUS_THREAD_DEBUG 1
|
||||||
#else
|
#else
|
||||||
|
@ -63,11 +65,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QDBUS_THREAD_DEBUG
|
#if QDBUS_THREAD_DEBUG
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
typedef void (*qdbusThreadDebugFunc)(int, int, QDBusConnectionPrivate *);
|
typedef void (*qdbusThreadDebugFunc)(int, int, QDBusConnectionPrivate *);
|
||||||
Q_DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
|
Q_DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
|
||||||
extern Q_DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
|
extern Q_DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
|
||||||
QT_END_NAMESPACE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum ThreadAction {
|
enum ThreadAction {
|
||||||
|
@ -233,5 +233,7 @@ struct QDBusWatchAndTimeoutLocker: QDBusMutexLocker
|
||||||
# define SEM_RELEASE(action, sem) sem.release()
|
# define SEM_RELEASE(action, sem) sem.release()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_DBUS
|
#endif // QT_NO_DBUS
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,6 +76,8 @@
|
||||||
#include "qdeclarativeanchors_p.h"
|
#include "qdeclarativeanchors_p.h"
|
||||||
#include "qdeclarativepincharea_p.h"
|
#include "qdeclarativepincharea_p.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent)
|
static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent)
|
||||||
{
|
{
|
||||||
QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
|
QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
|
||||||
|
@ -199,3 +201,5 @@ void QDeclarativeItemModule::defineModule()
|
||||||
qmlRegisterRevision<QDeclarativeImplicitSizePaintedItem,1>("QtQuick",1,1);
|
qmlRegisterRevision<QDeclarativeImplicitSizePaintedItem,1>("QtQuick",1,1);
|
||||||
qmlRegisterUncreatableType<QDeclarativeLayoutMirroringAttached>("QtQuick",1,1,"LayoutMirroring", QDeclarativeLayoutMirroringAttached::tr("LayoutMirroring is only available via attached properties"));
|
qmlRegisterUncreatableType<QDeclarativeLayoutMirroringAttached>("QtQuick",1,1,"LayoutMirroring", QDeclarativeLayoutMirroringAttached::tr("LayoutMirroring is only available via attached properties"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
#include "qlistmodelinterface_p.h"
|
#include "qlistmodelinterface_p.h"
|
||||||
#include "qscriptvalue.h"
|
#include "qscriptvalue.h"
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(QScriptValue)
|
||||||
|
QML_DECLARE_TYPE(QListModelInterface)
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
struct StaticQtMetaObject : public QObject
|
struct StaticQtMetaObject : public QObject
|
||||||
{
|
{
|
||||||
static const QMetaObject *get()
|
static const QMetaObject *get()
|
||||||
|
@ -35,7 +40,6 @@ static int inline qRoundDouble(double d)
|
||||||
DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG)
|
DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG)
|
||||||
DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP)
|
DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP)
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QScriptValue)
|
QT_END_NAMESPACE
|
||||||
QML_DECLARE_TYPE(QListModelInterface)
|
|
||||||
|
|
||||||
#endif // QDECLARATIVECOMMON_P_H
|
#endif // QDECLARATIVECOMMON_P_H
|
||||||
|
|
|
@ -204,7 +204,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QDECLARATIVEJSGRAMMAR_P_H
|
#endif // QDECLARATIVEJSGRAMMAR_P_H
|
||||||
|
|
||||||
|
|
|
@ -42,27 +42,24 @@
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "qdeclarativejsengine_p.h"
|
#include "qdeclarativejsengine_p.h"
|
||||||
#include "qdeclarativejslexer_p.h"
|
#include "qdeclarativejslexer_p.h"
|
||||||
#include "qdeclarativejsast_p.h"
|
#include "qdeclarativejsast_p.h"
|
||||||
#include "qdeclarativejsnodepool_p.h"
|
#include "qdeclarativejsnodepool_p.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "qdeclarativejsparser_p.h"
|
#include "qdeclarativejsparser_p.h"
|
||||||
#include <QVarLengthArray>
|
#include <QVarLengthArray>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// This file is automatically generated from qdeclarativejs.g.
|
// This file is automatically generated from qdeclarativejs.g.
|
||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
//
|
//
|
||||||
|
|
||||||
using namespace QDeclarativeJS;
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace QDeclarativeJS;
|
||||||
|
|
||||||
void Parser::reallocateStack()
|
void Parser::reallocateStack()
|
||||||
{
|
{
|
||||||
if (! stack_size)
|
if (! stack_size)
|
||||||
|
|
|
@ -240,6 +240,4 @@ protected:
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // QDECLARATIVEJSPARSER_P_H
|
#endif // QDECLARATIVEJSPARSER_P_H
|
||||||
|
|
|
@ -71,6 +71,8 @@
|
||||||
#include "qdeclarativeinfo.h"
|
#include "qdeclarativeinfo.h"
|
||||||
#include "qdeclarativetypenotavailable_p.h"
|
#include "qdeclarativetypenotavailable_p.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
void QDeclarativeUtilModule::defineModule()
|
void QDeclarativeUtilModule::defineModule()
|
||||||
{
|
{
|
||||||
if (QApplication::type() != QApplication::Tty) {
|
if (QApplication::type() != QApplication::Tty) {
|
||||||
|
@ -120,3 +122,5 @@ void QDeclarativeUtilModule::defineModule()
|
||||||
qmlRegisterCustomType<QDeclarativePropertyChanges>("QtQuick",1,0,"PropertyChanges", new QDeclarativePropertyChangesParser);
|
qmlRegisterCustomType<QDeclarativePropertyChanges>("QtQuick",1,0,"PropertyChanges", new QDeclarativePropertyChangesParser);
|
||||||
qmlRegisterCustomType<QDeclarativeListModel>("QtQuick",1,0,"ListModel", new QDeclarativeListModelParser);
|
qmlRegisterCustomType<QDeclarativeListModel>("QtQuick",1,0,"ListModel", new QDeclarativeListModelParser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -176,7 +176,7 @@ void FormWindowData::applyToFormWindow(FormWindowBase* fw) const
|
||||||
|
|
||||||
FormWindowSettings::FormWindowSettings(QDesignerFormWindowInterface *parent) :
|
FormWindowSettings::FormWindowSettings(QDesignerFormWindowInterface *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
m_ui(new ::Ui_FormWindowSettings),
|
m_ui(new Ui_FormWindowSettings),
|
||||||
m_formWindow(qobject_cast<FormWindowBase*>(parent)),
|
m_formWindow(qobject_cast<FormWindowBase*>(parent)),
|
||||||
m_oldData(new FormWindowData)
|
m_oldData(new FormWindowData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,6 +90,6 @@ private:
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
} // namespace qdesigner_internal
|
||||||
|
|
||||||
#endif // OBJECTINSPECTOR_H
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // OBJECTINSPECTOR_H
|
||||||
|
|
|
@ -163,6 +163,6 @@ namespace qdesigner_internal {
|
||||||
};
|
};
|
||||||
} // namespace qdesigner_internal
|
} // namespace qdesigner_internal
|
||||||
|
|
||||||
#endif // OBJECTINSPECTORMODEL_H
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // OBJECTINSPECTORMODEL_H
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
#ifndef QDESIGNERCOMPONENTS_P_H
|
#ifndef QDESIGNERCOMPONENTS_P_H
|
||||||
#define QDESIGNERCOMPONENTS_P_H
|
#define QDESIGNERCOMPONENTS_P_H
|
||||||
|
|
||||||
|
#include "QtCore/qglobal.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static const char *widgetElementC = "widget";
|
static const char *widgetElementC = "widget";
|
||||||
static const char *nameAttributeC = "name";
|
static const char *nameAttributeC = "name";
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QDESIGNERCOMPONENTS_P_H
|
#endif // QDESIGNERCOMPONENTS_P_H
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
#include "abstractformeditor.h"
|
#include "abstractformeditor.h"
|
||||||
#include "qwidget.h"
|
#include "qwidget.h"
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(QWidgetList)
|
||||||
|
Q_DECLARE_METATYPE(QAction*)
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
enum { FormLayoutColumns = 2 };
|
enum { FormLayoutColumns = 2 };
|
||||||
|
|
||||||
static const char *Geometry = "Geometry";
|
static const char *Geometry = "Geometry";
|
||||||
|
@ -35,7 +40,6 @@ static void recursiveUpdate(QWidget *w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QWidgetList)
|
QT_END_NAMESPACE
|
||||||
Q_DECLARE_METATYPE(QAction*)
|
|
||||||
|
|
||||||
#endif // QDESIGNERCOMMON_P_H
|
#endif // QDESIGNERCOMMON_P_H
|
||||||
|
|
|
@ -494,4 +494,5 @@ QString QDesignerIntegration::contextHelpId() const
|
||||||
} // namespace qdesigner_internal
|
} // namespace qdesigner_internal
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include <moc_qdesigner_integration_p.h>
|
#include <moc_qdesigner_integration_p.h>
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QDesignerSettingsSimple
|
\class QDesignerSettingsSimple
|
||||||
|
|
||||||
|
@ -92,3 +94,5 @@ void QDesignerQSettings::remove(const QString &key)
|
||||||
{
|
{
|
||||||
m_settings.remove(key);
|
m_settings.remove(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -1727,7 +1727,6 @@ QPixmap QMessageBox::standardIcon(Icon icon)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#include "moc_qmessagebox.h"
|
#include "moc_qmessagebox.h"
|
||||||
#include "qrc_qmessagebox.cpp"
|
#include "qrc_qmessagebox.cpp"
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,6 @@ public:
|
||||||
explicit QHBoxLayout(QWidget *parent);
|
explicit QHBoxLayout(QWidget *parent);
|
||||||
~QHBoxLayout();
|
~QHBoxLayout();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QHBoxLayout)
|
Q_DISABLE_COPY(QHBoxLayout)
|
||||||
};
|
};
|
||||||
|
@ -133,7 +132,6 @@ public:
|
||||||
explicit QVBoxLayout(QWidget *parent);
|
explicit QVBoxLayout(QWidget *parent);
|
||||||
~QVBoxLayout();
|
~QVBoxLayout();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QVBoxLayout)
|
Q_DISABLE_COPY(QVBoxLayout)
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,11 +49,8 @@ QT_BEGIN_HEADER
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
class QLayout;
|
|
||||||
class QSize;
|
class QSize;
|
||||||
|
|
||||||
|
|
||||||
class QLayoutPrivate;
|
class QLayoutPrivate;
|
||||||
|
|
||||||
class Q_GUI_EXPORT QLayout : public QObject, public QLayoutItem
|
class Q_GUI_EXPORT QLayout : public QObject, public QLayoutItem
|
||||||
|
@ -157,15 +154,14 @@ private:
|
||||||
|
|
||||||
friend class QApplicationPrivate;
|
friend class QApplicationPrivate;
|
||||||
friend class QWidget;
|
friend class QWidget;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
// legacy includes
|
// legacy includes
|
||||||
#include <QtGui/qboxlayout.h>
|
#include <QtGui/qboxlayout.h>
|
||||||
#include <QtGui/qgridlayout.h>
|
#include <QtGui/qgridlayout.h>
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
QT_END_HEADER
|
QT_END_HEADER
|
||||||
|
|
||||||
#endif // QLAYOUT_H
|
#endif // QLAYOUT_H
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "qiconengineplugin.h"
|
#include "qiconengineplugin.h"
|
||||||
#include "qimageiohandler.h"
|
#include "qimageiohandler.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50)
|
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50)
|
||||||
{
|
{
|
||||||
const int maxFactor = 100;
|
const int maxFactor = 100;
|
||||||
|
@ -28,4 +30,6 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, imageloader,
|
||||||
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
|
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QGUICOMMON_P_H
|
#endif // QGUICOMMON_P_H
|
||||||
|
|
|
@ -2331,7 +2331,7 @@ void QStyle::setProxy(QStyle *style)
|
||||||
d->proxyStyle = style;
|
d->proxyStyle = style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "moc_qstyle.h"
|
#include "moc_qstyle.h"
|
||||||
#include "qrc_qstyle.cpp"
|
#include "qrc_qstyle.cpp"
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ Q_DECLARE_METATYPE(QNetworkSession::State)
|
||||||
Q_DECLARE_METATYPE(QNetworkSession::SessionError)
|
Q_DECLARE_METATYPE(QNetworkSession::SessionError)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static void downloadBufferDeleter(char *ptr)
|
static void downloadBufferDeleter(char *ptr)
|
||||||
{
|
{
|
||||||
delete[] ptr;
|
delete[] ptr;
|
||||||
|
@ -34,4 +36,6 @@ static int qt_timeout_value(int msecs, int elapsed)
|
||||||
return timeout < 0 ? 0 : timeout;
|
return timeout < 0 ? 0 : timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QNETWORKCOMMON_H
|
#endif // QNETWORKCOMMON_H
|
||||||
|
|
|
@ -59,12 +59,6 @@
|
||||||
#include <QtCore/qurl.h>
|
#include <QtCore/qurl.h>
|
||||||
#include <QtCore/qvarlengtharray.h>
|
#include <QtCore/qvarlengtharray.h>
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
|
|
||||||
// Symbian does not seem to have the symbol for SNI defined
|
|
||||||
#ifndef SSL_CTRL_SET_TLSEXT_HOSTNAME
|
|
||||||
#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
bool QSslSocketPrivate::s_libraryLoaded = false;
|
bool QSslSocketPrivate::s_libraryLoaded = false;
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
#ifndef QT_NO_BEARERMANAGEMENT
|
#ifndef QT_NO_BEARERMANAGEMENT
|
||||||
#ifndef QT_NO_DBUS
|
#ifndef QT_NO_DBUS
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QDBusArgument &operator<<(QDBusArgument &argument, const ObjectPathProperties &item)
|
QDBusArgument &operator<<(QDBusArgument &argument, const ObjectPathProperties &item)
|
||||||
{
|
{
|
||||||
argument.beginStructure();
|
argument.beginStructure();
|
||||||
|
@ -73,7 +75,6 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, ObjectPathPropert
|
||||||
return argument;
|
return argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
static QDBusConnection ofonoConnection = QDBusConnection::systemBus();
|
static QDBusConnection ofonoConnection = QDBusConnection::systemBus();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,15 +84,14 @@
|
||||||
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
struct ObjectPathProperties
|
struct ObjectPathProperties
|
||||||
{
|
{
|
||||||
QDBusObjectPath path;
|
QDBusObjectPath path;
|
||||||
QVariantMap properties;
|
QVariantMap properties;
|
||||||
};
|
};
|
||||||
typedef QList<ObjectPathProperties> PathPropertiesList;
|
typedef QList<ObjectPathProperties> PathPropertiesList;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(ObjectPathProperties)
|
Q_DECLARE_METATYPE(ObjectPathProperties)
|
||||||
Q_DECLARE_METATYPE(PathPropertiesList)
|
Q_DECLARE_METATYPE(PathPropertiesList)
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QtCore/QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
struct TgaReader
|
struct TgaReader
|
||||||
{
|
{
|
||||||
virtual ~TgaReader() {}
|
virtual ~TgaReader() {}
|
||||||
|
@ -266,3 +268,5 @@ QImage QTgaFile::readImage()
|
||||||
// TODO: add processing of TGA extension information - ie TGA 2.0 files
|
// TODO: add processing of TGA extension information - ie TGA 2.0 files
|
||||||
return im;
|
return im;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -398,4 +398,5 @@ Q_EXPORT_STATIC_PLUGIN(QtDBusScriptPlugin)
|
||||||
Q_EXPORT_PLUGIN2(qtscriptdbus, QtDBusScriptPlugin)
|
Q_EXPORT_PLUGIN2(qtscriptdbus, QtDBusScriptPlugin)
|
||||||
|
|
||||||
#endif // QT_NO_DBUS
|
#endif // QT_NO_DBUS
|
||||||
|
|
||||||
#include "moc_dbmain.h"
|
#include "moc_dbmain.h"
|
||||||
|
|
|
@ -53,6 +53,8 @@
|
||||||
|
|
||||||
#ifndef QT_NO_DBUS
|
#ifndef QT_NO_DBUS
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class QDBusConnectionConstructor : public QObject,
|
class QDBusConnectionConstructor : public QObject,
|
||||||
public QScriptable
|
public QScriptable
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,6 @@ add_definitions(
|
||||||
-Djscyylex=qtjscyylex
|
-Djscyylex=qtjscyylex
|
||||||
-Djscyyerror=qtjscyyerror
|
-Djscyyerror=qtjscyyerror
|
||||||
-DWTF=QTWTF
|
-DWTF=QTWTF
|
||||||
-DQT_NO_USING_NAMESPACE
|
|
||||||
-DQLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
|
-DQLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
|
||||||
-DBUILDING_QT__
|
-DBUILDING_QT__
|
||||||
)
|
)
|
||||||
|
|
|
@ -34,9 +34,7 @@ Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupData)
|
||||||
Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupMap)
|
Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupMap)
|
||||||
Q_DECLARE_METATYPE(QScriptDebuggerValueList)
|
Q_DECLARE_METATYPE(QScriptDebuggerValueList)
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
static inline bool isAlmostIdentChar(const QChar &ch)
|
static inline bool isAlmostIdentChar(const QChar &ch)
|
||||||
{
|
{
|
||||||
|
@ -55,6 +53,6 @@ static inline bool isPrefixOf(const QString &prefix, const QString &what)
|
||||||
return ((what.length() > prefix.length()) && what.startsWith(prefix));
|
return ((what.length() > prefix.length()) && what.startsWith(prefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QSCRIPTTOOLSCOMMON_H
|
#endif // QSCRIPTTOOLSCOMMON_H
|
|
@ -41,6 +41,8 @@
|
||||||
|
|
||||||
#include <QtTest/qbenchmarkmetric_p.h>
|
#include <QtTest/qbenchmarkmetric_p.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\enum QTest::QBenchmarkMetric
|
\enum QTest::QBenchmarkMetric
|
||||||
\since 4.7
|
\since 4.7
|
||||||
|
@ -113,3 +115,4 @@ const char * QTest::benchmarkMetricUnit(QBenchmarkMetric metric)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -4,9 +4,13 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
namespace QTest
|
namespace QTest
|
||||||
{
|
{
|
||||||
static FILE *stream = 0;
|
static FILE *stream = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QTESTCOMMON_H
|
#endif // QTESTCOMMON_H
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
static QString m_defaultExtensions;
|
static QString m_defaultExtensions;
|
||||||
|
|
||||||
static void printOut(const QString & out)
|
static void printOut(const QString & out)
|
||||||
|
|
|
@ -813,14 +813,12 @@ void Moc::generate(FILE *out)
|
||||||
" much.)\"\n", QT_VERSION_STR);
|
" much.)\"\n", QT_VERSION_STR);
|
||||||
fprintf(out, "#endif\n\n");
|
fprintf(out, "#endif\n\n");
|
||||||
|
|
||||||
fprintf(out, "QT_BEGIN_MOC_NAMESPACE\n");
|
fprintf(out, "QT_USE_NAMESPACE\n");
|
||||||
|
|
||||||
for (i = 0; i < classList.size(); ++i) {
|
for (i = 0; i < classList.size(); ++i) {
|
||||||
Generator generator(&classList[i], metaTypes, out);
|
Generator generator(&classList[i], metaTypes, out);
|
||||||
generator.generateCode();
|
generator.generateCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(out, "QT_END_MOC_NAMESPACE\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ QT_BEGIN_NAMESPACE
|
||||||
Q_DBUS_EXPORT extern bool qt_dbus_metaobject_skip_annotations;
|
Q_DBUS_EXPORT extern bool qt_dbus_metaobject_skip_annotations;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
static QDBusConnection connection(QLatin1String(""));
|
static QDBusConnection connection(QLatin1String(""));
|
||||||
static bool printArgumentsLiterally = false;
|
static bool printArgumentsLiterally = false;
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ QT_END_NAMESPACE
|
||||||
#define PROGRAMVERSION "0.1"
|
#define PROGRAMVERSION "0.1"
|
||||||
#define PROGRAMCOPYRIGHT "Copyright (C) 2015 The Qt Company Ltd."
|
#define PROGRAMCOPYRIGHT "Copyright (C) 2015 The Qt Company Ltd."
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
static QString outputFile;
|
static QString outputFile;
|
||||||
static int flags;
|
static int flags;
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
|
|
||||||
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
|
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
static QString globalClassName;
|
static QString globalClassName;
|
||||||
static QString parentClassName;
|
static QString parentClassName;
|
||||||
static QString proxyFile;
|
static QString proxyFile;
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
PropertyDialog::PropertyDialog(QWidget *parent, Qt::WindowFlags f)
|
PropertyDialog::PropertyDialog(QWidget *parent, Qt::WindowFlags f)
|
||||||
: QDialog(parent, f)
|
: QDialog(parent, f)
|
||||||
{
|
{
|
||||||
|
@ -112,4 +114,6 @@ QList<QVariant> PropertyDialog::values() const
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <moc_propertydialog.h>
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#include "moc_propertydialog.h"
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class PropertyDialog: public QDialog
|
class PropertyDialog: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -66,5 +68,7 @@ private:
|
||||||
QDialogButtonBox *buttonBox;
|
QDialogButtonBox *buttonBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
#include <QtDBus/QDBusInterface>
|
#include <QtDBus/QDBusInterface>
|
||||||
#include <QtDBus/QDBusReply>
|
#include <QtDBus/QDBusReply>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
struct QDBusItem
|
struct QDBusItem
|
||||||
{
|
{
|
||||||
inline QDBusItem(QDBusModel::Type aType, const QString &aName, QDBusItem *aParent = 0)
|
inline QDBusItem(QDBusModel::Type aType, const QString &aName, QDBusItem *aParent = 0)
|
||||||
|
@ -352,4 +354,6 @@ QModelIndex QDBusModel::findObject(const QDBusObjectPath &objectPath)
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <moc_qdbusmodel.h>
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#include "moc_qdbusmodel.h"
|
||||||
|
|
|
@ -43,15 +43,15 @@
|
||||||
#define QDBUSMODEL_H
|
#define QDBUSMODEL_H
|
||||||
|
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
|
#include <QtXml/QDomDocument>
|
||||||
|
#include <QtXml/QDomElement>
|
||||||
#include <QtDBus/QDBusArgument>
|
#include <QtDBus/QDBusArgument>
|
||||||
#include <QtDBus/QDBusConnection>
|
#include <QtDBus/QDBusConnection>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
struct QDBusItem;
|
struct QDBusItem;
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QDomDocument)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QDomElement)
|
|
||||||
|
|
||||||
|
|
||||||
class QDBusModel: public QAbstractItemModel
|
class QDBusModel: public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -92,5 +92,7 @@ private:
|
||||||
QDBusItem *root;
|
QDBusItem *root;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#include <QtDBus/QDBusConnectionInterface>
|
#include <QtDBus/QDBusConnectionInterface>
|
||||||
#include <QtDBus/QDBusMetaType>
|
#include <QtDBus/QDBusMetaType>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QDBusViewModel: public QDBusModel
|
class QDBusViewModel: public QDBusModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -533,4 +535,6 @@ void QDBusViewer::anchorClicked(const QUrl &url)
|
||||||
are output in the message view on the lower side of the window.
|
are output in the message view on the lower side of the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <moc_qdbusviewer.h>
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#include "moc_qdbusviewer.h"
|
||||||
|
|
|
@ -42,13 +42,13 @@
|
||||||
#ifndef QDBUSVIEWER_H
|
#ifndef QDBUSVIEWER_H
|
||||||
#define QDBUSVIEWER_H
|
#define QDBUSVIEWER_H
|
||||||
|
|
||||||
|
#include <QtXml/QDomDocument>
|
||||||
|
#include <QtXml/QDomElement>
|
||||||
#include <QtGui/QtGui>
|
#include <QtGui/QtGui>
|
||||||
#include <QtDBus/QDBusConnection>
|
#include <QtDBus/QDBusConnection>
|
||||||
#include <QtDBus/QDBusMessage>
|
#include <QtDBus/QDBusMessage>
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QTreeView)
|
QT_BEGIN_NAMESPACE
|
||||||
QT_FORWARD_DECLARE_CLASS(QDomDocument)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QDomElement)
|
|
||||||
|
|
||||||
struct BusSignature
|
struct BusSignature
|
||||||
{
|
{
|
||||||
|
@ -100,4 +100,6 @@ private:
|
||||||
QRegExp objectPathRegExp;
|
QRegExp objectPathRegExp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
Q_DECLARE_METATYPE(QByteArray*)
|
Q_DECLARE_METATYPE(QByteArray*)
|
||||||
Q_DECLARE_METATYPE(ByteArrayClass*)
|
Q_DECLARE_METATYPE(ByteArrayClass*)
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class ByteArrayClassPropertyIterator : public QScriptClassPropertyIterator
|
class ByteArrayClassPropertyIterator : public QScriptClassPropertyIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -306,3 +308,5 @@ uint ByteArrayClassPropertyIterator::id() const
|
||||||
return m_last;
|
return m_last;
|
||||||
}
|
}
|
||||||
//! [8]
|
//! [8]
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#include <QtScript/QScriptClass>
|
#include <QtScript/QScriptClass>
|
||||||
#include <QtScript/QScriptString>
|
#include <QtScript/QScriptString>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class ByteArrayClass : public QObject, public QScriptClass
|
class ByteArrayClass : public QObject, public QScriptClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -88,4 +90,6 @@ private:
|
||||||
QScriptValue ctor;
|
QScriptValue ctor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
Q_DECLARE_METATYPE(QByteArray*)
|
Q_DECLARE_METATYPE(QByteArray*)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
ByteArrayPrototype::ByteArrayPrototype(QObject *parent)
|
ByteArrayPrototype::ByteArrayPrototype(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
|
@ -136,4 +138,6 @@ QScriptValue ByteArrayPrototype::valueOf() const
|
||||||
}
|
}
|
||||||
//! [2]
|
//! [2]
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "moc_bytearrayprototype.h"
|
#include "moc_bytearrayprototype.h"
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
#include <QtScript/QScriptable>
|
#include <QtScript/QScriptable>
|
||||||
#include <QtScript/QScriptValue>
|
#include <QtScript/QScriptValue>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
//! [0]
|
//! [0]
|
||||||
class ByteArrayPrototype : public QObject, public QScriptable
|
class ByteArrayPrototype : public QObject, public QScriptable
|
||||||
{
|
{
|
||||||
|
@ -75,5 +77,6 @@ private:
|
||||||
};
|
};
|
||||||
//! [0]
|
//! [0]
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,17 +38,18 @@
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <qscriptengine.h>
|
|
||||||
|
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QTextStream>
|
#include <QtCore/QTextStream>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
|
#include <QtScript/QScriptEngine>
|
||||||
#include <QtScriptTools/QScriptEngineDebugger>
|
#include <QtScriptTools/QScriptEngineDebugger>
|
||||||
|
|
||||||
|
#include "bytearrayclass.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "bytearrayclass.h"
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
static bool wantsToQuit;
|
static bool wantsToQuit;
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,6 @@
|
||||||
#include <qsqldatabase.h>
|
#include <qsqldatabase.h>
|
||||||
#include <qsqlquery.h>
|
#include <qsqlquery.h>
|
||||||
#include <qsqldriver.h>
|
#include <qsqldriver.h>
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
#include <q3sqlcursor.h>
|
|
||||||
#include <q3sqlrecordinfo.h>
|
|
||||||
#include <q3cstring.h>
|
|
||||||
#endif
|
|
||||||
#include <qsqlrecord.h>
|
#include <qsqlrecord.h>
|
||||||
#include <qsqlfield.h>
|
#include <qsqlfield.h>
|
||||||
#include <qsqlindex.h>
|
#include <qsqlindex.h>
|
||||||
|
@ -63,7 +58,6 @@
|
||||||
|
|
||||||
//TESTED_FILES=
|
//TESTED_FILES=
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSqlDatabase)
|
|
||||||
struct FieldDef;
|
struct FieldDef;
|
||||||
|
|
||||||
class tst_QSqlDatabase : public QObject
|
class tst_QSqlDatabase : public QObject
|
||||||
|
@ -132,8 +126,6 @@ private slots:
|
||||||
//problem specific tests
|
//problem specific tests
|
||||||
void alterTable_data() { generic_data(); }
|
void alterTable_data() { generic_data(); }
|
||||||
void alterTable();
|
void alterTable();
|
||||||
void recordNonSelect_data() { generic_data(); }
|
|
||||||
void recordNonSelect();
|
|
||||||
void caseSensivity_data() { generic_data(); }
|
void caseSensivity_data() { generic_data(); }
|
||||||
void caseSensivity();
|
void caseSensivity();
|
||||||
void noEscapedFieldNamesInRecord_data() { generic_data(); }
|
void noEscapedFieldNamesInRecord_data() { generic_data(); }
|
||||||
|
@ -213,13 +205,8 @@ private:
|
||||||
void populateTestTables(QSqlDatabase db);
|
void populateTestTables(QSqlDatabase db);
|
||||||
void generic_data(const QString &engine=QString());
|
void generic_data(const QString &engine=QString());
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
void testRecordInfo(const FieldDef fieldDefs[], const Q3SqlRecordInfo& inf);
|
|
||||||
#endif
|
|
||||||
void testRecord(const FieldDef fieldDefs[], const QSqlRecord& inf, QSqlDatabase db);
|
void testRecord(const FieldDef fieldDefs[], const QSqlRecord& inf, QSqlDatabase db);
|
||||||
void commonFieldTest(const FieldDef fieldDefs[], QSqlDatabase, const int);
|
void commonFieldTest(const FieldDef fieldDefs[], QSqlDatabase, const int);
|
||||||
void checkValues(const FieldDef fieldDefs[], QSqlDatabase db);
|
|
||||||
void checkNullValues(const FieldDef fieldDefs[], QSqlDatabase db);
|
|
||||||
|
|
||||||
tst_Databases dbs;
|
tst_Databases dbs;
|
||||||
};
|
};
|
||||||
|
@ -240,11 +227,7 @@ struct FieldDef {
|
||||||
{
|
{
|
||||||
QString rt = typeName;
|
QString rt = typeName;
|
||||||
rt.replace(QRegExp("\\s"), QString("_"));
|
rt.replace(QRegExp("\\s"), QString("_"));
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
int i = rt.find("(");
|
|
||||||
#else
|
|
||||||
int i = rt.indexOf("(");
|
int i = rt.indexOf("(");
|
||||||
#endif
|
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
i = rt.length();
|
i = rt.length();
|
||||||
if (i > 20)
|
if (i > 20)
|
||||||
|
@ -514,31 +497,6 @@ void tst_QSqlDatabase::open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordNonSelect()
|
|
||||||
{
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
QFETCH(QString, dbName);
|
|
||||||
QSqlDatabase db = QSqlDatabase::database(dbName);
|
|
||||||
CHECK_DATABASE(db);
|
|
||||||
|
|
||||||
QSqlQuery q(db);
|
|
||||||
|
|
||||||
// nothing should happen on an empty query
|
|
||||||
QSqlRecord rec = db.record(q);
|
|
||||||
QVERIFY(rec.isEmpty());
|
|
||||||
Q3SqlRecordInfo rInf = db.recordInfo(q);
|
|
||||||
QVERIFY(rInf.isEmpty());
|
|
||||||
|
|
||||||
QVERIFY_SQL(q, exec("create table " + qTableName("qtest_temp", __FILE__) + " (id int)"));
|
|
||||||
|
|
||||||
// query without result set should return empty record
|
|
||||||
rec = db.record(q);
|
|
||||||
QVERIFY(rec.isEmpty());
|
|
||||||
rInf = db.recordInfo(q);
|
|
||||||
QVERIFY(rInf.isEmpty());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QSqlDatabase::tables()
|
void tst_QSqlDatabase::tables()
|
||||||
{
|
{
|
||||||
QFETCH(QString, dbName);
|
QFETCH(QString, dbName);
|
||||||
|
@ -644,18 +602,9 @@ void tst_QSqlDatabase::alterTable()
|
||||||
QVERIFY_SQL(q, exec("create table " + qtestalter + " (F1 char(20), F2 char(20), F3 char(20))"));
|
QVERIFY_SQL(q, exec("create table " + qtestalter + " (F1 char(20), F2 char(20), F3 char(20))"));
|
||||||
QSqlRecord rec = db.record(qtestalter);
|
QSqlRecord rec = db.record(qtestalter);
|
||||||
QCOMPARE((int)rec.count(), 3);
|
QCOMPARE((int)rec.count(), 3);
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
Q3SqlRecordInfo rinf = db.recordInfo(qtestalter);
|
|
||||||
QCOMPARE((int)rinf.count(), 3);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
int i;
|
|
||||||
for (i = 0; i < 3; ++i) {
|
|
||||||
QCOMPARE(rec.field(i).name().toUpper(), QString("F%1").arg(i + 1));
|
QCOMPARE(rec.field(i).name().toUpper(), QString("F%1").arg(i + 1));
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
QCOMPARE(rinf[ i ].name().upper(), QString("F%1").arg(i + 1));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!q.exec("alter table " + qtestalter + " drop column F2")) {
|
if (!q.exec("alter table " + qtestalter + " drop column F2")) {
|
||||||
|
@ -663,36 +612,13 @@ void tst_QSqlDatabase::alterTable()
|
||||||
}
|
}
|
||||||
|
|
||||||
rec = db.record(qtestalter);
|
rec = db.record(qtestalter);
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
rinf = db.recordInfo(qtestalter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QCOMPARE((int)rec.count(), 2);
|
QCOMPARE((int)rec.count(), 2);
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
QCOMPARE((int)rinf.count(), 2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QCOMPARE(rec.field(0).name().toUpper(), QString("F1"));
|
QCOMPARE(rec.field(0).name().toUpper(), QString("F1"));
|
||||||
QCOMPARE(rec.field(1).name().toUpper(), QString("F3"));
|
QCOMPARE(rec.field(1).name().toUpper(), QString("F3"));
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
QCOMPARE(rinf[ 0 ].name().upper(), QString("F1"));
|
|
||||||
QCOMPARE(rinf[ 1 ].name().upper(), QString("F3"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
q.exec("select * from " + qtestalter);
|
q.exec("select * from " + qtestalter);
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
rec = db.record(q);
|
|
||||||
rinf = db.recordInfo(q);
|
|
||||||
|
|
||||||
QCOMPARE((int)rec.count(), 2);
|
|
||||||
QCOMPARE((int)rinf.count(), 2);
|
|
||||||
|
|
||||||
QCOMPARE(rec.field(0).name().upper(), QString("F1"));
|
|
||||||
QCOMPARE(rec.field(1).name().upper(), QString("F3"));
|
|
||||||
QCOMPARE(rinf[ 0 ].name().upper(), QString("F1"));
|
|
||||||
QCOMPARE(rinf[ 1 ].name().upper(), QString("F3"));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -716,27 +642,7 @@ void tst_QSqlDatabase::record()
|
||||||
const int fieldCount = createFieldTable(fieldDefs, db);
|
const int fieldCount = createFieldTable(fieldDefs, db);
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
// doesn't work with oracle: checkNullValues(fieldDefs, db);
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
void tst_QSqlDatabase::testRecordInfo(const FieldDef fieldDefs[], const Q3SqlRecordInfo& inf)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) {
|
|
||||||
QCOMPARE(inf[i+1].name().upper(), fieldDefs[ i ].fieldName().upper());
|
|
||||||
if (inf[i+1].type() != fieldDefs[ i ].type) {
|
|
||||||
QFAIL(QString(" Expected: '%1' Received: '%2' for field %3 in testRecordInfo").arg(
|
|
||||||
QVariant::typeToName(fieldDefs[ i ].type)).arg(
|
|
||||||
QVariant::typeToName(inf[i+1].type())).arg(
|
|
||||||
fieldDefs[ i ].fieldName()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -765,125 +671,12 @@ void tst_QSqlDatabase::commonFieldTest(const FieldDef fieldDefs[], QSqlDatabase
|
||||||
CHECK_DATABASE(db);
|
CHECK_DATABASE(db);
|
||||||
|
|
||||||
// check whether recordInfo returns the right types
|
// check whether recordInfo returns the right types
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
Q3SqlRecordInfo inf = db.recordInfo(qTableName("qtestfields", __FILE__));
|
|
||||||
QCOMPARE((int)inf.count(), fieldCount+1);
|
|
||||||
testRecordInfo(fieldDefs, inf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QSqlRecord rec = db.record(qTableName("qtestfields", __FILE__));
|
QSqlRecord rec = db.record(qTableName("qtestfields", __FILE__));
|
||||||
QCOMPARE((int)rec.count(), fieldCount+1);
|
QCOMPARE((int)rec.count(), fieldCount+1);
|
||||||
testRecord(fieldDefs, rec, db);
|
testRecord(fieldDefs, rec, db);
|
||||||
|
|
||||||
QSqlQuery q(db);
|
QSqlQuery q(db);
|
||||||
QVERIFY_SQL(q, exec("select * from " + qTableName("qtestfields", __FILE__)));
|
QVERIFY_SQL(q, exec("select * from " + qTableName("qtestfields", __FILE__)));
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
inf = db.recordInfo(q);
|
|
||||||
QCOMPARE((int)inf.count(), fieldCount+1);
|
|
||||||
testRecordInfo(fieldDefs, inf);
|
|
||||||
|
|
||||||
rec = db.record(q);
|
|
||||||
QCOMPARE((int)rec.count(), fieldCount+1);
|
|
||||||
testRecord(fieldDefs, rec, db);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// inserts testdata into the testtable, fetches and compares them
|
|
||||||
void tst_QSqlDatabase::checkValues(const FieldDef fieldDefs[], QSqlDatabase db)
|
|
||||||
{
|
|
||||||
Q_UNUSED(fieldDefs);
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
CHECK_DATABASE(db);
|
|
||||||
|
|
||||||
Q3SqlCursor cur(qTableName("qtestfields", __FILE__), true, db);
|
|
||||||
QVERIFY_SQL(cur, select());
|
|
||||||
QSqlRecord* rec = cur.primeInsert();
|
|
||||||
QVERIFY(rec);
|
|
||||||
rec->setValue("id", pkey++);
|
|
||||||
int i = 0;
|
|
||||||
for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) {
|
|
||||||
rec->setValue(fieldDefs[ i ].fieldName(), fieldDefs[ i ].val);
|
|
||||||
// qDebug(QString("inserting %1 into %2").arg(fieldDefs[ i ].val.toString()).arg(fieldDefs[ i ].fieldName()));
|
|
||||||
}
|
|
||||||
QVERIFY_SQL(cur, insert());
|
|
||||||
cur.setForwardOnly(true);
|
|
||||||
QVERIFY_SQL(cur, select("id = " + QString::number(pkey - 1)));
|
|
||||||
QVERIFY_SQL(cur, next());
|
|
||||||
|
|
||||||
for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) {
|
|
||||||
bool ok = false;
|
|
||||||
QVariant val1 = cur.value(fieldDefs[ i ].fieldName());
|
|
||||||
QVariant val2 = fieldDefs[ i ].val;
|
|
||||||
if (val1.type() == QVariant::String)
|
|
||||||
//TDS Workaround
|
|
||||||
val1 = val1.toString().stripWhiteSpace();
|
|
||||||
if (fieldDefs[ i ].fieldName() == "t_real") {
|
|
||||||
// strip precision
|
|
||||||
val1 = (float)val1.toDouble();
|
|
||||||
val2 = (float)val2.toDouble();
|
|
||||||
}
|
|
||||||
if (val1.canCast(QVariant::Double) && val2.type() == QVariant::Double) {
|
|
||||||
// we don't care about precision here, we just want to know whether
|
|
||||||
// we can insert/fetch the right values
|
|
||||||
ok = (val1.toDouble() - val2.toDouble() < 0.00001);
|
|
||||||
} else if (val1.type() == val2.type()) {
|
|
||||||
ok = (val1 == val2);
|
|
||||||
} else {
|
|
||||||
ok = (val1.toString() == val2.toString());
|
|
||||||
}
|
|
||||||
if (!ok) {
|
|
||||||
if (val2.type() == QVariant::DateTime || val2.type() == QVariant::Time)
|
|
||||||
qDebug("Expected Time: " + val2.toTime().toString("hh:mm:ss.zzz"));
|
|
||||||
if (val1.type() == QVariant::DateTime || val1.type() == QVariant::Time)
|
|
||||||
qDebug("Received Time: " + val1.toTime().toString("hh:mm:ss.zzz"));
|
|
||||||
QFAIL(QString(" Expected: '%1' Received: '%2' for field %3 (etype %4 rtype %5) in checkValues").arg(
|
|
||||||
val2.type() == QVariant::ByteArray ? val2.toByteArray().toHex() : val2.toString()).arg(
|
|
||||||
val1.type() == QVariant::ByteArray ? val1.toByteArray().toHex() : val1.toString()).arg(
|
|
||||||
fieldDefs[ i ].fieldName()).arg(
|
|
||||||
val2.typeName()).arg(
|
|
||||||
val1.typeName())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// inserts a NULL value for each nullable field in testdata, fetches and checks whether
|
|
||||||
// we get back NULL
|
|
||||||
void tst_QSqlDatabase::checkNullValues(const FieldDef fieldDefs[], QSqlDatabase db)
|
|
||||||
{
|
|
||||||
Q_UNUSED(fieldDefs);
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
CHECK_DATABASE(db);
|
|
||||||
|
|
||||||
Q3SqlCursor cur(qTableName("qtestfields", __FILE__), true, db);
|
|
||||||
QVERIFY_SQL(cur, select());
|
|
||||||
QSqlRecord* rec = cur.primeInsert();
|
|
||||||
QVERIFY(rec);
|
|
||||||
rec->setValue("id", pkey++);
|
|
||||||
int i = 0;
|
|
||||||
for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) {
|
|
||||||
if (fieldDefs[ i ].fieldName(), fieldDefs[ i ].nullable)
|
|
||||||
rec->setNull(fieldDefs[ i ].fieldName());
|
|
||||||
else
|
|
||||||
rec->setValue(fieldDefs[ i ].fieldName(), fieldDefs[ i ].val);
|
|
||||||
}
|
|
||||||
QVERIFY_SQL(cur, insert());
|
|
||||||
cur.setForwardOnly(true);
|
|
||||||
QVERIFY_SQL(cur, select("id = " + QString::number(pkey - 1)));
|
|
||||||
QVERIFY_SQL(cur, next());
|
|
||||||
|
|
||||||
for (i = 0; !fieldDefs[ i ].typeName.isNull(); ++i) {
|
|
||||||
if (fieldDefs[ i ].nullable == false)
|
|
||||||
continue;
|
|
||||||
// multiple inheritance sucks so much
|
|
||||||
QVERIFY2(((QSqlQuery)cur).isNull(i + 1), "Check whether '" + fieldDefs[ i ].fieldName() + "' is null in QSqlQuery");
|
|
||||||
QVERIFY2(((QSqlRecord)cur).isNull(fieldDefs[ i ].fieldName()), "Check whether '" + fieldDefs[ i ].fieldName() + "' is null in QSqlRecord");
|
|
||||||
if (!cur.value(fieldDefs[ i ].fieldName()).isNull())
|
|
||||||
qDebug(QString("QVariant is not null for NULL-Value in Field '%1'").arg(fieldDefs[ i ].fieldName()));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordTDS()
|
void tst_QSqlDatabase::recordTDS()
|
||||||
|
@ -912,11 +705,6 @@ void tst_QSqlDatabase::recordTDS()
|
||||||
FieldDef("nchar(20)", QVariant::String, "blah3"),
|
FieldDef("nchar(20)", QVariant::String, "blah3"),
|
||||||
FieldDef("nvarchar(20)", QVariant::String, "blah4"),
|
FieldDef("nvarchar(20)", QVariant::String, "blah4"),
|
||||||
FieldDef("text", QVariant::String, "blah5"),
|
FieldDef("text", QVariant::String, "blah5"),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
FieldDef("binary(20)", QVariant::ByteArray, Q3CString("blah6")),
|
|
||||||
FieldDef("varbinary(20)", QVariant::ByteArray, Q3CString("blah7")),
|
|
||||||
FieldDef("image", QVariant::ByteArray, Q3CString("blah8")),
|
|
||||||
#endif
|
|
||||||
FieldDef("bit", QVariant::Int, 1, false),
|
FieldDef("bit", QVariant::Int, 1, false),
|
||||||
|
|
||||||
FieldDef()
|
FieldDef()
|
||||||
|
@ -926,10 +714,6 @@ void tst_QSqlDatabase::recordTDS()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordOCI()
|
void tst_QSqlDatabase::recordOCI()
|
||||||
|
@ -986,9 +770,6 @@ void tst_QSqlDatabase::recordOCI()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i)
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
|
|
||||||
// some additional tests
|
// some additional tests
|
||||||
QSqlRecord rec = db.record(qTableName("qtestfields", __FILE__));
|
QSqlRecord rec = db.record(qTableName("qtestfields", __FILE__));
|
||||||
|
@ -1010,18 +791,11 @@ void tst_QSqlDatabase::recordPSQL()
|
||||||
|
|
||||||
FieldDef byteadef;
|
FieldDef byteadef;
|
||||||
if (db.driver()->hasFeature(QSqlDriver::BLOB))
|
if (db.driver()->hasFeature(QSqlDriver::BLOB))
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
byteadef = FieldDef("bytea", QVariant::ByteArray, QByteArray(Q3CString("bl\\ah")));
|
|
||||||
#else
|
|
||||||
byteadef = FieldDef("bytea", QVariant::ByteArray, QByteArray("bl\\ah"));
|
byteadef = FieldDef("bytea", QVariant::ByteArray, QByteArray("bl\\ah"));
|
||||||
#endif
|
|
||||||
static FieldDef fieldDefs[] = {
|
static FieldDef fieldDefs[] = {
|
||||||
FieldDef("bigint", QVariant::LongLong, Q_INT64_C(9223372036854775807)),
|
FieldDef("bigint", QVariant::LongLong, Q_INT64_C(9223372036854775807)),
|
||||||
FieldDef("bigserial", QVariant::LongLong, 100, false),
|
FieldDef("bigserial", QVariant::LongLong, 100, false),
|
||||||
FieldDef("bit", QVariant::String, "1"), // a bit in postgres is a bit-string
|
FieldDef("bit", QVariant::String, "1"), // a bit in postgres is a bit-string
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
FieldDef("boolean", QVariant::Bool, QVariant(bool(true), 0)),
|
|
||||||
#endif
|
|
||||||
FieldDef("box", QVariant::String, "(5,6),(1,2)"),
|
FieldDef("box", QVariant::String, "(5,6),(1,2)"),
|
||||||
FieldDef("char(20)", QVariant::String, "blah5678901234567890"),
|
FieldDef("char(20)", QVariant::String, "blah5678901234567890"),
|
||||||
FieldDef("varchar(20)", QVariant::String, "blah5678901234567890"),
|
FieldDef("varchar(20)", QVariant::String, "blah5678901234567890"),
|
||||||
|
@ -1070,7 +844,6 @@ void tst_QSqlDatabase::recordPSQL()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
||||||
// increase serial values
|
// increase serial values
|
||||||
for (int i2 = 0; !fieldDefs[ i2 ].typeName.isNull(); ++i2) {
|
for (int i2 = 0; !fieldDefs[ i2 ].typeName.isNull(); ++i2) {
|
||||||
|
@ -1078,15 +851,10 @@ void tst_QSqlDatabase::recordPSQL()
|
||||||
fieldDefs[ i2 ].typeName == "bigserial") {
|
fieldDefs[ i2 ].typeName == "bigserial") {
|
||||||
|
|
||||||
FieldDef def = fieldDefs[ i2 ];
|
FieldDef def = fieldDefs[ i2 ];
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
def.val = def.val.asInt() + 1;
|
|
||||||
#else
|
|
||||||
def.val = def.val.toInt() + 1;
|
def.val = def.val.toInt() + 1;
|
||||||
#endif
|
|
||||||
fieldDefs[ i2 ] = def;
|
fieldDefs[ i2 ] = def;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,13 +876,8 @@ void tst_QSqlDatabase::recordMySQL()
|
||||||
with space on insert, and trailing spaces are removed on select.
|
with space on insert, and trailing spaces are removed on select.
|
||||||
*/
|
*/
|
||||||
if( vernum >= ((5 << 16) + 15) ) {
|
if( vernum >= ((5 << 16) + 15) ) {
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
bin10 = FieldDef("binary(10)", QVariant::ByteArray, QByteArray(Q3CString("123abc ")));
|
|
||||||
varbin10 = FieldDef("varbinary(10)", QVariant::ByteArray, QByteArray(Q3CString("123abcv ")));
|
|
||||||
#else
|
|
||||||
bin10 = FieldDef("binary(10)", QVariant::ByteArray, QString("123abc "));
|
bin10 = FieldDef("binary(10)", QVariant::ByteArray, QString("123abc "));
|
||||||
varbin10 = FieldDef("varbinary(10)", QVariant::ByteArray, QString("123abcv "));
|
varbin10 = FieldDef("varbinary(10)", QVariant::ByteArray, QString("123abcv "));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDateTime dt(QDate::currentDate(), QTime(1, 2, 3, 0));
|
static QDateTime dt(QDate::currentDate(), QTime(1, 2, 3, 0));
|
||||||
|
@ -1140,20 +903,10 @@ void tst_QSqlDatabase::recordMySQL()
|
||||||
FieldDef("year", QVariant::Int, 2003),
|
FieldDef("year", QVariant::Int, 2003),
|
||||||
FieldDef("char(20)", QVariant::String, "Blah"),
|
FieldDef("char(20)", QVariant::String, "Blah"),
|
||||||
FieldDef("varchar(20)", QVariant::String, "BlahBlah"),
|
FieldDef("varchar(20)", QVariant::String, "BlahBlah"),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
FieldDef("tinyblob", QVariant::ByteArray, QByteArray(Q3CString("blah1"))),
|
|
||||||
FieldDef("blob", QVariant::ByteArray, QByteArray(Q3CString("blah2"))),
|
|
||||||
FieldDef("mediumblob", QVariant::ByteArray,QByteArray(Q3CString("blah3"))),
|
|
||||||
FieldDef("longblob", QVariant::ByteArray, QByteArray(Q3CString("blah4"))),
|
|
||||||
#endif
|
|
||||||
FieldDef("tinytext", QVariant::String, QString("blah5")),
|
FieldDef("tinytext", QVariant::String, QString("blah5")),
|
||||||
FieldDef("text", QVariant::String, QString("blah6")),
|
FieldDef("text", QVariant::String, QString("blah6")),
|
||||||
FieldDef("mediumtext", QVariant::String, QString("blah7")),
|
FieldDef("mediumtext", QVariant::String, QString("blah7")),
|
||||||
FieldDef("longtext", QVariant::String, QString("blah8")),
|
FieldDef("longtext", QVariant::String, QString("blah8")),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
bin10,
|
|
||||||
varbin10,
|
|
||||||
#endif
|
|
||||||
// SET OF?
|
// SET OF?
|
||||||
|
|
||||||
FieldDef()
|
FieldDef()
|
||||||
|
@ -1163,10 +916,6 @@ void tst_QSqlDatabase::recordMySQL()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
|
|
||||||
QSqlQuery q(db);
|
QSqlQuery q(db);
|
||||||
QVERIFY_SQL(q, exec("SELECT DATE_SUB(CURDATE(), INTERVAL 2 DAY)"));
|
QVERIFY_SQL(q, exec("SELECT DATE_SUB(CURDATE(), INTERVAL 2 DAY)"));
|
||||||
|
@ -1200,11 +949,6 @@ void tst_QSqlDatabase::recordDB2()
|
||||||
// FieldDef("graphic(20)", QVariant::String, QString("Blah4")),
|
// FieldDef("graphic(20)", QVariant::String, QString("Blah4")),
|
||||||
// FieldDef("vargraphic(20)", QVariant::String, QString("Blah5")),
|
// FieldDef("vargraphic(20)", QVariant::String, QString("Blah5")),
|
||||||
// FieldDef("long vargraphic", QVariant::String, QString("Blah6")),
|
// FieldDef("long vargraphic", QVariant::String, QString("Blah6")),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
// FieldDef("clob(20)", QVariant::CString, QString("Blah7")),
|
|
||||||
// FieldDef("dbclob(20)", QVariant::CString, QString("Blah8")),
|
|
||||||
// FieldDef("blob(20)", QVariant::ByteArray, QByteArray(Q3CString("Blah9"))),
|
|
||||||
#endif
|
|
||||||
//X FieldDef("datalink", QVariant::String, QString("DLVALUE('Blah10')")),
|
//X FieldDef("datalink", QVariant::String, QString("DLVALUE('Blah10')")),
|
||||||
FieldDef()
|
FieldDef()
|
||||||
};
|
};
|
||||||
|
@ -1213,10 +957,6 @@ void tst_QSqlDatabase::recordDB2()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordIBase()
|
void tst_QSqlDatabase::recordIBase()
|
||||||
|
@ -1243,10 +983,6 @@ void tst_QSqlDatabase::recordIBase()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordSQLite()
|
void tst_QSqlDatabase::recordSQLite()
|
||||||
|
@ -1273,10 +1009,6 @@ void tst_QSqlDatabase::recordSQLite()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordSQLServer()
|
void tst_QSqlDatabase::recordSQLServer()
|
||||||
|
@ -1296,9 +1028,6 @@ void tst_QSqlDatabase::recordSQLServer()
|
||||||
FieldDef("bigint", QVariant::LongLong, 12345),
|
FieldDef("bigint", QVariant::LongLong, 12345),
|
||||||
FieldDef("int", QVariant::Int, 123456),
|
FieldDef("int", QVariant::Int, 123456),
|
||||||
FieldDef("tinyint", QVariant::UInt, 255),
|
FieldDef("tinyint", QVariant::UInt, 255),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
FieldDef("image", QVariant::ByteArray, Q3CString("Blah1")),
|
|
||||||
#endif
|
|
||||||
FieldDef("float", QVariant::Double, 1.12345),
|
FieldDef("float", QVariant::Double, 1.12345),
|
||||||
FieldDef("numeric(5,2)", QVariant::Double, 123.45),
|
FieldDef("numeric(5,2)", QVariant::Double, 123.45),
|
||||||
FieldDef("uniqueidentifier", QVariant::String,
|
FieldDef("uniqueidentifier", QVariant::String,
|
||||||
|
@ -1311,10 +1040,6 @@ void tst_QSqlDatabase::recordSQLServer()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::recordAccess()
|
void tst_QSqlDatabase::recordAccess()
|
||||||
|
@ -1338,9 +1063,6 @@ void tst_QSqlDatabase::recordAccess()
|
||||||
FieldDef("single", QVariant::Double, 1.12345),
|
FieldDef("single", QVariant::Double, 1.12345),
|
||||||
FieldDef("double", QVariant::Double, 1.123456),
|
FieldDef("double", QVariant::Double, 1.123456),
|
||||||
FieldDef("byte", QVariant::UInt, 255),
|
FieldDef("byte", QVariant::UInt, 255),
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
FieldDef("binary(5)", QVariant::ByteArray, Q3CString("Blah2")),
|
|
||||||
#endif
|
|
||||||
FieldDef("long", QVariant::Int, 2147483647),
|
FieldDef("long", QVariant::Int, 2147483647),
|
||||||
FieldDef("memo", QVariant::String, memo),
|
FieldDef("memo", QVariant::String, memo),
|
||||||
FieldDef()
|
FieldDef()
|
||||||
|
@ -1350,10 +1072,6 @@ void tst_QSqlDatabase::recordAccess()
|
||||||
QVERIFY(fieldCount > 0);
|
QVERIFY(fieldCount > 0);
|
||||||
|
|
||||||
commonFieldTest(fieldDefs, db, fieldCount);
|
commonFieldTest(fieldDefs, db, fieldCount);
|
||||||
checkNullValues(fieldDefs, db);
|
|
||||||
for (int i = 0; i < ITERATION_COUNT; ++i) {
|
|
||||||
checkValues(fieldDefs, db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QSqlDatabase::transaction()
|
void tst_QSqlDatabase::transaction()
|
||||||
|
@ -1494,17 +1212,6 @@ void tst_QSqlDatabase::caseSensivity()
|
||||||
QVERIFY((int)rec.count() > 0);
|
QVERIFY((int)rec.count() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
Q3SqlRecordInfo rInf = db.recordInfo(qTableName("qtest", __FILE__));
|
|
||||||
QVERIFY((int)rInf.count() > 0);
|
|
||||||
if (!cs) {
|
|
||||||
rInf = db.recordInfo(qTableName("QTEST", __FILE__).upper());
|
|
||||||
QVERIFY((int)rInf.count() > 0);
|
|
||||||
rInf = db.recordInfo(qTableName("qTesT", __FILE__));
|
|
||||||
QVERIFY((int)rInf.count() > 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rec = db.primaryIndex(qTableName("qtest", __FILE__));
|
rec = db.primaryIndex(qTableName("qtest", __FILE__));
|
||||||
QVERIFY((int)rec.count() > 0);
|
QVERIFY((int)rec.count() > 0);
|
||||||
if (!cs) {
|
if (!cs) {
|
||||||
|
@ -1558,12 +1265,6 @@ void tst_QSqlDatabase::psql_schemas()
|
||||||
QCOMPARE(rec.fieldName(0), QString("id"));
|
QCOMPARE(rec.fieldName(0), QString("id"));
|
||||||
QCOMPARE(rec.fieldName(1), QString("name"));
|
QCOMPARE(rec.fieldName(1), QString("name"));
|
||||||
|
|
||||||
#ifdef QT3_SUPPORT
|
|
||||||
rec = db.record(QSqlQuery("select * from " + table, db));
|
|
||||||
QCOMPARE(rec.count(), 2);
|
|
||||||
QCOMPARE(rec.fieldName(0), QString("id"));
|
|
||||||
QCOMPARE(rec.fieldName(1), QString("name"));
|
|
||||||
#endif
|
|
||||||
QSqlIndex idx = db.primaryIndex(table);
|
QSqlIndex idx = db.primaryIndex(table);
|
||||||
QCOMPARE(idx.count(), 1);
|
QCOMPARE(idx.count(), 1);
|
||||||
QCOMPARE(idx.fieldName(0), QString("id"));
|
QCOMPARE(idx.fieldName(0), QString("id"));
|
||||||
|
|
|
@ -43,12 +43,7 @@
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QtGui/qwidget.h>
|
#include <QtGui/qwidget.h>
|
||||||
|
#include <QtGui/qgraphicsscene.h>
|
||||||
QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QLabel)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSlider)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSplitter)
|
|
||||||
|
|
||||||
class MainWindow : public QWidget
|
class MainWindow : public QWidget
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,11 +43,10 @@
|
||||||
#define VIEW_H
|
#define VIEW_H
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QGraphicsView>
|
||||||
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
|
#include <QLabel>
|
||||||
QT_FORWARD_DECLARE_CLASS(QLabel)
|
#include <QSlider>
|
||||||
QT_FORWARD_DECLARE_CLASS(QSlider)
|
#include <QToolButton>
|
||||||
QT_FORWARD_DECLARE_CLASS(QToolButton)
|
|
||||||
|
|
||||||
class View : public QFrame
|
class View : public QFrame
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,13 +42,8 @@
|
||||||
#ifndef CHIPTESTER_H
|
#ifndef CHIPTESTER_H
|
||||||
#define CHIPTESTER_H
|
#define CHIPTESTER_H
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QGraphicsScene>
|
||||||
|
#include <QGraphicsView>
|
||||||
QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QLabel)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSlider)
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSplitter)
|
|
||||||
|
|
||||||
class ChipTester : public QGraphicsView
|
class ChipTester : public QGraphicsView
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
#ifndef DOTGRAPH_H
|
#ifndef DOTGRAPH_H
|
||||||
#define DOTGRAPH_H
|
#define DOTGRAPH_H
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QTextStream);
|
#include <QTextStream>
|
||||||
|
|
||||||
class Automaton;
|
class Automaton;
|
||||||
|
|
||||||
class DotGraph
|
class DotGraph
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
#ifndef PARSETABLE_H
|
#ifndef PARSETABLE_H
|
||||||
#define PARSETABLE_H
|
#define PARSETABLE_H
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QTextStream);
|
#include <QTextStream>
|
||||||
|
|
||||||
class Automaton;
|
class Automaton;
|
||||||
|
|
||||||
class ParseTable
|
class ParseTable
|
||||||
|
|
Loading…
Add table
Reference in a new issue