summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qfeatures.h10
-rw-r--r--src/corelib/global/qfeatures.txt22
-rw-r--r--src/corelib/global/qglobal.cpp11
-rw-r--r--src/corelib/global/qglobal.h47
-rw-r--r--src/corelib/global/qlibraryinfo.cpp16
-rw-r--r--src/corelib/global/qnamespace.h11
-rw-r--r--src/corelib/global/qt_windows.h3
7 files changed, 93 insertions, 27 deletions
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 2189723..9f7c7ba 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -311,6 +311,11 @@
#define QT_NO_ACCESSIBILITY
#endif
+// Animation
+#if !defined(QT_NO_ANIMATION) && (defined(QT_NO_PROPERTIES))
+#define QT_NO_ANIMATION
+#endif
+
// QButtonGroup
#if !defined(QT_NO_BUTTONGROUP) && (defined(QT_NO_GROUPBOX))
#define QT_NO_BUTTONGROUP
@@ -361,6 +366,11 @@
#define QT_NO_MENU
#endif
+// QNetworkDiskCache
+#if !defined(QT_NO_NETWORKDISKCACHE) && (defined(QT_NO_TEMPORARYFILE))
+#define QT_NO_NETWORKDISKCACHE
+#endif
+
// Phonon::SeekSlider
#if !defined(QT_NO_PHONON_SEEKSLIDER) && (defined(QT_NO_SLIDER))
#define QT_NO_PHONON_SEEKSLIDER
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 40ccb15..9408a5b 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1085,6 +1085,13 @@ Requires:
Name: QNetworkInterface
SeeAlso: ???
+Feature: NETWORKDISKCACHE
+Description: Supports a disk cache for network resources
+Section: Networking
+Requires: TEMPORARYFILE
+Name: QNetworkDiskCache
+SeeAlso: ???
+
# Utilities
Feature: COMPLETER
@@ -1150,6 +1157,21 @@ Requires: PROPERTIES
Name: Accessibility
SeeAlso: ???
+Feature: ANIMATION
+Description: Provides a framework for animations.
+Section: Utilities
+Requires: PROPERTIES
+Name: Animation
+SeeAlso: ???
+
+Feature: STATEMACHINE
+Description: Provides hierarchical finite state machines.
+Section: Utilities
+Requires: PROPERTIES
+Name: State machine
+SeeAlso: ???
+
+
# SVG
Feature: SVG
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 88f845a..6976c00 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2147,7 +2147,7 @@ void qt_message_output(QtMsgType msgType, const char *buf)
mac_default_handler(buf);
#elif defined(Q_OS_WINCE)
QString fstr = QString::fromLatin1(buf);
- fstr += QLatin1String("\n");
+ fstr += QLatin1Char('\n');
OutputDebugString(reinterpret_cast<const wchar_t *> (fstr.utf16()));
#elif defined(Q_OS_SYMBIAN)
// RDebug::Print has a cap of 256 characters so break it up
@@ -2454,7 +2454,7 @@ bool qputenv(const char *varName, const QByteArray& value)
return _putenv_s(varName, value.constData()) == 0;
#else
QByteArray buffer(varName);
- buffer += "=";
+ buffer += '=';
buffer += value;
return putenv(qstrdup(buffer.constData())) == 0;
#endif
@@ -3170,7 +3170,12 @@ bool QInternal::callFunction(InternalFunction func, void **args)
\relates <QtGlobal>
\since 4.4
\threadsafe
- \overload
+
+ Compares the floating point value \a p1 and \a p2 and
+ returns \c true if they are considered equal, otherwise \c false.
+
+ The two numbers are compared in a relative way, where the
+ exactness is stronger the smaller the numbers are.
*/
/*!
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 14b6895..c95338d 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -44,11 +44,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "4.5.2"
+#define QT_VERSION_STR "4.6.0"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x040502
+#define QT_VERSION 0x040600
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
@@ -772,6 +772,10 @@ namespace QT_NAMESPACE {}
# endif
#elif defined(Q_OS_WINCE)
# define Q_WS_WIN32
+# define Q_WS_WINCE
+# if defined(Q_OS_WINCE_WM)
+# define Q_WS_WINCE_WM
+# endif
#elif defined(Q_OS_OS2)
# define Q_WS_PM
# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
@@ -791,10 +795,11 @@ namespace QT_NAMESPACE {}
# endif
#endif
-#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
+#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) || defined(Q_WS_WINCE)
# define Q_WS_WIN
#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -848,17 +853,12 @@ typedef quint64 qulonglong;
sizeof(void *) == sizeof(quintptr)
&& sizeof(void *) == sizeof(qptrdiff)
*/
-template <int> class QUintForSize { private: typedef void Type; };
-template <> class QUintForSize<4> { public: typedef quint32 Type; };
-template <> class QUintForSize<8> { public: typedef quint64 Type; };
-template <typename T> class QUintForType : public QUintForSize<sizeof(T)> { };
-typedef QUintForType<void *>::Type quintptr;
-
-template <int> class QIntForSize { private: typedef void Type; };
-template <> class QIntForSize<4> { public: typedef qint32 Type; };
-template <> class QIntForSize<8> { public: typedef qint64 Type; };
-template <typename T> class QIntForType : public QIntForSize<sizeof(T)> { };
-typedef QIntForType<void *>::Type qptrdiff;
+template <int> struct QIntegerForSize;
+template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; };
+template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; };
+template <class T> struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { };
+typedef QIntegerForSizeof<void*>::Unsigned quintptr;
+typedef QIntegerForSizeof<void*>::Signed qptrdiff;
/*
Useful type definitions for Qt
@@ -1037,6 +1037,7 @@ typedef int QNoImplicitBoolCast;
#define QT_NO_FPU
#endif
+// This logic must match the one in qmetatype.h
#if defined(QT_COORD_TYPE)
typedef QT_COORD_TYPE qreal;
#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
@@ -1805,6 +1806,22 @@ static inline bool qFuzzyCompare(float p1, float p2)
return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2)));
}
+/*!
+ \internal
+*/
+static inline bool qFuzzyIsNull(double d)
+{
+ return qAbs(d) <= 0.000000000001;
+}
+
+/*!
+ \internal
+*/
+static inline bool qFuzzyIsNull(float f)
+{
+ return qAbs(f) <= 0.00001f;
+}
+
/*
This function tests a double for a null value. It doesn't
check whether the actual value is 0 or close to 0, but whether
@@ -1936,7 +1953,7 @@ enum { /* TYPEINFO flags */
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS) \
template <> \
-class QTypeInfo<TYPE> \
+class QTypeInfo<TYPE > \
{ \
public: \
enum { \
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 5e4b9bd..6eb6c3a 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -420,14 +420,14 @@ QLibraryInfo::location(LibraryLocation loc)
#else
if (QCoreApplication::instance()) {
#ifdef Q_OS_MAC
- CFBundleRef bundleRef = CFBundleGetMainBundle();
- if (bundleRef) {
- QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);
- if (urlRef) {
- QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
- return QDir::cleanPath(path + QLatin1String("/Contents"));
- }
- }
+ CFBundleRef bundleRef = CFBundleGetMainBundle();
+ if (bundleRef) {
+ QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);
+ if (urlRef) {
+ QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
+ return QDir::cleanPath(path + QLatin1String("/Contents/") + ret);
+ }
+ }
#endif
return QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(ret);
} else {
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 43740ed..a94d6d0 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -192,6 +192,12 @@ public:
#endif
};
+ enum TileRule {
+ Stretch,
+ Repeat,
+ Round
+ };
+
// Text formatting flags for QPainter::drawText and QLabel.
// The following two enums can be combined to one integer which
// is passed as 'flags' to drawText and qt_format_text.
@@ -501,6 +507,8 @@ public:
AA_NativeWindows = 3,
AA_DontCreateNativeWidgetSiblings = 4,
AA_MacPluginApplication = 5,
+ AA_DontUseNativeMenuBar = 6,
+ AA_MacDontSwapCtrlAndMeta = 7,
// Add new attributes before this line
AA_AttributeCount
@@ -1323,7 +1331,8 @@ public:
DirectConnection,
QueuedConnection,
AutoCompatConnection,
- BlockingQueuedConnection
+ BlockingQueuedConnection,
+ UniqueConnection = 0x80
};
enum ShortcutContext {
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 2ce4059..7fc7f47 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -106,6 +106,9 @@
#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL 0x020A
#endif
+#ifndef WM_MOUSEHWHEEL
+#define WM_MOUSEHWHEEL 0x020E
+#endif
#ifndef ETO_PDY
#define ETO_PDY 0x2000
#endif