summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/corelib.pro2
-rw-r--r--src/corelib/doc/src/containers.qdoc1
-rw-r--r--src/corelib/global/qendian.h5
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt7
-rw-r--r--src/corelib/io/qlockfile_unix.cpp9
-rw-r--r--src/corelib/io/qsavefile.cpp7
-rw-r--r--src/corelib/io/qsavefile.h7
-rw-r--r--src/corelib/io/qsavefile_p.h6
-rw-r--r--src/corelib/io/qtemporaryfile_p.h6
-rw-r--r--src/corelib/json/qjsonparser.cpp3
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp8
-rw-r--r--src/corelib/tools/qrect.cpp6
13 files changed, 64 insertions, 8 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 0a5cc04a17..44a3f06f50 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -58,7 +58,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist
contains(DEFINES,QT_EVAL):include(eval.pri)
-HOST_BINS = $$[QT_HOST_BINS/raw]
+HOST_BINS = $$[QT_HOST_BINS]
host_bins.name = host_bins
host_bins.variable = HOST_BINS
diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc
index 30d86eac63..fc23a9967c 100644
--- a/src/corelib/doc/src/containers.qdoc
+++ b/src/corelib/doc/src/containers.qdoc
@@ -28,7 +28,6 @@
/*!
\page containers.html
\title Container Classes
- \ingroup technology-apis
\ingroup groups
\ingroup qt-basic-concepts
\keyword container class
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index c9c4d23aab..9b939feea0 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -78,7 +78,10 @@ template <typename T> inline void qbswap(const T src, uchar *dest)
// If you want to avoid the memcopy, you must write specializations for this function
template <typename T> inline void qToUnaligned(const T src, uchar *dest)
{
- memcpy(dest, &src, sizeof(T));
+ // Using sizeof(T) inside memcpy function produces internal compiler error with
+ // MSVC2008/ARM in tst_endian -> use extra indirection to resolve size of T.
+ const size_t size = sizeof(T);
+ memcpy(dest, &src, size);
}
/* T qFromLittleEndian(const uchar *src)
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index f2e5dc7633..4534e9bf13 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -311,6 +311,11 @@
#define QT_NO_LOCALSERVER
#endif
+// QPdf
+#if !defined(QT_NO_PDF) && (defined(QT_NO_TEMPORARYFILE))
+#define QT_NO_PDF
+#endif
+
// QMenu
#if !defined(QT_NO_MENU) && (defined(QT_NO_ACTION))
#define QT_NO_MENU
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 43db585643..61a3df39f3 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -851,6 +851,13 @@ Requires:
Name: Color Names
SeeAlso: ???
+Feature: PDF
+Description: Supports pdf format
+Section: Painting
+Requires: TEMPORARYFILE
+Name: QPdf
+SeeAlso: ???
+
Feature: PRINTER
Description: Supports printing
Section: Painting
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp
index ed3b399fbf..db81d65565 100644
--- a/src/corelib/io/qlockfile_unix.cpp
+++ b/src/corelib/io/qlockfile_unix.cpp
@@ -45,6 +45,7 @@
#include "QtCore/qcoreapplication.h"
#include "QtCore/qfileinfo.h"
#include "QtCore/qdebug.h"
+#include "QtCore/qdatetime.h"
#include "private/qcore_unix_p.h" // qt_safe_open
#include "private/qabstractfileengine_p.h"
@@ -80,12 +81,13 @@ static qint64 qt_write_loop(int fd, const char *data, qint64 len)
int QLockFilePrivate::checkFcntlWorksAfterFlock()
{
+#ifndef QT_NO_TEMPORARYFILE
QTemporaryFile file;
if (!file.open())
- return -2;
+ return 0;
const int fd = file.d_func()->engine()->handle();
if (flock(fd, LOCK_EX | LOCK_NB) == -1) // other threads, and other processes on a local fs
- return -3;
+ return 0;
struct flock flockData;
flockData.l_type = F_WRLCK;
flockData.l_whence = SEEK_SET;
@@ -95,6 +97,9 @@ int QLockFilePrivate::checkFcntlWorksAfterFlock()
if (fcntl(fd, F_SETLK, &flockData) == -1) // for networked filesystems
return 0;
return 1;
+#else
+ return 0;
+#endif
}
static QBasicAtomicInt fcntlOK = Q_BASIC_ATOMIC_INITIALIZER(-1);
diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp
index f8b5ebcabd..5ed429c464 100644
--- a/src/corelib/io/qsavefile.cpp
+++ b/src/corelib/io/qsavefile.cpp
@@ -39,8 +39,11 @@
**
****************************************************************************/
-#include "qplatformdefs.h"
#include "qsavefile.h"
+
+#ifndef QT_NO_TEMPORARYFILE
+
+#include "qplatformdefs.h"
#include "private/qsavefile_p.h"
#include "qfileinfo.h"
#include "qabstractfileengine_p.h"
@@ -381,3 +384,5 @@ bool QSaveFile::directWriteFallback() const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_TEMPORARYFILE
diff --git a/src/corelib/io/qsavefile.h b/src/corelib/io/qsavefile.h
index 6d81f58d42..ad18417124 100644
--- a/src/corelib/io/qsavefile.h
+++ b/src/corelib/io/qsavefile.h
@@ -42,6 +42,10 @@
#ifndef QSAVEFILE_H
#define QSAVEFILE_H
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_TEMPORARYFILE
+
#include <QtCore/qfiledevice.h>
#include <QtCore/qstring.h>
@@ -51,7 +55,6 @@
QT_BEGIN_NAMESPACE
-
class QAbstractFileEngine;
class QSaveFilePrivate;
@@ -90,4 +93,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_TEMPORARYFILE
+
#endif // QSAVEFILE_H
diff --git a/src/corelib/io/qsavefile_p.h b/src/corelib/io/qsavefile_p.h
index 53a8b5eb34..b9efd1ee7c 100644
--- a/src/corelib/io/qsavefile_p.h
+++ b/src/corelib/io/qsavefile_p.h
@@ -53,6 +53,10 @@
// We mean it.
//
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_TEMPORARYFILE
+
#include "private/qfiledevice_p.h"
QT_BEGIN_NAMESPACE
@@ -75,4 +79,6 @@ protected:
QT_END_NAMESPACE
+#endif // QT_NO_TEMPORARYFILE
+
#endif // QSAVEFILE_P_H
diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h
index d274f60ecc..fe637c8dfd 100644
--- a/src/corelib/io/qtemporaryfile_p.h
+++ b/src/corelib/io/qtemporaryfile_p.h
@@ -42,6 +42,10 @@
#ifndef QTEMPORARYFILE_P_H
#define QTEMPORARYFILE_P_H
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_TEMPORARYFILE
+
#include "private/qfsfileengine_p.h"
#include "private/qfilesystemengine_p.h"
#include "private/qfile_p.h"
@@ -99,5 +103,7 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_TEMPORARYFILE
+
#endif /* QTEMPORARYFILE_P_H */
diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp
index 7989d18901..b151af7955 100644
--- a/src/corelib/json/qjsonparser.cpp
+++ b/src/corelib/json/qjsonparser.cpp
@@ -886,7 +886,8 @@ bool Parser::parseString(bool *latin1)
return false;
}
}
- if (ch > 0xff) {
+ // bail out if the string is not pure latin1 or too long to hold as a latin1string (which has only 16 bit for the length)
+ if (ch > 0xff || json - start >= 0x8000) {
*latin1 = false;
break;
}
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index ae291f13cd..d1bd8fbe95 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -52,6 +52,8 @@
#include "qelapsedtimer.h"
#include "qcoreapplication_p.h"
+#include "qsysinfo.h"
+
#include <private/qthread_p.h>
#include <private/qmutexpool_p.h>
@@ -305,8 +307,14 @@ static void resolveTimerAPI()
#endif
triedResolve = true;
#if !defined(Q_OS_WINCE)
+# if defined(_MSC_VER) && _MSC_VER >= 1700
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS8) { // QTBUG-27266, Disable when running MSVC2012-built code on pre-Windows 8
+# else
+ {
+# endif
qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeSetEvent");
qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeKillEvent");
+ }
#else
qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeSetEvent");
qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeKillEvent");
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index e197fd9178..41b2b266ee 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -201,6 +201,12 @@ QT_BEGIN_NAMESPACE
function to manipulate the rectangle's coordinates and dimensions
in one go.
+ \section1 Constraints
+
+ QRect is limited to the minimum and maximum values for the \c int type.
+ Operations on a QRect that could potentially result in values outside this
+ range will result in undefined behavior.
+
\sa QRectF, QRegion
*/