summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-23 15:37:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-23 15:37:09 (GMT)
commite2ff3adad12ad10363a19d2c49d0ed3bdfe20d68 (patch)
tree1b688135c560b44b0398627f09b0fc5af26f6a8c /src
parentdb2cef1df7fe3e9068d95acd1227a4585373be59 (diff)
parenta315c693d0f3dd64711b8459d86b89ddc48e8c1a (diff)
downloadQt-e2ff3adad12ad10363a19d2c49d0ed3bdfe20d68.zip
Qt-e2ff3adad12ad10363a19d2c49d0ed3bdfe20d68.tar.gz
Qt-e2ff3adad12ad10363a19d2c49d0ed3bdfe20d68.tar.bz2
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (46 commits) Fix crash in indeterminate progressbars on windows Fix infinite loop in qmake when reading malformed .ts files. Fix timer regression for indeterminate progressbars Improve performance of bilinear upscaling of images with neon. Fix libinfixed usage in Symbian when def files are used Made documentation of QPixmap::createMaskFromColor match behaviour. Improve performance of bilinear downscaling of images with neon. Document the 'variant' basic type Add double type to QML Basic Types docs Remove redundant docs Doc: Added a missing license header. More testing for KeyNavigation attached properties. Add tests for ListView.indexAt() and GridView.IndexAt() runonphone: Only print the modprobe instructions on linux reword: Make the USB serial device enumeration work on OS X, too runonphone: Check that the device->config is valid before dereferencing it Remove few compile warnings Fix using QFileDialog statics in Symbian. doc: Replaced some \raw and \endraw uses with \table and \endtable doc: Replaced some \raw and \endraw uses with \table and \endtable ...
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qdiriterator.cpp6
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/tools/qlocale.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp24
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp8
-rw-r--r--src/declarative/util/qdeclarativeview.cpp7
-rw-r--r--src/gui/dialogs/qfiledialog_symbian.cpp73
-rw-r--r--src/gui/image/qpixmap.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp168
-rw-r--r--src/gui/styles/qcommonstyle.cpp5
-rw-r--r--src/gui/styles/qwindowsstyle.cpp5
-rw-r--r--src/gui/widgets/qdockwidget.cpp17
12 files changed, 235 insertions, 86 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index a8192ea..be392c4 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -423,9 +423,6 @@ QDirIterator::QDirIterator(const QDir &dir, IteratorFlags flags)
\note To list symlinks that point to non existing files, QDir::System must be
passed to the flags.
- \warning This constructor expects \a flags to be left at its default value. Use
- the constructors that do not take the \a filters argument instead.
-
\sa hasNext(), next(), IteratorFlags
*/
QDirIterator::QDirIterator(const QString &path, QDir::Filters filters, IteratorFlags flags)
@@ -461,9 +458,6 @@ QDirIterator::QDirIterator(const QString &path, IteratorFlags flags)
\note To list symlinks that point to non existing files, QDir::System must be
passed to the flags.
- \warning This constructor expects \c flags to be left at its default value. Use the
- constructors that do not take the \a filters argument instead.
-
\sa hasNext(), next(), IteratorFlags
*/
QDirIterator::QDirIterator(const QString &path, const QStringList &nameFilters,
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 98b1dcc..72ab845 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -187,7 +187,7 @@ Q_GLOBAL_STATIC(QStringList, resourceSearchPaths)
A QResource can either be loaded with an absolute path, either treated
as a file system rooted with a \c{/} character, or in resource notation
rooted with a \c{:} character. A relative resource can also be opened
- which will be found through the searchPaths().
+ which will be found in the list of paths returned by QDir::searchPaths().
A QResource that is representing a file will have data backing it, this
data can possibly be compressed, in which case qUncompress() must be
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 83d6dcd..b817eb2 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1576,8 +1576,6 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
defaults to the default locale (see setDefault()).
\endlist
- The "C" locale is identical in behavior to \l{English}/\l{UnitedStates}.
-
Use language() and country() to determine the actual language and
country values used.
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 75e4a0b..24d9b03 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -454,10 +454,18 @@ void QDeclarativeItemKeyFilter::componentComplete()
\qmlproperty Item KeyNavigation::down
These properties hold the item to assign focus to
- when Key_Left, Key_Right, Key_Up or Key_Down are
+ when the left, right, up or down cursor keys are
pressed.
*/
+/*!
+ \qmlproperty Item KeyNavigation::tab
+ \qmlproperty Item KeyNavigation::backtab
+
+ These properties hold the item to assign focus to
+ when the Tab key or Shift+Tab key combination (Backtab) are pressed.
+*/
+
QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent)
: QObject(*(new QDeclarativeKeyNavigationAttachedPrivate), parent),
QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
@@ -911,6 +919,20 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
*/
/*!
+ \qmlsignal Keys::onTabPressed(KeyEvent event)
+
+ This handler is called when the Tab key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onBacktabPressed(KeyEvent event)
+
+ This handler is called when the Shift+Tab key combination (Backtab) has
+ been pressed. The \a event parameter provides information about the event.
+*/
+
+/*!
\qmlsignal Keys::onAsteriskPressed(KeyEvent event)
This handler is called when the Asterisk '*' has been pressed. The \a event
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 58444bd..d5df51e 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1324,7 +1324,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
/*!
\qmlclass RotationAnimation QDeclarativeRotationAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits PropertyAnimation
\brief The RotationAnimation element animates changes in rotation values.
@@ -1333,8 +1333,8 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
over the direction of rotation during an animation.
By default, it rotates in the direction
- of the numerical change; a rotation from 0 to 240 will rotate 220 degrees
- clockwise, while a rotation from 240 to 0 will rotate 220 degrees
+ of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
+ clockwise, while a rotation from 240 to 0 will rotate 240 degrees
counterclockwise. The \l direction property can be set to specify the
direction in which the rotation should occur.
@@ -1342,7 +1342,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
between states via the shortest path:
\snippet doc/src/snippets/declarative/rotationanimation.qml 0
-
+
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index c4d8dde..49b662f 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -192,7 +192,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\class QDeclarativeView
- \since 4.7
+ \since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
QDeclarativeItem objects can be placed on a standard QGraphicsScene and
@@ -360,13 +360,14 @@ QDeclarativeContext* QDeclarativeView::rootContext() const
}
/*!
- \enum QDeclarativeView::Status
+ \enum QDeclarativeView::Status
Specifies the loading status of the QDeclarativeView.
\value Null This QDeclarativeView has no source set.
\value Ready This QDeclarativeView has loaded and created the QML component.
\value Loading This QDeclarativeView is loading network data.
- \value Error An error has occurred. Call errorDescription() to retrieve a description.
+ \value Error One or more errors has occurred. Call errors() to retrieve a list
+ of errors.
*/
/*! \enum QDeclarativeView::ResizeMode
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp
index 1f70305..1fc5f5e 100644
--- a/src/gui/dialogs/qfiledialog_symbian.cpp
+++ b/src/gui/dialogs/qfiledialog_symbian.cpp
@@ -64,7 +64,7 @@ public:
filterList.clear();
if (filter.left(2) == QLatin1String("*.")) {
//Filter has only extensions
- filterList << filter.split(" ");
+ filterList << filter.split(QLatin1String(" "));
return;
} else {
//Extensions are in parenthesis and there may be several filters
@@ -75,7 +75,7 @@ public:
return;
}
}
- QRegExp rx("\\(([^\\)]*)\\)");
+ QRegExp rx(QLatin1String("\\(([^\\)]*)\\)"));
int pos = 0;
while ((pos = rx.indexIn(filter, pos)) != -1) {
filterList << rx.cap(1).split(QLatin1String(" "));
@@ -119,36 +119,49 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st
{
QString selection;
#if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3)
- QT_TRAP_THROWING(
- TFileName startFolder;
- if (!startDirectory.isEmpty()) {
- QString dir = QDir::toNativeSeparators(startDirectory);
+ TFileName startFolder;
+ if (!startDirectory.isEmpty()) {
+ QString dir = QDir::toNativeSeparators(QFileDialogPrivate::workingDirectory(startDirectory));
+ startFolder = qt_QString2TPtrC(dir);
+ }
+ TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
+ AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
+ AknCommonDialogsDynMem::EMemoryTypePhone;
+
+ TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
+ TFileName target;
+ bool select = false;
+ int tryCount = 2;
+ while (tryCount--) {
+ TInt err(KErrNone);
+ TRAP(err,
+ if (dialogMode == DialogOpen) {
+ CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
+ CleanupStack::PushL(extensionFilter);
+ extensionFilter->setFilter(filter);
+ select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr, extensionFilter);
+ CleanupStack::Pop(extensionFilter);
+ } else if (dialogMode == DialogSave) {
+ select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr);
+ } else if (dialogMode == DialogFolder) {
+ select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
+ 0, 0, titlePtr, NULL, NULL);
+ }
+ );
+
+ if (err == KErrNone) {
+ tryCount = 0;
+ } else {
+ // Symbian native file dialog doesn't allow accessing files outside C:/Data
+ // It will always leave in that case, so default into QDir::rootPath() in error cases.
+ QString dir = QDir::toNativeSeparators(QDir::rootPath());
startFolder = qt_QString2TPtrC(dir);
}
- TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
- AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
- AknCommonDialogsDynMem::EMemoryTypePhone;
-
- TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
- TFileName target;
- bool select = false;
- if (dialogMode == DialogOpen) {
- CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
- CleanupStack::PushL(extensionFilter);
- extensionFilter->setFilter(filter);
- select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
- startFolder, NULL, NULL, titlePtr, extensionFilter);
- CleanupStack::Pop(extensionFilter);
- } else if (dialogMode == DialogSave) {
- select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
- startFolder, NULL, NULL, titlePtr);
- } else if (dialogMode == DialogFolder) {
- select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
- 0, 0, titlePtr, NULL, NULL);
- }
- if (select)
- selection.append(qt_TDesC2QString(target));
- );
+ }
+ if (select)
+ selection.append(qt_TDesC2QString(target));
#endif
return selection;
}
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 9fd10ae..5cd47c7 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -783,8 +783,8 @@ QBitmap QPixmap::createHeuristicMask(bool clipTight) const
/*!
Creates and returns a mask for this pixmap based on the given \a
maskColor. If the \a mode is Qt::MaskInColor, all pixels matching the
- maskColor will be opaque. If \a mode is Qt::MaskOutColor, all pixels
- matching the maskColor will be transparent.
+ maskColor will be transparent. If \a mode is Qt::MaskOutColor, all pixels
+ matching the maskColor will be opaque.
This function is slow because it involves converting to/from a
QImage.
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 62af212..4fd90ed 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -712,6 +712,38 @@ static inline uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, i
}
#endif
+#if defined(QT_ALWAYS_HAVE_NEON)
+#define interpolate_4_pixels_16_neon(tl, tr, bl, br, distx, disty, disty_, colorMask, invColorMask, v_256, b) \
+{ \
+ const int16x8_t dxdy = vmulq_s16(distx, disty); \
+ const int16x8_t distx_ = vshlq_n_s16(distx, 4); \
+ const int16x8_t idxidy = vaddq_s16(dxdy, vsubq_s16(v_256, vaddq_s16(distx_, disty_))); \
+ const int16x8_t dxidy = vsubq_s16(distx_, dxdy); \
+ const int16x8_t idxdy = vsubq_s16(disty_, dxdy); \
+ \
+ int16x8_t tlAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tl), 8)); \
+ int16x8_t tlRB = vandq_s16(tl, colorMask); \
+ int16x8_t trAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tr), 8)); \
+ int16x8_t trRB = vandq_s16(tr, colorMask); \
+ int16x8_t blAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bl), 8)); \
+ int16x8_t blRB = vandq_s16(bl, colorMask); \
+ int16x8_t brAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(br), 8)); \
+ int16x8_t brRB = vandq_s16(br, colorMask); \
+ \
+ int16x8_t rAG = vmulq_s16(tlAG, idxidy); \
+ int16x8_t rRB = vmulq_s16(tlRB, idxidy); \
+ rAG = vmlaq_s16(rAG, trAG, dxidy); \
+ rRB = vmlaq_s16(rRB, trRB, dxidy); \
+ rAG = vmlaq_s16(rAG, blAG, idxdy); \
+ rRB = vmlaq_s16(rRB, blRB, idxdy); \
+ rAG = vmlaq_s16(rAG, brAG, dxdy); \
+ rRB = vmlaq_s16(rRB, brRB, dxdy); \
+ \
+ rAG = vandq_s16(invColorMask, rAG); \
+ rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); \
+ vst1q_s16((int16_t*)(b), vorrq_s16(rAG, rRB)); \
+}
+#endif
template<TextureBlendType blendType>
Q_STATIC_TEMPLATE_FUNCTION inline void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2)
@@ -819,10 +851,9 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
}
}
-#if defined(QT_ALWAYS_HAVE_SSE2)
if (blendType != BlendTransformedBilinearTiled &&
(format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) {
-
+#if defined(QT_ALWAYS_HAVE_SSE2)
const __m128i disty_ = _mm_set1_epi16(disty);
const __m128i idisty_ = _mm_set1_epi16(idisty);
const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
@@ -852,8 +883,38 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
rRB = _mm_srli_epi16(rRB, 8);
_mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB);
}
- }
+#elif defined(QT_ALWAYS_HAVE_NEON)
+ const int16x8_t disty_ = vdupq_n_s16(disty);
+ const int16x8_t idisty_ = vdupq_n_s16(idisty);
+ const int16x8_t colorMask = vdupq_n_s16(0x00ff);
+
+ lim -= 3;
+ for (; f < lim; x += 4, f += 4) {
+ // Load 4 pixels from s1, and split the alpha-green and red-blue component
+ int16x8_t top = vld1q_s16((int16_t*)((const uint *)(s1)+x));
+ int16x8_t topAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(top), 8));
+ int16x8_t topRB = vandq_s16(top, colorMask);
+ // Multiplies each colour component by idisty
+ topAG = vmulq_s16(topAG, idisty_);
+ topRB = vmulq_s16(topRB, idisty_);
+
+ // Same for the s2 vector
+ int16x8_t bottom = vld1q_s16((int16_t*)((const uint *)(s2)+x));
+ int16x8_t bottomAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bottom), 8));
+ int16x8_t bottomRB = vandq_s16(bottom, colorMask);
+ bottomAG = vmulq_s16(bottomAG, disty_);
+ bottomRB = vmulq_s16(bottomRB, disty_);
+
+ // Add the values, and shift to only keep 8 significant bits per colors
+ int16x8_t rAG = vaddq_s16(topAG, bottomAG);
+ rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8));
+ vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG);
+ int16x8_t rRB = vaddq_s16(topRB, bottomRB);
+ rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8));
+ vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB);
+ }
#endif
+ }
for (; f < count; f++) { // Same as above but without sse2
if (blendType == BlendTransformedBilinearTiled) {
if (x >= image_width) x -= image_width;
@@ -920,35 +981,36 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
const uchar *s2 = data->texture.scanLine(y2);
int disty = (fy & 0x0000ffff) >> 12;
-#if defined(QT_ALWAYS_HAVE_SSE2)
if (blendType != BlendTransformedBilinearTiled &&
(format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) {
- //prolog to get into the bounds
- while (b < end) {
- int x1 = (fx >> 16);
- int x2;
- fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2);
- if (x1 != x2) //break if we are insided the bounds.
- break;
- uint tl = fetch(s1, x1, data->texture.colorTable);
- uint tr = fetch(s1, x2, data->texture.colorTable);
- uint bl = fetch(s2, x1, data->texture.colorTable);
- uint br = fetch(s2, x2, data->texture.colorTable);
- int distx = (fx & 0x0000ffff) >> 12;
- *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty);
- fx += fdx;
- ++b;
- }
- uint *boundedEnd;
- if (fdx > 0)
- boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11));
- else
- boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11));
+#define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \
+ while (b < end) { \
+ int x1 = (fx >> 16); \
+ int x2; \
+ fetchTransformedBilinear_pixelBounds<blendType>(image_width, image_x1, image_x2, x1, x2); \
+ if (x1 != x2) \
+ break; \
+ uint tl = fetch(s1, x1, data->texture.colorTable); \
+ uint tr = fetch(s1, x2, data->texture.colorTable); \
+ uint bl = fetch(s2, x1, data->texture.colorTable); \
+ uint br = fetch(s2, x2, data->texture.colorTable); \
+ int distx = (fx & 0x0000ffff) >> 12; \
+ *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \
+ fx += fdx; \
+ ++b; \
+ } \
+ uint *boundedEnd; \
+ if (fdx > 0) \
+ boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); \
+ else \
+ boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); \
boundedEnd -= 3;
+#if defined(QT_ALWAYS_HAVE_SSE2)
+ BILINEAR_DOWNSCALE_BOUNDS_PROLOG
+
const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
- //const __m128i distShuffleMask = _mm_set_epi8(13, 12, 13, 12, 9, 8, 9, 8, 5, 4, 5, 4, 1, 0, 1, 0);
const __m128i v_256 = _mm_set1_epi16(256);
const __m128i v_disty = _mm_set1_epi16(disty);
__m128i v_fdx = _mm_set1_epi32(fdx*4);
@@ -976,8 +1038,7 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
bl.i[i] = *(addr_tl+secondLine);
br.i[i] = *(addr_tr+secondLine);
}
- __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12); //distx = (fx & 0x0000ffff) >> 12;
- //v_distx = _mm_shuffle_epi8(v_disty, distShuffleMask); //distx |= distx << 16;
+ __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12);
v_distx = _mm_shufflehi_epi16(v_distx, _MM_SHUFFLE(2,2,0,0));
v_distx = _mm_shufflelo_epi16(v_distx, _MM_SHUFFLE(2,2,0,0));
@@ -986,8 +1047,57 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
v_fx.vect = _mm_add_epi32(v_fx.vect, v_fdx);
}
fx = v_fx.i[0];
- }
+#elif defined(QT_ALWAYS_HAVE_NEON)
+ BILINEAR_DOWNSCALE_BOUNDS_PROLOG
+
+ const int16x8_t colorMask = vdupq_n_s16(0x00ff);
+ const int16x8_t invColorMask = vmvnq_s16(colorMask);
+ const int16x8_t v_256 = vdupq_n_s16(256);
+ const int16x8_t v_disty = vdupq_n_s16(disty);
+ const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4);
+ int32x4_t v_fdx = vdupq_n_s32(fdx*4);
+
+ ptrdiff_t secondLine = reinterpret_cast<const uint *>(s2) - reinterpret_cast<const uint *>(s1);
+
+ union Vect_buffer { int32x4_t vect; quint32 i[4]; };
+ Vect_buffer v_fx;
+
+ for (int i = 0; i < 4; i++) {
+ v_fx.i[i] = fx;
+ fx += fdx;
+ }
+
+ const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff);
+
+ while (b < boundedEnd) {
+
+ Vect_buffer tl, tr, bl, br;
+
+ Vect_buffer v_fx_shifted;
+ v_fx_shifted.vect = vshrq_n_s32(v_fx.vect, 16);
+
+ int32x4_t v_distx = vshrq_n_s32(vandq_s32(v_fx.vect, v_ffff_mask), 12);
+
+ for (int i = 0; i < 4; i++) {
+ int x1 = v_fx_shifted.i[i];
+ const uint *addr_tl = reinterpret_cast<const uint *>(s1) + x1;
+ const uint *addr_tr = addr_tl + 1;
+ tl.i[i] = *addr_tl;
+ tr.i[i] = *addr_tr;
+ bl.i[i] = *(addr_tl+secondLine);
+ br.i[i] = *(addr_tr+secondLine);
+ }
+
+ v_distx = vorrq_s32(v_distx, vshlq_n_s32(v_distx, 16));
+
+ interpolate_4_pixels_16_neon(vreinterpretq_s16_s32(tl.vect), vreinterpretq_s16_s32(tr.vect), vreinterpretq_s16_s32(bl.vect), vreinterpretq_s16_s32(br.vect), vreinterpretq_s16_s32(v_distx), v_disty, v_disty_, colorMask, invColorMask, v_256, b);
+ b+=4;
+ v_fx.vect = vaddq_s32(v_fx.vect, v_fdx);
+ }
+ fx = v_fx.i[0];
#endif
+ }
+
while (b < end) {
int x1 = (fx >> 16);
int x2;
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 296455b..e443832 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1403,8 +1403,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
}
break;
case CE_ProgressBarGroove:
- qDrawShadePanel(p, opt->rect, opt->palette, true, 1,
- &opt->palette.brush(QPalette::Window));
+ if (opt->rect.isValid())
+ qDrawShadePanel(p, opt->rect, opt->palette, true, 1,
+ &opt->palette.brush(QPalette::Window));
break;
case CE_ProgressBarLabel:
if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index d994b9b..2604f1f 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -130,6 +130,7 @@ QWindowsStylePrivate::QWindowsStylePrivate()
pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo");
}
#endif
+ startTime.start();
}
// Returns true if the toplevel parent of \a widget has seen the Alt-key
@@ -2396,8 +2397,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
#ifndef QT_NO_PROGRESSBAR
case CE_ProgressBarContents:
if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
-
QRect rect = pb->rect;
+ if (!rect.isValid())
+ return;
+
bool vertical = false;
bool inverted = false;
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index df9b171..0a6269d 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1531,8 +1531,11 @@ QAction * QDockWidget::toggleViewAction() const
/*!
\since 4.3
+
Sets an arbitrary \a widget as the dock widget's title bar. If \a widget
- is 0, the title bar widget is removed, but not deleted.
+ is 0, any custom title bar widget previously set on the dock widget is
+ removed, but not deleted, and the default title bar will be used
+ instead.
If a title bar widget is set, QDockWidget will not use native window
decorations when it is floated.
@@ -1540,23 +1543,27 @@ QAction * QDockWidget::toggleViewAction() const
Here are some tips for implementing custom title bars:
\list
- \i Mouse events that are not explicitly handled by the title bar widget
+ \o Mouse events that are not explicitly handled by the title bar widget
must be ignored by calling QMouseEvent::ignore(). These events then
propagate to the QDockWidget parent, which handles them in the usual
manner, moving when the title bar is dragged, docking and undocking
when it is double-clicked, etc.
- \i When DockWidgetVerticalTitleBar is set on QDockWidget, the title
+ \o When DockWidgetVerticalTitleBar is set on QDockWidget, the title
bar widget is repositioned accordingly. In resizeEvent(), the title
bar should check what orientation it should assume:
\snippet doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp 0
- \i The title bar widget must have a valid QWidget::sizeHint() and
+ \o The title bar widget must have a valid QWidget::sizeHint() and
QWidget::minimumSizeHint(). These functions should take into account
the current orientation of the title bar.
+
+ \o It is not possible to remove a title bar from a dock widget. However,
+ a similar effect can be achieved by setting a default constructed
+ QWidget as the title bar widget.
\endlist
- Using qobject_cast as shown above, the title bar widget has full access
+ Using qobject_cast() as shown above, the title bar widget has full access
to its parent QDockWidget. Hence it can perform such operations as docking
and hiding in response to user actions.