summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/boxes/glextensions.h7
-rw-r--r--src/corelib/tools/qhash.h5
-rw-r--r--src/gui/painting/qtransform.h2
-rw-r--r--src/gui/styles/qmacstyle_mac.mm3
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h2
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp11
6 files changed, 18 insertions, 12 deletions
diff --git a/demos/boxes/glextensions.h b/demos/boxes/glextensions.h
index 74617d6..7ba3b32 100644
--- a/demos/boxes/glextensions.h
+++ b/demos/boxes/glextensions.h
@@ -120,8 +120,11 @@ glUnmapBuffer
//#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
#endif
+#ifndef GL_ARB_vertex_buffer_object
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+
#ifndef GL_VERSION_1_5
-typedef ptrdiff_t GLsizeiptr;
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_READ_WRITE 0x88BA
@@ -185,7 +188,7 @@ typedef void (APIENTRY *_glTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei,
typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *);
typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint);
-typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptr, const GLvoid *, GLenum);
+typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *);
typedef void *(APIENTRY *_glMapBuffer) (GLenum, GLenum);
typedef GLboolean (APIENTRY *_glUnmapBuffer) (GLenum);
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index a18b531..632c422 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -97,10 +97,7 @@ Q_CORE_EXPORT uint qHash(const QBitArray &key);
#endif
template <class T> inline uint qHash(const T *key)
{
- if (sizeof(const T *) > sizeof(uint))
- return qHash(reinterpret_cast<quint64>(key));
- else
- return uint(reinterpret_cast<ulong>(key));
+ return qHash(reinterpret_cast<quintptr>(key));
}
#if defined(Q_CC_MSVC)
#pragma warning( pop )
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 059752b..7e93f74 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -342,7 +342,7 @@ inline QTransform &QTransform::operator-=(qreal num)
# if Q_CC_GNU_VERSION >= 0x040201
# pragma GCC diagnostic warning "-Wfloat-equal"
# endif
-# undef Q_GCC_GNU_VERSION
+# undef Q_CC_GNU_VERSION
#endif
/****** stream functions *******************/
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 64edd76..2478f20 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -5151,7 +5151,8 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
arrowOpt.state = tb->state;
arrowOpt.palette = tb->palette;
drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget);
- } else if (tb->features & QStyleOptionToolButton::HasMenu) {
+ } else if ((tb->features & QStyleOptionToolButton::HasMenu)
+ && (tb->toolButtonStyle != Qt::ToolButtonTextOnly && !tb->icon.isNull())) {
drawToolbarButtonArrow(tb->rect, tds, cg);
}
if (tb->state & State_On) {
diff --git a/src/plugins/accessible/widgets/rangecontrols.h b/src/plugins/accessible/widgets/rangecontrols.h
index aea91e1..57073ee 100644
--- a/src/plugins/accessible/widgets/rangecontrols.h
+++ b/src/plugins/accessible/widgets/rangecontrols.h
@@ -60,6 +60,7 @@ class QDial;
#ifndef QT_NO_SPINBOX
class QAccessibleAbstractSpinBox: public QAccessibleWidgetEx, public QAccessibleValueInterface
{
+ Q_ACCESSIBLE_OBJECT
public:
explicit QAccessibleAbstractSpinBox(QWidget *w);
@@ -132,6 +133,7 @@ protected:
class QAccessibleAbstractSlider: public QAccessibleWidgetEx, public QAccessibleValueInterface
{
+ Q_ACCESSIBLE_OBJECT
public:
explicit QAccessibleAbstractSlider(QWidget *w, Role r = Slider);
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
index f501e78..5ab5064 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -795,14 +795,14 @@ void tst_QSocks5SocketEngine::downloadBigFile()
if (QTestEventLoop::instance().timeout())
QFAIL("Network operation timed out");
- QCOMPARE(bytesAvailable, qint64(10000309));
+ QCOMPARE(bytesAvailable, qint64(10000000));
QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState);
- qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s",
+ /*qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s",
bytesAvailable / (1024.0 * 1024.0),
stopWatch.elapsed() / 1024.0,
- (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
+ (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));*/
delete tmpSocket;
tmpSocket = 0;
@@ -816,7 +816,10 @@ void tst_QSocks5SocketEngine::exitLoopSlot()
void tst_QSocks5SocketEngine::downloadBigFileSlot()
{
- bytesAvailable += tmpSocket->readAll().size();
+ QByteArray tmp=tmpSocket->readAll();
+ int correction=tmp.indexOf((char)0,0); //skip header
+ if (correction==-1) correction=0;
+ bytesAvailable += (tmp.size()-correction);
if (bytesAvailable >= 10000000)
QTestEventLoop::instance().exitLoop();
}