summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-10 18:27:48 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-10 18:27:49 +0100
commit7917dfbf1c54150d0ca3a79285767c22e6f9d770 (patch)
treea05973334097df480afe32d07db42f381b460e74 /src/corelib
parentb9362903b339e57362a7a3296904504521d0e26f (diff)
parentb088e4827f427189334e8a1c5b4f2b8b0b713fc2 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/cp949codetbl_p.h4
-rw-r--r--src/corelib/global/qglobal.h12
-rw-r--r--src/corelib/global/qsystemdetection.h17
-rw-r--r--src/corelib/global/qtypeinfo.h2
-rw-r--r--src/corelib/plugin/qlibrary.cpp3
5 files changed, 21 insertions, 17 deletions
diff --git a/src/corelib/codecs/cp949codetbl_p.h b/src/corelib/codecs/cp949codetbl_p.h
index 336b0b75a1..2a62b3c6c7 100644
--- a/src/corelib/codecs/cp949codetbl_p.h
+++ b/src/corelib/codecs/cp949codetbl_p.h
@@ -40,7 +40,7 @@
****************************************************************************/
#ifndef CP949CODETBL_P_H
-#define CP494CODETBL_P_H
+#define CP949CODETBL_P_H
//
// W A R N I N G
@@ -645,4 +645,4 @@ static const unsigned short cp949_icode_to_unicode[] = {
0xd7a2, 0xd7a3
};
-#endif // CP494CODETBL_P_H
+#endif // CP949CODETBL_P_H
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 8b91545c9b..8a86dc158e 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -716,13 +716,13 @@ typedef void (*QFunctionPointer)();
# define Q_UNIMPLEMENTED() qWarning("%s:%d: %s: Unimplemented code.", __FILE__, __LINE__, Q_FUNC_INFO)
#endif
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT;
+Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2)
{
return (qAbs(p1 - p2) * 1000000000000. <= qMin(qAbs(p1), qAbs(p2)));
}
-Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT;
+Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2)
{
return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2)));
@@ -731,7 +731,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2)
/*!
\internal
*/
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT;
+Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d)
{
return qAbs(d) <= 0.000000000001;
@@ -740,7 +740,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d)
/*!
\internal
*/
-Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT;
+Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
{
return qAbs(f) <= 0.00001f;
@@ -751,7 +751,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
-static inline bool qIsNull(double d) Q_REQUIRED_RESULT;
+static inline bool qIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
static inline bool qIsNull(double d)
{
union U {
@@ -768,7 +768,7 @@ static inline bool qIsNull(double d)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
-static inline bool qIsNull(float f) Q_REQUIRED_RESULT;
+static inline bool qIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
static inline bool qIsNull(float f)
{
union U {
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index 7b1c32663b..0431e10133 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -210,14 +210,17 @@
#ifdef Q_OS_DARWIN
# include <Availability.h>
-# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
-# undef __MAC_OS_X_VERSION_MIN_REQUIRED
-# define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6
-# endif
# include <AvailabilityMacros.h>
-# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
-# undef MAC_OS_X_VERSION_MIN_REQUIRED
-# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
+#
+# ifdef Q_OS_OSX
+# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
+# undef __MAC_OS_X_VERSION_MIN_REQUIRED
+# define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6
+# endif
+# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+# undef MAC_OS_X_VERSION_MIN_REQUIRED
+# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
+# endif
# endif
#
# // Numerical checks are preferred to named checks, but to be safe
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index 7c97909971..114e11345a 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -214,7 +214,7 @@ Q_DECLARE_TYPEINFO_BODY(QFlags<T>, Q_PRIMITIVE_TYPE);
#define Q_DECLARE_SHARED_STL(TYPE) \
QT_END_NAMESPACE \
namespace std { \
- template<> inline void swap<QT_PREPEND_NAMESPACE(TYPE)>(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \
+ template<> inline void swap< QT_PREPEND_NAMESPACE(TYPE) >(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \
{ value1.swap(value2); } \
} \
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 77de4d594e..468f759189 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -256,7 +256,8 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
*/
bool hasMetaData = false;
long pos = 0;
- const char pattern[] = "QTMETADATA ";
+ char pattern[] = "qTMETADATA ";
+ pattern[0] = 'Q'; // Ensure the pattern "QTMETADATA" is not found in this library should QPluginLoader ever encounter it.
const ulong plen = qstrlen(pattern);
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
int r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen);