From 84a1493b509994901cb336c93378b80ed82b6a2a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 16 Apr 2012 08:25:23 +0200 Subject: doc: remove link to obsolete doc Change-Id: Ie1a48a821764978a28e274c7eb52ee02aef391a6 Reviewed-by: Jerome Pasion --- src/corelib/doc/src/objectmodel/object.qdoc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/doc/src/objectmodel/object.qdoc b/src/corelib/doc/src/objectmodel/object.qdoc index 281c1a30cb..1d33c14d0f 100644 --- a/src/corelib/doc/src/objectmodel/object.qdoc +++ b/src/corelib/doc/src/objectmodel/object.qdoc @@ -66,11 +66,7 @@ by Qt's own \l{moc}{Meta-Object Compiler (moc)}. The meta-object system is a C++ extension that makes the language - better suited to true component GUI programming. Although - templates can be used to extend C++, the meta-object system - provides benefits using standard C++ that cannot be achieved with - templates; see \l{Why Doesn't Qt Use Templates for Signals and - Slots?} + better suited to true component GUI programming. \section1 Important Classes -- cgit v1.2.3 From f2e8a81227b3ee09afe1bf8a5d292e8c5f2ee67f Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 21 Feb 2013 12:11:35 +0100 Subject: QMimeDatabase: pass MatchMode down, to fix MatchContent. Task-number: QTBUG-29702 Change-Id: I2f1538adbf8e7a5edfc4276585bf4ef04ce69874 Reviewed-by: Konstantin Ritt Reviewed-by: Thiago Macieira --- src/corelib/mimetypes/qmimedatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp index d8b7a02a1b..a5f5a326d4 100644 --- a/src/corelib/mimetypes/qmimedatabase.cpp +++ b/src/corelib/mimetypes/qmimedatabase.cpp @@ -418,7 +418,7 @@ QMimeType QMimeDatabase::mimeTypeForFile(const QString &fileName, MatchMode mode } else { // Implemented as a wrapper around mimeTypeForFile(QFileInfo), so no mutex. QFileInfo fileInfo(fileName); - return mimeTypeForFile(fileInfo); + return mimeTypeForFile(fileInfo, mode); } } -- cgit v1.2.3 From f9497b1a541627a6e2239a0c00b37307da6a93f2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 4 Mar 2013 15:22:47 +0100 Subject: Fix spelling Change-Id: If3d5e09b2553d95caacd3e61a1bb108f1172111f Reviewed-by: Oswald Buddenhagen --- src/corelib/kernel/qobject.cpp | 4 ++-- src/corelib/kernel/qobjectdefs_impl.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index a82242939d..36db55d25a 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4194,7 +4194,7 @@ void qDeleteInEventHandler(QObject *o) connecting to a static function or a functor \a slot a pointer only used when using Qt::UniqueConnection \a type the Qt::ConnctionType passed as argument to connect - \a types an array of integer with the metatype id of the parametter of the signal + \a types an array of integer with the metatype id of the parameter of the signal to be used with queued connection must stay valid at least for the whole time of the connection, this function do not take ownership. typically static data. @@ -4209,7 +4209,7 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa const int *types, const QMetaObject *senderMetaObject) { if (!sender || !signal || !slotObj || !senderMetaObject) { - qWarning("QObject::connect: invalid null parametter"); + qWarning("QObject::connect: invalid null parameter"); if (slotObj) slotObj->destroyIfLastRef(); return QMetaObject::Connection(); diff --git a/src/corelib/kernel/qobjectdefs_impl.h b/src/corelib/kernel/qobjectdefs_impl.h index 68d8fdf961..1452e720ad 100644 --- a/src/corelib/kernel/qobjectdefs_impl.h +++ b/src/corelib/kernel/qobjectdefs_impl.h @@ -59,7 +59,7 @@ namespace QtPrivate { /* The following List classes are used to help to handle the list of arguments. It follow the same principles as the lisp lists. - List_Left take a list and a number as a parametter and returns (via the Value typedef, + List_Left take a list and a number as a parameter and returns (via the Value typedef, the list composed of the first N element of the list */ #ifndef Q_COMPILER_VARIADIC_TEMPLATES @@ -113,7 +113,7 @@ namespace QtPrivate { - ArgumentCount is the number of argument, or -1 if it is unknown - the Object typedef is the Object of a pointer to member function - the Arguments typedef is the list of argument (in a QtPrivate::List) - - the Function typedef is an alias to the template parametter Func + - the Function typedef is an alias to the template parameter Func - the call(f,o,args) method is used to call that slot Args is the list of argument of the signal R is the return type of the signal -- cgit v1.2.3 From 342c99ff45c1e6ef524b6045571900fd7408d635 Mon Sep 17 00:00:00 2001 From: Roman Pasechnik Date: Mon, 18 Feb 2013 16:08:28 +0200 Subject: Fixed memory leak in QXmlStreamReader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed memory leak caused by repetitive usage of the same QXmlStreamReader instance. Task-number: QTBUG-27889 Change-Id: I673f4d26bae1503cb43e972f95b418dbf6d6fd89 Reviewed-by: Olivier Goffart Reviewed-by: Jędrzej Nowacki --- src/corelib/xml/qxmlstream.cpp | 2 ++ src/corelib/xml/qxmlstream_p.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 4be4593e95..372b1d91fe 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -784,6 +784,7 @@ QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack() NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push(); namespaceDeclaration.prefix = addToStringStorage(QLatin1String("xml")); namespaceDeclaration.namespaceUri = addToStringStorage(QLatin1String("http://www.w3.org/XML/1998/namespace")); + initialTagStackStringStorageSize = tagStackStringStorageSize; } #ifndef QT_NO_XMLSTREAMREADER @@ -854,6 +855,7 @@ void QXmlStreamReaderPrivate::init() rawReadBuffer.clear(); dataBuffer.clear(); readBuffer.clear(); + tagStackStringStorageSize = initialTagStackStringStorageSize; type = QXmlStreamReader::NoToken; error = QXmlStreamReader::NoError; diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index 68b7ff7af3..448764ab58 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -697,6 +697,7 @@ public: QXmlStreamSimpleStack namespaceDeclarations; QString tagStackStringStorage; int tagStackStringStorageSize; + int initialTagStackStringStorageSize; bool tagsDone; inline QStringRef addToStringStorage(const QStringRef &s) { -- cgit v1.2.3 From 56820382f26069ea81444da075e6cbefc8f03765 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Sun, 3 Mar 2013 15:06:40 +0100 Subject: Workaround a bug in mktime on QNX Under certain circumstances, mktime failes to convert the tm struct into secs since epoch. This is a workaround and fixes the qdatetime and qqmllocale autotests. Change-Id: If99385142a049c5315429dca177df7fc8e947d55 Reviewed-by: Thomas McGuire Reviewed-by: Wolfgang Bremer Reviewed-by: Thiago Macieira --- src/corelib/tools/qdatetime.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 4b6e739759..88f22daad5 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4050,6 +4050,16 @@ static void localToUtc(QDate &date, QTime &time, int isdst) _tzset(); #endif time_t secsSince1Jan1970UTC = mktime(&localTM); +#ifdef Q_OS_QNX + //mktime sometimes fails on QNX. Following workaround converts the date and time then manually + if (secsSince1Jan1970UTC == (time_t)-1) { + QDateTime tempTime = QDateTime(date, time, Qt::UTC);; + tempTime = tempTime.addMSecs(timezone * 1000); + date = tempTime.date(); + time = tempTime.time(); + return; + } +#endif #endif tm *brokenDown = 0; #if defined(Q_OS_WINCE) -- cgit v1.2.3 From 31c5b34e808db102bfc5364405711ec94fe51f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 5 Mar 2013 14:30:26 +0100 Subject: Silence warning about an unused variable in Q_ASSUME. Change-Id: Ia7dd537d1f0dadb1dc41b8123fda0da82e83598b Reviewed-by: Olivier Goffart --- src/corelib/global/qcompilerdetection.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index d062ea0d15..15229e03a0 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -862,6 +862,7 @@ const bool valueOfExpression = Expr;\ Q_ASSERT_X(valueOfExpression, "Q_ASSUME()", "Assumption in Q_ASSUME(\"" #Expr "\") was not correct");\ Q_ASSUME_IMPL(valueOfExpression);\ + Q_UNUSED(valueOfExpression); /* the value may not be used if Q_ASSERT_X and Q_ASSUME_IMPL are noop */\ } while (0) #endif // QCOMPILERDETECTION_H -- cgit v1.2.3