summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-08-06 10:45:40 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-08-06 10:54:01 +0200
commit77da617dc8e378a631ee8c15b1b414f16b87f147 (patch)
tree563f4f8e64e416774ea2b1599b896b589385168c /src/corelib/kernel
parentc17134e2db4d364855aa78a0d3c47cb9ef964dd9 (diff)
parent01f3530650f9f6f4c08520263a3c62281d81e3fc (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp23
-rw-r--r--src/corelib/kernel/qmetatype.cpp13
-rw-r--r--src/corelib/kernel/qobject.cpp9
-rw-r--r--src/corelib/kernel/qtranslator.cpp2
5 files changed, 45 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 5e15f2d773..e08f709cd2 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -441,7 +441,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
static const char *const empty = "";
if (argc == 0 || argv == 0) {
argc = 0;
- argv = (char **)&empty;
+ argv = const_cast<char **>(&empty);
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
if (!isArgvModified(argc, argv)) {
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 90ee7d8f95..7ae9fef622 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1533,6 +1533,29 @@ bool QMetaObject::invokeMethod(QObject *obj,
*/
/*!
+ \fn QMetaObject::Connection::Connection(const Connection &other)
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn QMetaObject::Connection::Connection &operator=(const Connection &other)
+
+ Assigns \a other to this connection and returns a reference to this connection.
+*/
+
+/*!
+ \fn QMetaObject::Connection &QMetaObject::Connection::operator=(Connection &&other)
+
+ Move-assigns \a other to this object.
+*/
+/*!
+ \fn QMetaObject::Connection::Connection(Connection &&o)
+
+ Move-constructs a Connection instance, making it point to the same object that \a o was pointing to.
+*/
+
+/*!
\class QMetaMethod
\inmodule QtCore
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 641053371d..3906cdc036 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -421,6 +421,16 @@ struct DefinedTypesFilter {
*/
/*!
+ \fn void *QMetaType::construct(int type, const void *copy)
+ \deprecated
+
+ Constructs a value of the given type which is a copy of \a copy.
+ The default value for \a copy is 0.
+
+ Deprecated, use the static function QMetaType::create(int type,
+ const void *copy) instead.
+*/
+/*!
\fn void *QMetaType::construct(void *where, const void *copy = 0) const
\since 5.0
@@ -1834,7 +1844,8 @@ public:
void delegate(const T *where) { DestructorImpl<T>::Destruct(m_type, const_cast<T*>(where)); }
void delegate(const void *) {}
void delegate(const QMetaTypeSwitcher::UnknownType*) {}
- void delegate(const QMetaTypeSwitcher::NotBuiltinType *where) { customTypeDestructor(m_type, (void*)where); }
+ void delegate(const QMetaTypeSwitcher::NotBuiltinType *where)
+ { customTypeDestructor(m_type, const_cast<void *>(static_cast<const void *>(where))); }
private:
static void customTypeDestructor(const int type, void *where)
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e6ea27ef58..4d4cccd7b1 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4103,7 +4103,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
QDebugStateSaver saver(dbg);
if (!o)
return dbg << "QObject(0x0)";
- dbg.nospace() << o->metaObject()->className() << '(' << (void *)o;
+ dbg.nospace() << o->metaObject()->className() << '(' << (const void *)o;
if (!o->objectName().isEmpty())
dbg << ", name = " << o->objectName();
dbg << ')';
@@ -4908,8 +4908,15 @@ QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::C
return *this;
}
+/*!
+ Creates a Connection instance.
+*/
+
QMetaObject::Connection::Connection() : d_ptr(0) {}
+/*!
+ Destructor for QMetaObject::Connection.
+*/
QMetaObject::Connection::~Connection()
{
if (d_ptr)
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index ef74b4bdd1..794a4aaa0c 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -722,7 +722,7 @@ static QString find_translation(const QLocale & locale,
For example, an application running in the \a locale with the following
\l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call
- load(QLocale::system(), "foo", ".", "/opt/foolib", ".qm"). load() would
+ load(QLocale(), "foo", ".", "/opt/foolib", ".qm"). load() would
replace '-' (dash) with '_' (underscore) in the ui language and then try to
open the first existing readable file from this list: