summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qbitfield_p.h11
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h10
-rw-r--r--src/declarative/qml/qdeclarativecontext.h4
-rw-r--r--src/declarative/qml/qdeclarativeengine.h2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.h4
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.h2
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp2
-rw-r--r--src/declarative/qml/qdeclarativelist.h20
8 files changed, 32 insertions, 23 deletions
diff --git a/src/declarative/qml/qbitfield_p.h b/src/declarative/qml/qbitfield_p.h
index 5a11de38..20f474ad 100644
--- a/src/declarative/qml/qbitfield_p.h
+++ b/src/declarative/qml/qbitfield_p.h
@@ -128,15 +128,16 @@ QBitField QBitField::united(const QBitField &o)
rv.bits = max;
rv.ownData = new quint32[length + 1];
*(rv.ownData) = 1;
- rv.data = rv.ownData + 1;
+ quint32 *rvdata;
+ rv.data = rvdata = rv.ownData + 1;
if (bits > o.bits) {
- ::memcpy((quint32 *)rv.data, data, length * sizeof(quint32));
+ ::memcpy(rvdata, data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (o.bits + quint32(31)) / 32; ++ii)
- ((quint32 *)rv.data)[ii] |= o.data[ii];
+ rvdata[ii] |= o.data[ii];
} else {
- ::memcpy((quint32 *)rv.data, o.data, length * sizeof(quint32));
+ ::memcpy(rvdata, o.data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (bits + quint32(31)) / 32; ++ii)
- ((quint32 *)rv.data)[ii] |= data[ii];
+ rvdata[ii] |= data[ii];
}
return rv;
}
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
index ace62d77..b3c73ef8 100644
--- a/src/declarative/qml/qdeclarativecomponent.h
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -60,10 +60,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject
Q_PROPERTY(QUrl url READ url CONSTANT)
public:
- QDeclarativeComponent(QObject *parent = 0);
- QDeclarativeComponent(QDeclarativeEngine *, QObject *parent=0);
- QDeclarativeComponent(QDeclarativeEngine *, const QString &fileName, QObject *parent = 0);
- QDeclarativeComponent(QDeclarativeEngine *, const QUrl &url, QObject *parent = 0);
+ explicit QDeclarativeComponent(QObject *parent = Q_NULLPTR);
+ explicit QDeclarativeComponent(QDeclarativeEngine *, QObject *parent = Q_NULLPTR);
+ explicit QDeclarativeComponent(QDeclarativeEngine *, const QString &fileName, QObject *parent = Q_NULLPTR);
+ explicit QDeclarativeComponent(QDeclarativeEngine *, const QUrl &url, QObject *parent = Q_NULLPTR);
virtual ~QDeclarativeComponent();
Q_ENUMS(Status)
@@ -82,7 +82,7 @@ public:
QUrl url() const;
- virtual QObject *create(QDeclarativeContext *context = 0);
+ virtual QObject *create(QDeclarativeContext *context = Q_NULLPTR);
virtual QObject *beginCreate(QDeclarativeContext *);
virtual void completeCreate();
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index 0b6ece4a..ed78da6d 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -58,8 +58,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeContext : public QObject
Q_DECLARE_PRIVATE(QDeclarativeContext)
public:
- QDeclarativeContext(QDeclarativeEngine *parent, QObject *objParent=0);
- QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent=0);
+ explicit QDeclarativeContext(QDeclarativeEngine *parent, QObject *objParent = Q_NULLPTR);
+ explicit QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent = Q_NULLPTR);
virtual ~QDeclarativeContext();
bool isValid() const;
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 1b02bf14..6cf7515d 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -62,7 +62,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QObject
Q_PROPERTY(QString offlineStoragePath READ offlineStoragePath WRITE setOfflineStoragePath)
Q_OBJECT
public:
- QDeclarativeEngine(QObject *p = 0);
+ explicit QDeclarativeEngine(QObject *p = Q_NULLPTR);
virtual ~QDeclarativeEngine();
QDeclarativeContext *rootContext() const;
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
index 61ef3b70..c92471db 100644
--- a/src/declarative/qml/qdeclarativeexpression.h
+++ b/src/declarative/qml/qdeclarativeexpression.h
@@ -55,7 +55,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject
Q_OBJECT
public:
QDeclarativeExpression();
- QDeclarativeExpression(QDeclarativeContext *, QObject *, const QString &, QObject * = 0);
+ explicit QDeclarativeExpression(QDeclarativeContext *, QObject *, const QString &, QObject * = Q_NULLPTR);
virtual ~QDeclarativeExpression();
QDeclarativeEngine *engine() const;
@@ -77,7 +77,7 @@ public:
void clearError();
QDeclarativeError error() const;
- QVariant evaluate(bool *valueIsUndefined = 0);
+ QVariant evaluate(bool *valueIsUndefined = Q_NULLPTR);
Q_SIGNALS:
void valueChanged();
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.h b/src/declarative/qml/qdeclarativeextensionplugin.h
index 420921a9..552e15f9 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.h
+++ b/src/declarative/qml/qdeclarativeextensionplugin.h
@@ -49,7 +49,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExtensionPlugin : public QObject, public
Q_OBJECT
Q_INTERFACES(QDeclarativeExtensionInterface)
public:
- explicit QDeclarativeExtensionPlugin(QObject *parent = 0);
+ explicit QDeclarativeExtensionPlugin(QObject *parent = Q_NULLPTR);
~QDeclarativeExtensionPlugin();
virtual void registerTypes(const char *uri) = 0;
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 9404834a..9df5dc4a 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -840,7 +840,7 @@ QString QDeclarativeImportDatabase::resolvePlugin(const QDir &qmldirPath, const
\row \li Unix/Linux \li \c .so
\row \li AIX \li \c .a
\row \li HP-UX \li \c .sl, \c .so (HP-UXi)
- \row \li Mac OS X \li \c .dylib, \c .bundle, \c .so
+ \row \li OS X \li \c .dylib, \c .bundle, \c .so
\endtable
Version number on unix are ignored.
diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h
index 78d2f422..e5b8d249 100644
--- a/src/declarative/qml/qdeclarativelist.h
+++ b/src/declarative/qml/qdeclarativelist.h
@@ -56,13 +56,21 @@ public:
typedef void (*ClearFunction)(QDeclarativeListProperty<T> *);
QDeclarativeListProperty()
- : object(0), data(0), append(0), count(0), at(0), clear(0), dummy1(0), dummy2(0) {}
+ : object(Q_NULLPTR),
+ data(Q_NULLPTR),
+ append(Q_NULLPTR),
+ count(Q_NULLPTR),
+ at(Q_NULLPTR),
+ clear(Q_NULLPTR),
+ dummy1(Q_NULLPTR),
+ dummy2(Q_NULLPTR)
+ {}
QDeclarativeListProperty(QObject *o, QList<T *> &list)
: object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),
- clear(qlist_clear), dummy1(0), dummy2(0) {}
- QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0,
- ClearFunction r = 0)
- : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(0), dummy2(0) {}
+ clear(qlist_clear), dummy1(Q_NULLPTR), dummy2(Q_NULLPTR) {}
+ QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = Q_NULLPTR,
+ AtFunction t = Q_NULLPTR, ClearFunction r = Q_NULLPTR)
+ : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(Q_NULLPTR), dummy2(Q_NULLPTR) {}
bool operator==(const QDeclarativeListProperty &o) const {
return object == o.object &&
@@ -108,7 +116,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeListReference
{
public:
QDeclarativeListReference();
- QDeclarativeListReference(QObject *, const char *property, QDeclarativeEngine * = 0);
+ explicit QDeclarativeListReference(QObject *, const char *property, QDeclarativeEngine * = Q_NULLPTR);
QDeclarativeListReference(const QDeclarativeListReference &);
QDeclarativeListReference &operator=(const QDeclarativeListReference &);
~QDeclarativeListReference();