summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp11
-rw-r--r--src/corelib/statemachine/qstatemachine_p.h2
-rw-r--r--src/gui/kernel/qsound.cpp3
-rw-r--r--src/gui/styles/qs60style.cpp41
-rw-r--r--src/openvg/qpixmapdata_vg.cpp13
5 files changed, 38 insertions, 32 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index bd7e626..9d5c49f 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1175,6 +1175,16 @@ void QStateMachinePrivate::removeStartState()
_startState = 0;
}
+void QStateMachinePrivate::clearHistory()
+{
+ Q_Q(QStateMachine);
+ QList<QHistoryState*> historyStates = qFindChildren<QHistoryState*>(q);
+ for (int i = 0; i < historyStates.size(); ++i) {
+ QHistoryState *h = historyStates.at(i);
+ QHistoryStatePrivate::get(h)->configuration.clear();
+ }
+}
+
void QStateMachinePrivate::_q_start()
{
Q_Q(QStateMachine);
@@ -1186,6 +1196,7 @@ void QStateMachinePrivate::_q_start()
internalEventQueue.clear();
qDeleteAll(externalEventQueue);
externalEventQueue.clear();
+ clearHistory();
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": starting";
diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h
index 0fead5d..5e1015f 100644
--- a/src/corelib/statemachine/qstatemachine_p.h
+++ b/src/corelib/statemachine/qstatemachine_p.h
@@ -126,6 +126,8 @@ public:
QState *startState();
void removeStartState();
+ void clearHistory();
+
void microstep(QEvent *event, const QList<QAbstractTransition*> &transitionList);
bool isPreempted(const QAbstractState *s, const QSet<QAbstractTransition*> &transitions) const;
QSet<QAbstractTransition*> selectTransitions(QEvent *event) const;
diff --git a/src/gui/kernel/qsound.cpp b/src/gui/kernel/qsound.cpp
index 165e6ce..9d8ffa5 100644
--- a/src/gui/kernel/qsound.cpp
+++ b/src/gui/kernel/qsound.cpp
@@ -147,12 +147,13 @@ public:
supports WAVE and AU files.
\row
\o Mac OS X
- \o NSSound is used. All formats that NSSound supports, including QuickTime formats,
+ \o NSSound is used. All formats that NSSound supports, including QuickTime formats,
are supported by Qt for Mac OS X.
\row
\o Qt for Embedded Linux
\o A built-in mixing sound server is used, accessing \c /dev/dsp
directly. Only the WAVE format is supported.
+ \row
\o Symbian
\o CMdaAudioPlayerUtility is used. All formats that Symbian OS or devices support
are supported also by Qt.
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 750e19f..6448417 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -1964,40 +1964,37 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_MenuScroller:
break;
case CE_FocusFrame: {
- // The pen width should nearly fill the layoutspacings around the widget
- const int penWidth =
- qMin(pixelMetric(QS60Style::PM_LayoutVerticalSpacing), pixelMetric(QS60Style::PM_LayoutHorizontalSpacing))
- - 2; // But keep 1 pixel distance to the focus widget and 1 pixel to the adjacent widgets
-
#ifdef QT_KEYPAD_NAVIGATION
bool editFocus = false;
if (const QFocusFrame *focusFrame = qobject_cast<const QFocusFrame*>(widget)) {
if (focusFrame->widget() && focusFrame->widget()->hasEditFocus())
editFocus = true;
}
- const qreal opacity = editFocus ? 0.65 : 0.45; // Trial and error factors. Feel free to improve.
+ const qreal opacity = editFocus ? 1 : 0.75; // Trial and error factors. Feel free to improve.
#else
- const qreal opacity = 0.5;
+ const qreal opacity = 0.85;
#endif
- // Because of Qts coordinate system, we need to tweak the rect by .5 pixels, otherwise it gets blurred.
- const qreal rectAdjustment = (penWidth % 2) ? -.5 : 0;
-
- // Make sure that the pen stroke is inside the rect
- const QRectF adjustedRect =
- QRectF(option->rect).adjusted(
- rectAdjustment + penWidth,
- rectAdjustment + penWidth,
- -rectAdjustment - penWidth,
- -rectAdjustment - penWidth
- );
-
- const qreal roundRectRadius = penWidth * goldenRatio;
+ // We need to reduce the focus frame size if LayoutSpacing is smaller than FocusFrameMargin
+ // Otherwise, we would overlay adjacent widgets.
+ const int frameHeightReduction =
+ qMin(0, pixelMetric(QStyle::PM_LayoutVerticalSpacing)
+ - pixelMetric(QStyle::PM_FocusFrameVMargin));
+ const int frameWidthReduction =
+ qMin(0, pixelMetric(QStyle::PM_LayoutHorizontalSpacing)
+ - pixelMetric(QStyle::PM_FocusFrameHMargin));
+ const int rounding =
+ qMin(pixelMetric(QStyle::PM_FocusFrameVMargin),
+ pixelMetric(QStyle::PM_LayoutVerticalSpacing));
+ const QRect frameRect =
+ option->rect.adjusted(-frameWidthReduction, -frameHeightReduction,
+ frameWidthReduction, frameHeightReduction);
+ QPainterPath framePath;
+ framePath.addRoundedRect(frameRect, rounding, rounding);
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
painter->setOpacity(opacity);
- painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth));
- painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius);
+ painter->fillPath(framePath, option->palette.color(QPalette::Text));
painter->restore();
}
break;
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index cb5255d..d602790 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -464,8 +464,8 @@ void QVGPixmapData::cleanup()
void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
{
-#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
if (type == QPixmapData::SgImage && pixmap) {
+#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmap);
destroyImages();
@@ -536,6 +536,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
// release stuff
eglDestroyImageKHR(QEglContext::display(), eglImage);
driver.Close();
+#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
@@ -581,16 +582,12 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
if(deleteSourceBitmap)
delete bitmap;
}
-#else
- Q_UNUSED(pixmap);
- Q_UNUSED(type);
-#endif
}
void* QVGPixmapData::toNativeType(NativeType type)
{
-#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
if (type == QPixmapData::SgImage) {
+#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
toVGImage();
if (!isValid() || vgImage == VG_INVALID_HANDLE)
@@ -657,6 +654,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
eglDestroyImageKHR(QEglContext::display(), eglImage);
driver.Close();
return reinterpret_cast<void*>(sgImage);
+#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);
@@ -678,10 +676,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
return reinterpret_cast<void*>(bitmap);
}
-#else
- Q_UNUSED(type);
return 0;
-#endif
}
#endif //Q_OS_SYMBIAN