diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-01 08:25:54 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-01 08:25:54 (GMT) |
commit | 1051e9d0dc5cbad27b89756839f3619cae2d44fe (patch) | |
tree | cd25969458735e14c0b5de365760c3fd7747659d /src/corelib | |
parent | 0d411622521a89c04a416e2aaf3da44b6015b183 (diff) | |
parent | 8f1596ae9b64870c54958611552c71b0b390038f (diff) | |
download | Qt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.zip Qt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.tar.gz Qt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.tar.bz2 |
Merge branch '4.6' of git:qt/qt into 4.6
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 11 | ||||
-rw-r--r-- | src/corelib/tools/qmargins.cpp | 8 | ||||
-rw-r--r-- | src/corelib/tools/qmargins.h | 5 |
3 files changed, 7 insertions, 17 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 30f1cc8..c311465 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -943,7 +943,7 @@ QByteArray QMetaObject::normalizedType(const char *type) if (!type || !*type) return result; - QVarLengthArray<char> stackbuf((int)strlen(type)); + QVarLengthArray<char> stackbuf(int(strlen(type)) + 1); qRemoveWhitespace(type, stackbuf.data()); int templdepth = 0; qNormalizeType(stackbuf.data(), templdepth, result); @@ -968,10 +968,9 @@ QByteArray QMetaObject::normalizedSignature(const char *method) if (!method || !*method) return result; int len = int(strlen(method)); - char stackbuf[64]; - char *buf = (len >= 64 ? new char[len+1] : stackbuf); - qRemoveWhitespace(method, buf); - char *d = buf; + QVarLengthArray<char> stackbuf(len + 1); + char *d = stackbuf.data(); + qRemoveWhitespace(method, d); result.reserve(len); @@ -987,8 +986,6 @@ QByteArray QMetaObject::normalizedSignature(const char *method) result += *d++; } - if (buf != stackbuf) - delete [] buf; return result; } diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index df08da1..747ea5e 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE \class QMargins \ingroup painting - \brief The QMargins + \brief The QMargins class defines the four margins of a rectangle. QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle. @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE Constructs a margins object with all margins set to 0. - \sa isValid() + \sa isNull() */ /*! @@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE Constructs margins with the given \a left, \a top, \a right, \a bottom - \sa setWidth(), setHeight() + \sa setLeft(), setRight(), setTop(), setBottom() */ /*! @@ -86,8 +86,6 @@ QT_BEGIN_NAMESPACE Returns true if all margins are is 0; otherwise returns false. - - \sa isValid(), isEmpty() */ diff --git a/src/corelib/tools/qmargins.h b/src/corelib/tools/qmargins.h index be918cc..2691c62 100644 --- a/src/corelib/tools/qmargins.h +++ b/src/corelib/tools/qmargins.h @@ -68,11 +68,6 @@ public: void setRight(int right); void setBottom(int bottom); - int &rleft(); - int &rtop(); - int &rright(); - int &rbottom(); - private: int m_left; int m_top; |