summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/corelib.pro4
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qversiontagging.h6
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp11
-rw-r--r--src/corelib/io/qwinoverlappedionotifier.cpp16
-rw-r--r--src/corelib/json/qjson_p.h6
-rw-r--r--src/corelib/json/qjsonarray.cpp72
-rw-r--r--src/corelib/json/qjsonarray.h6
-rw-r--r--src/corelib/json/qjsondocument.cpp4
-rw-r--r--src/corelib/json/qjsonobject.cpp94
-rw-r--r--src/corelib/json/qjsonobject.h6
-rw-r--r--src/corelib/kernel/qcore_mac_objc.mm2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp17
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h1
-rw-r--r--src/corelib/tools/qmap.cpp2
-rw-r--r--src/corelib/tools/qshareddata.h2
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h2
17 files changed, 197 insertions, 59 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index a8c8f65d37..78ea489ebc 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -25,6 +25,10 @@ ANDROID_PERMISSIONS = \
android.permission.INTERNET \
android.permission.WRITE_EXTERNAL_STORAGE
+# QtCore can't be compiled with -Wl,-no-undefined because it uses the "environ"
+# variable and on FreeBSD, this variable is in the final executable itself
+freebsd: QMAKE_LFLAGS_NOUNDEF =
+
load(qt_module)
load(qfeatures)
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index aa4945f90e..dd846955f6 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -53,7 +53,10 @@ slog2 {
journald {
CONFIG += link_pkgconfig
- PKGCONFIG_PRIVATE += libsystemd-journal
+ packagesExist(libsystemd): \
+ PKGCONFIG_PRIVATE += libsystemd
+ else: \
+ PKGCONFIG_PRIVATE += libsystemd-journal
DEFINES += QT_USE_JOURNALD
}
diff --git a/src/corelib/global/qversiontagging.h b/src/corelib/global/qversiontagging.h
index f9062a98fb..ef3da7c658 100644
--- a/src/corelib/global/qversiontagging.h
+++ b/src/corelib/global/qversiontagging.h
@@ -65,11 +65,7 @@ QT_BEGIN_NAMESPACE
#elif defined(Q_CC_GNU) && !defined(Q_OS_ANDROID)
# if defined(Q_PROCESSOR_X86) && (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD_KERNEL))
# if defined(Q_PROCESSOR_X86_64) // x86-64 or x32
-# if defined(__code_model_large__)
-# define QT_VERSION_TAG_RELOC(sym) ".quad " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n"
-# else
-# define QT_VERSION_TAG_RELOC(sym) ".long " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOTPCREL\n"
-# endif
+# define QT_VERSION_TAG_RELOC(sym) ".quad " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n"
# else // x86
# define QT_VERSION_TAG_RELOC(sym) ".long " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n"
# endif
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index 48b915eef8..c7144d2c6b 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -49,13 +49,8 @@ QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent)
quitNow(false),
hasWritten(false)
{
-#if !defined(Q_OS_WINCE) || (_WIN32_WCE >= 0x600)
DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(),
&writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS);
-#else
- Q_UNUSED(pipe);
- writePipe = GetCurrentProcess();
-#endif
}
QWindowsPipeWriter::~QWindowsPipeWriter()
@@ -66,9 +61,7 @@ QWindowsPipeWriter::~QWindowsPipeWriter()
lock.unlock();
if (!wait(30000))
terminate();
-#if !defined(Q_OS_WINCE) || (_WIN32_WCE >= 0x600)
CloseHandle(writePipe);
-#endif
}
bool QWindowsPipeWriter::waitForWrite(int msecs)
@@ -159,7 +152,6 @@ void QWindowsPipeWriter::run()
msleep(100);
continue;
}
-#ifndef Q_OS_WINCE
if (writeError != ERROR_IO_PENDING) {
qErrnoWarning(writeError, "QWindowsPipeWriter: async WriteFile failed.");
return;
@@ -168,9 +160,6 @@ void QWindowsPipeWriter::run()
qErrnoWarning(GetLastError(), "QWindowsPipeWriter: GetOverlappedResult failed.");
return;
}
-#else
- return;
-#endif
}
totalWritten += written;
#if defined QPIPEWRITER_DEBUG
diff --git a/src/corelib/io/qwinoverlappedionotifier.cpp b/src/corelib/io/qwinoverlappedionotifier.cpp
index 3f599e464f..d7745ae1b6 100644
--- a/src/corelib/io/qwinoverlappedionotifier.cpp
+++ b/src/corelib/io/qwinoverlappedionotifier.cpp
@@ -81,6 +81,22 @@ QT_BEGIN_NAMESPACE
or WriteFile() is ignored and can be used for other purposes.
\warning This class is only available on Windows.
+
+ Due to peculiarities of the Windows I/O completion port API, users of
+ QWinOverlappedIoNotifier must pay attention to the following restrictions:
+ \list
+ \li File handles with a QWinOverlappedIoNotifer are assigned to an I/O
+ completion port until the handle is closed. It is impossible to
+ disassociate the file handle from the I/O completion port.
+ \li There can be only one QWinOverlappedIoNotifer per file handle. Creating
+ another QWinOverlappedIoNotifier for that file, even with a duplicated
+ handle, will fail.
+ \li Certain Windows API functions are unavailable for file handles that are
+ assigned to an I/O completion port. This includes the functions
+ \c{ReadFileEx} and \c{WriteFileEx}.
+ \endlist
+ See also the remarks in the MSDN documentation for the
+ \c{CreateIoCompletionPort} function.
*/
struct IOResult
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h
index 5f6484728a..4c628ff1fe 100644
--- a/src/corelib/json/qjson_p.h
+++ b/src/corelib/json/qjson_p.h
@@ -795,7 +795,11 @@ public:
if (reserve) {
if (reserve < 128)
reserve = 128;
- size = qMax(size + reserve, size *2);
+ size = qMax(size + reserve, qMin(size *2, (int)Value::MaxSize));
+ if (size > Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure");
+ return 0;
+ }
}
char *raw = (char *)malloc(size);
Q_CHECK_PTR(raw);
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index 3eecc458aa..d4cc4b81df 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -262,8 +262,45 @@ QJsonArray QJsonArray::fromStringList(const QStringList &list)
QJsonArray QJsonArray::fromVariantList(const QVariantList &list)
{
QJsonArray array;
- for (QVariantList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
- array.append(QJsonValue::fromVariant(*it));
+ if (list.isEmpty())
+ return array;
+
+ array.detach2(1024);
+
+ QVector<QJsonPrivate::Value> values;
+ values.resize(list.size());
+ QJsonPrivate::Value *valueData = values.data();
+ uint currentOffset = sizeof(QJsonPrivate::Base);
+
+ for (int i = 0; i < list.size(); ++i) {
+ QJsonValue val = QJsonValue::fromVariant(list.at(i));
+
+ bool latinOrIntValue;
+ int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
+
+ if (!array.detach2(valueSize))
+ return QJsonArray();
+
+ QJsonPrivate::Value *v = valueData + i;
+ v->type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
+ v->latinOrIntValue = latinOrIntValue;
+ v->latinKey = false;
+ v->value = QJsonPrivate::Value::valueToStore(val, currentOffset);
+ if (valueSize)
+ QJsonPrivate::Value::copyData(val, (char *)array.a + currentOffset, latinOrIntValue);
+
+ currentOffset += valueSize;
+ array.a->size = currentOffset;
+ }
+
+ // write table
+ array.a->tableOffset = currentOffset;
+ if (!array.detach2(sizeof(QJsonPrivate::offset)*values.size()))
+ return QJsonArray();
+ memcpy(array.a->table(), values.constData(), values.size()*sizeof(uint));
+ array.a->length = values.size();
+ array.a->size = currentOffset + sizeof(QJsonPrivate::offset)*values.size();
+
return array;
}
@@ -388,7 +425,7 @@ void QJsonArray::removeAt(int i)
if (!a || i < 0 || i >= (int)a->length)
return;
- detach();
+ detach2();
a->removeItems(i, 1);
++d->compactionCounter;
if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)
@@ -448,7 +485,8 @@ void QJsonArray::insert(int i, const QJsonValue &value)
bool compressed;
int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
- detach(valueSize + sizeof(QJsonPrivate::Value));
+ if (!detach2(valueSize + sizeof(QJsonPrivate::Value)))
+ return;
if (!a->length)
a->tableOffset = sizeof(QJsonPrivate::Array);
@@ -498,7 +536,8 @@ void QJsonArray::replace(int i, const QJsonValue &value)
bool compressed;
int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
- detach(valueSize);
+ if (!detach2(valueSize))
+ return;
if (!a->length)
a->tableOffset = sizeof(QJsonPrivate::Array);
@@ -1129,21 +1168,38 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
*/
void QJsonArray::detach(uint reserve)
{
+ Q_UNUSED(reserve)
+ Q_ASSERT(!reserve);
+ detach2(0);
+}
+
+/*!
+ \internal
+ */
+bool QJsonArray::detach2(uint reserve)
+{
if (!d) {
+ if (reserve >= QJsonPrivate::Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure");
+ return false;
+ }
d = new QJsonPrivate::Data(reserve, QJsonValue::Array);
a = static_cast<QJsonPrivate::Array *>(d->header->root());
d->ref.ref();
- return;
+ return true;
}
if (reserve == 0 && d->ref.load() == 1)
- return;
+ return true;
QJsonPrivate::Data *x = d->clone(a, reserve);
+ if (!x)
+ return false;
x->ref.ref();
if (!d->ref.deref())
delete d;
d = x;
a = static_cast<QJsonPrivate::Array *>(d->header->root());
+ return true;
}
/*!
@@ -1154,7 +1210,7 @@ void QJsonArray::compact()
if (!d || !d->compactionCounter)
return;
- detach();
+ detach2();
d->compact();
a = static_cast<QJsonPrivate::Array *>(d->header->root());
}
diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h
index 899b675600..3b6fa37cfa 100644
--- a/src/corelib/json/qjsonarray.h
+++ b/src/corelib/json/qjsonarray.h
@@ -191,10 +191,10 @@ public:
friend class const_iterator;
// stl style
- inline iterator begin() { detach(); return iterator(this, 0); }
+ inline iterator begin() { detach2(); return iterator(this, 0); }
inline const_iterator begin() const { return const_iterator(this, 0); }
inline const_iterator constBegin() const { return const_iterator(this, 0); }
- inline iterator end() { detach(); return iterator(this, size()); }
+ inline iterator end() { detach2(); return iterator(this, size()); }
inline const_iterator end() const { return const_iterator(this, size()); }
inline const_iterator constEnd() const { return const_iterator(this, size()); }
iterator insert(iterator before, const QJsonValue &value) { insert(before.i, value); return before; }
@@ -235,7 +235,9 @@ private:
QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array);
void initialize();
void compact();
+ // ### Qt 6: remove me and merge with detach2
void detach(uint reserve = 0);
+ bool detach2(uint reserve = 0);
QJsonPrivate::Data *d;
QJsonPrivate::Array *a;
diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp
index a6746d5afe..1fde69ecf6 100644
--- a/src/corelib/json/qjsondocument.cpp
+++ b/src/corelib/json/qjsondocument.cpp
@@ -488,7 +488,7 @@ void QJsonDocument::setObject(const QJsonObject &object)
if (d->compactionCounter)
o.compact();
else
- o.detach();
+ o.detach2();
d = o.d;
d->ref.ref();
return;
@@ -515,7 +515,7 @@ void QJsonDocument::setArray(const QJsonArray &array)
if (d->compactionCounter)
a.compact();
else
- a.detach();
+ a.detach2();
d = a.d;
d->ref.ref();
return;
diff --git a/src/corelib/json/qjsonobject.cpp b/src/corelib/json/qjsonobject.cpp
index a3ce13a99f..4ee20ef168 100644
--- a/src/corelib/json/qjsonobject.cpp
+++ b/src/corelib/json/qjsonobject.cpp
@@ -203,11 +203,54 @@ QJsonObject &QJsonObject::operator =(const QJsonObject &other)
*/
QJsonObject QJsonObject::fromVariantMap(const QVariantMap &map)
{
- // ### this is implemented the trivial way, not the most efficient way
-
QJsonObject object;
- for (QVariantMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it)
- object.insert(it.key(), QJsonValue::fromVariant(it.value()));
+ if (map.isEmpty())
+ return object;
+
+ object.detach2(1024);
+
+ QVector<QJsonPrivate::offset> offsets;
+ QJsonPrivate::offset currentOffset;
+ currentOffset = sizeof(QJsonPrivate::Base);
+
+ // the map is already sorted, so we can simply append one entry after the other and
+ // write the offset table at the end
+ for (QVariantMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) {
+ QString key = it.key();
+ QJsonValue val = QJsonValue::fromVariant(it.value());
+
+ bool latinOrIntValue;
+ int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
+
+ bool latinKey = QJsonPrivate::useCompressed(key);
+ int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);
+ int requiredSize = valueOffset + valueSize;
+
+ if (!object.detach2(requiredSize + sizeof(QJsonPrivate::offset))) // offset for the new index entry
+ return QJsonObject();
+
+ QJsonPrivate::Entry *e = reinterpret_cast<QJsonPrivate::Entry *>(reinterpret_cast<char *>(object.o) + currentOffset);
+ e->value.type = val.t;
+ e->value.latinKey = latinKey;
+ e->value.latinOrIntValue = latinOrIntValue;
+ e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)object.o + valueOffset);
+ QJsonPrivate::copyString((char *)(e + 1), key, latinKey);
+ if (valueSize)
+ QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
+
+ offsets << currentOffset;
+ currentOffset += requiredSize;
+ object.o->size = currentOffset;
+ }
+
+ // write table
+ object.o->tableOffset = currentOffset;
+ if (!object.detach2(sizeof(QJsonPrivate::offset)*offsets.size()))
+ return QJsonObject();
+ memcpy(object.o->table(), offsets.constData(), offsets.size()*sizeof(uint));
+ object.o->length = offsets.size();
+ object.o->size = currentOffset + sizeof(QJsonPrivate::offset)*offsets.size();
+
return object;
}
@@ -276,16 +319,14 @@ QVariantHash QJsonObject::toVariantHash() const
*/
QStringList QJsonObject::keys() const
{
- if (!d)
- return QStringList();
-
QStringList keys;
- keys.reserve(o->length);
- for (uint i = 0; i < o->length; ++i) {
- QJsonPrivate::Entry *e = o->entryAt(i);
- keys.append(e->key());
+ if (o) {
+ keys.reserve(o->length);
+ for (uint i = 0; i < o->length; ++i) {
+ QJsonPrivate::Entry *e = o->entryAt(i);
+ keys.append(e->key());
+ }
}
-
return keys;
}
@@ -397,7 +438,8 @@ QJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &
int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);
int requiredSize = valueOffset + valueSize;
- detach(requiredSize + sizeof(QJsonPrivate::offset)); // offset for the new index entry
+ if (!detach2(requiredSize + sizeof(QJsonPrivate::offset))) // offset for the new index entry
+ return iterator();
if (!o->length)
o->tableOffset = sizeof(QJsonPrivate::Object);
@@ -441,7 +483,7 @@ void QJsonObject::remove(const QString &key)
if (!keyExists)
return;
- detach();
+ detach2();
o->removeItems(index, 1);
++d->compactionCounter;
if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)
@@ -468,7 +510,7 @@ QJsonValue QJsonObject::take(const QString &key)
return QJsonValue(QJsonValue::Undefined);
QJsonValue v(d, o, o->entryAt(index)->value);
- detach();
+ detach2();
o->removeItems(index, 1);
++d->compactionCounter;
if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)
@@ -562,7 +604,7 @@ QJsonObject::iterator QJsonObject::find(const QString &key)
int index = o ? o->indexOf(key, &keyExists) : 0;
if (!keyExists)
return end();
- detach();
+ detach2();
return iterator(this, index);
}
@@ -1069,21 +1111,35 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
*/
void QJsonObject::detach(uint reserve)
{
+ Q_UNUSED(reserve)
+ Q_ASSERT(!reserve);
+ detach2(reserve);
+}
+
+bool QJsonObject::detach2(uint reserve)
+{
if (!d) {
+ if (reserve >= QJsonPrivate::Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure");
+ return false;
+ }
d = new QJsonPrivate::Data(reserve, QJsonValue::Object);
o = static_cast<QJsonPrivate::Object *>(d->header->root());
d->ref.ref();
- return;
+ return true;
}
if (reserve == 0 && d->ref.load() == 1)
- return;
+ return true;
QJsonPrivate::Data *x = d->clone(o, reserve);
+ if (!x)
+ return false;
x->ref.ref();
if (!d->ref.deref())
delete d;
d = x;
o = static_cast<QJsonPrivate::Object *>(d->header->root());
+ return true;
}
/*!
@@ -1094,7 +1150,7 @@ void QJsonObject::compact()
if (!d || !d->compactionCounter)
return;
- detach();
+ detach2();
d->compact();
o = static_cast<QJsonPrivate::Object *>(d->header->root());
}
diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h
index 5617eee04f..6cffbce83a 100644
--- a/src/corelib/json/qjsonobject.h
+++ b/src/corelib/json/qjsonobject.h
@@ -188,10 +188,10 @@ public:
friend class const_iterator;
// STL style
- inline iterator begin() { detach(); return iterator(this, 0); }
+ inline iterator begin() { detach2(); return iterator(this, 0); }
inline const_iterator begin() const { return const_iterator(this, 0); }
inline const_iterator constBegin() const { return const_iterator(this, 0); }
- inline iterator end() { detach(); return iterator(this, size()); }
+ inline iterator end() { detach2(); return iterator(this, size()); }
inline const_iterator end() const { return const_iterator(this, size()); }
inline const_iterator constEnd() const { return const_iterator(this, size()); }
iterator erase(iterator it);
@@ -221,7 +221,9 @@ private:
QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object);
void initialize();
+ // ### Qt 6: remove me and merge with detach2
void detach(uint reserve = 0);
+ bool detach2(uint reserve = 0);
void compact();
QString keyAt(int i) const;
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
index 4d5b0f156c..a923d83bcf 100644
--- a/src/corelib/kernel/qcore_mac_objc.mm
+++ b/src/corelib/kernel/qcore_mac_objc.mm
@@ -113,6 +113,7 @@ QAppleOperatingSystemVersion qt_apple_os_version()
// Use temporary variables so we can return 0.0.0 (unknown version)
// in case of an error partway through determining the OS version
qint32 major = 0, minor = 0, patch = 0;
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_10, __IPHONE_8_0)
#if defined(Q_OS_IOS)
@autoreleasepool {
NSArray *parts = [UIDevice.currentDevice.systemVersion componentsSeparatedByString:@"."];
@@ -136,6 +137,7 @@ QAppleOperatingSystemVersion qt_apple_os_version()
if (pGestalt('sys3', &patch) != 0)
return v;
#endif
+#endif
v.major = major;
v.minor = minor;
v.patch = patch;
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 73cefdafd7..4d7aa83c43 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -942,9 +942,8 @@ void QEventDispatcherWin32::registerSocketNotifier(QSocketNotifier *notifier)
void QEventDispatcherWin32::unregisterSocketNotifier(QSocketNotifier *notifier)
{
Q_ASSERT(notifier);
- int sockfd = notifier->socket();
- int type = notifier->type();
#ifndef QT_NO_DEBUG
+ int sockfd = notifier->socket();
if (sockfd < 0) {
qWarning("QSocketNotifier: Internal error");
return;
@@ -953,8 +952,16 @@ void QEventDispatcherWin32::unregisterSocketNotifier(QSocketNotifier *notifier)
return;
}
#endif
+ doUnregisterSocketNotifier(notifier);
+}
+void QEventDispatcherWin32::doUnregisterSocketNotifier(QSocketNotifier *notifier)
+{
Q_D(QEventDispatcherWin32);
+ int type = notifier->type();
+ int sockfd = notifier->socket();
+ Q_ASSERT(sockfd >= 0);
+
QSFDict::iterator it = d->active_fd.find(sockfd);
if (it != d->active_fd.end()) {
QSockFd &sd = it.value();
@@ -1210,11 +1217,11 @@ void QEventDispatcherWin32::closingDown()
// clean up any socketnotifiers
while (!d->sn_read.isEmpty())
- unregisterSocketNotifier((*(d->sn_read.begin()))->obj);
+ doUnregisterSocketNotifier((*(d->sn_read.begin()))->obj);
while (!d->sn_write.isEmpty())
- unregisterSocketNotifier((*(d->sn_write.begin()))->obj);
+ doUnregisterSocketNotifier((*(d->sn_write.begin()))->obj);
while (!d->sn_except.isEmpty())
- unregisterSocketNotifier((*(d->sn_except.begin()))->obj);
+ doUnregisterSocketNotifier((*(d->sn_except.begin()))->obj);
Q_ASSERT(d->active_fd.isEmpty());
// clean up any timers
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index 848dbaf475..d745f16975 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -109,6 +109,7 @@ public:
protected:
QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = 0);
virtual void sendPostedEvents();
+ void doUnregisterSocketNotifier(QSocketNotifier *notifier);
private:
friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index 2a4d6da477..90edeca0a8 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -1181,7 +1181,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*!
\fn QPair<iterator, iterator> QMap::equal_range(const Key &key)
- Returns a pair of iterators delimiting the range of values that
+ Returns a pair of iterators delimiting the range of values \c{[first, second)}, that
are stored under \a key.
*/
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 366ce1477f..13b0032605 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -42,7 +42,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qatomic.h>
-#if QT_DEPRECATED_SINCE(5, 5)
+#if QT_DEPRECATED_SINCE(5, 6)
#include <QtCore/qhash.h>
#endif
#include <QtCore/qhashfunctions.h>
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index a946191cde..6a5c8f4fe5 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -63,7 +63,7 @@ QT_END_NAMESPACE
#include <QtCore/qatomic.h>
#include <QtCore/qobject.h> // for qobject_cast
#include <QtCore/qdebug.h>
-#if QT_DEPRECATED_SINCE(5, 5)
+#if QT_DEPRECATED_SINCE(5, 6)
#include <QtCore/qhash.h>
#endif
#include <QtCore/qhashfunctions.h>