summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-09-08 11:51:23 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-09-08 11:51:23 (GMT)
commitc88f8d6337a2273f8dc5fb44830823c8d17354a3 (patch)
treea27787bceabf8a75cc2cc5ecbaa998553bd5cc68 /src
parentbeea786c9d1362b1fb12fdff209b842e21ef9cf8 (diff)
parent0399ace27c7441b4454911da3aaa4ea17b931b99 (diff)
downloadQt-c88f8d6337a2273f8dc5fb44830823c8d17354a3.zip
Qt-c88f8d6337a2273f8dc5fb44830823c8d17354a3.tar.gz
Qt-c88f8d6337a2273f8dc5fb44830823c8d17354a3.tar.bz2
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h (renamed from src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h)6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h2
-rw-r--r--src/corelib/animation/qabstractanimation.cpp17
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp14
-rw-r--r--src/gui/kernel/qstandardgestures.cpp6
-rw-r--r--src/gui/painting/qpaintengine.cpp1
-rw-r--r--src/gui/widgets/qlinecontrol_p.h6
-rw-r--r--src/gui/widgets/qlineedit.cpp2
10 files changed, 50 insertions, 10 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi
index 2d69c7d..5a75ab7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi
@@ -323,7 +323,7 @@
'runtime/TimeoutChecker.cpp',
'runtime/TimeoutChecker.h',
'runtime/Tracing.h',
- 'runtime/TypeInfo.h',
+ 'runtime/JSTypeInfo.h',
'runtime/UString.cpp',
'runtime/UString.h',
'wrec/CharacterClass.cpp',
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h
index 70aeed3..bea188b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TypeInfo_h
-#define TypeInfo_h
+#ifndef JSTypeInfo_h
+#define JSTypeInfo_h
#include "JSType.h"
@@ -69,4 +69,4 @@ namespace JSC {
}
-#endif // TypeInfo_h
+#endif // JSTypeInfo_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
index dcd4e50..ca4552b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
@@ -31,7 +31,7 @@
#include "JSValue.h"
#include "PropertyMapHashTable.h"
#include "StructureTransitionTable.h"
-#include "TypeInfo.h"
+#include "JSTypeInfo.h"
#include "UString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index e1b8509..31f0841 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -157,6 +157,19 @@
#define DEFAULT_TIMER_INTERVAL 16
+#ifdef Q_WS_WIN
+ /// Fix for Qt 4.7
+ //on windows if you're currently dragging a widget an inner eventloop was started by the system
+ //to make sure that this timer is getting fired, we need to make sure to use the system timers
+ //that will send a WM_TIMER event. We do that by settings the timer interval to 11
+ //It is 11 because QEventDispatcherWin32Private::registerTimer specifically checks if the interval
+ //is greater than 10 to determine if it should use a system timer (or the multimedia timer).
+#define STARTSTOP_TIMER_DELAY 11
+#else
+#define STARTSTOP_TIMER_DELAY 0
+#endif
+
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
@@ -217,7 +230,7 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation)
if (animations.contains(animation) || animationsToStart.contains(animation))
return;
animationsToStart << animation;
- startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer
+ startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); // we delay the check if we should start/stop the global timer
}
void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
@@ -233,7 +246,7 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation)
} else {
animationsToStart.removeOne(animation);
}
- startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer
+ startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); // we delay the check if we should start/stop the global timer
}
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 52529ff..99e9aeb 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1661,6 +1661,10 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)
EditTrigger trigger = (selectedClicked ? SelectedClicked : NoEditTriggers);
bool edited = edit(index, trigger, event);
+ //in the case the user presses on no item we might decide to clear the selection
+ if (d->selectionModel && !index.isValid())
+ d->selectionModel->select(QModelIndex(), selectionCommand(index, event));
+
setState(NoState);
if (click) {
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 511c797..a3420da 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4772,7 +4772,12 @@ void QApplicationPrivate::emitLastWindowClosed()
If \a enable is true, Qt::Key_Up and Qt::Key_Down are used to change focus.
- This feature is available in Qt for Embedded Linux and Symbian only.
+ This feature is available in Qt for Embedded Linux, Symbian and Windows CE
+ only.
+
+ \note On Windows CE this feature is disabled by default for touch device
+ mkspecs. To enable keypad navigation, build Qt with
+ QT_KEYPAD_NAVIGATION defined.
\sa keypadNavigationEnabled()
*/
@@ -4785,7 +4790,12 @@ void QApplication::setKeypadNavigationEnabled(bool enable)
Returns true if Qt is set to use keypad navigation; otherwise returns
false. The default value is true on Symbian, but false on other platforms.
- This feature is available in Qt for Embedded Linux and Symbian only.
+ This feature is available in Qt for Embedded Linux, Symbian and Windows CE
+ only.
+
+ \note On Windows CE this feature is disabled by default for touch device
+ mkspecs. To enable keypad navigation, build Qt with
+ QT_KEYPAD_NAVIGATION defined.
\sa setKeypadNavigationEnabled()
*/
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 8e76715..b3e137d 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -535,6 +535,12 @@ void QPinchGesture::reset()
QGesture::reset();
}
+/*! \enum QPinchGesture::WhatChange
+ \value ScaleFactorChanged
+ \value RotationAngleChanged
+ \value CenterPointChanged
+*/
+
/*!
\property QPinchGesture::whatChanged
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index f442788..42da637 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -386,6 +386,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw
\value User First user type ID
\value MaxUser Last user type ID
\value OpenGL2
+ \value PaintBuffer
*/
/*!
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index a81f138..f46abf1 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -109,6 +109,7 @@ public:
int width() const;
int height() const;
int ascent() const;
+ qreal naturalTextWidth() const;
void setSelection(int start, int length);
@@ -410,6 +411,11 @@ inline int QLineControl::width() const
return qRound(m_textLayout.lineAt(0).width()) + 1;
}
+inline qreal QLineControl::naturalTextWidth() const
+{
+ return m_textLayout.lineAt(0).naturalTextWidth();
+}
+
inline int QLineControl::height() const
{
return qRound(m_textLayout.lineAt(0).height()) + 1;
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 3065c7f..9571860 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1808,7 +1808,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
// (cix).
int minLB = qMax(0, -fm.minLeftBearing());
int minRB = qMax(0, -fm.minRightBearing());
- int widthUsed = d->control->width() + minRB;
+ int widthUsed = qRound(d->control->naturalTextWidth()) + 1 + minRB;
if ((minLB + widthUsed) <= lineRect.width()) {
// text fits in lineRect; use hscroll for alignment
switch (va & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {