summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xconfigure9
-rw-r--r--demos/demos.pro21
-rw-r--r--doc/src/development/assistant-manual.qdoc9
-rw-r--r--mkspecs/features/unix/separate_debug_info.prf2
-rw-r--r--mkspecs/unsupported/linux-host-g++/qmake.conf2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp1
-rw-r--r--src/corelib/kernel/qobject.cpp43
-rw-r--r--src/gui/effects/qgraphicseffect.cpp26
-rw-r--r--src/gui/effects/qgraphicseffect_p.h11
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp29
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
-rw-r--r--src/gui/image/qpixmapfilter.cpp364
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp9
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h1
-rw-r--r--src/gui/painting/qmemrotate.cpp21
-rw-r--r--src/gui/painting/qmemrotate_p.h2
-rw-r--r--src/gui/text/qfontengine_mac.mm8
-rw-r--r--src/gui/widgets/qplaintextedit.cpp10
-rw-r--r--src/opengl/gl2paintengineex/qglcustomshaderstage_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h3
-rw-r--r--src/opengl/qgl.cpp46
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_egl.cpp34
-rw-r--r--src/opengl/qgl_p.h1
-rw-r--r--src/opengl/qgl_x11egl.cpp48
-rw-r--r--src/opengl/qglpixmapfilter.cpp754
-rw-r--r--src/openvg/openvg.pro6
-rw-r--r--src/openvg/qpaintengine_vg.cpp16
-rw-r--r--src/openvg/qpixmapdata_vg.cpp92
-rw-r--r--src/openvg/qpixmapdata_vg_p.h17
-rw-r--r--src/openvg/qpixmapfilter_vg.cpp25
-rw-r--r--src/openvg/qvgimagepool.cpp215
-rw-r--r--src/openvg/qvgimagepool_p.h157
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp4
-rw-r--r--src/tools/moc/generator.cpp11
-rw-r--r--tests/auto/moc/tst_moc.cpp35
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp23
-rw-r--r--tests/auto/qfile/tst_qfile.cpp75
-rw-r--r--tests/auto/qgl/tst_qgl.cpp19
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp49
-rw-r--r--tests/auto/qobject/tst_qobject.cpp144
-rw-r--r--tools/assistant/lib/qhelpindexwidget.cpp4
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp116
-rw-r--r--tools/designer/src/components/formeditor/itemview_propertysheet.cpp183
-rw-r--r--tools/designer/src/components/formeditor/itemview_propertysheet.h10
-rw-r--r--tools/designer/src/lib/shared/actionrepository.cpp2
-rw-r--r--translations/assistant_pl.ts56
-rw-r--r--translations/designer_pl.ts108
-rw-r--r--translations/linguist_pl.ts50
-rw-r--r--translations/qt_help_pl.ts45
-rw-r--r--translations/qt_pl.ts1094
-rw-r--r--translations/qvfb_pl.ts11
53 files changed, 2642 insertions, 1390 deletions
diff --git a/.gitignore b/.gitignore
index 33c9b7c..2069ad5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -93,7 +93,6 @@ tests/auto/qprocess/fileWriterProcess.txt
.com.apple.timemachine.supported
tests/auto/qlibrary/libmylib.so*
tests/auto/qresourceengine/runtime_resource.rcc
-tools/qdoc3/qdoc3*
tools/qtestlib/updater/updater*
tools/activeqt/testcon/testcon.tlb
translations/*.qm
diff --git a/configure b/configure
index 436be8a..6547318 100755
--- a/configure
+++ b/configure
@@ -713,6 +713,7 @@ CFG_PTMALLOC=no
CFG_STL=auto
CFG_PRECOMPILE=auto
CFG_SEPARATE_DEBUG_INFO=auto
+CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
CFG_REDUCE_EXPORTS=auto
CFG_MMX=auto
CFG_3DNOW=auto
@@ -1544,6 +1545,9 @@ while [ "$#" -gt 0 ]; do
separate-debug-info)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SEPARATE_DEBUG_INFO="$VAL"
+ elif [ "$VAL" = "nocopy" ] ; then
+ CFG_SEPARATE_DEBUG_INFO="yes"
+ CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
else
UNKNOWN_OPT=yes
fi
@@ -2902,7 +2906,7 @@ fi
# pass on $CFG_SDK to the configure tests.
if [ '!' -z "$CFG_SDK" ]; then
- MAC_CONFIG_TEST_COMMANDLINE="-sdk $CFG_SDK"
+ MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
fi
# find the default framework value
@@ -6094,6 +6098,9 @@ if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
QMakeVar add QMAKE_CXXFLAGS -g
QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
fi
+if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
+ QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info_nocopy"
+fi
[ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
[ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
[ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
diff --git a/demos/demos.pro b/demos/demos.pro
index a943bfd..5a9b6db 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -20,7 +20,24 @@ symbian: SUBDIRS = \
demos_shared \
demos_deform \
demos_pathstroke
-
+
+wince*: SUBDIRS = \
+ demos_shared \
+ demos_deform \
+ demos_gradients \
+ demos_pathstroke \
+ demos_affine \
+ demos_composition \
+ demos_books \
+ demos_interview \
+ demos_mainwindow \
+ demos_spreadsheet \
+ demos_textedit \
+ # demos_chip \
+ demos_embeddeddialogs \
+ demos_undo \
+ demos_sub-attaq
+
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl):!contains(QT_CONFIG, opengles2):{
SUBDIRS += demos_boxes
}
@@ -33,7 +50,7 @@ wince*|symbian|embedded|x11: SUBDIRS += embedded
!cross_compile:{
contains(QT_BUILD_PARTS, tools):{
!wince*:SUBDIRS += demos_sqlbrowser demos_qtdemo
-wince*: SUBDIRS += demos_sqlbrowser
+wince*:SUBDIRS += demos_sqlbrowser
}
}
contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 8de500e..5a30e43 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -130,7 +130,7 @@
\o -collectionFile <file.qhc>
\o Uses the specified collection file instead of the default one.
\row
- \o -showUrl URL
+ \o -showUrl <URL>
\o Shows the document referenced by URL.
\row
\o -enableRemoteControl
@@ -156,7 +156,12 @@
\o Unregisters the specified compressed help file from the given
collection file.
\row
- \o -setCurrentFilter filter
+ \o -remove-search-index
+ \o Purges the help search engine's index. This option is
+ useful in case the associated index files get corrupted.
+ \QA will re-index the documentation at the next start-up.
+ \row
+ \o -setCurrentFilter <filter>
\o Sets the given filter as the active filter.
\row
\o -quiet
diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf
index 0c95baf..c675828 100644
--- a/mkspecs/features/unix/separate_debug_info.prf
+++ b/mkspecs/features/unix/separate_debug_info.prf
@@ -1,5 +1,5 @@
-!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {
+!separate_debug_info_nocopy:!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {
QMAKE_SEPARATE_DEBUG_INFO = (test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY --only-keep-debug \"\$\$targ\" \"\$\$targ.debug\" && $$QMAKE_OBJCOPY --strip-debug \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.debug\" \"\$\$targ\" && chmod -x \"\$\$targ.debug\" ) ;
QMAKE_INSTALL_SEPARATE_DEBUG_INFO = test -z "$(DESTDIR)" || cd \"$(DESTDIR)\" ; $(INSTALL_FILE) `basename $(TARGET)`.debug $(INSTALL_ROOT)/\$\$target_path/
diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf
index 237477c..8a480c4 100644
--- a/mkspecs/unsupported/linux-host-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-host-g++/qmake.conf
@@ -134,5 +134,5 @@ QMAKE_MKDIR = mkdir -p
QMAKE_INSTALL_FILE = install -m 644 -p
QMAKE_INSTALL_PROGRAM = install -m 755 -p
-include(../common/unix.conf)
+include(../../common/unix.conf)
load(qt_config)
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 6e6da19..72d6786 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -2648,6 +2648,7 @@ const char* QMetaClassInfo::value() const
*/
int QMetaObjectPrivate::originalClone(const QMetaObject *mobj, int local_method_index)
{
+ Q_ASSERT(local_method_index < get(mobj)->methodCount);
int handle = get(mobj)->methodData + 5 * local_method_index;
while (mobj->d.data[handle + 4] & MethodCloned) {
Q_ASSERT(local_method_index > 0);
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 85915c2..4370ee0 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2850,6 +2850,27 @@ void QObject::disconnectNotify(const char *)
{
}
+/* \internal
+ convert a signal index from the method range to the signal range
+ */
+static int methodIndexToSignalIndex(const QMetaObject *metaObject, int signal_index)
+{
+ if (signal_index < 0)
+ return signal_index;
+ while (metaObject && metaObject->methodOffset() > signal_index)
+ metaObject = metaObject->superClass();
+
+ if (metaObject) {
+ int signalOffset, methodOffset;
+ computeOffsets(metaObject, &signalOffset, &methodOffset);
+ if (signal_index < metaObject->methodCount())
+ signal_index = QMetaObjectPrivate::originalClone(metaObject, signal_index - methodOffset) + signalOffset;
+ else
+ signal_index = signal_index - methodOffset + signalOffset;
+ }
+ return signal_index;
+}
+
/*!\internal
\a types is a 0-terminated vector of meta types for queued
connections.
@@ -2860,16 +2881,7 @@ void QObject::disconnectNotify(const char *)
bool QMetaObject::connect(const QObject *sender, int signal_index,
const QObject *receiver, int method_index, int type, int *types)
{
- if (signal_index > 0) {
- const QMetaObject *mo = sender->metaObject();
- while (mo && mo->methodOffset() > signal_index)
- mo = mo->superClass();
- if (mo) {
- int signalOffset, methodOffset;
- computeOffsets(mo, &signalOffset, &methodOffset);
- signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset;
- }
- }
+ signal_index = methodIndexToSignalIndex(sender->metaObject(), signal_index);
return QMetaObjectPrivate::connect(sender, signal_index,
receiver, method_index, type, types);
}
@@ -2938,16 +2950,7 @@ bool QMetaObjectPrivate::connect(const QObject *sender, int signal_index,
bool QMetaObject::disconnect(const QObject *sender, int signal_index,
const QObject *receiver, int method_index)
{
- if (signal_index > 0) {
- const QMetaObject *mo = sender->metaObject();
- while (mo && mo->methodOffset() > signal_index)
- mo = mo->superClass();
- if (mo) {
- int signalOffset, methodOffset;
- computeOffsets(mo, &signalOffset, &methodOffset);
- signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset;
- }
- }
+ signal_index = methodIndexToSignalIndex(sender->metaObject(), signal_index);
return QMetaObjectPrivate::disconnect(sender, signal_index,
receiver, method_index);
}
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index d6cabaa..a523bab 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -313,7 +313,10 @@ QPixmap QGraphicsEffectSource::pixmap(Qt::CoordinateSystem system, QPoint *offse
// Shortcut, no cache for childless pixmap items...
const QGraphicsItem *item = graphicsItem();
if (system == Qt::LogicalCoordinates && mode == QGraphicsEffect::NoPad && item && isPixmap()) {
- return ((QGraphicsPixmapItem *) item)->pixmap();
+ const QGraphicsPixmapItem *pixmapItem = static_cast<const QGraphicsPixmapItem *>(item);
+ if (offset)
+ *offset = pixmapItem->offset().toPoint();
+ return pixmapItem->pixmap();
}
if (system == Qt::DeviceCoordinates && item
@@ -371,10 +374,14 @@ QGraphicsEffectSourcePrivate::~QGraphicsEffectSourcePrivate()
invalidateCache();
}
-void QGraphicsEffectSourcePrivate::invalidateCache(bool effectRectChanged) const
+void QGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) const
{
- if (effectRectChanged && m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect)
+ if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect
+ && (reason == EffectRectChanged
+ || reason == TransformChanged
+ && m_cachedSystem == Qt::LogicalCoordinates))
return;
+
QPixmapCache::remove(m_cacheKey);
}
@@ -520,7 +527,7 @@ void QGraphicsEffect::updateBoundingRect()
Q_D(QGraphicsEffect);
if (d->source) {
d->source->d_func()->effectBoundingRectChanged();
- d->source->d_func()->invalidateCache(true);
+ d->source->d_func()->invalidateCache(QGraphicsEffectSourcePrivate::EffectRectChanged);
}
}
@@ -837,22 +844,19 @@ QRectF QGraphicsBlurEffect::boundingRectFor(const QRectF &rect) const
void QGraphicsBlurEffect::draw(QPainter *painter)
{
Q_D(QGraphicsBlurEffect);
- if (d->filter->radius() <= 0) {
+ if (d->filter->radius() < 1) {
drawSource(painter);
return;
}
PixmapPadMode mode = PadToEffectiveBoundingRect;
if (painter->paintEngine()->type() == QPaintEngine::OpenGL2)
- mode = PadToTransparentBorder;
+ mode = NoPad;
// Draw pixmap in device coordinates to avoid pixmap scaling.
QPoint offset;
- const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset, mode);
- QTransform restoreTransform = painter->worldTransform();
- painter->setWorldTransform(QTransform());
+ QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset, mode);
d->filter->draw(painter, offset, pixmap);
- painter->setWorldTransform(restoreTransform);
}
/*!
@@ -1033,7 +1037,7 @@ void QGraphicsDropShadowEffect::draw(QPainter *painter)
PixmapPadMode mode = PadToEffectiveBoundingRect;
if (painter->paintEngine()->type() == QPaintEngine::OpenGL2)
- mode = PadToTransparentBorder;
+ mode = NoPad;
// Draw pixmap in device coordinates to avoid pixmap scaling.
QPoint offset;
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 0011eef..cab7a48 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -108,6 +108,13 @@ public:
, m_cachedMode(QGraphicsEffect::PadToTransparentBorder)
{}
+ enum InvalidateReason
+ {
+ TransformChanged,
+ EffectRectChanged,
+ SourceChanged
+ };
+
virtual ~QGraphicsEffectSourcePrivate();
virtual void detach() = 0;
virtual QRectF boundingRect(Qt::CoordinateSystem system) const = 0;
@@ -121,7 +128,9 @@ public:
virtual QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset = 0,
QGraphicsEffect::PixmapPadMode mode = QGraphicsEffect::PadToTransparentBorder) const = 0;
virtual void effectBoundingRectChanged() = 0;
- void invalidateCache(bool effectRectChanged = false) const;
+
+ void invalidateCache(InvalidateReason reason = SourceChanged) const;
+ Qt::CoordinateSystem currentCachedSystem() const { return m_cachedSystem; }
friend class QGraphicsScenePrivate;
friend class QGraphicsItem;
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index d955f16..fbfd8e6 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7177,9 +7177,16 @@ void QGraphicsItem::prepareGeometryChange()
QGraphicsItem *parent = this;
while ((parent = parent->d_ptr->parent)) {
- parent->d_ptr->dirtyChildrenBoundingRect = 1;
+ QGraphicsItemPrivate *parentp = parent->d_ptr.data();
+ parentp->dirtyChildrenBoundingRect = 1;
// ### Only do this if the parent's effect applies to the entire subtree.
- parent->d_ptr->notifyBoundingRectChanged = 1;
+ parentp->notifyBoundingRectChanged = 1;
+#ifndef QT_NO_GRAPHICSEFFECT
+ if (parentp->scene && parentp->graphicsEffect) {
+ parentp->notifyInvalidated = 1;
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()->source->d_func())->invalidateCache();
+ }
+#endif
}
}
@@ -10717,7 +10724,6 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
qWarning("QGraphicsEffectSource::pixmap: Not yet implemented, lacking device context");
return QPixmap();
}
-
if (!item->d_ptr->scene)
return QPixmap();
QGraphicsScenePrivate *scened = item->d_ptr->scene->d_func();
@@ -10725,9 +10731,11 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
const QRectF sourceRect = boundingRect(system);
QRectF effectRectF;
+ bool unpadded = false;
if (mode == QGraphicsEffect::PadToEffectiveBoundingRect) {
if (info) {
effectRectF = item->graphicsEffect()->boundingRectFor(boundingRect(Qt::DeviceCoordinates));
+ unpadded = (effectRectF.size() == sourceRect.size());
if (info && system == Qt::LogicalCoordinates)
effectRectF = info->painter->worldTransform().inverted().mapRect(effectRectF);
} else {
@@ -10739,6 +10747,7 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
effectRectF = sourceRect.adjusted(-1.5, -1.5, 1.5, 1.5);
} else {
effectRectF = sourceRect;
+ unpadded = true;
}
QRect effectRect = effectRectF.toAlignedRect();
@@ -10746,6 +10755,14 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
if (offset)
*offset = effectRect.topLeft();
+ bool untransformed = !deviceCoordinates
+ || info->painter->worldTransform().type() <= QTransform::TxTranslate;
+ if (untransformed && unpadded && isPixmap()) {
+ if (offset)
+ *offset = boundingRect(system).topLeft().toPoint();
+ return static_cast<QGraphicsPixmapItem *>(item)->pixmap();
+ }
+
if (deviceCoordinates) {
// Clip to viewport rect.
int left, top, right, bottom;
@@ -10773,12 +10790,6 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
if (effectRect.isEmpty())
return QPixmap();
- if (system == Qt::LogicalCoordinates
- && effectRect.size() == sourceRect.size()
- && isPixmap()) {
- return static_cast<QGraphicsPixmapItem *>(item)->pixmap();
- }
-
QPixmap pixmap(effectRect.size());
pixmap.fill(Qt::transparent);
QPainter pixmapPainter(&pixmap);
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 6176f2d..182a3f5 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4671,10 +4671,13 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
painter->setWorldTransform(*transformPtr);
painter->setOpacity(opacity);
- if (sourced->lastEffectTransform != painter->worldTransform()) {
+ if (sourced->currentCachedSystem() != Qt::LogicalCoordinates
+ && sourced->lastEffectTransform != painter->worldTransform())
+ {
sourced->lastEffectTransform = painter->worldTransform();
- sourced->invalidateCache();
+ sourced->invalidateCache(QGraphicsEffectSourcePrivate::TransformChanged);
}
+
item->d_ptr->graphicsEffect->draw(painter);
painter->setWorldTransform(restoreTransform);
sourced->info = 0;
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index 3723500..caa0752 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -52,6 +52,10 @@
#include "private/qgraphicssystem_p.h"
#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
+#include "qmath.h"
+#include "private/qmath_p.h"
+#include "private/qmemrotate_p.h"
+#include "private/qdrawhelper_p.h"
#ifndef QT_NO_GRAPHICSEFFECT
QT_BEGIN_NAMESPACE
@@ -585,106 +589,338 @@ QGraphicsBlurEffect::BlurHints QPixmapBlurFilter::blurHints() const
return d->hints;
}
+const qreal radiusScale = qreal(2.5);
+
/*!
\internal
*/
QRectF QPixmapBlurFilter::boundingRectFor(const QRectF &rect) const
{
Q_D(const QPixmapBlurFilter);
- const qreal delta = d->radius + 1;
+ const qreal delta = radiusScale * d->radius + 1;
return rect.adjusted(-delta, -delta, delta, delta);
}
-// Blur the image according to the blur radius
-// Based on exponential blur algorithm by Jani Huhtanen
-// (maximum radius is set to 16)
-static QImage blurred(const QImage& image, const QRect& rect, int radius, bool alphaOnly = false)
+template <int shift>
+static inline int static_shift(int value)
{
- int tab[] = { 14, 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 };
- int alpha = (radius < 1) ? 16 : (radius > 17) ? 1 : tab[radius-1];
+ if (shift == 0)
+ return value;
+ else if (shift > 0)
+ return value << (uint(shift) & 0x1f);
+ else
+ return value >> (uint(-shift) & 0x1f);
+}
- QImage result = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
- int r1 = rect.top();
- int r2 = rect.bottom();
- int c1 = rect.left();
- int c2 = rect.right();
+template<int aprec, int zprec>
+static inline void blurinner(uchar *bptr, int &zR, int &zG, int &zB, int &zA, int alpha)
+{
+ QRgb *pixel = (QRgb *)bptr;
+
+#define Z_MASK (0xff << zprec)
+ const int A_zprec = static_shift<zprec - 24>(*pixel) & Z_MASK;
+ const int R_zprec = static_shift<zprec - 16>(*pixel) & Z_MASK;
+ const int G_zprec = static_shift<zprec - 8>(*pixel) & Z_MASK;
+ const int B_zprec = static_shift<zprec>(*pixel) & Z_MASK;
+#undef Z_MASK
+
+ const int zR_zprec = zR >> aprec;
+ const int zG_zprec = zG >> aprec;
+ const int zB_zprec = zB >> aprec;
+ const int zA_zprec = zA >> aprec;
+
+ zR += alpha * (R_zprec - zR_zprec);
+ zG += alpha * (G_zprec - zG_zprec);
+ zB += alpha * (B_zprec - zB_zprec);
+ zA += alpha * (A_zprec - zA_zprec);
+
+#define ZA_MASK (0xff << (zprec + aprec))
+ *pixel =
+ static_shift<24 - zprec - aprec>(zA & ZA_MASK)
+ | static_shift<16 - zprec - aprec>(zR & ZA_MASK)
+ | static_shift<8 - zprec - aprec>(zG & ZA_MASK)
+ | static_shift<-zprec - aprec>(zB & ZA_MASK);
+#undef ZA_MASK
+}
- int bpl = result.bytesPerLine();
- int rgba[4];
- unsigned char* p;
+const int alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3);
- int i1 = 0;
- int i2 = 3;
+template<int aprec, int zprec>
+static inline void blurinner_alphaOnly(uchar *bptr, int &z, int alpha)
+{
+ const int A_zprec = int(*(bptr)) << zprec;
+ const int z_zprec = z >> aprec;
+ z += alpha * (A_zprec - z_zprec);
+ *(bptr) = z >> (zprec + aprec);
+}
- if (alphaOnly)
- i1 = i2 = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3);
+template<int aprec, int zprec, bool alphaOnly>
+static inline void blurrow(QImage & im, int line, int alpha)
+{
+ uchar *bptr = im.scanLine(line);
+
+ int zR = 0, zG = 0, zB = 0, zA = 0;
+
+ if (alphaOnly && im.format() != QImage::Format_Indexed8)
+ bptr += alphaIndex;
+
+ const int stride = im.depth() >> 3;
+ const int im_width = im.width();
+ for (int index = 0; index < im_width; ++index) {
+ if (alphaOnly)
+ blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha);
+ else
+ blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha);
+ bptr += stride;
+ }
+
+ bptr -= stride;
+
+ for (int index = im_width - 2; index >= 0; --index) {
+ bptr -= stride;
+ if (alphaOnly)
+ blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha);
+ else
+ blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha);
+ }
+}
+
+/*
+* expblur(QImage &img, int radius)
+*
+* Based on exponential blur algorithm by Jani Huhtanen
+*
+* In-place blur of image 'img' with kernel
+* of approximate radius 'radius'.
+*
+* Blurs with two sided exponential impulse
+* response.
+*
+* aprec = precision of alpha parameter
+* in fixed-point format 0.aprec
+*
+* zprec = precision of state parameters
+* zR,zG,zB and zA in fp format 8.zprec
+*/
+template <int aprec, int zprec, bool alphaOnly>
+void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transposed = 0)
+{
+ // halve the radius if we're using two passes
+ if (improvedQuality)
+ radius *= qreal(0.5);
+
+ Q_ASSERT(img.format() == QImage::Format_ARGB32_Premultiplied
+ || img.format() == QImage::Format_RGB32);
+
+ // choose the alpha such that pixels at radius distance from a fully
+ // saturated pixel will have an alpha component of no greater than
+ // the cutOffIntensity
+ const qreal cutOffIntensity = 2;
+ int alpha = radius <= qreal(1e-5)
+ ? ((1 << aprec)-1)
+ : qRound((1<<aprec)*(1 - qPow(cutOffIntensity * (1 / qreal(255)), 1 / radius)));
+
+ int img_height = img.height();
+ for (int row = 0; row < img_height; ++row) {
+ for (int i = 0; i <= improvedQuality; ++i)
+ blurrow<aprec, zprec, alphaOnly>(img, row, alpha);
+ }
+
+ QImage temp(img.height(), img.width(), img.format());
+ if (transposed >= 0) {
+ if (img.depth() == 8) {
+ qt_memrotate270(reinterpret_cast<const quint8*>(img.bits()),
+ img.width(), img.height(), img.bytesPerLine(),
+ reinterpret_cast<quint8*>(temp.bits()),
+ temp.bytesPerLine());
+ } else {
+ qt_memrotate270(reinterpret_cast<const quint32*>(img.bits()),
+ img.width(), img.height(), img.bytesPerLine(),
+ reinterpret_cast<quint32*>(temp.bits()),
+ temp.bytesPerLine());
+ }
+ } else {
+ if (img.depth() == 8) {
+ qt_memrotate90(reinterpret_cast<const quint8*>(img.bits()),
+ img.width(), img.height(), img.bytesPerLine(),
+ reinterpret_cast<quint8*>(temp.bits()),
+ temp.bytesPerLine());
+ } else {
+ qt_memrotate90(reinterpret_cast<const quint32*>(img.bits()),
+ img.width(), img.height(), img.bytesPerLine(),
+ reinterpret_cast<quint32*>(temp.bits()),
+ temp.bytesPerLine());
+ }
+ }
- for (int col = c1; col <= c2; col++) {
- p = result.scanLine(r1) + col * 4;
- for (int i = i1; i <= i2; i++)
- rgba[i] = p[i] << 4;
+ img_height = temp.height();
+ for (int row = 0; row < img_height; ++row) {
+ for (int i = 0; i <= improvedQuality; ++i)
+ blurrow<aprec, zprec, alphaOnly>(temp, row, alpha);
+ }
- p += bpl;
- for (int j = r1; j < r2; j++, p += bpl)
- for (int i = i1; i <= i2; i++)
- p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
+ if (transposed == 0) {
+ qt_memrotate90(reinterpret_cast<const quint32*>(temp.bits()),
+ temp.width(), temp.height(), temp.bytesPerLine(),
+ reinterpret_cast<quint32*>(img.bits()),
+ img.bytesPerLine());
+ } else {
+ img = temp;
}
+}
+#define AVG(a,b) ( ((((a)^(b)) & 0xfefefefeUL) >> 1) + ((a)&(b)) )
+#define AVG16(a,b) ( ((((a)^(b)) & 0xf7deUL) >> 1) + ((a)&(b)) )
- for (int row = r1; row <= r2; row++) {
- p = result.scanLine(row) + c1 * 4;
- for (int i = i1; i <= i2; i++)
- rgba[i] = p[i] << 4;
+Q_GUI_EXPORT QImage qt_halfScaled(const QImage &source)
+{
+ QImage srcImage = source;
+
+ if (source.format() == QImage::Format_Indexed8) {
+ // assumes grayscale
+ QImage dest(source.width() / 2, source.height() / 2, srcImage.format());
+
+ const uchar *src = reinterpret_cast<const uchar*>(const_cast<const QImage &>(srcImage).bits());
+ int sx = srcImage.bytesPerLine();
+ int sx2 = sx << 1;
+
+ uchar *dst = reinterpret_cast<uchar*>(dest.bits());
+ int dx = dest.bytesPerLine();
+ int ww = dest.width();
+ int hh = dest.height();
+
+ for (int y = hh; y; --y, dst += dx, src += sx2) {
+ const uchar *p1 = src;
+ const uchar *p2 = src + sx;
+ uchar *q = dst;
+ for (int x = ww; x; --x, ++q, p1 += 2, p2 += 2)
+ *q = ((int(p1[0]) + int(p1[1]) + int(p2[0]) + int(p2[1])) + 2) >> 2;
+ }
+
+ return dest;
+ } else if (source.format() == QImage::Format_ARGB8565_Premultiplied) {
+ QImage dest(source.width() / 2, source.height() / 2, srcImage.format());
+
+ const uchar *src = reinterpret_cast<const uchar*>(const_cast<const QImage &>(srcImage).bits());
+ int sx = srcImage.bytesPerLine();
+ int sx2 = sx << 1;
+
+ uchar *dst = reinterpret_cast<uchar*>(dest.bits());
+ int dx = dest.bytesPerLine();
+ int ww = dest.width();
+ int hh = dest.height();
+
+ for (int y = hh; y; --y, dst += dx, src += sx2) {
+ const uchar *p1 = src;
+ const uchar *p2 = src + sx;
+ uchar *q = dst;
+ for (int x = ww; x; --x, q += 3, p1 += 6, p2 += 6) {
+ // alpha
+ q[0] = AVG(AVG(p1[0], p1[3]), AVG(p2[0], p2[3]));
+ // rgb
+ const quint16 p16_1 = (p1[2] << 8) | p1[1];
+ const quint16 p16_2 = (p1[5] << 8) | p1[4];
+ const quint16 p16_3 = (p2[2] << 8) | p2[1];
+ const quint16 p16_4 = (p2[5] << 8) | p2[4];
+ const quint16 result = AVG16(AVG16(p16_1, p16_2), AVG16(p16_3, p16_4));
+ q[1] = result & 0xff;
+ q[2] = result >> 8;
+ }
+ }
- p += 4;
- for (int j = c1; j < c2; j++, p += 4)
- for (int i = i1; i <= i2; i++)
- p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
+ return dest;
+ } else if (source.format() != QImage::Format_ARGB32_Premultiplied
+ && source.format() != QImage::Format_RGB32)
+ {
+ srcImage = source.convertToFormat(QImage::Format_ARGB32_Premultiplied);
}
- for (int col = c1; col <= c2; col++) {
- p = result.scanLine(r2) + col * 4;
- for (int i = i1; i <= i2; i++)
- rgba[i] = p[i] << 4;
+ QImage dest(source.width() / 2, source.height() / 2, srcImage.format());
+
+ const quint32 *src = reinterpret_cast<const quint32*>(const_cast<const QImage &>(srcImage).bits());
+ int sx = srcImage.bytesPerLine() >> 2;
+ int sx2 = sx << 1;
+
+ quint32 *dst = reinterpret_cast<quint32*>(dest.bits());
+ int dx = dest.bytesPerLine() >> 2;
+ int ww = dest.width();
+ int hh = dest.height();
- p -= bpl;
- for (int j = r1; j < r2; j++, p -= bpl)
- for (int i = i1; i <= i2; i++)
- p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
+ for (int y = hh; y; --y, dst += dx, src += sx2) {
+ const quint32 *p1 = src;
+ const quint32 *p2 = src + sx;
+ quint32 *q = dst;
+ for (int x = ww; x; --x, q++, p1 += 2, p2 += 2)
+ *q = AVG(AVG(p1[0], p1[1]), AVG(p2[0], p2[1]));
}
- for (int row = r1; row <= r2; row++) {
- p = result.scanLine(row) + c2 * 4;
- for (int i = i1; i <= i2; i++)
- rgba[i] = p[i] << 4;
+ return dest;
+}
- p -= 4;
- for (int j = c1; j < c2; j++, p -= 4)
- for (int i = i1; i <= i2; i++)
- p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
+Q_GUI_EXPORT void qt_blurImage(QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed = 0)
+{
+ if (blurImage.format() != QImage::Format_ARGB32_Premultiplied
+ && blurImage.format() != QImage::Format_RGB32)
+ {
+ blurImage = blurImage.convertToFormat(QImage::Format_ARGB32_Premultiplied);
}
- return result;
+ qreal scale = 1;
+ if (radius >= 4) {
+ blurImage = qt_halfScaled(blurImage);
+ scale = 2;
+ radius *= qreal(0.5);
+ }
+
+ if (alphaOnly)
+ expblur<12, 10, true>(blurImage, radius, quality, transposed);
+ else
+ expblur<12, 10, false>(blurImage, radius, quality, transposed);
+
+ if (p) {
+ p->scale(scale, scale);
+ p->setRenderHint(QPainter::SmoothPixmapTransform);
+ p->drawImage(QRect(0, 0, blurImage.width(), blurImage.height()), blurImage);
+ }
+}
+
+Q_GUI_EXPORT void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0)
+{
+ if (blurImage.format() == QImage::Format_Indexed8)
+ expblur<12, 10, true>(blurImage, radius, quality, transposed);
+ else
+ expblur<12, 10, false>(blurImage, radius, quality, transposed);
}
+bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
+
/*!
\internal
*/
-void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap &src, const QRectF &srcRect) const
+void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap &src, const QRectF &rect) const
{
Q_D(const QPixmapBlurFilter);
if (!painter->isActive())
return;
- if (d->radius <= 0) {
+ QRectF srcRect = rect;
+ if (srcRect.isNull())
+ srcRect = src.rect();
+
+ if (d->radius <= 1) {
painter->drawPixmap(srcRect.translated(p), src, srcRect);
return;
}
+ qreal scaledRadius = radiusScale * d->radius;
+ qreal scale;
+ if (qt_scaleForTransform(painter->transform(), &scale))
+ scaledRadius /= scale;
+
QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
QPixmapBlurFilter *blurFilter = static_cast<QPixmapBlurFilter*>(filter);
if (blurFilter) {
- blurFilter->setRadius(d->radius);
+ blurFilter->setRadius(scaledRadius);
blurFilter->setBlurHints(d->hints);
blurFilter->draw(painter, p, src, srcRect);
return;
@@ -693,17 +929,17 @@ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap
QImage srcImage;
QImage destImage;
- if (srcRect.isNull()) {
+ if (srcRect == src.rect()) {
srcImage = src.toImage();
- destImage = blurred(srcImage, srcImage.rect(), qRound(d->radius));
} else {
QRect rect = srcRect.toAlignedRect().intersected(src.rect());
-
srcImage = src.copy(rect).toImage();
- destImage = blurred(srcImage, srcImage.rect(), qRound(d->radius));
}
- painter->drawImage(p, destImage);
+ QTransform transform = painter->worldTransform();
+ painter->translate(p);
+ qt_blurImage(painter, srcImage, scaledRadius, (d->hints & QGraphicsBlurEffect::QualityHint), false);
+ painter->setWorldTransform(transform);
}
// grayscales the image to dest (could be same). If rect isn't defined
@@ -1095,7 +1331,13 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
tmpPainter.end();
// blur the alpha channel
- tmp = blurred(tmp, tmp.rect(), qRound(d->radius), true);
+ QImage blurred(tmp.size(), QImage::Format_ARGB32_Premultiplied);
+ blurred.fill(0);
+ QPainter blurPainter(&blurred);
+ qt_blurImage(&blurPainter, tmp, d->radius, false, true);
+ blurPainter.end();
+
+ tmp = blurred;
// blacken the image...
tmpPainter.begin(&tmp);
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 5ddba06..f447989 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -70,6 +70,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate()
itemDelegate(0),
selectionModel(0),
ctrlDragSelectionFlag(QItemSelectionModel::NoUpdate),
+ noSelectionOnMousePress(false),
selectionMode(QAbstractItemView::ExtendedSelection),
selectionBehavior(QAbstractItemView::SelectItems),
currentlyCommittingEditor(0),
@@ -1622,6 +1623,7 @@ void QAbstractItemView::mousePressEvent(QMouseEvent *event)
d->pressedIndex = index;
d->pressedModifiers = event->modifiers();
QItemSelectionModel::SelectionFlags command = selectionCommand(index, event);
+ d->noSelectionOnMousePress = command == QItemSelectionModel::NoUpdate || !index.isValid();
QPoint offset = d->offset();
if ((command & QItemSelectionModel::Current) == 0)
d->pressedPosition = pos + offset;
@@ -1760,9 +1762,10 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)
d->ctrlDragSelectionFlag = QItemSelectionModel::NoUpdate;
- //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));
+ if (d->selectionModel && d->noSelectionOnMousePress) {
+ d->noSelectionOnMousePress = false;
+ d->selectionModel->select(index, selectionCommand(index, event));
+ }
setState(NoState);
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index 0b5cfbe..7fc6780 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -347,6 +347,7 @@ public:
QMap<int, QPointer<QAbstractItemDelegate> > columnDelegates;
QPointer<QItemSelectionModel> selectionModel;
QItemSelectionModel::SelectionFlag ctrlDragSelectionFlag;
+ bool noSelectionOnMousePress;
QAbstractItemView::SelectionMode selectionMode;
QAbstractItemView::SelectionBehavior selectionBehavior;
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 67dc2c7..e3a6f78 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -572,5 +572,26 @@ QT_IMPL_MEMROTATE(quint32, qrgb_generic16)
QT_IMPL_MEMROTATE(quint16, qrgb_generic16)
#endif
+struct qrgb_gl_rgba
+{
+public:
+ inline qrgb_gl_rgba(quint32 v) {
+ if (QSysInfo::ByteOrder == QSysInfo::LittleEndian)
+ data = ((v << 16) & 0xff0000) | ((v >> 16) & 0xff) | (v & 0xff00ff00);
+ else
+ data = (v << 8) | ((v >> 24) & 0xff);
+ }
+
+ inline operator quint32() const { return data; }
+
+private:
+ quint32 data;
+} Q_PACKED;
+
+void Q_GUI_EXPORT qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride,
+ quint32 *dest, int dstStride)
+{
+ qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast<qrgb_gl_rgba *>(dest), dstStride);
+}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index 676a880..8aee575 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -81,6 +81,8 @@ QT_BEGIN_NAMESPACE
void Q_GUI_QWS_EXPORT qt_memrotate180(const srctype*, int, int, int, desttype*, int); \
void Q_GUI_QWS_EXPORT qt_memrotate270(const srctype*, int, int, int, desttype*, int)
+void Q_GUI_EXPORT qt_memrotate90(const quint32*, int, int, int, quint32*, int);
+
QT_DECL_MEMROTATE(quint32, quint32);
QT_DECL_MEMROTATE(quint32, quint16);
QT_DECL_MEMROTATE(quint16, quint32);
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index a4e7c04..a75d70f 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -404,7 +404,9 @@ QFixed QCoreTextFontEngine::ascent() const
}
QFixed QCoreTextFontEngine::descent() const
{
- return QFixed::fromReal(CTFontGetDescent(ctfont)).ceil();
+ // subtract a pixel to even out the historical +1 in QFontMetrics::height().
+ // Fix in Qt 5.
+ return QFixed::fromReal(CTFontGetDescent(ctfont)).ceil() - 1;
}
QFixed QCoreTextFontEngine::leading() const
{
@@ -1406,7 +1408,9 @@ QFixed QFontEngineMac::ascent() const
QFixed QFontEngineMac::descent() const
{
- return m_descent;
+ // subtract a pixel to even out the historical +1 in QFontMetrics::height().
+ // Fix in Qt 5.
+ return m_descent - 1;
}
QFixed QFontEngineMac::leading() const
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index f79931a..5e7d06e 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -684,8 +684,12 @@ void QPlainTextEditPrivate::ensureVisible(int position, bool center, bool forceC
qreal h = center ? line.naturalTextRect().center().y() : line.naturalTextRect().bottom();
+ QTextBlock previousVisibleBlock = block;
while (h < height && block.previous().isValid()) {
- block = block.previous();
+ previousVisibleBlock = block;
+ do {
+ block = block.previous();
+ } while (!block.isVisible() && block.previous().isValid());
h += q->blockBoundingRect(block).height();
}
@@ -699,8 +703,8 @@ void QPlainTextEditPrivate::ensureVisible(int position, bool center, bool forceC
++l;
}
- if (block.next().isValid() && l >= lineCount) {
- block = block.next();
+ if (l >= lineCount) {
+ block = previousVisibleBlock;
l = 0;
}
setTopBlock(block.blockNumber(), l);
diff --git a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
index e319389..e0033be 100644
--- a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
+++ b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h
@@ -68,7 +68,7 @@ class Q_OPENGL_EXPORT QGLCustomShaderStage
public:
QGLCustomShaderStage();
virtual ~QGLCustomShaderStage();
- virtual void setUniforms(QGLShaderProgram*) = 0;
+ virtual void setUniforms(QGLShaderProgram*) {}
void setUniformsDirty();
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 0084476..77ca3a8 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -291,10 +291,7 @@ public:
QScopedPointer<QPixmapFilter> convolutionFilter;
QScopedPointer<QPixmapFilter> colorizeFilter;
QScopedPointer<QPixmapFilter> blurFilter;
- QScopedPointer<QPixmapFilter> animationBlurFilter;
- QScopedPointer<QPixmapFilter> fastBlurFilter;
QScopedPointer<QPixmapFilter> dropShadowFilter;
- QScopedPointer<QPixmapFilter> fastDropShadowFilter;
QSet<QVectorPath::CacheEntry *> pathCaches;
QVector<GLuint> unusedVBOSToClean;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index b6f8919..32534aa 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2063,6 +2063,29 @@ QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
// #define QGL_BIND_TEXTURE_DEBUG
+// map from Qt's ARGB endianness-dependent format to GL's big-endian RGBA layout
+static inline void qgl_byteSwapImage(QImage &img, GLenum pixel_type)
+{
+ const int width = img.width();
+ const int height = img.height();
+
+ if (pixel_type == GL_UNSIGNED_INT_8_8_8_8_REV
+ || (pixel_type == GL_UNSIGNED_BYTE && QSysInfo::ByteOrder == QSysInfo::LittleEndian))
+ {
+ for (int i = 0; i < height; ++i) {
+ uint *p = (uint *) img.scanLine(i);
+ for (int x = 0; x < width; ++x)
+ p[x] = ((p[x] << 16) & 0xff0000) | ((p[x] >> 16) & 0xff) | (p[x] & 0xff00ff00);
+ }
+ } else {
+ for (int i = 0; i < height; ++i) {
+ uint *p = (uint *) img.scanLine(i);
+ for (int x = 0; x < width; ++x)
+ p[x] = (p[x] << 8) | ((p[x] >> 24) & 0xff);
+ }
+ }
+}
+
QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, GLint internalFormat,
const qint64 key, QGLContext::BindOptions options)
{
@@ -2215,23 +2238,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
// 32 in the switch above is for the RGB16 case, where we set
// the format to GL_RGB
Q_ASSERT(img.depth() == 32);
- const int width = img.width();
- const int height = img.height();
-
- if (pixel_type == GL_UNSIGNED_INT_8_8_8_8_REV
- || (pixel_type == GL_UNSIGNED_BYTE && QSysInfo::ByteOrder == QSysInfo::LittleEndian)) {
- for (int i=0; i < height; ++i) {
- uint *p = (uint *) img.scanLine(i);
- for (int x=0; x<width; ++x)
- p[x] = ((p[x] << 16) & 0xff0000) | ((p[x] >> 16) & 0xff) | (p[x] & 0xff00ff00);
- }
- } else {
- for (int i=0; i < height; ++i) {
- uint *p = (uint *) img.scanLine(i);
- for (int x=0; x<width; ++x)
- p[x] = (p[x] << 8) | ((p[x] >> 24) & 0xff);
- }
- }
+ qgl_byteSwapImage(img, pixel_type);
}
#ifdef QT_OPENGL_ES
// OpenGL/ES requires that the internal and external formats be identical.
@@ -3803,6 +3810,11 @@ bool QGLWidget::event(QEvent *e)
}
#if defined(QT_OPENGL_ES)
+ // A re-parent is likely to destroy the X11 window and re-create it. It is important
+ // that we free the EGL surface _before_ the winID changes - otherwise we can leak.
+ if (e->type() == QEvent::ParentAboutToChange)
+ d->glcx->d_func()->destroyEglSurfaceForDevice();
+
if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) {
// The window may have been re-created during re-parent or state change - if so, the EGL
// surface will need to be re-created.
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 079953f..2076c46 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -546,6 +546,7 @@ private:
friend class QGLPixelBuffer;
friend class QGLPixelBufferPrivate;
friend class QGLContext;
+ friend class QGLContextPrivate;
friend class QGLOverlayWidget;
friend class QOpenGLPaintEngine;
friend class QGLPaintDevice;
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index fbf0349..839e8eb 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -142,19 +142,7 @@ void QGLContext::reset()
d->cleanup();
doneCurrent();
if (d->eglContext) {
- if (d->eglSurface != EGL_NO_SURFACE) {
-#ifdef Q_WS_X11
- // Make sure we don't call eglDestroySurface on a surface which
- // was created for a different winId:
- if (d->paintDevice->devType() == QInternal::Widget) {
- QGLWidget* w = static_cast<QGLWidget*>(d->paintDevice);
-
- if (w->d_func()->eglSurfaceWindowId == w->winId())
- eglDestroySurface(d->eglContext->display(), d->eglSurface);
- } else
-#endif
- eglDestroySurface(d->eglContext->display(), d->eglSurface);
- }
+ d->destroyEglSurfaceForDevice();
delete d->eglContext;
}
d->eglContext = 0;
@@ -198,6 +186,26 @@ void QGLContext::swapBuffers() const
d->eglContext->swapBuffers(d->eglSurface);
}
+void QGLContextPrivate::destroyEglSurfaceForDevice()
+{
+ if (eglSurface != EGL_NO_SURFACE) {
+#ifdef Q_WS_X11
+ // Make sure we don't call eglDestroySurface on a surface which
+ // was created for a different winId:
+ if (paintDevice->devType() == QInternal::Widget) {
+ QGLWidget* w = static_cast<QGLWidget*>(paintDevice);
+
+ if (w->d_func()->eglSurfaceWindowId == w->winId())
+ eglDestroySurface(eglContext->display(), eglSurface);
+ else
+ qWarning("WARNING: Potential EGL surface leak!");
+ } else
+#endif
+ eglDestroySurface(eglContext->display(), eglSurface);
+ eglSurface = EGL_NO_SURFACE;
+ }
+}
+
void QGLWidget::setMouseTracking(bool enable)
{
QWidget::setMouseTracking(enable);
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 11770d3..99c0f33 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -288,6 +288,7 @@ public:
#if defined(QT_OPENGL_ES)
QEglContext *eglContext;
EGLSurface eglSurface;
+ void destroyEglSurfaceForDevice();
#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
void* cx;
#endif
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index a868e83..19026b3 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -173,10 +173,16 @@ void QGLWidget::updateOverlayGL()
//handle overlay
}
+//#define QT_DEBUG_X11_VISUAL_SELECTION 1
+
bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, const QX11Info &x11Info, bool useArgbVisual)
{
bool foundVisualIsArgb = useArgbVisual;
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("qt_egl_setup_x11_visual() - useArgbVisual=%d", useArgbVisual);
+#endif
+
memset(&vi, 0, sizeof(XVisualInfo));
EGLint eglConfigColorSize;
@@ -199,7 +205,9 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf
XRenderPictFormat *format;
format = XRenderFindVisualFormat(x11Info.display(), chosenVisualInfo->visual);
if (format->type == PictTypeDirect && format->direct.alphaMask) {
-// qDebug("Using ARGB X Visual ID (%d) provided by EGL", (int)vi.visualid);
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("Using ARGB X Visual ID (%d) provided by EGL", (int)vi.visualid);
+#endif
foundVisualIsArgb = true;
vi = *chosenVisualInfo;
}
@@ -212,7 +220,9 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf
#endif
{
if (eglConfigColorSize == chosenVisualInfo->depth) {
-// qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid);
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid);
+#endif
vi = *chosenVisualInfo;
} else
qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!",
@@ -248,7 +258,9 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf
if (format->type == PictTypeDirect && format->direct.alphaMask) {
vi = matchingVisuals[i];
foundVisualIsArgb = true;
-// qDebug("Using X Visual ID (%d) for ARGB visual as provided by XRender", (int)vi.visualid);
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("Using X Visual ID (%d) for ARGB visual as provided by XRender", (int)vi.visualid);
+#endif
break;
}
}
@@ -272,24 +284,28 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf
} else
qWarning(" - Falling back to X11 suggested depth (%d)", depth);
}
-// else
-// qDebug("Using X Visual ID (%d) for EGL provided depth (%d)", (int)vi.visualid, depth);
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ else
+ qDebug("Using X Visual ID (%d) for EGL provided depth (%d)", (int)vi.visualid, depth);
+#endif
// Don't try to use ARGB now unless the visual is 32-bit - even then it might stil fail :-(
if (useArgbVisual)
foundVisualIsArgb = vi.depth == 32; //### We might at some point (soon) get ARGB4444
}
-// qDebug("Visual Info:");
-// qDebug(" bits_per_rgb=%d", vi.bits_per_rgb);
-// qDebug(" red_mask=0x%x", vi.red_mask);
-// qDebug(" green_mask=0x%x", vi.green_mask);
-// qDebug(" blue_mask=0x%x", vi.blue_mask);
-// qDebug(" colormap_size=%d", vi.colormap_size);
-// qDebug(" c_class=%d", vi.c_class);
-// qDebug(" depth=%d", vi.depth);
-// qDebug(" screen=%d", vi.screen);
-// qDebug(" visualid=%d", vi.visualid);
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("Visual Info:");
+ qDebug(" bits_per_rgb=%d", vi.bits_per_rgb);
+ qDebug(" red_mask=0x%x", vi.red_mask);
+ qDebug(" green_mask=0x%x", vi.green_mask);
+ qDebug(" blue_mask=0x%x", vi.blue_mask);
+ qDebug(" colormap_size=%d", vi.colormap_size);
+ qDebug(" c_class=%d", vi.c_class);
+ qDebug(" depth=%d", vi.depth);
+ qDebug(" screen=%d", vi.screen);
+ qDebug(" visualid=%d", vi.visualid);
+#endif
return foundVisualIsArgb;
}
@@ -320,7 +336,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext,
// If the application has set WA_TranslucentBackground and not explicitly set
// the alpha buffer size to zero, modify the format so it have an alpha channel
QGLFormat& fmt = d->glcx->d_func()->glFormat;
- const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground);
+ const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground) || fmt.alpha();
if (tryArgbVisual && fmt.alphaBufferSize() == -1)
fmt.setAlphaBufferSize(1);
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index c478630..d4bcbe9 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -55,11 +55,17 @@
#include "qgl_p.h"
#include "private/qapplication_p.h"
+#include "private/qdrawhelper_p.h"
+#include "private/qmemrotate_p.h"
#include "private/qmath_p.h"
#include "qmath.h"
QT_BEGIN_NAMESPACE
+// qpixmapfilter.cpp
+void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0);
+QImage qt_halfScaled(const QImage &source);
+
void QGLPixmapFilterBase::bindTexture(const QPixmap &src) const
{
const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(src, GL_TEXTURE_2D, GL_RGBA, QGLContext::BindOptions(QGLContext::DefaultBindOption | QGLContext::MemoryManagedBindOption));
@@ -102,48 +108,21 @@ private:
class QGLPixmapBlurFilter : public QGLCustomShaderStage, public QGLPixmapFilter<QPixmapBlurFilter>
{
public:
- QGLPixmapBlurFilter(QGraphicsBlurEffect::BlurHints hints);
-
- void setUniforms(QGLShaderProgram *program);
-
- static QByteArray generateGaussianShader(int radius, bool singlePass = false, bool dropShadow = false);
+ QGLPixmapBlurFilter();
protected:
bool processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &srcRect) const;
-
-private:
-
- mutable QSize m_textureSize;
- mutable bool m_horizontalBlur;
- mutable bool m_singlePass;
- mutable bool m_animatedBlur;
-
- mutable qreal m_t;
- mutable QSize m_targetSize;
-
- mutable bool m_haveCached;
- mutable int m_cachedRadius;
- mutable QGraphicsBlurEffect::BlurHints m_hints;
};
class QGLPixmapDropShadowFilter : public QGLCustomShaderStage, public QGLPixmapFilter<QPixmapDropShadowFilter>
{
public:
- QGLPixmapDropShadowFilter(QGraphicsBlurEffect::BlurHints hints);
+ QGLPixmapDropShadowFilter();
void setUniforms(QGLShaderProgram *program);
protected:
bool processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &srcRect) const;
-
-private:
- mutable QSize m_textureSize;
- mutable bool m_horizontalBlur;
- mutable bool m_singlePass;
-
- mutable bool m_haveCached;
- mutable int m_cachedRadius;
- mutable QGraphicsBlurEffect::BlurHints m_hints;
};
extern QGLWidget *qt_gl_share_widget();
@@ -158,31 +137,14 @@ QPixmapFilter *QGL2PaintEngineEx::pixmapFilter(int type, const QPixmapFilter *pr
return d->colorizeFilter.data();
case QPixmapFilter::BlurFilter: {
- const QPixmapBlurFilter *proto = static_cast<const QPixmapBlurFilter *>(prototype);
- if (proto->blurHints() & QGraphicsBlurEffect::AnimationHint) {
- if (!d->animationBlurFilter)
- d->animationBlurFilter.reset(new QGLPixmapBlurFilter(proto->blurHints()));
- return d->animationBlurFilter.data();
- }
- if ((proto->blurHints() & QGraphicsBlurEffect::QualityHint) && proto->radius() > 5) {
- if (!d->blurFilter)
- d->blurFilter.reset(new QGLPixmapBlurFilter(QGraphicsBlurEffect::QualityHint));
- return d->blurFilter.data();
- }
- if (!d->fastBlurFilter)
- d->fastBlurFilter.reset(new QGLPixmapBlurFilter(QGraphicsBlurEffect::PerformanceHint));
- return d->fastBlurFilter.data();
+ if (!d->blurFilter)
+ d->blurFilter.reset(new QGLPixmapBlurFilter());
+ return d->blurFilter.data();
}
case QPixmapFilter::DropShadowFilter: {
- const QPixmapDropShadowFilter *proto = static_cast<const QPixmapDropShadowFilter *>(prototype);
- if (proto->blurRadius() <= 5) {
- if (!d->fastDropShadowFilter)
- d->fastDropShadowFilter.reset(new QGLPixmapDropShadowFilter(QGraphicsBlurEffect::PerformanceHint));
- return d->fastDropShadowFilter.data();
- }
if (!d->dropShadowFilter)
- d->dropShadowFilter.reset(new QGLPixmapDropShadowFilter(QGraphicsBlurEffect::QualityHint));
+ d->dropShadowFilter.reset(new QGLPixmapDropShadowFilter());
return d->dropShadowFilter.data();
}
@@ -311,59 +273,43 @@ bool QGLPixmapConvolutionFilter::processGL(QPainter *painter, const QPointF &pos
return true;
}
-static const char *qt_gl_texture_sampling_helper =
- "lowp float texture2DAlpha(lowp sampler2D src, highp vec2 srcCoords) {\n"
- " return texture2D(src, srcCoords).a;\n"
- "}\n";
-
-QGLPixmapBlurFilter::QGLPixmapBlurFilter(QGraphicsBlurEffect::BlurHints hints)
- : m_animatedBlur(false)
- , m_haveCached(false)
- , m_cachedRadius(0)
- , m_hints(hints)
-{
-}
-
-// should be even numbers as they will be divided by two
-static const int qCachedBlurLevels[] = { 6, 14, 30 };
-static const int qNumCachedBlurTextures = sizeof(qCachedBlurLevels) / sizeof(*qCachedBlurLevels);
-static const int qMaxCachedBlurLevel = qCachedBlurLevels[qNumCachedBlurTextures - 1];
-
-static qreal qLogBlurLevel(int level)
+QGLPixmapBlurFilter::QGLPixmapBlurFilter()
{
- static bool initialized = false;
- static qreal logBlurLevelCache[qNumCachedBlurTextures];
- if (!initialized) {
- for (int i = 0; i < qNumCachedBlurTextures; ++i)
- logBlurLevelCache[i] = qLn(qCachedBlurLevels[i]);
- initialized = true;
- }
- return logBlurLevelCache[level];
}
class QGLBlurTextureInfo
{
public:
- QGLBlurTextureInfo(QSize size, GLuint textureIds[])
- : m_size(size)
+ QGLBlurTextureInfo(const QImage &image, GLuint tex, qreal r)
+ : m_texture(tex)
+ , m_radius(r)
{
- for (int i = 0; i < qNumCachedBlurTextures; ++i)
- m_textureIds[i] = textureIds[i];
+ m_paddedImage << image;
}
~QGLBlurTextureInfo()
{
- glDeleteTextures(qNumCachedBlurTextures, m_textureIds);
+ glDeleteTextures(1, &m_texture);
}
- QSize size() const { return m_size; }
- GLuint textureId(int i) const { return m_textureIds[i]; }
+ QImage paddedImage(int scaleLevel = 0) const;
+ GLuint texture() const { return m_texture; }
+ qreal radius() const { return m_radius; }
private:
- GLuint m_textureIds[qNumCachedBlurTextures];
- QSize m_size;
+ mutable QList<QImage> m_paddedImage;
+ GLuint m_texture;
+ qreal m_radius;
};
+QImage QGLBlurTextureInfo::paddedImage(int scaleLevel) const
+{
+ for (int i = m_paddedImage.size() - 1; i <= scaleLevel; ++i)
+ m_paddedImage << qt_halfScaled(m_paddedImage.at(i));
+
+ return m_paddedImage.at(scaleLevel);
+}
+
class QGLBlurTextureCache : public QObject
{
public:
@@ -373,7 +319,6 @@ public:
~QGLBlurTextureCache();
QGLBlurTextureInfo *takeBlurTextureInfo(const QPixmap &pixmap);
- bool fitsInCache(const QPixmap &pixmap) const;
bool hasBlurTextureInfo(const QPixmap &pixmap) const;
void insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTextureInfo *info);
void clearBlurTextureInfo(const QPixmap &pixmap);
@@ -458,12 +403,7 @@ void QGLBlurTextureCache::insertBlurTextureInfo(const QPixmap &pixmap, QGLBlurTe
if (timerId)
killTimer(timerId);
- timerId = startTimer(1000);
-}
-
-bool QGLBlurTextureCache::fitsInCache(const QPixmap &pixmap) const
-{
- return pixmap.width() * pixmap.height() <= cache.maxCost();
+ timerId = startTimer(8000);
}
void QGLBlurTextureCache::pixmapDestroyed(QPixmap *pixmap)
@@ -474,567 +414,217 @@ void QGLBlurTextureCache::pixmapDestroyed(QPixmap *pixmap)
}
}
-static const char *qt_gl_interpolate_filter =
- "uniform lowp float interpolationValue;"
- "uniform lowp sampler2D interpolateTarget;"
- "uniform highp vec4 interpolateMapping;"
- "lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords)"
- "{"
- " return mix(texture2D(interpolateTarget, interpolateMapping.xy + interpolateMapping.zw * srcCoords),"
- " texture2D(src, srcCoords), interpolationValue);"
- "}";
+static const int qAnimatedBlurLevelIncrement = 16;
+static const int qMaxBlurHalfScaleLevel = 1;
-static void initializeTexture(GLuint id, int width, int height)
+static GLuint generateBlurTexture(const QSize &size, GLenum format = GL_RGBA)
{
- glBindTexture(GL_TEXTURE_2D, id);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glBindTexture(GL_TEXTURE_2D, 0);
+ GLuint texture;
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexImage2D(GL_TEXTURE_2D, 0, format, size.width(), size.height(), 0, format,
+ GL_UNSIGNED_BYTE, 0);
+ return texture;
}
-bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &) const
+static inline uint nextMultiple(uint x, uint multiplier)
{
- QGLPixmapBlurFilter *filter = const_cast<QGLPixmapBlurFilter *>(this);
-
- QGLContext *ctx = const_cast<QGLContext *>(QGLContext::currentContext());
- QGLBlurTextureCache *blurTextureCache = QGLBlurTextureCache::cacheForContext(ctx);
-
- if ((m_hints & QGraphicsBlurEffect::AnimationHint) && blurTextureCache->fitsInCache(src)) {
- QRect targetRect = src.rect().adjusted(-qMaxCachedBlurLevel, -qMaxCachedBlurLevel, qMaxCachedBlurLevel, qMaxCachedBlurLevel);
- // ensure even dimensions (going to divide by two)
- targetRect.setWidth((targetRect.width() + 1) & ~1);
- targetRect.setHeight((targetRect.height() + 1) & ~1);
-
- QGLBlurTextureInfo *info = 0;
- if (blurTextureCache->hasBlurTextureInfo(src)) {
- info = blurTextureCache->takeBlurTextureInfo(src);
- } else {
- m_animatedBlur = false;
- m_hints = QGraphicsBlurEffect::QualityHint;
- m_singlePass = false;
-
- QGLFramebufferObjectFormat format;
- format.setInternalTextureFormat(GLenum(GL_RGBA));
- QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(targetRect.size() / 2, format, true);
-
- if (!fbo)
- return false;
-
- QPainter fboPainter(fbo);
- QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(fboPainter.paintEngine());
-
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- // ensure GL_LINEAR filtering is used for scaling down to half the size
- fboPainter.setRenderHint(QPainter::SmoothPixmapTransform);
- fboPainter.setCompositionMode(QPainter::CompositionMode_Source);
- fboPainter.drawPixmap(qMaxCachedBlurLevel / 2, qMaxCachedBlurLevel / 2,
- targetRect.width() / 2 - qMaxCachedBlurLevel, targetRect.height() / 2 - qMaxCachedBlurLevel, src);
-
- GLuint textures[qNumCachedBlurTextures]; // blur textures
- glGenTextures(qNumCachedBlurTextures, textures);
- GLuint temp; // temp texture
- glGenTextures(1, &temp);
-
- initializeTexture(temp, fbo->width(), fbo->height());
- m_textureSize = fbo->size();
-
- int currentBlur = 0;
-
- QRect fboRect(0, 0, fbo->width(), fbo->height());
- GLuint sourceTexture = fbo->texture();
- for (int i = 0; i < qNumCachedBlurTextures; ++i) {
- int targetBlur = qCachedBlurLevels[i] / 2;
-
- int blurDelta = qRound(qSqrt(targetBlur * targetBlur - currentBlur * currentBlur));
- QByteArray source = generateGaussianShader(blurDelta);
- filter->setSource(source);
-
- currentBlur = targetBlur;
-
- // now we're going to be nasty and keep using the same FBO with different textures
- glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- GL_TEXTURE_2D, temp, 0);
-
- m_horizontalBlur = true;
- filter->setOnPainter(&fboPainter);
- engine->drawTexture(fboRect, sourceTexture, fbo->size(), fboRect);
- filter->removeFromPainter(&fboPainter);
-
- sourceTexture = textures[i];
- initializeTexture(sourceTexture, fbo->width(), fbo->height());
-
- glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- GL_TEXTURE_2D, textures[i], 0);
-
- m_horizontalBlur = false;
- filter->setOnPainter(&fboPainter);
- engine->drawTexture(fboRect, temp, fbo->size(), fboRect);
- filter->removeFromPainter(&fboPainter);
- }
-
- glDeleteTextures(1, &temp);
+ uint mod = x % multiplier;
+ if (mod == 0)
+ return x;
+ return x + multiplier - mod;
+}
- // reattach the original FBO texture
- glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- GL_TEXTURE_2D, fbo->texture(), 0);
+void qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride,
+ quint32 *dest, int dstStride);
- fboPainter.end();
+bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &) const
+{
+ if (radius() < 1) {
+ painter->drawPixmap(pos, src);
+ return true;
+ }
- qgl_fbo_pool()->release(fbo);
+ qreal actualRadius = radius();
- info = new QGLBlurTextureInfo(fboRect.size(), textures);
- }
+ QGLContext *ctx = const_cast<QGLContext *>(QGLContext::currentContext());
- if (!m_haveCached || !m_animatedBlur) {
- m_haveCached = true;
- m_animatedBlur = true;
- m_hints = QGraphicsBlurEffect::AnimationHint;
- filter->setSource(qt_gl_interpolate_filter);
- }
+ QGLBlurTextureCache *blurTextureCache = QGLBlurTextureCache::cacheForContext(ctx);
+ QGLBlurTextureInfo *info = 0;
+ int padding = nextMultiple(qCeil(actualRadius), qAnimatedBlurLevelIncrement);
+ QRect targetRect = src.rect().adjusted(-padding, -padding, padding, padding);
- QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
- painter->setRenderHint(QPainter::SmoothPixmapTransform);
- filter->setOnPainter(painter);
+ // pad so that we'll be able to half-scale qMaxBlurHalfScaleLevel times
+ targetRect.setWidth((targetRect.width() + (qMaxBlurHalfScaleLevel-1)) & ~(qMaxBlurHalfScaleLevel-1));
+ targetRect.setHeight((targetRect.height() + (qMaxBlurHalfScaleLevel-1)) & ~(qMaxBlurHalfScaleLevel-1));
- qreal logRadius = qLn(radius());
+ QSize textureSize;
- int t;
- for (t = -1; t < qNumCachedBlurTextures - 2; ++t) {
- if (logRadius < qLogBlurLevel(t+1))
- break;
- }
+ info = blurTextureCache->takeBlurTextureInfo(src);
+ if (!info || info->radius() < actualRadius) {
+ QSize paddedSize = targetRect.size() / 2;
- qreal logBase = t >= 0 ? qLogBlurLevel(t) : 0;
- m_t = qBound(qreal(0), (logRadius - logBase) / (qLogBlurLevel(t+1) - logBase), qreal(1));
+ QImage padded(paddedSize.height(), paddedSize.width(), QImage::Format_ARGB32_Premultiplied);
+ padded.fill(0);
- m_textureSize = info->size();
+ if (info) {
+ int oldPadding = qRound(info->radius());
- glActiveTexture(GL_TEXTURE0 + 3);
- if (t >= 0) {
- glBindTexture(GL_TEXTURE_2D, info->textureId(t));
- m_targetSize = info->size();
+ QPainter p(&padded);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.drawImage((padding - oldPadding) / 2, (padding - oldPadding) / 2, info->paddedImage());
+ p.end();
} else {
- QGLTexture *texture =
- ctx->d_func()->bindTexture(src, GL_TEXTURE_2D, GL_RGBA,
- QGLContext::InternalBindOption
- | QGLContext::CanFlipNativePixmapBindOption);
- m_targetSize = src.size();
- if (!(texture->options & QGLContext::InvertedYBindOption))
- m_targetSize.setHeight(-m_targetSize.height());
+ // TODO: combine byteswapping and memrotating into one by declaring
+ // custom GL_RGBA pixel type and qt_colorConvert template for it
+ QImage prepadded = qt_halfScaled(src.toImage()).convertToFormat(QImage::Format_ARGB32_Premultiplied);
+
+ // byte-swap and memrotates in one go
+ qt_memrotate90_gl(reinterpret_cast<const quint32*>(prepadded.bits()),
+ prepadded.width(), prepadded.height(), prepadded.bytesPerLine(),
+ reinterpret_cast<quint32*>(padded.scanLine(padding / 2)) + padding / 2,
+ padded.bytesPerLine());
}
- // restrict the target rect to the max of the radii we are interpolating between
- int radiusDelta = qMaxCachedBlurLevel - qCachedBlurLevels[t+1];
- targetRect = targetRect.translated(pos.toPoint()).adjusted(radiusDelta, radiusDelta, -radiusDelta, -radiusDelta);
-
- radiusDelta /= 2;
- QRect sourceRect = QRect(QPoint(), m_textureSize).adjusted(radiusDelta, radiusDelta, -radiusDelta, -radiusDelta);
-
- engine->drawTexture(targetRect, info->textureId(t+1), m_textureSize, sourceRect);
-
- glActiveTexture(GL_TEXTURE0 + 3);
- glBindTexture(GL_TEXTURE_2D, 0);
-
- filter->removeFromPainter(painter);
- blurTextureCache->insertBlurTextureInfo(src, info);
-
- return true;
- }
+ delete info;
+ info = new QGLBlurTextureInfo(padded, generateBlurTexture(paddedSize), padding);
- if (blurTextureCache->hasBlurTextureInfo(src))
- blurTextureCache->clearBlurTextureInfo(src);
-
- int actualRadius = qRound(radius());
- int filterRadius = actualRadius;
- int fastRadii[] = { 1, 2, 3, 5, 8, 15, 25 };
- if (!(m_hints & QGraphicsBlurEffect::QualityHint)) {
- uint i = 0;
- for (; i < (sizeof(fastRadii)/sizeof(*fastRadii))-1; ++i) {
- if (fastRadii[i+1] > filterRadius)
- break;
- }
- filterRadius = fastRadii[i];
+ textureSize = paddedSize;
+ } else {
+ textureSize = QSize(info->paddedImage().height(), info->paddedImage().width());
}
- m_singlePass = filterRadius <= 3;
-
- if (!m_haveCached || m_animatedBlur || filterRadius != m_cachedRadius) {
- // Only regenerate the shader from source if parameters have changed.
- m_haveCached = true;
- m_animatedBlur = false;
- m_cachedRadius = filterRadius;
- QByteArray source = generateGaussianShader(filterRadius, m_singlePass);
- filter->setSource(source);
+ actualRadius *= qreal(0.5);
+ int level = 1;
+ for (; level < qMaxBlurHalfScaleLevel; ++level) {
+ if (actualRadius <= 16)
+ break;
+ actualRadius *= qreal(0.5);
}
- QRect targetRect = QRectF(src.rect()).translated(pos).adjusted(-actualRadius, -actualRadius, actualRadius, actualRadius).toAlignedRect();
+ const int s = (1 << level);
- if (m_singlePass) {
- // prepare for updateUniforms
- m_textureSize = src.size();
+ int prepadding = qRound(info->radius());
+ padding = qMin(prepadding, qCeil(actualRadius) << level);
+ targetRect = src.rect().adjusted(-padding, -padding, padding, padding);
- // ensure GL_LINEAR filtering is used
- painter->setRenderHint(QPainter::SmoothPixmapTransform);
- filter->setOnPainter(painter);
- QBrush pixmapBrush = src;
- pixmapBrush.setTransform(QTransform::fromTranslate(pos.x(), pos.y()));
- painter->fillRect(targetRect, pixmapBrush);
- filter->removeFromPainter(painter);
- } else {
- QGLFramebufferObjectFormat format;
- format.setInternalTextureFormat(GLenum(src.hasAlphaChannel() ? GL_RGBA : GL_RGB));
- QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(targetRect.size(), format);
+ targetRect.setWidth(targetRect.width() & ~(s-1));
+ targetRect.setHeight(targetRect.height() & ~(s-1));
- if (!fbo)
- return false;
+ int paddingDelta = (prepadding - padding) >> level;
- // prepare for updateUniforms
- m_textureSize = src.size();
+ QRect subRect(paddingDelta, paddingDelta, targetRect.width() >> level, targetRect.height() >> level);
+ QImage sourceImage = info->paddedImage(level-1);
- // horizontal pass, to pixmap
- m_horizontalBlur = true;
+ QImage subImage(subRect.height(), subRect.width(), QImage::Format_ARGB32_Premultiplied);
+ qt_rectcopy((QRgb *)subImage.bits(), ((QRgb *)sourceImage.scanLine(paddingDelta)) + paddingDelta,
+ 0, 0, subRect.height(), subRect.width(), subImage.bytesPerLine(), sourceImage.bytesPerLine());
- QPainter fboPainter(fbo);
+ GLuint texture = info->texture();
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT);
+ qt_blurImage(subImage, actualRadius, blurHints() & QGraphicsBlurEffect::QualityHint, 1);
- // ensure GL_LINEAR filtering is used
- fboPainter.setRenderHint(QPainter::SmoothPixmapTransform);
- fboPainter.setCompositionMode(QPainter::CompositionMode_Source);
- filter->setOnPainter(&fboPainter);
- QBrush pixmapBrush = src;
- pixmapBrush.setTransform(QTransform::fromTranslate(actualRadius, actualRadius));
- fboPainter.fillRect(QRect(0, 0, targetRect.width(), targetRect.height()), pixmapBrush);
- filter->removeFromPainter(&fboPainter);
- fboPainter.end();
+ // subtract one pixel off the end to prevent the bilinear sampling from sampling uninitialized data
+ QRect textureSubRect = subImage.rect().adjusted(0, 0, -1, -1);
+ QRectF targetRectF = QRectF(targetRect).adjusted(0, 0, -targetRect.width() / qreal(textureSize.width()), -targetRect.height() / qreal(textureSize.height()));
- QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subImage.width(), subImage.height(), GL_RGBA,
+ GL_UNSIGNED_BYTE, const_cast<const QImage &>(subImage).bits());
- // vertical pass, to painter
- m_horizontalBlur = false;
- m_textureSize = fbo->size();
+ QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
+ painter->setRenderHint(QPainter::SmoothPixmapTransform);
- painter->save();
- // ensure GL_LINEAR filtering is used
- painter->setRenderHint(QPainter::SmoothPixmapTransform);
- filter->setOnPainter(painter);
- engine->drawTexture(targetRect, fbo->texture(), fbo->size(), QRect(QPoint(), targetRect.size()).translated(0, fbo->height() - targetRect.height()));
- filter->removeFromPainter(painter);
- painter->restore();
+ // texture is flipped on the y-axis
+ targetRectF = QRectF(targetRectF.x(), targetRectF.bottom(), targetRectF.width(), -targetRectF.height());
+ engine->drawTexture(targetRectF.translated(pos), texture, textureSize, textureSubRect);
- qgl_fbo_pool()->release(fbo);
- }
+ blurTextureCache->insertBlurTextureInfo(src, info);
return true;
}
-void QGLPixmapBlurFilter::setUniforms(QGLShaderProgram *program)
-{
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- if (m_animatedBlur) {
- program->setUniformValue("interpolateTarget", 3);
- program->setUniformValue("interpolationValue", GLfloat(m_t));
-
- if (m_textureSize == m_targetSize) {
- program->setUniformValue("interpolateMapping", 0.0f, 0.0f, 1.0f, 1.0f);
- } else {
- float offsetX = (-qMaxCachedBlurLevel - 0.5) / qreal(m_targetSize.width());
- float offsetY = (-qMaxCachedBlurLevel - 0.5) / qreal(m_targetSize.height());
-
- if (m_targetSize.height() < 0)
- offsetY = 1 + offsetY;
-
- float scaleX = 2.0f * qreal(m_textureSize.width()) / qreal(m_targetSize.width());
- float scaleY = 2.0f * qreal(m_textureSize.height()) / qreal(m_targetSize.height());
-
- program->setUniformValue("interpolateMapping", offsetX, offsetY, scaleX, scaleY);
- }
-
- return;
- }
+static const char *qt_gl_drop_shadow_filter =
+ "uniform lowp vec4 shadowColor;"
+ "lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords)"
+ "{"
+ " return shadowColor * texture2D(src, srcCoords.yx).a;"
+ "}";
- if (m_hints & QGraphicsBlurEffect::QualityHint) {
- if (m_singlePass)
- program->setUniformValue("delta", 1.0 / m_textureSize.width(), 1.0 / m_textureSize.height());
- else if (m_horizontalBlur)
- program->setUniformValue("delta", 1.0 / m_textureSize.width(), 0.0);
- else
- program->setUniformValue("delta", 0.0, 1.0 / m_textureSize.height());
- } else {
- qreal blur = radius() / qreal(m_cachedRadius);
-
- if (m_singlePass)
- program->setUniformValue("delta", blur / m_textureSize.width(), blur / m_textureSize.height());
- else if (m_horizontalBlur)
- program->setUniformValue("delta", blur / m_textureSize.width(), 0.0);
- else
- program->setUniformValue("delta", 0.0, blur / m_textureSize.height());
- }
-}
-static inline qreal gaussian(qreal dx, qreal sigma)
+QGLPixmapDropShadowFilter::QGLPixmapDropShadowFilter()
{
- return exp(-dx * dx / (2 * sigma * sigma)) / (Q_2PI * sigma * sigma);
+ setSource(qt_gl_drop_shadow_filter);
}
-QByteArray QGLPixmapBlurFilter::generateGaussianShader(int radius, bool singlePass, bool dropShadow)
+bool QGLPixmapDropShadowFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &srcRect) const
{
- Q_ASSERT(radius >= 1);
-
- radius = qMin(127, radius);
-
- static QCache<uint, QByteArray> shaderSourceCache;
- uint key = radius | (int(singlePass) << 7) | (int(dropShadow) << 8);
- QByteArray *cached = shaderSourceCache.object(key);
- if (cached)
- return *cached;
-
- QByteArray source;
- source.reserve(1000);
- source.append(qt_gl_texture_sampling_helper);
-
- source.append("uniform highp vec2 delta;\n");
- if (dropShadow)
- source.append("uniform mediump vec4 shadowColor;\n");
- source.append("lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {\n");
-
- QVector<qreal> sampleOffsets;
- QVector<qreal> weights;
-
- QVector<qreal> gaussianComponents;
-
- qreal sigma = radius / 1.65;
-
- qreal sum = 0;
- for (int i = -radius; i < radius; ++i) {
- float value = gaussian(i, sigma);
- gaussianComponents << value;
- sum += value;
- }
-
- // normalize
- for (int i = 0; i < gaussianComponents.size(); ++i)
- gaussianComponents[i] /= sum;
-
- for (int i = 0; i < gaussianComponents.size() - 1; i += 2) {
- qreal weight = gaussianComponents.at(i) + gaussianComponents.at(i + 1);
- qreal offset = i - radius + gaussianComponents.at(i + 1) / weight;
-
- sampleOffsets << offset;
- weights << weight;
- }
-
- int limit = sampleOffsets.size();
- if (singlePass)
- limit *= limit;
-
- QByteArray baseCoordinate = "srcCoords";
-
- for (int i = 0; i < limit; ++i) {
- QByteArray coordinate = baseCoordinate;
-
- qreal weight;
- if (singlePass) {
- const int xIndex = i % sampleOffsets.size();
- const int yIndex = i / sampleOffsets.size();
-
- const qreal deltaX = sampleOffsets.at(xIndex);
- const qreal deltaY = sampleOffsets.at(yIndex);
- weight = weights.at(xIndex) * weights.at(yIndex);
-
- if (!qFuzzyCompare(deltaX, deltaY)) {
- coordinate.append(" + vec2(delta.x * float(");
- coordinate.append(QByteArray::number(deltaX));
- coordinate.append("), delta.y * float(");
- coordinate.append(QByteArray::number(deltaY));
- coordinate.append("))");
- } else if (!qFuzzyIsNull(deltaX)) {
- coordinate.append(" + delta * float(");
- coordinate.append(QByteArray::number(deltaX));
- coordinate.append(")");
- }
- } else {
- const qreal delta = sampleOffsets.at(i);
- weight = weights.at(i);
- if (!qFuzzyIsNull(delta)) {
- coordinate.append(" + delta * float(");
- coordinate.append(QByteArray::number(delta));
- coordinate.append(")");
- }
- }
-
- if (i == 0) {
- if (dropShadow)
- source.append(" mediump float sample = ");
- else
- source.append(" mediump vec4 sample = ");
- } else {
- if (dropShadow)
- source.append(" sample += ");
- else
- source.append(" sample += ");
- }
+ QGLPixmapDropShadowFilter *filter = const_cast<QGLPixmapDropShadowFilter *>(this);
- source.append("texture2D(src, ");
- source.append(coordinate);
- source.append(")");
+ qreal r = blurRadius();
+ QRectF targetRectUnaligned = QRectF(src.rect()).translated(pos + offset()).adjusted(-r, -r, r, r);
+ QRect targetRect = targetRectUnaligned.toAlignedRect();
- if (dropShadow)
- source.append(".a");
+ // ensure even dimensions (going to divide by two)
+ targetRect.setWidth((targetRect.width() + 1) & ~1);
+ targetRect.setHeight((targetRect.height() + 1) & ~1);
- if (!qFuzzyCompare(weight, qreal(1))) {
- source.append(" * float(");
- source.append(QByteArray::number(weight));
- source.append(");\n");
- } else {
- source.append(";\n");
- }
- }
+ QGLContext *ctx = const_cast<QGLContext *>(QGLContext::currentContext());
+ QGLBlurTextureCache *blurTextureCache = QGLBlurTextureCache::cacheForContext(ctx);
- source.append(" return ");
- if (dropShadow)
- source.append("shadowColor * ");
- source.append("sample;\n");
- source.append("}\n");
+ QGLBlurTextureInfo *info = blurTextureCache->takeBlurTextureInfo(src);
+ if (!info || info->radius() != r) {
+ QImage half = qt_halfScaled(src.toImage().alphaChannel());
- cached = new QByteArray(source);
- shaderSourceCache.insert(key, cached);
+ qreal rx = r + targetRect.left() - targetRectUnaligned.left();
+ qreal ry = r + targetRect.top() - targetRectUnaligned.top();
- return source;
-}
+ QImage image = QImage(targetRect.size() / 2, QImage::Format_Indexed8);
+ image.setColorTable(half.colorTable());
+ image.fill(0);
+ int dx = qRound(rx * qreal(0.5));
+ int dy = qRound(ry * qreal(0.5));
+ qt_rectcopy(image.bits(), half.bits(), dx, dy,
+ half.width(), half.height(),
+ image.bytesPerLine(), half.bytesPerLine());
-QGLPixmapDropShadowFilter::QGLPixmapDropShadowFilter(QGraphicsBlurEffect::BlurHints hints)
- : m_haveCached(false)
- , m_cachedRadius(0)
- , m_hints(hints)
-{
-}
+ qt_blurImage(image, r * qreal(0.5), false, 1);
-bool QGLPixmapDropShadowFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &srcRect) const
-{
- QGLPixmapDropShadowFilter *filter = const_cast<QGLPixmapDropShadowFilter *>(this);
+ GLuint texture = generateBlurTexture(image.size(), GL_ALPHA);
- int actualRadius = qRound(blurRadius());
- int filterRadius = actualRadius;
- m_singlePass = filterRadius <= 3;
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image.width(), image.height(), GL_ALPHA,
+ GL_UNSIGNED_BYTE, image.bits());
- if (!m_haveCached || filterRadius != m_cachedRadius) {
- // Only regenerate the shader from source if parameters have changed.
- m_haveCached = true;
- m_cachedRadius = filterRadius;
- QByteArray source = QGLPixmapBlurFilter::generateGaussianShader(filterRadius, m_singlePass, true);
- filter->setSource(source);
+ info = new QGLBlurTextureInfo(image, texture, r);
}
- QRect targetRect = QRectF(src.rect()).translated(pos + offset()).adjusted(-actualRadius, -actualRadius, actualRadius, actualRadius).toAlignedRect();
-
- if (m_singlePass) {
- // prepare for updateUniforms
- m_textureSize = src.size();
-
- painter->save();
- // ensure GL_LINEAR filtering is used
- painter->setRenderHint(QPainter::SmoothPixmapTransform);
- filter->setOnPainter(painter);
- QBrush pixmapBrush = src;
- pixmapBrush.setTransform(QTransform::fromTranslate(pos.x() + offset().x(), pos.y() + offset().y()));
- painter->fillRect(targetRect, pixmapBrush);
- filter->removeFromPainter(painter);
- painter->restore();
- } else {
- QGLFramebufferObjectFormat format;
- format.setInternalTextureFormat(GLenum(src.hasAlphaChannel() ? GL_RGBA : GL_RGB));
- QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(targetRect.size(), format);
-
- if (!fbo)
- return false;
-
- // prepare for updateUniforms
- m_textureSize = src.size();
-
- // horizontal pass, to pixmap
- m_horizontalBlur = true;
-
- QPainter fboPainter(fbo);
+ GLuint texture = info->texture();
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- // ensure GL_LINEAR filtering is used
- fboPainter.setRenderHint(QPainter::SmoothPixmapTransform);
- fboPainter.setCompositionMode(QPainter::CompositionMode_Source);
- filter->setOnPainter(&fboPainter);
- QBrush pixmapBrush = src;
- pixmapBrush.setTransform(QTransform::fromTranslate(actualRadius, actualRadius));
- fboPainter.fillRect(QRect(0, 0, targetRect.width(), targetRect.height()), pixmapBrush);
- filter->removeFromPainter(&fboPainter);
- fboPainter.end();
-
- QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
+ filter->setOnPainter(painter);
- // vertical pass, to painter
- m_horizontalBlur = false;
- m_textureSize = fbo->size();
+ QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
+ painter->setRenderHint(QPainter::SmoothPixmapTransform);
- painter->save();
- // ensure GL_LINEAR filtering is used
- painter->setRenderHint(QPainter::SmoothPixmapTransform);
- filter->setOnPainter(painter);
- engine->drawTexture(targetRect, fbo->texture(), fbo->size(), QRectF(0, fbo->height() - targetRect.height(), targetRect.width(), targetRect.height()));
- filter->removeFromPainter(painter);
- painter->restore();
+ engine->drawTexture(targetRect, texture, info->paddedImage().size(), info->paddedImage().rect());
- qgl_fbo_pool()->release(fbo);
- }
+ filter->removeFromPainter(painter);
// Now draw the actual pixmap over the top.
painter->drawPixmap(pos, src, srcRect);
+ blurTextureCache->insertBlurTextureInfo(src, info);
+
return true;
}
void QGLPixmapDropShadowFilter::setUniforms(QGLShaderProgram *program)
{
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
QColor col = color();
- if (m_horizontalBlur && !m_singlePass) {
- program->setUniformValue("shadowColor", 1.0f, 1.0f, 1.0f, 1.0f);
- } else {
- qreal alpha = col.alphaF();
- program->setUniformValue("shadowColor", col.redF() * alpha,
- col.greenF() * alpha,
- col.blueF() * alpha,
- alpha);
- }
-
- if (m_hints & QGraphicsBlurEffect::QualityHint) {
- if (m_singlePass)
- program->setUniformValue("delta", 1.0 / m_textureSize.width(), 1.0 / m_textureSize.height());
- else if (m_horizontalBlur)
- program->setUniformValue("delta", 1.0 / m_textureSize.width(), 0.0);
- else
- program->setUniformValue("delta", 0.0, 1.0 / m_textureSize.height());
- } else {
- qreal blur = blurRadius() / qreal(m_cachedRadius);
-
- if (m_singlePass)
- program->setUniformValue("delta", blur / m_textureSize.width(), blur / m_textureSize.height());
- else if (m_horizontalBlur)
- program->setUniformValue("delta", blur / m_textureSize.width(), 0.0);
- else
- program->setUniformValue("delta", 0.0, blur / m_textureSize.height());
- }
+ qreal alpha = col.alphaF();
+ program->setUniformValue("shadowColor", col.redF() * alpha,
+ col.greenF() * alpha,
+ col.blueF() * alpha,
+ alpha);
}
QT_END_NAMESPACE
diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
index 8927c4c..c8c9917 100644
--- a/src/openvg/openvg.pro
+++ b/src/openvg/openvg.pro
@@ -16,11 +16,13 @@ HEADERS += \
qpaintengine_vg_p.h \
qpixmapdata_vg_p.h \
qpixmapfilter_vg_p.h \
- qvgcompositionhelper_p.h
+ qvgcompositionhelper_p.h \
+ qvgimagepool_p.h
SOURCES += \
qpaintengine_vg.cpp \
qpixmapdata_vg.cpp \
- qpixmapfilter_vg.cpp
+ qpixmapfilter_vg.cpp \
+ qvgimagepool.cpp
contains(QT_CONFIG, egl) {
HEADERS += \
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 6b829dd..04fee08 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -43,6 +43,7 @@
#include "qpixmapdata_vg_p.h"
#include "qpixmapfilter_vg_p.h"
#include "qvgcompositionhelper_p.h"
+#include "qvgimagepool_p.h"
#if !defined(QT_NO_EGL)
#include <QtGui/private/qegl_p.h>
#include "qwindowsurface_vgegl_p.h"
@@ -1018,7 +1019,7 @@ static VGImage toVGImage
const uchar *pixels = img.bits();
- VGImage vgImg = vgCreateImage
+ VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(format, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
vgImageSubData
(vgImg, pixels, img.bytesPerLine(), format, 0, 0,
@@ -1063,7 +1064,7 @@ static VGImage toVGImageSubRect
const uchar *pixels = img.bits() + bpp * sr.x() +
img.bytesPerLine() * sr.y();
- VGImage vgImg = vgCreateImage
+ VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(format, sr.width(), sr.height(), VG_IMAGE_QUALITY_FASTER);
vgImageSubData
(vgImg, pixels, img.bytesPerLine(), format, 0, 0,
@@ -1084,7 +1085,7 @@ static VGImage toVGImageWithOpacity(const QImage & image, qreal opacity)
const uchar *pixels = img.bits();
- VGImage vgImg = vgCreateImage
+ VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(VG_sARGB_8888_PRE, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
vgImageSubData
(vgImg, pixels, img.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0,
@@ -1106,7 +1107,7 @@ static VGImage toVGImageWithOpacitySubRect
const uchar *pixels = img.bits();
- VGImage vgImg = vgCreateImage
+ VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(VG_sARGB_8888_PRE, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
vgImageSubData
(vgImg, pixels, img.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0,
@@ -1194,6 +1195,12 @@ VGPaintType QVGPaintEnginePrivate::setBrush
if (pd->classId() == QPixmapData::OpenVGClass) {
QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
vgImg = vgpd->toVGImage();
+
+ // We don't want the pool to reclaim this image
+ // because we cannot predict when the paint object
+ // will stop using it. Replacing the image with
+ // new data will make the paint object invalid.
+ vgpd->detachImageFromPool();
} else {
vgImg = toVGImage(*(pd->buffer()));
deref = true;
@@ -1201,6 +1208,7 @@ VGPaintType QVGPaintEnginePrivate::setBrush
} else if (pd->classId() == QPixmapData::OpenVGClass) {
QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
vgImg = vgpd->toVGImage(opacity);
+ vgpd->detachImageFromPool();
} else {
vgImg = toVGImageWithOpacity(*(pd->buffer()), opacity);
deref = true;
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index af6f0f0..358ec4d 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -43,6 +43,7 @@
#include "qpaintengine_vg_p.h"
#include <QtGui/private/qdrawhelper_p.h>
#include "qvg_p.h"
+#include "qvgimagepool_p.h"
#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
#include <graphics/sgimage.h>
@@ -63,6 +64,8 @@ QVGPixmapData::QVGPixmapData(PixelType type)
vgImageOpacity = VG_INVALID_HANDLE;
cachedOpacity = 1.0f;
recreate = true;
+ inImagePool = false;
+ inLRU = false;
#if !defined(QT_NO_EGL)
context = 0;
qt_vg_register_pixmap(this);
@@ -78,32 +81,43 @@ QVGPixmapData::~QVGPixmapData()
#endif
}
+void QVGPixmapData::destroyImages()
+{
+ if (inImagePool) {
+ QVGImagePool *pool = QVGImagePool::instance();
+ if (vgImage != VG_INVALID_HANDLE)
+ pool->releaseImage(this, vgImage);
+ if (vgImageOpacity != VG_INVALID_HANDLE)
+ pool->releaseImage(this, vgImageOpacity);
+ } else {
+ if (vgImage != VG_INVALID_HANDLE)
+ vgDestroyImage(vgImage);
+ if (vgImageOpacity != VG_INVALID_HANDLE)
+ vgDestroyImage(vgImageOpacity);
+ }
+ vgImage = VG_INVALID_HANDLE;
+ vgImageOpacity = VG_INVALID_HANDLE;
+ inImagePool = false;
+}
+
void QVGPixmapData::destroyImageAndContext()
{
if (vgImage != VG_INVALID_HANDLE) {
// We need to have a context current to destroy the image.
#if !defined(QT_NO_EGL)
if (context->isCurrent()) {
- vgDestroyImage(vgImage);
- if (vgImageOpacity != VG_INVALID_HANDLE)
- vgDestroyImage(vgImageOpacity);
+ destroyImages();
} else {
// We don't currently have a widget surface active, but we
// need a surface to make the context current. So use the
// shared pbuffer surface instead.
context->makeCurrent(qt_vg_shared_surface());
- vgDestroyImage(vgImage);
- if (vgImageOpacity != VG_INVALID_HANDLE)
- vgDestroyImage(vgImageOpacity);
+ destroyImages();
context->lazyDoneCurrent();
}
#else
- vgDestroyImage(vgImage);
- if (vgImageOpacity != VG_INVALID_HANDLE)
- vgDestroyImage(vgImageOpacity);
+ destroyImages();
#endif
- vgImage = VG_INVALID_HANDLE;
- vgImageOpacity = VG_INVALID_HANDLE;
}
#if !defined(QT_NO_EGL)
if (context) {
@@ -234,26 +248,22 @@ VGImage QVGPixmapData::toVGImage()
context = qt_vg_create_context(0, QInternal::Pixmap);
#endif
- if (recreate && prevSize != QSize(w, h)) {
- if (vgImage != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImage);
- vgImage = VG_INVALID_HANDLE;
- }
- if (vgImageOpacity != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImageOpacity);
- vgImageOpacity = VG_INVALID_HANDLE;
- }
- } else if (recreate) {
+ if (recreate && prevSize != QSize(w, h))
+ destroyImages();
+ else if (recreate)
cachedOpacity = -1.0f; // Force opacity image to be refreshed later.
- }
if (vgImage == VG_INVALID_HANDLE) {
- vgImage = vgCreateImage
- (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER);
+ vgImage = QVGImagePool::instance()->createImageForPixmap
+ (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER, this);
// Bail out if we run out of GPU memory - try again next time.
if (vgImage == VG_INVALID_HANDLE)
return VG_INVALID_HANDLE;
+
+ inImagePool = true;
+ } else if (inImagePool) {
+ QVGImagePool::instance()->useImage(this);
}
if (!source.isNull() && recreate) {
@@ -282,8 +292,13 @@ VGImage QVGPixmapData::toVGImage(qreal opacity)
// Create an alternative image for the selected opacity.
if (vgImageOpacity == VG_INVALID_HANDLE || cachedOpacity != opacity) {
if (vgImageOpacity == VG_INVALID_HANDLE) {
- vgImageOpacity = vgCreateImage
- (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER);
+ if (inImagePool) {
+ vgImageOpacity = QVGImagePool::instance()->createImageForPixmap
+ (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER, this);
+ } else {
+ vgImageOpacity = vgCreateImage
+ (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER);
+ }
// Bail out if we run out of GPU memory - try again next time.
if (vgImageOpacity == VG_INVALID_HANDLE)
@@ -308,6 +323,14 @@ VGImage QVGPixmapData::toVGImage(qreal opacity)
#endif
}
+void QVGPixmapData::detachImageFromPool()
+{
+ if (inImagePool) {
+ QVGImagePool::instance()->detachImage(this);
+ inImagePool = false;
+ }
+}
+
void QVGPixmapData::hibernate()
{
// If the image was imported (e.g, from an SgImage under Symbian),
@@ -319,6 +342,14 @@ void QVGPixmapData::hibernate()
destroyImageAndContext();
}
+void QVGPixmapData::reclaimImages()
+{
+ if (!inImagePool)
+ return;
+ forceToImage();
+ destroyImages();
+}
+
extern int qt_defaultDpiX();
extern int qt_defaultDpiY();
@@ -411,14 +442,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
if (!context)
context = qt_vg_create_context(0, QInternal::Pixmap);
- if (vgImage != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImage);
- vgImage = VG_INVALID_HANDLE;
- }
- if (vgImageOpacity != VG_INVALID_HANDLE) {
- vgDestroyImage(vgImageOpacity);
- vgImageOpacity = VG_INVALID_HANDLE;
- }
+ destroyImages();
prevSize = QSize();
TInt err = 0;
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index c0bb098..4ff95c1 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -63,6 +63,7 @@ class RSGImage;
QT_BEGIN_NAMESPACE
class QEglContext;
+class QVGImagePool;
#if !defined(QT_NO_EGL)
class QVGPixmapData;
@@ -101,6 +102,9 @@ public:
// Return the VGImage form for a specific opacity setting.
virtual VGImage toVGImage(qreal opacity);
+ // Detach this image from the image pool.
+ virtual void detachImageFromPool();
+
// Release the VG resources associated with this pixmap and copy
// the pixmap's contents out of the GPU back into main memory.
// The VG resource will be automatically recreated the next time
@@ -109,6 +113,10 @@ public:
// process via a SgImage).
virtual void hibernate();
+ // Called when the QVGImagePool wants to reclaim this pixmap's
+ // VGImage objects to reuse storage.
+ virtual void reclaimImages();
+
QSize size() const { return QSize(w, h); }
#if defined(Q_OS_SYMBIAN)
@@ -123,8 +131,13 @@ protected:
void cleanup();
#endif
-#if !defined(QT_NO_EGL)
private:
+ QVGPixmapData *nextLRU;
+ QVGPixmapData *prevLRU;
+ bool inLRU;
+ friend class QVGImagePool;
+
+#if !defined(QT_NO_EGL)
QVGPixmapData *next;
QVGPixmapData *prev;
@@ -140,6 +153,7 @@ protected:
qreal cachedOpacity;
mutable QImage source;
mutable bool recreate;
+ bool inImagePool;
#if !defined(QT_NO_EGL)
mutable QEglContext *context;
#endif
@@ -148,6 +162,7 @@ protected:
QImage::Format sourceFormat() const;
void destroyImageAndContext();
+ void destroyImages();
};
QT_END_NAMESPACE
diff --git a/src/openvg/qpixmapfilter_vg.cpp b/src/openvg/qpixmapfilter_vg.cpp
index e17c728..aa526ed 100644
--- a/src/openvg/qpixmapfilter_vg.cpp
+++ b/src/openvg/qpixmapfilter_vg.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qpixmapfilter_vg_p.h"
+#include "qvgimagepool_p.h"
#include <QtCore/qvarlengtharray.h>
#include <QtGui/qpainter.h>
@@ -82,9 +83,9 @@ void QVGPixmapConvolutionFilter::draw
return;
QSize size = pd->size();
- VGImage dstImage = vgCreateImage
+ VGImage dstImage = QVGImagePool::instance()->createTemporaryImage
(VG_sARGB_8888_PRE, size.width(), size.height(),
- VG_IMAGE_QUALITY_FASTER);
+ VG_IMAGE_QUALITY_FASTER, pd);
if (dstImage == VG_INVALID_HANDLE)
return;
@@ -124,7 +125,7 @@ void QVGPixmapConvolutionFilter::draw
if(child != dstImage)
vgDestroyImage(child);
- vgDestroyImage(dstImage);
+ QVGImagePool::instance()->releaseImage(0, dstImage);
}
QVGPixmapColorizeFilter::QVGPixmapColorizeFilter()
@@ -155,9 +156,9 @@ void QVGPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const
return;
QSize size = pd->size();
- VGImage dstImage = vgCreateImage
+ VGImage dstImage = QVGImagePool::instance()->createTemporaryImage
(VG_sARGB_8888_PRE, size.width(), size.height(),
- VG_IMAGE_QUALITY_FASTER);
+ VG_IMAGE_QUALITY_FASTER, pd);
if (dstImage == VG_INVALID_HANDLE)
return;
@@ -217,7 +218,7 @@ void QVGPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const
if(child != dstImage)
vgDestroyImage(child);
- vgDestroyImage(dstImage);
+ QVGImagePool::instance()->releaseImage(0, dstImage);
}
QVGPixmapDropShadowFilter::QVGPixmapDropShadowFilter()
@@ -248,9 +249,9 @@ void QVGPixmapDropShadowFilter::draw(QPainter *painter, const QPointF &dest, con
return;
QSize size = pd->size();
- VGImage dstImage = vgCreateImage
+ VGImage dstImage = QVGImagePool::instance()->createTemporaryImage
(VG_A_8, size.width(), size.height(),
- VG_IMAGE_QUALITY_FASTER);
+ VG_IMAGE_QUALITY_FASTER, pd);
if (dstImage == VG_INVALID_HANDLE)
return;
@@ -282,7 +283,7 @@ void QVGPixmapDropShadowFilter::draw(QPainter *painter, const QPointF &dest, con
if(child != dstImage)
vgDestroyImage(child);
- vgDestroyImage(dstImage);
+ QVGImagePool::instance()->releaseImage(0, dstImage);
// Now draw the actual pixmap over the top.
painter->drawPixmap(dest, src, srect);
@@ -316,9 +317,9 @@ void QVGPixmapBlurFilter::draw(QPainter *painter, const QPointF &dest, const QPi
return;
QSize size = pd->size();
- VGImage dstImage = vgCreateImage
+ VGImage dstImage = QVGImagePool::instance()->createTemporaryImage
(VG_sARGB_8888_PRE, size.width(), size.height(),
- VG_IMAGE_QUALITY_FASTER);
+ VG_IMAGE_QUALITY_FASTER, pd);
if (dstImage == VG_INVALID_HANDLE)
return;
@@ -347,7 +348,7 @@ void QVGPixmapBlurFilter::draw(QPainter *painter, const QPointF &dest, const QPi
if(child != dstImage)
vgDestroyImage(child);
- vgDestroyImage(dstImage);
+ QVGImagePool::instance()->releaseImage(0, dstImage);
}
#endif
diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp
new file mode 100644
index 0000000..93e6e03
--- /dev/null
+++ b/src/openvg/qvgimagepool.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtOpenVG module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qvgimagepool_p.h"
+#include "qpixmapdata_vg_p.h"
+
+QT_BEGIN_NAMESPACE
+
+static QVGImagePool *qt_vg_image_pool = 0;
+
+class QVGImagePoolPrivate
+{
+public:
+ QVGImagePoolPrivate() : lruFirst(0), lruLast(0) {}
+
+ QVGPixmapData *lruFirst;
+ QVGPixmapData *lruLast;
+};
+
+QVGImagePool::QVGImagePool()
+ : d_ptr(new QVGImagePoolPrivate())
+{
+}
+
+QVGImagePool::~QVGImagePool()
+{
+}
+
+QVGImagePool *QVGImagePool::instance()
+{
+ if (!qt_vg_image_pool)
+ qt_vg_image_pool = new QVGImagePool();
+ return qt_vg_image_pool;
+}
+
+void QVGImagePool::setImagePool(QVGImagePool *pool)
+{
+ if (qt_vg_image_pool != pool)
+ delete qt_vg_image_pool;
+ qt_vg_image_pool = pool;
+}
+
+VGImage QVGImagePool::createTemporaryImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality,
+ QVGPixmapData *keepData)
+{
+ VGImage image;
+ do {
+ image = vgCreateImage(format, width, height, allowedQuality);
+ if (image != VG_INVALID_HANDLE)
+ return image;
+ } while (reclaimSpace(format, width, height, keepData));
+ qWarning("QVGImagePool: cannot reclaim sufficient space for a %dx%d temporary image",
+ width, height);
+ return VG_INVALID_HANDLE;
+}
+
+VGImage QVGImagePool::createImageForPixmap(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality,
+ QVGPixmapData *data)
+{
+ VGImage image;
+ do {
+ image = vgCreateImage(format, width, height, allowedQuality);
+ if (image != VG_INVALID_HANDLE) {
+ if (data)
+ moveToHeadOfLRU(data);
+ return image;
+ }
+ } while (reclaimSpace(format, width, height, data));
+ qWarning("QVGImagePool: cannot reclaim sufficient space for a %dx%d pixmap",
+ width, height);
+ return VG_INVALID_HANDLE;
+}
+
+VGImage QVGImagePool::createPermanentImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality)
+{
+ VGImage image;
+ do {
+ image = vgCreateImage(format, width, height, allowedQuality);
+ if (image != VG_INVALID_HANDLE)
+ return image;
+ } while (reclaimSpace(format, width, height, 0));
+ qWarning("QVGImagePool: cannot reclaim sufficient space for a %dx%d image",
+ width, height);
+ return VG_INVALID_HANDLE;
+}
+
+void QVGImagePool::releaseImage(QVGPixmapData *data, VGImage image)
+{
+ // Very simple strategy at the moment: just destroy the image.
+ if (data)
+ removeFromLRU(data);
+ vgDestroyImage(image);
+}
+
+void QVGImagePool::useImage(QVGPixmapData *data)
+{
+ moveToHeadOfLRU(data);
+}
+
+void QVGImagePool::detachImage(QVGPixmapData *data)
+{
+ removeFromLRU(data);
+}
+
+bool QVGImagePool::reclaimSpace(VGImageFormat format,
+ VGint width, VGint height,
+ QVGPixmapData *data)
+{
+ Q_UNUSED(format); // For future use in picking the best image to eject.
+ Q_UNUSED(width);
+ Q_UNUSED(height);
+
+ if (data)
+ moveToHeadOfLRU(data);
+
+ QVGPixmapData *lrudata = pixmapLRU();
+ if (lrudata && lrudata != data) {
+ lrudata->reclaimImages();
+ return true;
+ }
+
+ return false;
+}
+
+void QVGImagePool::hibernate()
+{
+ // Nothing to do here at the moment since the pool does not
+ // retain VGImage's after they have been released.
+}
+
+void QVGImagePool::moveToHeadOfLRU(QVGPixmapData *data)
+{
+ Q_D(QVGImagePool);
+ if (data->inLRU) {
+ if (!data->prevLRU)
+ return; // Already at the head of the list.
+ removeFromLRU(data);
+ }
+ data->inLRU = true;
+ data->nextLRU = d->lruFirst;
+ data->prevLRU = 0;
+ if (d->lruFirst)
+ d->lruFirst->prevLRU = data;
+ else
+ d->lruLast = data;
+ d->lruFirst = data;
+}
+
+void QVGImagePool::removeFromLRU(QVGPixmapData *data)
+{
+ Q_D(QVGImagePool);
+ if (!data->inLRU)
+ return;
+ if (data->nextLRU)
+ data->nextLRU->prevLRU = data->prevLRU;
+ else
+ d->lruLast = data->prevLRU;
+ if (data->prevLRU)
+ data->prevLRU->nextLRU = data->nextLRU;
+ else
+ d->lruFirst = data->nextLRU;
+ data->inLRU = false;
+}
+
+QVGPixmapData *QVGImagePool::pixmapLRU()
+{
+ Q_D(QVGImagePool);
+ return d->lruLast;
+}
+
+QT_END_NAMESPACE
diff --git a/src/openvg/qvgimagepool_p.h b/src/openvg/qvgimagepool_p.h
new file mode 100644
index 0000000..66a4998
--- /dev/null
+++ b/src/openvg/qvgimagepool_p.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtOpenVG module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVGIMAGEPOOL_P_H
+#define QVGIMAGEPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qvg.h"
+#include <QtCore/qscopedpointer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QVGPixmapData;
+class QVGImagePoolPrivate;
+
+class Q_OPENVG_EXPORT QVGImagePool
+{
+public:
+ QVGImagePool();
+ virtual ~QVGImagePool();
+
+ static QVGImagePool *instance();
+
+ // This function can be used from system-specific graphics system
+ // plugins to alter the image allocation strategy.
+ static void setImagePool(QVGImagePool *pool);
+
+ // Create a new VGImage from the pool with the specified parameters
+ // that is not associated with a pixmap. The VGImage is returned to
+ // the pool when releaseImage() is called.
+ //
+ // This function will call reclaimSpace() when vgCreateImage() fails.
+ //
+ // This function is typically called when allocating temporary
+ // VGImage's for pixmap filters. The "keepData" object will not
+ // be reclaimed if reclaimSpace() needs to be called.
+ virtual VGImage createTemporaryImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality,
+ QVGPixmapData *keepData = 0);
+
+ // Create a new VGImage with the specified parameters and associate
+ // it with "data". The QVGPixmapData will be notified when the
+ // VGImage needs to be reclaimed by the pool.
+ //
+ // This function will call reclaimSpace() when vgCreateImage() fails.
+ virtual VGImage createImageForPixmap(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality,
+ QVGPixmapData *data);
+
+ // Create a permanent VGImage with the specified parameters.
+ // If there is insufficient space for the vgCreateImage call,
+ // then this function will call reclaimSpace() and try again.
+ //
+ // The caller is responsible for calling vgDestroyImage()
+ // when it no longer needs the VGImage, as the image is not
+ // recorded in the image pool.
+ //
+ // This function is typically used for pattern brushes where
+ // the OpenVG engine is responsible for managing the lifetime
+ // of the VGImage, destroying it automatically when the brush
+ // is no longer in use.
+ virtual VGImage createPermanentImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality);
+
+ // Release a VGImage that is no longer required.
+ virtual void releaseImage(QVGPixmapData *data, VGImage image);
+
+ // Notify the pool that a QVGPixmapData object is using
+ // an image again. This allows the pool to move the image
+ // within a least-recently-used list of QVGPixmapData objects.
+ virtual void useImage(QVGPixmapData *data);
+
+ // Notify the pool that the VGImage's associated with a
+ // QVGPixmapData are being detached from the pool. The caller
+ // will become responsible for calling vgDestroyImage().
+ virtual void detachImage(QVGPixmapData *data);
+
+ // Reclaim space for an image allocation with the specified parameters.
+ // Returns true if space was reclaimed, or false if there is no
+ // further space that can be reclaimed. The "data" parameter
+ // indicates the pixmap that is trying to obtain space which should
+ // not itself be reclaimed.
+ virtual bool reclaimSpace(VGImageFormat format,
+ VGint width, VGint height,
+ QVGPixmapData *data);
+
+ // Hibernate the image pool because the context is about to be
+ // destroyed. All VGImage's left in the pool should be released.
+ virtual void hibernate();
+
+protected:
+ // Helper functions for managing the LRU list of QVGPixmapData objects.
+ void moveToHeadOfLRU(QVGPixmapData *data);
+ void removeFromLRU(QVGPixmapData *data);
+ QVGPixmapData *pixmapLRU();
+
+private:
+ QScopedPointer<QVGImagePoolPrivate> d_ptr;
+
+ Q_DECLARE_PRIVATE(QVGImagePool)
+ Q_DISABLE_COPY(QVGImagePool)
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 1571083..bda6096 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -42,6 +42,7 @@
#include "qwindowsurface_vgegl_p.h"
#include "qpaintengine_vg_p.h"
#include "qpixmapdata_vg_p.h"
+#include "qvgimagepool_p.h"
#include "qvg_p.h"
#if !defined(QT_NO_EGL)
@@ -360,6 +361,9 @@ void qt_vg_hibernate_pixmaps(QVGSharedContext *shared)
pd = pd->next;
}
+ // Hibernate any remaining VGImage's in the image pool.
+ QVGImagePool::instance()->hibernate();
+
// Don't need the current context any more.
shared->context->lazyDoneCurrent();
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 8fcc0df..1a75cf6 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -725,16 +725,6 @@ void Generator::generateMetacall()
needEditable |= p.editable.endsWith(')');
needUser |= p.user.endsWith(')');
}
- bool needAnything = needGet
- | needSet
- | needReset
- | needDesignable
- | needScriptable
- | needStored
- | needEditable
- | needUser;
- if (!needAnything)
- goto skip_properties;
fprintf(out, "\n#ifndef QT_NO_PROPERTIES\n ");
if (needElse)
@@ -904,7 +894,6 @@ void Generator::generateMetacall()
fprintf(out, "\n#endif // QT_NO_PROPERTIES");
}
- skip_properties:
if (methodList.size() || cdef->signalList.size() || cdef->propertyList.size())
fprintf(out, "\n ");
fprintf(out,"return _id;\n}\n");
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp
index 2316ba2..1ca2b3a 100644
--- a/tests/auto/moc/tst_moc.cpp
+++ b/tests/auto/moc/tst_moc.cpp
@@ -489,6 +489,7 @@ private slots:
void constructors();
void typenameWithUnsigned();
void warnOnVirtualSignal();
+ void QTBUG5590_dummyProperty();
signals:
void sigWithUnsignedArg(unsigned foo);
void sigWithSignedArg(signed foo);
@@ -1216,6 +1217,40 @@ void tst_Moc::warnOnVirtualSignal()
#endif
}
+
+class QTBUG5590_DummyObject: public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool dummy)
+};
+
+class QTBUG5590_PropertyObject: public QTBUG5590_DummyObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue)
+ Q_PROPERTY(int value2 READ value2 WRITE setValue2)
+
+ public:
+ QTBUG5590_PropertyObject() : m_value(85), m_value2(40) { }
+ int value() const { return m_value; }
+ void setValue(int value) { m_value = value; }
+ int value2() const { return m_value2; }
+ void setValue2(int value) { m_value2 = value; }
+ private:
+ int m_value, m_value2;
+};
+
+void tst_Moc::QTBUG5590_dummyProperty()
+{
+ QTBUG5590_PropertyObject o;
+ QCOMPARE(o.property("value").toInt(), 85);
+ QCOMPARE(o.property("value2").toInt(), 40);
+ o.setProperty("value", 32);
+ QCOMPARE(o.value(), 32);
+ o.setProperty("value2", 82);
+ QCOMPARE(o.value2(), 82);
+}
+
QTEST_APPLESS_MAIN(tst_Moc)
#include "tst_moc.moc"
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index 6479829..bf3af63 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -48,6 +48,7 @@
#include <qlistview.h>
#include <qlistwidget.h>
#include <qtableview.h>
+#include <qtablewidget.h>
#include <qtreeview.h>
#include <qtreewidget.h>
#include <qheaderview.h>
@@ -226,6 +227,7 @@ private slots:
void shiftSelectionAfterRubberbandSelection();
void ctrlRubberbandSelection();
void QTBUG6407_extendedSelection();
+ void QTBUG6753_selectOnSelection();
};
class MyAbstractItemDelegate : public QAbstractItemDelegate
@@ -1475,5 +1477,26 @@ void tst_QAbstractItemView::QTBUG6407_extendedSelection()
}
+void tst_QAbstractItemView::QTBUG6753_selectOnSelection()
+{
+ QTableWidget table(5, 5);
+ for (int i = 0; i < table.rowCount(); ++i)
+ for (int j = 0; j < table.columnCount(); ++j)
+ table.setItem(i, j, new QTableWidgetItem("choo-be-doo-wah"));
+
+ table.show();
+ table.setSelectionMode(QAbstractItemView::ExtendedSelection);
+ table.selectAll();
+ QTest::qWaitForWindowShown(&table);
+ QModelIndex item = table.model()->index(1,1);
+ QRect itemRect = table.visualRect(item);
+ QTest::mouseMove(table.viewport(), itemRect.center());
+ QTest::mouseClick(table.viewport(), Qt::LeftButton, Qt::NoModifier, itemRect.center());
+ QTest::qWait(20);
+
+ QCOMPARE(table.selectedItems().count(), 1);
+ QCOMPARE(table.selectedItems().first(), table.item(item.row(), item.column()));
+}
+
QTEST_MAIN(tst_QAbstractItemView)
#include "tst_qabstractitemview.moc"
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp
index 7ee5665..2b2f431 100644
--- a/tests/auto/qfile/tst_qfile.cpp
+++ b/tests/auto/qfile/tst_qfile.cpp
@@ -220,6 +220,9 @@ public:
private:
enum FileType { OpenQFile, OpenFd, OpenStream };
+ void openStandardStreamsFileDescriptors();
+ void openStandardStreamsBufferedStreams();
+
bool openFd(QFile &file, QIODevice::OpenMode mode)
{
int fdMode = QT_OPEN_LARGEFILE | QT_OPEN_BINARY;
@@ -554,6 +557,10 @@ void tst_QFile::size()
QFETCH( QString, filename );
QFETCH( qint64, size );
+#ifdef Q_WS_WINCE
+ filename = QFileInfo(filename).absoluteFilePath();
+#endif
+
{
QFile f( filename );
QCOMPARE( f.size(), size );
@@ -564,24 +571,29 @@ void tst_QFile::size()
{
QFile f;
- int fd = QT_OPEN(filename.toLocal8Bit().constData(), QT_OPEN_RDONLY);
- QVERIFY( fd != -1 );
- QVERIFY( f.open(fd, QIODevice::ReadOnly) );
+ FILE* stream = QT_FOPEN(filename.toLocal8Bit().constData(), "rb");
+ QVERIFY( stream );
+ QVERIFY( f.open(stream, QIODevice::ReadOnly) );
QCOMPARE( f.size(), size );
f.close();
- QT_CLOSE(fd);
+ fclose(stream);
}
{
+#ifdef Q_WS_WINCE
+ QSKIP("Currently low level file I/O not well supported on Windows CE", SkipSingle);
+#endif
QFile f;
- FILE* stream = QT_FOPEN(filename.toLocal8Bit().constData(), "rb");
- QVERIFY( stream );
- QVERIFY( f.open(stream, QIODevice::ReadOnly) );
+
+ int fd = QT_OPEN(filename.toLocal8Bit().constData(), QT_OPEN_RDONLY);
+
+ QVERIFY( fd != -1 );
+ QVERIFY( f.open(fd, QIODevice::ReadOnly) );
QCOMPARE( f.size(), size );
f.close();
- fclose(stream);
+ QT_CLOSE(fd);
}
}
@@ -603,6 +615,7 @@ void tst_QFile::seek()
QVERIFY(file.seek(10));
QCOMPARE(file.pos(), qint64(10));
QCOMPARE(file.size(), qint64(0));
+ file.close();
QFile::remove("newfile.txt");
}
@@ -1128,9 +1141,15 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
+#ifdef Q_WS_WINCE
// Need to reset permissions on Windows to be able to delete
QVERIFY(QFile::setPermissions("file-copy-destination.txt",
- QFile::ReadOwner | QFile::WriteOwner));
+ QFile::WriteOther));
+#else
+ // Need to reset permissions on Windows to be able to delete
+ QVERIFY(QFile::setPermissions("file-copy-destination.txt",
+ QFile::ReadOwner | QFile::WriteOwner));
+#endif
QVERIFY(QFile::remove("file-copy-destination.txt"));
// Fallback copy of open file.
@@ -1139,6 +1158,7 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
+ file.close();
QFile::remove("file-copy-destination.txt");
}
@@ -2239,6 +2259,7 @@ void tst_QFile::rename()
QFile file(source);
QCOMPARE(file.rename(destination), result);
+
if (result)
QCOMPARE(file.error(), QFile::NoError);
else
@@ -2367,6 +2388,7 @@ void tst_QFile::appendAndRead()
QCOMPARE(readFile.read(1 << j).size(), 1 << j);
}
+ readFile.close();
QFile::remove(QLatin1String("appendfile.txt"));
}
@@ -2608,10 +2630,15 @@ void tst_QFile::map()
QFETCH(QFile::FileError, error);
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
+
+#ifdef Q_WS_WINCE
+ fileName = QFileInfo(fileName).absoluteFilePath();
+#endif
+
if (QFile::exists(fileName)) {
QVERIFY(QFile::setPermissions(fileName,
QFile::WriteOwner | QFile::ReadOwner | QFile::WriteUser | QFile::ReadUser));
- QFile::remove(fileName);
+ QFile::remove(fileName);
}
QFile file(fileName);
@@ -2650,8 +2677,13 @@ void tst_QFile::map()
QCOMPARE(file.error(), QFile::NoError);
// hpux wont let you map multiple times.
-#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API)
+#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API) && !defined(Q_OS_WINCE)
// exotic test to make sure that multiple maps work
+
+ // note: windows ce does not reference count mutliple maps
+ // it's essentially just the same reference but it
+ // cause a resource lock on the file which prevents it
+ // from being removed uchar *memory1 = file.map(0, file.size());
uchar *memory1 = file.map(0, file.size());
QCOMPARE(file.error(), QFile::NoError);
uchar *memory2 = file.map(0, file.size());
@@ -2687,7 +2719,6 @@ void tst_QFile::map()
QVERIFY(!memory);
QVERIFY(file.setPermissions(originalPermissions));
}
-
QVERIFY(file.remove());
}
@@ -2800,8 +2831,14 @@ void tst_QFile::openDirectory()
f1.close();
}
-void tst_QFile::openStandardStreams()
+void tst_QFile::openStandardStreamsFileDescriptors()
{
+#ifdef Q_WS_WINCE
+ //allthough Windows CE (not mobile!) has functions that allow redirecting
+ //the standard file descriptors to a file (see SetStdioPathW/GetStdioPathW)
+ //it does not have functions to simply open them like below .
+ QSKIP("Opening standard streams on Windows CE via descriptor not implemented", SkipAll);
+#endif
// Using file descriptors
{
QFile in;
@@ -2826,7 +2863,13 @@ void tst_QFile::openStandardStreams()
QCOMPARE( err.size(), (qint64)0 );
QVERIFY( err.isSequential() );
}
+}
+void tst_QFile::openStandardStreamsBufferedStreams()
+{
+#if defined (Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ QSKIP("Unix only test.", SkipAll);
+#endif
// Using streams
{
QFile in;
@@ -2853,6 +2896,12 @@ void tst_QFile::openStandardStreams()
}
}
+void tst_QFile::openStandardStreams()
+{
+ openStandardStreamsFileDescriptors();
+ openStandardStreamsBufferedStreams();
+}
+
void tst_QFile::writeNothing()
{
for (int i = 0; i < 3; ++i) {
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 5dc072d..532e550 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -75,6 +75,7 @@ private slots:
void graphicsViewClipping();
void partialGLWidgetUpdates_data();
void partialGLWidgetUpdates();
+ void glWidgetWithAlpha();
void glWidgetRendering();
void glFBOSimpleRendering();
void glFBORendering();
@@ -251,15 +252,10 @@ void tst_QGL::getSetCheck()
// bool QGLFormat::sampleBuffers()
// void QGLFormat::setSampleBuffers(bool)
-#if !defined(QT_OPENGL_ES_2)
QCOMPARE(false, obj1.sampleBuffers());
QVERIFY(!obj1.testOption(QGL::SampleBuffers));
QVERIFY(obj1.testOption(QGL::NoSampleBuffers));
-#else
- QCOMPARE(true, obj1.sampleBuffers());
- QVERIFY(obj1.testOption(QGL::SampleBuffers));
- QVERIFY(!obj1.testOption(QGL::NoSampleBuffers));
-#endif
+
obj1.setSampleBuffers(false);
QCOMPARE(false, obj1.sampleBuffers());
QVERIFY(obj1.testOption(QGL::NoSampleBuffers));
@@ -927,6 +923,17 @@ void tst_QGL::glPBufferRendering()
QFUZZY_COMPARE_IMAGES(fb, reference);
}
+void tst_QGL::glWidgetWithAlpha()
+{
+ QGLWidget* w = new QGLWidget(QGLFormat(QGL::AlphaChannel));
+ w->show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(w);
+#endif
+
+ delete w;
+}
+
class GLWidget : public QGLWidget
{
public:
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 259df4d..69fc118 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -69,6 +69,7 @@ private slots:
void opacity();
void grayscale();
void colorize();
+ void drawPixmapItem();
};
void tst_QGraphicsEffect::initTestCase()
@@ -465,6 +466,54 @@ void tst_QGraphicsEffect::colorize()
QCOMPARE(image.pixel(10, 10), qRgb(122, 193, 66));
}
+class PixmapItemEffect : public QGraphicsEffect
+{
+public:
+ PixmapItemEffect(const QPixmap &source)
+ : QGraphicsEffect()
+ , pixmap(source)
+ , repaints(0)
+ {}
+
+ QRectF boundingRectFor(const QRectF &rect) const
+ { return rect; }
+
+ void draw(QPainter *painter)
+ {
+ QVERIFY(sourcePixmap(Qt::LogicalCoordinates).pixmapData() == pixmap.pixmapData());
+ QVERIFY((painter->worldTransform().type() <= QTransform::TxTranslate) == (sourcePixmap(Qt::DeviceCoordinates).pixmapData() == pixmap.pixmapData()));
+
+ ++repaints;
+ }
+ QPixmap pixmap;
+ int repaints;
+};
+
+void tst_QGraphicsEffect::drawPixmapItem()
+{
+ QImage image(32, 32, QImage::Format_RGB32);
+ QPainter p(&image);
+ p.fillRect(0, 0, 32, 16, Qt::blue);
+ p.fillRect(0, 16, 32, 16, Qt::red);
+ p.end();
+
+ QGraphicsScene scene;
+ QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap::fromImage(image));
+ scene.addItem(item);
+
+ PixmapItemEffect *effect = new PixmapItemEffect(item->pixmap());
+ item->setGraphicsEffect(effect);
+
+ QGraphicsView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ item->rotate(180);
+ QTest::qWait(50);
+
+ QTRY_VERIFY(effect->repaints >= 2);
+}
+
QTEST_MAIN(tst_QGraphicsEffect)
#include "tst_qgraphicseffect.moc"
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index a2524aa..75d7a0a 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -126,6 +126,7 @@ private slots:
void deleteQObjectWhenDeletingEvent();
void overloads();
void isSignalConnected();
+ void qMetaObjectConnect();
protected:
};
@@ -3125,5 +3126,148 @@ void tst_QObject::isSignalConnected()
QCOMPARE(o.rec, 2);
}
+void tst_QObject::qMetaObjectConnect()
+{
+ SenderObject *s = new SenderObject;
+ ReceiverObject *r1 = new ReceiverObject;
+ ReceiverObject *r2 = new ReceiverObject;
+ r1->reset();
+ r2->reset();
+ ReceiverObject::sequence = 0;
+
+ int signal1Index = s->metaObject()->indexOfSignal("signal1()");
+ int signal3Index = s->metaObject()->indexOfSignal("signal3()");
+ int slot1Index = r1->metaObject()->indexOfSlot("slot1()");
+ int slot2Index = r1->metaObject()->indexOfSlot("slot2()");
+ int slot3Index = r1->metaObject()->indexOfSlot("slot3()");
+
+ QVERIFY(slot1Index > 0);
+ QVERIFY(slot2Index > 0);
+ QVERIFY(slot3Index > 0);
+
+ QVERIFY( QMetaObject::connect( s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::connect( s, signal3Index, r2, slot3Index) );
+ QVERIFY( QMetaObject::connect( s, -1, r2, slot2Index) );
+
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 0 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 0 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ s->emitSignal1();
+
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 0 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 1 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ s->emitSignal2();
+ s->emitSignal3();
+ s->emitSignal4();
+
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 0 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 4 );
+ QCOMPARE( r2->count_slot3, 1 );
+
+ QVERIFY( QMetaObject::disconnect( s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::disconnect( s, signal3Index, r2, slot3Index) );
+ QVERIFY( QMetaObject::disconnect( s, -1, r2, slot2Index) );
+
+ s->emitSignal1();
+ s->emitSignal2();
+ s->emitSignal3();
+ s->emitSignal4();
+
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 0 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 4 );
+ QCOMPARE( r2->count_slot3, 1 );
+
+ //some "dynamic" signal
+ QVERIFY( QMetaObject::connect( s, s->metaObject()->methodOffset() + 20, r1, slot3Index) );
+ QVERIFY( QMetaObject::connect( s, s->metaObject()->methodOffset() + 35, r2, slot1Index) );
+ QVERIFY( QMetaObject::connect( s, -1, r1, slot2Index) );
+
+ r1->reset();
+ r2->reset();
+
+ void *args[] = { 0 , 0 };
+ QMetaObject::activate(s, s->metaObject()->methodOffset() + 20, args);
+ QMetaObject::activate(s, s->metaObject()->methodOffset() + 48, args);
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 2 );
+ QCOMPARE( r1->count_slot3, 1 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 0 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ QMetaObject::activate(s, s->metaObject()->methodOffset() + 35, args);
+ s->emitSignal1();
+ s->emitSignal2();
+
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 5 );
+ QCOMPARE( r1->count_slot3, 1 );
+ QCOMPARE( r2->count_slot1, 1 );
+ QCOMPARE( r2->count_slot2, 0 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ delete s;
+ r1->reset();
+ r2->reset();
+
+#define SIGNAL_INDEX(S) obj1.metaObject()->indexOfSignal(QMetaObject::normalizedSignature(#S))
+ OverloadObject obj1;
+ QObject obj2, obj3;
+
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int)) , r1, slot1Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *)) , r2, slot1Index);
+
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *, QObject *)) , r1, slot2Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *)) , r2, slot2Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int, int)) , r1, slot3Index);
+
+ emit obj1.sig(0.5); //connected to nothing
+ emit obj1.sig(1, 'a'); //connected to nothing
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 0 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 0 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ emit obj1.sig(1); //this signal is connected
+ emit obj1.sig(&obj2);
+
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 0 );
+ QCOMPARE( r1->count_slot3, 1 );
+ QCOMPARE( r2->count_slot1, 0 );
+ QCOMPARE( r2->count_slot2, 1 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ emit obj1.sig(&obj2, &obj3); //this signal is connected
+
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 1 );
+ QCOMPARE( r1->count_slot3, 1 );
+ QCOMPARE( r2->count_slot1, 1 );
+ QCOMPARE( r2->count_slot2, 1 );
+ QCOMPARE( r2->count_slot3, 0 );
+
+ delete r1;
+ delete r2;
+
+}
+
QTEST_MAIN(tst_QObject)
#include "tst_qobject.moc"
diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp
index 475a1fe..6cf1a72 100644
--- a/tools/assistant/lib/qhelpindexwidget.cpp
+++ b/tools/assistant/lib/qhelpindexwidget.cpp
@@ -130,6 +130,7 @@ void QHelpIndexProvider::stopCollecting()
m_abort = true;
m_mutex.unlock();
wait();
+ m_abort = false;
}
QStringList QHelpIndexProvider::indices() const
@@ -164,7 +165,6 @@ void QHelpIndexProvider::run()
foreach (QString dbFileName, m_helpEngine->fileNameReaderMap.keys()) {
m_mutex.lock();
if (m_abort) {
- m_abort = false;
m_mutex.unlock();
return;
}
@@ -181,7 +181,6 @@ void QHelpIndexProvider::run()
foreach (QString s, lst)
indicesSet.insert(s);
if (m_abort) {
- m_abort = false;
m_mutex.unlock();
return;
}
@@ -194,7 +193,6 @@ void QHelpIndexProvider::run()
m_mutex.lock();
m_indices = indicesSet.values();
qSort(m_indices.begin(), m_indices.end(), caseInsensitiveLessThan);
- m_abort = false;
m_mutex.unlock();
}
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index 70f3157..523525e 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -69,9 +69,12 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
, m_title(title)
, bookmarkManager(manager)
{
+ ui.setupUi(this);
+
installEventFilter(this);
+ ui.treeView->installEventFilter(this);
+ ui.treeView->viewport()->installEventFilter(this);
- ui.setupUi(this);
ui.bookmarkEdit->setText(title);
ui.newFolderButton->setVisible(false);
ui.buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
@@ -264,12 +267,14 @@ void BookmarkDialog::currentChanged(const QModelIndex &current)
bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
{
- if (object == this && e->type() == QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ if (object != ui.treeView && object != ui.treeView->viewport())
+ return QWidget::eventFilter(object, e);
- QModelIndex index = ui.treeView->currentIndex();
+ if (e->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(e);
switch (ke->key()) {
case Qt::Key_F2: {
+ const QModelIndex &index = ui.treeView->currentIndex();
const QModelIndex &source = proxyModel->mapToSource(index);
QStandardItem *item =
bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
@@ -281,13 +286,13 @@ bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
} break;
case Qt::Key_Delete: {
+ const QModelIndex &index = ui.treeView->currentIndex();
bookmarkManager->removeBookmarkItem(ui.treeView,
proxyModel->mapToSource(index));
ui.bookmarkFolders->clear();
ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
QString name = tr("Bookmarks");
- index = ui.treeView->currentIndex();
if (index.isValid())
name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
@@ -297,6 +302,7 @@ bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
break;
}
}
+
return QObject::eventFilter(object, e);
}
@@ -312,7 +318,10 @@ BookmarkWidget::BookmarkWidget(BookmarkManager *manager, QWidget *parent,
, bookmarkManager(manager)
{
setup(showButtons);
+
installEventFilter(this);
+ treeView->installEventFilter(this);
+ treeView->viewport()->installEventFilter(this);
}
BookmarkWidget::~BookmarkWidget()
@@ -484,7 +493,6 @@ void BookmarkWidget::setup(bool showButtons)
treeView->setAutoExpandDelay(1000);
treeView->setDropIndicatorShown(true);
treeView->header()->setVisible(false);
- treeView->viewport()->installEventFilter(this);
treeView->setContextMenuPolicy(Qt::CustomContextMenu);
connect(treeView, SIGNAL(expanded(QModelIndex)), this,
@@ -530,59 +538,71 @@ void BookmarkWidget::focusInEvent(QFocusEvent *e)
bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
{
- if ((object == this) || (object == treeView->viewport())) {
- QModelIndex index = treeView->currentIndex();
- if (e->type() == QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if (index.isValid() && searchField->text().isEmpty()) {
+ if (object != this && object != treeView
+ && object != treeView->viewport()) {
+ return QWidget::eventFilter(object, e);
+ }
+
+ if (e->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ const bool tree = object == treeView || object == treeView->viewport();
+ switch (ke->key()) {
+ case Qt::Key_F2: {
+ const QModelIndex &index = treeView->currentIndex();
const QModelIndex &src = filterBookmarkModel->mapToSource(index);
- if (ke->key() == Qt::Key_F2) {
- QStandardItem *item =
- bookmarkManager->treeBookmarkModel()->itemFromIndex(src);
- if (item) {
+ if (tree && searchField->text().isEmpty()) {
+ if (QStandardItem *item = bookmarkManager->treeBookmarkModel()
+ ->itemFromIndex(src)) {
item->setEditable(true);
treeView->edit(index);
item->setEditable(false);
}
- } else if (ke->key() == Qt::Key_Delete) {
- bookmarkManager->removeBookmarkItem(treeView, src);
}
- }
+ } break;
+
+ case Qt::Key_Enter: {
+ case Qt::Key_Return:
+ if (tree) {
+ const QString &data = treeView->selectionModel()->currentIndex()
+ .data(Qt::UserRole + 10).toString();
+ if (!data.isEmpty() && data != QLatin1String("Folder"))
+ emit requestShowLink(data);
+ }
+ } break;
- switch (ke->key()) {
- default: break;
- case Qt::Key_Up: {
- case Qt::Key_Down:
+ case Qt::Key_Delete: {
+ const QModelIndex &index = treeView->currentIndex();
+ const QModelIndex &src = filterBookmarkModel->mapToSource(index);
+ if (tree && searchField->text().isEmpty())
+ bookmarkManager->removeBookmarkItem(treeView, src);
+ } break;
+
+ case Qt::Key_Up: {
+ case Qt::Key_Down:
+ if (!tree)
treeView->subclassKeyPressEvent(ke);
- } break;
-
- case Qt::Key_Enter: {
- case Qt::Key_Return:
- index = treeView->selectionModel()->currentIndex();
- if (index.isValid()) {
- QString data = index.data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- emit requestShowLink(data);
- }
- } break;
+ } break;
- case Qt::Key_Escape: {
- emit escapePressed();
- } break;
- }
- } else if (e->type() == QEvent::MouseButtonRelease) {
- if (index.isValid()) {
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
- bool controlPressed = me->modifiers() & Qt::ControlModifier;
- if(((me->button() == Qt::LeftButton) && controlPressed)
- || (me->button() == Qt::MidButton)) {
- QString data = index.data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- CentralWidget::instance()->setSourceInNewTab(data);
- }
- }
+ case Qt::Key_Escape: {
+ emit escapePressed();
+ } break;
+
+ default: break;
}
}
+
+ if (e->type() == QEvent::MouseButtonRelease) {
+ QMouseEvent *me = static_cast<QMouseEvent*>(e);
+ bool controlPressed = me->modifiers() & Qt::ControlModifier;
+ if(((me->button() == Qt::LeftButton) && controlPressed)
+ || (me->button() == Qt::MidButton)) {
+ const QModelIndex &index = treeView->currentIndex();
+ const QString &data = index.data(Qt::UserRole + 10).toString();
+ if (!data.isEmpty() && data != QLatin1String("Folder"))
+ CentralWidget::instance()->setSourceInNewTab(data);
+ }
+ }
+
return QWidget::eventFilter(object, e);
}
diff --git a/tools/designer/src/components/formeditor/itemview_propertysheet.cpp b/tools/designer/src/components/formeditor/itemview_propertysheet.cpp
index 38f73e7..96d159a 100644
--- a/tools/designer/src/components/formeditor/itemview_propertysheet.cpp
+++ b/tools/designer/src/components/formeditor/itemview_propertysheet.cpp
@@ -45,6 +45,7 @@
#include <QtGui/QAbstractItemView>
#include <QtGui/QHeaderView>
+#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
@@ -54,41 +55,27 @@ struct Property {
Property() : m_sheet(0),m_id(-1) {}
Property(QDesignerPropertySheetExtension *sheet, int id)
: m_sheet(sheet), m_id(id) {}
- bool operator==(const Property &p) { return m_sheet == p.m_sheet && m_id == p.m_id; }
- uint qHash() {
- return ((int)(m_sheet-(QDesignerPropertySheetExtension*)(0))) & m_id;
- }
QDesignerPropertySheetExtension *m_sheet;
int m_id;
};
-class ItemViewPropertySheetPrivate {
+typedef QMap<int, Property> FakePropertyMap;
-public:
- ItemViewPropertySheetPrivate(QHeaderView *horizontalHeader,
- QHeaderView *verticalHeader,
- QObject *parent);
+struct ItemViewPropertySheetPrivate {
+ ItemViewPropertySheetPrivate(QDesignerFormEditorInterface *core,
+ QHeaderView *horizontalHeader,
+ QHeaderView *verticalHeader);
- inline void createMapping(int fakeId, QHeaderView *header, const QString &headerName);
inline QStringList realPropertyNames();
inline QString fakePropertyName(const QString &prefix, const QString &realName);
- QDesignerFormEditorInterface *m_core;
-
- // Maps index of fake property
- // to index of real property in respective sheet
- QHash<int, Property> m_propertyIdMap;
+ // Maps index of fake property to index of real property in respective sheet
+ FakePropertyMap m_propertyIdMap;
- // Maps name of fake property
- // to name of real property
+ // Maps name of fake property to name of real property
QHash<QString, QString> m_propertyNameMap;
-private:
- static QDesignerFormEditorInterface *formEditorForObject(QObject *o);
-
- QHeaderView *m_hHeader;
- QHeaderView *m_vHeader;
QHash<QHeaderView *, QDesignerPropertySheetExtension *> m_propertySheet;
QStringList m_realPropertyNames;
};
@@ -111,43 +98,18 @@ using namespace qdesigner_internal;
/***************** ItemViewPropertySheetPrivate *********************/
-ItemViewPropertySheetPrivate::ItemViewPropertySheetPrivate(QHeaderView *horizontalHeader,
- QHeaderView *verticalHeader,
- QObject *parent)
- : m_core(formEditorForObject(parent)),
- m_hHeader(horizontalHeader),
- m_vHeader(verticalHeader)
+ItemViewPropertySheetPrivate::ItemViewPropertySheetPrivate(QDesignerFormEditorInterface *core,
+ QHeaderView *horizontalHeader,
+ QHeaderView *verticalHeader)
{
if (horizontalHeader)
m_propertySheet.insert(horizontalHeader,
qt_extension<QDesignerPropertySheetExtension*>
- (m_core->extensionManager(), horizontalHeader));
+ (core->extensionManager(), horizontalHeader));
if (verticalHeader)
m_propertySheet.insert(verticalHeader,
qt_extension<QDesignerPropertySheetExtension*>
- (m_core->extensionManager(), verticalHeader));
-}
-
-// Find the form editor in the hierarchy.
-// We know that the parent of the sheet is the extension manager
-// whose parent is the core.
-QDesignerFormEditorInterface *ItemViewPropertySheetPrivate::formEditorForObject(QObject *o)
-{
- do {
- if (QDesignerFormEditorInterface* core = qobject_cast<QDesignerFormEditorInterface*>(o))
- return core;
- o = o->parent();
- } while(o);
- Q_ASSERT(o);
- return 0;
-}
-
-void ItemViewPropertySheetPrivate::createMapping(int fakeId, QHeaderView *header,
- const QString &headerName)
-{
- const int realPropertyId = m_propertySheet.value(header)->indexOf(headerName);
- QDesignerPropertySheetExtension *propertySheet = m_propertySheet.value(header);
- m_propertyIdMap.insert(fakeId, Property(propertySheet, realPropertyId));
+ (core->extensionManager(), verticalHeader));
}
QStringList ItemViewPropertySheetPrivate::realPropertyNames()
@@ -194,46 +156,19 @@ QString ItemViewPropertySheetPrivate::fakePropertyName(const QString &prefix,
ItemViewPropertySheet::ItemViewPropertySheet(QTreeView *treeViewObject, QObject *parent)
: QDesignerPropertySheet(treeViewObject, parent),
- d(new ItemViewPropertySheetPrivate(treeViewObject->header(), 0, parent))
+ d(new ItemViewPropertySheetPrivate(core(), treeViewObject->header(), 0))
{
- QHeaderView *hHeader = treeViewObject->header();
-
- foreach (const QString &realPropertyName, d->realPropertyNames()) {
- const QString fakePropertyName
- = d->fakePropertyName(QLatin1String("header"), realPropertyName);
- d->createMapping(createFakeProperty(fakePropertyName, 0), hHeader, realPropertyName);
- }
-
- foreach (int id, d->m_propertyIdMap.keys()) {
- setAttribute(id, true);
- setPropertyGroup(id, QLatin1String(headerGroup));
- }
+ initHeaderProperties(treeViewObject->header(), QLatin1String("header"));
}
-
ItemViewPropertySheet::ItemViewPropertySheet(QTableView *tableViewObject, QObject *parent)
: QDesignerPropertySheet(tableViewObject, parent),
- d(new ItemViewPropertySheetPrivate(tableViewObject->horizontalHeader(),
- tableViewObject->verticalHeader(), parent))
+ d(new ItemViewPropertySheetPrivate(core(),
+ tableViewObject->horizontalHeader(),
+ tableViewObject->verticalHeader()))
{
- QHeaderView *hHeader = tableViewObject->horizontalHeader();
- QHeaderView *vHeader = tableViewObject->verticalHeader();
-
- foreach (const QString &realPropertyName, d->realPropertyNames()) {
- const QString fakePropertyName
- = d->fakePropertyName(QLatin1String("horizontalHeader"), realPropertyName);
- d->createMapping(createFakeProperty(fakePropertyName, 0), hHeader, realPropertyName);
- }
- foreach (const QString &realPropertyName, d->realPropertyNames()) {
- const QString fakePropertyName
- = d->fakePropertyName(QLatin1String("verticalHeader"), realPropertyName);
- d->createMapping(createFakeProperty(fakePropertyName, 0), vHeader, realPropertyName);
- }
-
- foreach (int id, d->m_propertyIdMap.keys()) {
- setAttribute(id, true);
- setPropertyGroup(id, QLatin1String(headerGroup));
- }
+ initHeaderProperties(tableViewObject->horizontalHeader(), QLatin1String("horizontalHeader"));
+ initHeaderProperties(tableViewObject->verticalHeader(), QLatin1String("verticalHeader"));
}
ItemViewPropertySheet::~ItemViewPropertySheet()
@@ -241,6 +176,24 @@ ItemViewPropertySheet::~ItemViewPropertySheet()
delete d;
}
+void ItemViewPropertySheet::initHeaderProperties(QHeaderView *hv, const QString &prefix)
+{
+ QDesignerPropertySheetExtension *headerSheet = d->m_propertySheet.value(hv);
+ Q_ASSERT(headerSheet);
+ const QString headerGroupS = QLatin1String(headerGroup);
+ foreach (const QString &realPropertyName, d->realPropertyNames()) {
+ const int headerIndex = headerSheet->indexOf(realPropertyName);
+ Q_ASSERT(headerIndex != -1);
+ const QVariant defaultValue = realPropertyName == QLatin1String(visibleProperty) ?
+ QVariant(true) : headerSheet->property(headerIndex);
+ const QString fakePropertyName = d->fakePropertyName(prefix, realPropertyName);
+ const int fakeIndex = createFakeProperty(fakePropertyName, defaultValue);
+ d->m_propertyIdMap.insert(fakeIndex, Property(headerSheet, headerIndex));
+ setAttribute(fakeIndex, true);
+ setPropertyGroup(fakeIndex, headerGroupS);
+ }
+}
+
/*!
Returns the mapping of fake property names to real property names
*/
@@ -251,19 +204,17 @@ QHash<QString,QString> ItemViewPropertySheet::propertyNameMap() const
QVariant ItemViewPropertySheet::property(int index) const
{
- if (d->m_propertyIdMap.contains(index)) {
- Property realProperty = d->m_propertyIdMap.value(index);
- return realProperty.m_sheet->property(realProperty.m_id);
- } else {
- return QDesignerPropertySheet::property(index);
- }
+ const FakePropertyMap::const_iterator it = d->m_propertyIdMap.constFind(index);
+ if (it != d->m_propertyIdMap.constEnd())
+ return it.value().m_sheet->property(it.value().m_id);
+ return QDesignerPropertySheet::property(index);
}
void ItemViewPropertySheet::setProperty(int index, const QVariant &value)
{
- if (d->m_propertyIdMap.contains(index)) {
- Property realProperty = d->m_propertyIdMap.value(index);
- realProperty.m_sheet->setProperty(realProperty.m_id, value);
+ const FakePropertyMap::iterator it = d->m_propertyIdMap.find(index);
+ if (it != d->m_propertyIdMap.end()) {
+ it.value().m_sheet->setProperty(it.value().m_id, value);
} else {
QDesignerPropertySheet::setProperty(index, value);
}
@@ -271,18 +222,46 @@ void ItemViewPropertySheet::setProperty(int index, const QVariant &value)
void ItemViewPropertySheet::setChanged(int index, bool changed)
{
- if (d->m_propertyIdMap.contains(index)) {
- Property realProperty = d->m_propertyIdMap.value(index);
- realProperty.m_sheet->setChanged(realProperty.m_id, changed);
+ const FakePropertyMap::iterator it = d->m_propertyIdMap.find(index);
+ if (it != d->m_propertyIdMap.end()) {
+ it.value().m_sheet->setChanged(it.value().m_id, changed);
+ } else {
+ QDesignerPropertySheet::setChanged(index, changed);
}
- QDesignerPropertySheet::setChanged(index, changed);
+}
+
+bool ItemViewPropertySheet::isChanged(int index) const
+{
+ const FakePropertyMap::const_iterator it = d->m_propertyIdMap.constFind(index);
+ if (it != d->m_propertyIdMap.constEnd())
+ return it.value().m_sheet->isChanged(it.value().m_id);
+ return QDesignerPropertySheet::isChanged(index);
+}
+
+bool ItemViewPropertySheet::hasReset(int index) const
+{
+ const FakePropertyMap::const_iterator it = d->m_propertyIdMap.constFind(index);
+ if (it != d->m_propertyIdMap.constEnd())
+ return it.value().m_sheet->hasReset(it.value().m_id);
+ return QDesignerPropertySheet::hasReset(index);
}
bool ItemViewPropertySheet::reset(int index)
{
- if (d->m_propertyIdMap.contains(index)) {
- Property realProperty = d->m_propertyIdMap.value(index);
- return realProperty.m_sheet->reset(realProperty.m_id);
+ const FakePropertyMap::iterator it = d->m_propertyIdMap.find(index);
+ if (it != d->m_propertyIdMap.end()) {
+ QDesignerPropertySheetExtension *headerSheet = it.value().m_sheet;
+ const int headerIndex = it.value().m_id;
+ const bool resetRC = headerSheet->reset(headerIndex);
+ // Resetting for "visible" might fail and the stored default
+ // of the Widget database is "false" due to the widget not being
+ // visible at the time it was determined. Reset to "true" manually.
+ if (!resetRC && headerSheet->propertyName(headerIndex) == QLatin1String(visibleProperty)) {
+ headerSheet->setProperty(headerIndex, QVariant(true));
+ headerSheet->setChanged(headerIndex, false);
+ return true;
+ }
+ return resetRC;
} else {
return QDesignerPropertySheet::reset(index);
}
diff --git a/tools/designer/src/components/formeditor/itemview_propertysheet.h b/tools/designer/src/components/formeditor/itemview_propertysheet.h
index a926339..dbcd63d 100644
--- a/tools/designer/src/components/formeditor/itemview_propertysheet.h
+++ b/tools/designer/src/components/formeditor/itemview_propertysheet.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
namespace qdesigner_internal {
-class ItemViewPropertySheetPrivate;
+struct ItemViewPropertySheetPrivate;
class ItemViewPropertySheet: public QDesignerPropertySheet
{
@@ -69,11 +69,15 @@ public:
QVariant property(int index) const;
void setProperty(int index, const QVariant &value);
- void setChanged(int index, bool changed);
+ virtual void setChanged(int index, bool changed);
+ virtual bool isChanged(int index) const;
- bool reset(int index);
+ virtual bool hasReset(int index) const;
+ virtual bool reset(int index);
private:
+ void initHeaderProperties(QHeaderView *hv, const QString &prefix);
+
ItemViewPropertySheetPrivate *d;
};
diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp
index 1655d07..83e64e6 100644
--- a/tools/designer/src/lib/shared/actionrepository.cpp
+++ b/tools/designer/src/lib/shared/actionrepository.cpp
@@ -226,7 +226,7 @@ void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action,
item->setText(action->text());
item->setToolTip(action->text());
// shortcut
- const QString shortcut = actionShortCut(core, action).value().toString();
+ const QString shortcut = actionShortCut(core, action).value().toString(QKeySequence::NativeText);
item = sl[ShortCutColumn];
item->setText(shortcut);
item->setToolTip(shortcut);
diff --git a/translations/assistant_pl.ts b/translations/assistant_pl.ts
index 069b5a0..0ef3251 100644
--- a/translations/assistant_pl.ts
+++ b/translations/assistant_pl.ts
@@ -78,7 +78,7 @@
<context>
<name>BookmarkManager</name>
<message>
- <location line="+434"/>
+ <location line="+435"/>
<source>Bookmarks</source>
<translation>Zakładki</translation>
</message>
@@ -102,7 +102,7 @@
<context>
<name>BookmarkWidget</name>
<message>
- <location line="-416"/>
+ <location line="-417"/>
<source>Filter:</source>
<translation>Filtr:</translation>
</message>
@@ -150,7 +150,7 @@
<context>
<name>CentralWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+238"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+239"/>
<source>Add new page</source>
<translation>Dodaj nową stronę</translation>
</message>
@@ -165,7 +165,7 @@
<translation>Wydrukuj dokument</translation>
</message>
<message>
- <location line="+148"/>
+ <location line="+130"/>
<location line="+2"/>
<source>unknown</source>
<translation>nieznany</translation>
@@ -191,7 +191,7 @@
<translation>Dodaj zakładkę dla tej strony...</translation>
</message>
<message>
- <location line="+255"/>
+ <location line="+235"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
@@ -225,7 +225,7 @@
<context>
<name>FindWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-955"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-918"/>
<source>Previous</source>
<translation>Poprzedni</translation>
</message>
@@ -281,7 +281,7 @@
<context>
<name>HelpViewer</name>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+492"/>
+ <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+489"/>
<source>Help</source>
<translation>Pomoc</translation>
</message>
@@ -326,7 +326,7 @@
<translation>Wy&amp;szukaj:</translation>
</message>
<message>
- <location line="+68"/>
+ <location line="+72"/>
<source>Open Link</source>
<translation>Otwórz odsyłacz</translation>
</message>
@@ -440,19 +440,19 @@
<name>MainWindow</name>
<message>
<location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+110"/>
- <location line="+391"/>
+ <location line="+383"/>
<source>Index</source>
<translation>Indeks</translation>
</message>
<message>
- <location line="-385"/>
- <location line="+383"/>
+ <location line="-377"/>
+ <location line="+375"/>
<source>Contents</source>
<translation>Spis treści</translation>
</message>
<message>
- <location line="-378"/>
- <location line="+382"/>
+ <location line="-370"/>
+ <location line="+374"/>
<source>Bookmarks</source>
<translation>Zakładki</translation>
</message>
@@ -462,14 +462,14 @@
<translation>Wyszukaj</translation>
</message>
<message>
- <location line="-372"/>
- <location line="+215"/>
- <location line="+512"/>
+ <location line="-364"/>
+ <location line="+207"/>
+ <location line="+514"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="-544"/>
+ <location line="-546"/>
<location line="+5"/>
<source>Unfiltered</source>
<translation>Nieprzefiltrowany</translation>
@@ -515,7 +515,12 @@
<translation>Znajdź w &amp;tekście...</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+2"/>
+ <source>&amp;Find</source>
+ <translation>&amp;Znajdź</translation>
+ </message>
+ <message>
+ <location line="+4"/>
<source>Find &amp;Next</source>
<translation>Znajdź &amp;następny</translation>
</message>
@@ -585,7 +590,12 @@
<translation>Znajdź bieżącą stronę w spisie treści</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+2"/>
+ <source>Sync</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
<source>Next Page</source>
<translation>Następna strona</translation>
</message>
@@ -635,7 +645,7 @@
<translation>Przefiltrowane przez:</translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+25"/>
<source>Address Toolbar</source>
<translation>Pasek adresu</translation>
</message>
@@ -660,7 +670,7 @@
<translation>Uaktualnianie indeksu wyszukiwawczego</translation>
</message>
<message>
- <location line="-638"/>
+ <location line="-640"/>
<source>Looking for Qt Documentation...</source>
<translation>Szukanie dokumentacji Qt...</translation>
</message>
@@ -962,7 +972,7 @@
<translation>Qt Assistant</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/main.cpp" line="+217"/>
+ <location filename="../tools/assistant/tools/assistant/main.cpp" line="+228"/>
<source>Could not register documentation file
%1
@@ -1024,7 +1034,7 @@ Powód:
<context>
<name>SearchWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+195"/>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+196"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
diff --git a/translations/designer_pl.ts b/translations/designer_pl.ts
index f9c6dd0..acd1827 100644
--- a/translations/designer_pl.ts
+++ b/translations/designer_pl.ts
@@ -517,12 +517,12 @@
</message>
<message>
<location line="+89"/>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="+907"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="+915"/>
<source>Move action</source>
<translation>Przenieś akcję</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="-424"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="-432"/>
<source>Change Title</source>
<translation>Zmień tytuł</translation>
</message>
@@ -703,7 +703,7 @@
<context>
<name>ConnectionDelegate</name>
<message>
- <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="+643"/>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="+644"/>
<source>&lt;object&gt;</source>
<translation>&lt;obiekt&gt;</translation>
</message>
@@ -1028,7 +1028,7 @@
<context>
<name>FormBuilder</name>
<message>
- <location filename="../tools/designer/src/lib/uilib/formbuilderextra.cpp" line="+359"/>
+ <location filename="../tools/designer/src/lib/uilib/formbuilderextra.cpp" line="+375"/>
<source>Invalid stretch value for &apos;%1&apos;: &apos;%2&apos;</source>
<extracomment>Parsing layout stretch values</extracomment>
<translation>Niepoprawna wartość rozciągniecia dla &apos;%1&apos;: &apos;%2&apos;</translation>
@@ -1050,7 +1050,7 @@
<message>
<location line="+4"/>
<source>Preview Zoom</source>
- <translation>Powiększenie podglądu</translation>
+ <translation>Powiększanie podglądu</translation>
</message>
<message>
<location line="+2"/>
@@ -1259,7 +1259,7 @@
<message>
<location line="-34"/>
<source>Show this Dialog on Startup</source>
- <translation>Pokaż to okno przy uruchamianiu</translation>
+ <translation>Pokazuj to okno przy uruchamianiu</translation>
</message>
<message>
<location line="+2"/>
@@ -1413,7 +1413,7 @@
<translation>Niepoprawny plik UI: brak głównego elementu &lt;ui&gt;.</translation>
</message>
<message>
- <location line="+119"/>
+ <location line="+104"/>
<source>The creation of a widget of the class &apos;%1&apos; failed.</source>
<translation>Utworzenie widżetu klasy &apos;%1&apos; nie powiodło się.</translation>
</message>
@@ -1594,7 +1594,7 @@ Skrypt: %3</translation>
<message>
<location line="-10"/>
<source>Edit Widgets</source>
- <translation>Edytuj widżety</translation>
+ <translation>Modyfikuj widżety</translation>
</message>
<message>
<location line="+195"/>
@@ -1803,7 +1803,7 @@ Czy chcesz zaktualizować położenie pliku lub wygenerować nowy formularz?</tr
<message>
<location line="+1"/>
<source>&amp;Print...</source>
- <translation>Wy&amp;drukuj...</translation>
+ <translation>&amp;Drukuj...</translation>
</message>
<message>
<location line="+3"/>
@@ -2277,7 +2277,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QFormBuilder</name>
<message>
- <location filename="../tools/designer/src/lib/uilib/formbuilder.cpp" line="+163"/>
+ <location filename="../tools/designer/src/lib/uilib/formbuilder.cpp" line="+168"/>
<source>An empty class name was passed on to %1 (object name: &apos;%2&apos;).</source>
<extracomment>Empty class name passed to widget factory method</extracomment>
<translation>Pusta nazwa klasy została przekazana do %1 (nazwa obiektu: &apos;%2&apos;).</translation>
@@ -2669,7 +2669,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<message>
<location filename="../tools/shared/qtgradienteditor/qtgradientdialog.ui"/>
<source>Edit Gradient</source>
- <translation>Edytuj gradient</translation>
+ <translation>Modyfikuj gradient</translation>
</message>
</context>
<context>
@@ -3042,7 +3042,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<location/>
<location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+1"/>
<source>Edit...</source>
- <translation>Edytuj...</translation>
+ <translation>Modyfikuj...</translation>
</message>
<message>
<location/>
@@ -3499,7 +3499,7 @@ jako:
<message>
<location line="+20"/>
<source>Edit Resources...</source>
- <translation>Edytuj zasoby...</translation>
+ <translation>Modyfikuj zasoby...</translation>
</message>
<message>
<location line="+6"/>
@@ -3961,12 +3961,12 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location line="+98"/>
<source>Edit action</source>
- <translation>Edytuj akcję</translation>
+ <translation>Modyfikuj akcję</translation>
</message>
<message>
<location line="-417"/>
<source>Edit...</source>
- <translation>Edytuj...</translation>
+ <translation>Modyfikuj...</translation>
</message>
<message>
<location line="+1"/>
@@ -4126,7 +4126,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location filename="../tools/designer/src/components/buddyeditor/buddyeditor_plugin.cpp" line="+73"/>
<source>Edit Buddies</source>
- <translation>Edytuj skojarzone etykiety</translation>
+ <translation>Modyfikuj skojarzone etykiety</translation>
</message>
</context>
<context>
@@ -4134,7 +4134,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location filename="../tools/designer/src/components/buddyeditor/buddyeditor_tool.cpp" line="+56"/>
<source>Edit Buddies</source>
- <translation>Edytuj skojarzone etykiety</translation>
+ <translation>Modyfikuj skojarzone etykiety</translation>
</message>
</context>
<context>
@@ -4254,7 +4254,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/combobox_taskmenu.cpp" line="+68"/>
<source>Edit Items...</source>
- <translation>Edytuj elementy...</translation>
+ <translation>Modyfikuj elementy...</translation>
</message>
<message>
<location line="+38"/>
@@ -4653,7 +4653,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location line="+6"/>
<source>Edit the selected profile</source>
- <translation>Edytuj zaznaczony profil</translation>
+ <translation>Modyfikuj zaznaczony profil</translation>
</message>
<message>
<location line="+4"/>
@@ -4673,7 +4673,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location line="+35"/>
<source>Edit Profile</source>
- <translation>Edytuj profil</translation>
+ <translation>Modyfikuj profil</translation>
</message>
<message>
<location line="+26"/>
@@ -4709,7 +4709,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location line="+1"/>
<source>The file &quot;%1&quot; has changed outside Designer. Do you want to reload it?</source>
- <translation type="unfinished">Plik &quot;%1&quot; zmienił się na zewnątrz Designera. Czy chcesz go ponownie załadować?</translation>
+ <translation>Plik &quot;%1&quot; zmienił się na zewnątrz Designera. Czy chcesz go ponownie załadować?</translation>
</message>
</context>
<context>
@@ -4725,7 +4725,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1267"/>
<source>Edit contents</source>
- <translation>Edytuj zawartość</translation>
+ <translation>Modyfikuj zawartość</translation>
</message>
<message>
<location line="+1"/>
@@ -4834,7 +4834,7 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>qdesigner_internal::FormWindowManager</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/formwindowmanager.cpp" line="+364"/>
+ <location filename="../tools/designer/src/components/formeditor/formwindowmanager.cpp" line="+365"/>
<source>Cu&amp;t</source>
<translation>Wy&amp;tnij</translation>
</message>
@@ -5290,12 +5290,12 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location line="+32"/>
<source>Edit List Widget</source>
- <translation>Edytuj listę</translation>
+ <translation>Modyfikuj listę</translation>
</message>
<message>
<location line="+19"/>
<source>Edit Combobox</source>
- <translation>Edytuj combobox</translation>
+ <translation>Modyfikuj combobox</translation>
</message>
</context>
<context>
@@ -5303,7 +5303,7 @@ Czy chcesz nadpisać szablon?</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/listwidget_taskmenu.cpp" line="+67"/>
<source>Edit Items...</source>
- <translation>Edytuj elementy...</translation>
+ <translation>Modyfikuj elementy...</translation>
</message>
<message>
<location line="+38"/>
@@ -5560,18 +5560,15 @@ Wybierz inną nazwę.</translation>
<context>
<name>qdesigner_internal::ObjectInspector</name>
<message>
- <location filename="../tools/designer/src/components/objectinspector/objectinspector.cpp" line="+754"/>
- <source>&amp;Find in Text...</source>
- <translation>Z&amp;najdź w tekście...</translation>
- </message>
-</context>
-<context>
- <name>qdesigner_internal::ObjectInspector::ObjectInspectorPrivate</name>
- <message>
- <location line="-438"/>
+ <location filename="../tools/designer/src/components/objectinspector/objectinspector.cpp" line="+316"/>
<source>Change Current Page</source>
<translation>Zmień bieżącą stronę</translation>
</message>
+ <message>
+ <location line="+438"/>
+ <source>&amp;Find in Text...</source>
+ <translation>Z&amp;najdź w tekście...</translation>
+ </message>
</context>
<context>
<name>qdesigner_internal::OrderDialog</name>
@@ -5611,7 +5608,7 @@ Wybierz inną nazwę.</translation>
<message>
<location filename="../tools/designer/src/components/propertyeditor/paletteeditor.ui"/>
<source>Edit Palette</source>
- <translation>Edytuj paletę</translation>
+ <translation>Modyfikuj paletę</translation>
</message>
<message>
<location/>
@@ -5719,7 +5716,7 @@ Wybierz inną nazwę.</translation>
<message>
<location filename="../tools/designer/src/lib/shared/plaintexteditor.cpp" line="+65"/>
<source>Edit text</source>
- <translation>Edytuj tekst</translation>
+ <translation>Modyfikuj tekst</translation>
</message>
</context>
<context>
@@ -5785,9 +5782,6 @@ Wybierz inną nazwę.</translation>
<source>Browse...</source>
<translation>Przeglądaj...</translation>
</message>
-</context>
-<context>
- <name>qdesigner_internal::PreviewConfigurationWidget::PreviewConfigurationWidgetPrivate</name>
<message>
<location line="+118"/>
<source>Load Custom Device Skin</source>
@@ -6202,12 +6196,12 @@ Klasa: %2</translation>
<message>
<location line="+235"/>
<source>Edit ToolTip</source>
- <translation>Edytuj podpowiedź</translation>
+ <translation>Modyfikuj podpowiedź</translation>
</message>
<message>
<location line="+5"/>
<source>Edit WhatsThis</source>
- <translation>Edytuj &quot;Co to jest&quot;</translation>
+ <translation>Modyfikuj &quot;Co to jest&quot;</translation>
</message>
</context>
<context>
@@ -6332,7 +6326,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/lib/shared/richtexteditor.cpp" line="+436"/>
<source>Edit text</source>
- <translation>Edytuj tekst</translation>
+ <translation>Modyfikuj tekst</translation>
</message>
<message>
<location line="+32"/>
@@ -6433,7 +6427,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/lib/shared/scriptdialog.cpp" line="+66"/>
<source>Edit script</source>
- <translation>Edytuj skrypt</translation>
+ <translation>Modyfikuj skrypt</translation>
</message>
<message>
<location line="+56"/>
@@ -6483,7 +6477,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp" line="+72"/>
<source>Edit Signals/Slots</source>
- <translation>Edytuj sygnały/sloty</translation>
+ <translation>Modyfikuj sygnały/sloty</translation>
</message>
<message>
<location line="+2"/>
@@ -6496,7 +6490,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp" line="+58"/>
<source>Edit Signals/Slots</source>
- <translation>Edytuj sygnały/sloty</translation>
+ <translation>Modyfikuj sygnały/sloty</translation>
</message>
</context>
<context>
@@ -6520,7 +6514,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/lib/shared/stylesheeteditor.cpp" line="+97"/>
<source>Edit Style Sheet</source>
- <translation>Edytuj arkusz stylu</translation>
+ <translation>Modyfikuj arkusz stylu</translation>
</message>
<message>
<location line="-7"/>
@@ -6587,7 +6581,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/tabordereditor/tabordereditor_plugin.cpp" line="+73"/>
<source>Edit Tab Order</source>
- <translation>Edytuj kolejność tabulacji</translation>
+ <translation>Modyfikuj kolejność tabulacji</translation>
</message>
</context>
<context>
@@ -6595,7 +6589,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/tabordereditor/tabordereditor_tool.cpp" line="+57"/>
<source>Edit Tab Order</source>
- <translation>Edytuj kolejność tabulacji</translation>
+ <translation>Modyfikuj kolejność tabulacji</translation>
</message>
</context>
<context>
@@ -6603,7 +6597,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/tablewidgeteditor.ui"/>
<source>Edit Table Widget</source>
- <translation>Edytuj tablę</translation>
+ <translation>Modyfikuj tablę</translation>
</message>
<message>
<location/>
@@ -6652,7 +6646,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/tablewidget_taskmenu.cpp" line="+64"/>
<source>Edit Items...</source>
- <translation>Edytuj elementy...</translation>
+ <translation>Modyfikuj elementy...</translation>
</message>
</context>
<context>
@@ -6688,12 +6682,12 @@ Klasa: %2</translation>
<message>
<location line="-1"/>
<source>Edit HTML</source>
- <translation>Edytuj HTML</translation>
+ <translation>Modyfikuj HTML</translation>
</message>
<message>
<location line="+10"/>
<source>Edit Text</source>
- <translation>Edytuj tekst</translation>
+ <translation>Modyfikuj tekst</translation>
</message>
<message>
<location line="+1"/>
@@ -6757,7 +6751,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.ui"/>
<source>Edit Tree Widget</source>
- <translation>Edytuj drzewo</translation>
+ <translation>Modyfikuj drzewo</translation>
</message>
<message>
<location/>
@@ -6883,7 +6877,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/taskmenu/treewidget_taskmenu.cpp" line="+63"/>
<source>Edit Items...</source>
- <translation>Edytuj elementy...</translation>
+ <translation>Modyfikujj elementy...</translation>
</message>
</context>
<context>
@@ -6934,7 +6928,7 @@ Klasa: %2</translation>
<message>
<location line="+2"/>
<source>Edit name</source>
- <translation>Edytuj nazwę</translation>
+ <translation>Modyfikuj nazwę</translation>
</message>
</context>
<context>
@@ -6950,7 +6944,7 @@ Klasa: %2</translation>
<message>
<location filename="../tools/designer/src/components/formeditor/tool_widgeteditor.cpp" line="+67"/>
<source>Edit Widgets</source>
- <translation>Edytuj widżety</translation>
+ <translation>Modyfikuj widżety</translation>
</message>
</context>
<context>
diff --git a/translations/linguist_pl.ts b/translations/linguist_pl.ts
index cdff54b..963c39b 100644
--- a/translations/linguist_pl.ts
+++ b/translations/linguist_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1357"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1364"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
@@ -110,11 +110,17 @@
</message>
<message>
<location line="+4"/>
+ <location line="+8"/>
<source>&lt;p&gt;[more duplicates omitted]</source>
<translation>&lt;p&gt;[pominięto resztę powtórzeń]</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="-5"/>
+ <source>&lt;p&gt;* ID: %1</source>
+ <translation>&lt;p&gt;* identyfikator: %1</translation>
+ </message>
+ <message>
+ <location line="+8"/>
<source>&lt;p&gt;* Context: %1&lt;br&gt;* Source: %2</source>
<translation>&lt;p&gt;* Kontekst: %1&lt;br&gt;* Źródło: %2</translation>
</message>
@@ -124,7 +130,7 @@
<translation>&lt;br&gt;* Komentarz: %3</translation>
</message>
<message>
- <location line="+70"/>
+ <location line="+71"/>
<source>Linguist does not know the plural rules for &apos;%1&apos;.
Will assume a single universal form.</source>
<translation>Linguist nie zna reguł liczby mnogiej dla &quot;%1&quot;.
@@ -312,7 +318,7 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<context>
<name>LRelease</name>
<message numerus="yes">
- <location filename="../tools/linguist/shared/qm.cpp" line="+748"/>
+ <location filename="../tools/linguist/shared/qm.cpp" line="+763"/>
<source>Dropped %n message(s) which had no ID.</source>
<translation>
<numerusform>Opuszczono %n wyrażenie które nie miało identyfikatora.</numerusform>
@@ -714,7 +720,7 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<translation>Zamienia tłumaczenia we wszystkich pasujących do wzorca wpisach.</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2004"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2011"/>
<source></source>
<comment>This is the application&apos;s main window.</comment>
<translation></translation>
@@ -732,27 +738,27 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</message>
<message>
<location line="-2"/>
- <location line="+62"/>
+ <location line="+63"/>
<source>Context</source>
<translation>Kontekst</translation>
</message>
<message>
- <location line="-61"/>
+ <location line="-62"/>
<source>Items</source>
<translation>Elementy</translation>
</message>
<message>
- <location line="+78"/>
+ <location line="+79"/>
<source>This panel lists the source contexts.</source>
<translation>Ten panel pokazuje listę kontekstów.</translation>
</message>
<message>
- <location line="+15"/>
+ <location line="+13"/>
<source>Strings</source>
<translation>Tłumaczenia</translation>
</message>
<message>
- <location line="+39"/>
+ <location line="+37"/>
<source>Phrases and guesses</source>
<translation>Wyrażenia i podpowiedzi</translation>
</message>
@@ -773,7 +779,7 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<translation> MOD </translation>
</message>
<message>
- <location line="+130"/>
+ <location line="+139"/>
<source>Loading...</source>
<translation>Ładowanie...</translation>
</message>
@@ -811,7 +817,7 @@ Czy chcesz pominąć pierwszy plik?</translation>
</translation>
</message>
<message>
- <location line="+93"/>
+ <location line="+94"/>
<source>Related files (%1);;</source>
<translation>Związane pliki (%1);;</translation>
</message>
@@ -1176,7 +1182,7 @@ Wszystkie pliki (*)</translation>
<translation>Czy chcesz zachować książke wyrażeń &apos;%1&apos;?</translation>
</message>
<message>
- <location line="+323"/>
+ <location line="+334"/>
<source>All</source>
<translation>Wszystko</translation>
</message>
@@ -1242,7 +1248,7 @@ Wszystkie pliki (*)</translation>
</message>
<message>
<location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-470"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-481"/>
<source>Translation</source>
<translation>Tłumaczenie</translation>
</message>
@@ -1579,7 +1585,7 @@ Wszystkie pliki (*)</translation>
<translation>Tutaj można wprowadzić komentarze na własny użytek. One nie mają wpływu na przetłumaczoną aplikację.</translation>
</message>
<message>
- <location line="+232"/>
+ <location line="+234"/>
<source>%1 translation (%2)</source>
<translation>Tłumaczenie na język %1 (%2)</translation>
</message>
@@ -1609,7 +1615,7 @@ Linia: %2</translation>
<context>
<name>MessageModel</name>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+825"/>
<source>Completion status for %1</source>
<translation>Stan ukończenia dla %1</translation>
</message>
@@ -1632,7 +1638,7 @@ Linia: %2</translation>
<context>
<name>MsgEdit</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-612"/>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-614"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
@@ -1811,8 +1817,8 @@ Linia: %2</translation>
<translation>Wszystkie pliki (*)</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1118"/>
- <location line="+18"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1120"/>
+ <location line="+27"/>
<location line="+67"/>
<location line="+39"/>
<location line="+17"/>
@@ -1847,7 +1853,7 @@ Linia: %2</translation>
<translation>Pliki XLIFF</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/qph.cpp" line="+183"/>
+ <location filename="../tools/linguist/shared/qph.cpp" line="+195"/>
<source>Qt Linguist &apos;Phrase Book&apos;</source>
<translation>Qt Linguist &quot;Książka wyrażeń&quot;</translation>
</message>
@@ -1998,12 +2004,12 @@ Linia: %2</translation>
<context>
<name>TranslationSettingsDialog</name>
<message>
- <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+68"/>
+ <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+93"/>
<source>Any Country</source>
<translation>Dowolny kraj</translation>
</message>
<message>
- <location line="+11"/>
+ <location line="-22"/>
<location line="+8"/>
<source>Settings for &apos;%1&apos; - Qt Linguist</source>
<translation>Ustawienia dla &apos;%1&apos; - Qt Linguist</translation>
diff --git a/translations/qt_help_pl.ts b/translations/qt_help_pl.ts
index 220f70c..f2eb6c9 100644
--- a/translations/qt_help_pl.ts
+++ b/translations/qt_help_pl.ts
@@ -32,13 +32,9 @@
<context>
<name>QHelpCollectionHandler</name>
<message>
- <source>The collection file is not set up yet!</source>
- <translation type="obsolete">Plik z kolekcją nie jest jeszcze ustawiony!</translation>
- </message>
- <message>
<location filename="../tools/assistant/lib/qhelpcollectionhandler.cpp" line="+79"/>
<source>The collection file &apos;%1&apos; is not set up yet!</source>
- <translation type="unfinished"></translation>
+ <translation>Plik z kolekcją &quot;%1&quot; nie jest jeszcze ustawiony!</translation>
</message>
<message>
<location line="+23"/>
@@ -59,31 +55,27 @@
<message>
<location line="+16"/>
<source>The collection file &apos;%1&apos; already exists!</source>
- <translation type="unfinished"></translation>
+ <translation>Plik z kolekcją &quot;%1&quot; już istnieje!</translation>
</message>
<message>
<location line="+148"/>
<source>Unknown filter &apos;%1&apos;!</source>
- <translation type="unfinished"></translation>
+ <translation>Nieznany filtr &quot;%1&quot;!</translation>
</message>
<message>
<location line="+105"/>
<source>Invalid documentation file &apos;%1&apos;!</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawny plik z dokumentacją &quot;%1&quot;!</translation>
</message>
<message>
<location line="+167"/>
<source>Cannot register namespace &apos;%1&apos;!</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można zarejestrować przestrzeni nazw &quot;%1&quot;!</translation>
</message>
<message>
<location line="+24"/>
<source>Cannot open database &apos;%1&apos; to optimize!</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>The specified collection file already exists!</source>
- <translation type="obsolete">Podany plik z kolekcją już istnieje!</translation>
+ <translation>Nie można otworzyć bazy danych &quot;%1&quot; do zoptymalizowania!</translation>
</message>
<message>
<location line="-438"/>
@@ -96,10 +88,6 @@
<translation>Nie można skopiować pliku z kolekcją: %1</translation>
</message>
<message>
- <source>Unknown filter!</source>
- <translation type="obsolete">Nieznany filtr!</translation>
- </message>
- <message>
<location line="+174"/>
<source>Cannot register filter %1!</source>
<translation>Nie można zarejestrować pliku %1!</translation>
@@ -110,10 +98,6 @@
<translation>Nie można otworzyć pliku z dokumentacją %1!</translation>
</message>
<message>
- <source>Invalid documentation file!</source>
- <translation type="obsolete">Niepoprawny plik z dokumentacją!</translation>
- </message>
- <message>
<location line="+40"/>
<source>The namespace %1 was not registered!</source>
<translation>Przestrzeń nazw %1 nie została zarejestrowana!</translation>
@@ -123,14 +107,6 @@
<source>Namespace %1 already exists!</source>
<translation>Przestrzeń nazw %1 już istnieje!</translation>
</message>
- <message>
- <source>Cannot register namespace!</source>
- <translation type="obsolete">Nie można zarejestrować przestrzeni nazw!</translation>
- </message>
- <message>
- <source>Cannot open database to optimize!</source>
- <translation type="obsolete">Nie można otworzyć bazy danych do zoptymalizowania!</translation>
- </message>
</context>
<context>
<name>QHelpDBReader</name>
@@ -144,7 +120,7 @@
<context>
<name>QHelpEngineCore</name>
<message>
- <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+524"/>
+ <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+525"/>
<source>The specified namespace does not exist!</source>
<translation>Podana przestrzeń nazw nie istnieje!</translation>
</message>
@@ -152,7 +128,7 @@
<context>
<name>QHelpEngineCorePrivate</name>
<message>
- <location line="-402"/>
+ <location line="-403"/>
<source>Cannot open documentation file %1: %2!</source>
<translation>Nie można otworzyć pliku z dokumentacją %1: %2!</translation>
</message>
@@ -342,11 +318,6 @@
<context>
<name>QObject</name>
<message>
- <location filename="../tools/assistant/lib/qhelp_global.h" line="+83"/>
- <source>Untitled</source>
- <translation>Nienazwany</translation>
- </message>
- <message>
<location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+85"/>
<source>Unknown token.</source>
<translation>Nieznany znak.</translation>
diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts
index f79ecb0..fabec70 100644
--- a/translations/qt_pl.ts
+++ b/translations/qt_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2245"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2264"/>
<source>Close Tab</source>
<translation>Zamknij kartę</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>FakeReply</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2193"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2199"/>
<source>Fake error !</source>
<translation type="unfinished"></translation>
</message>
@@ -58,7 +58,7 @@
<context>
<name>Phonon::AudioOutput</name>
<message>
- <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+377"/>
+ <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+385"/>
<source>&lt;html&gt;The audio playback device &lt;b&gt;%1&lt;/b&gt; does not work.&lt;br/&gt;Falling back to &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</source>
<translation>&lt;html&gt;Urządzenie dźwiękowe &lt;b&gt;%1&lt;/b&gt; nie działa.&lt;br/&gt;Przywracanie do &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</translation>
</message>
@@ -76,7 +76,7 @@
<context>
<name>Phonon::Gstreamer::Backend</name>
<message>
- <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+171"/>
+ <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+182"/>
<source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
Some video features have been disabled.</source>
<translation>Ostrzeżenie: Wygląda na to, że pakiet gstreamer0.10-plugins-good nie jest zainstalowany w tym systemie.
@@ -96,7 +96,7 @@ Obsługa dźwięku i wideo została wyłączona</translation>
<location filename="../src/3rdparty/phonon/gstreamer/mediaobject.cpp" line="+90"/>
<source>Cannot start playback.
-Check your Gstreamer installation and make sure you
+Check your GStreamer installation and make sure you
have libgstreamer-plugins-base installed.</source>
<translation>Nie można rozpocząć odtwarzania.
@@ -109,10 +109,10 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<translation>Brak wymaganego kodeka. Aby odtworzyć zawartość musisz zainstalować poniższy kodek: %0</translation>
</message>
<message>
- <location line="+681"/>
+ <location line="+702"/>
<location line="+8"/>
<location line="+15"/>
- <location line="+22"/>
+ <location line="+26"/>
<location line="+6"/>
<location line="+19"/>
<location line="+339"/>
@@ -121,12 +121,12 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<translation>Nie można otworzyć źródła mediów.</translation>
</message>
<message>
- <location line="-420"/>
+ <location line="-424"/>
<source>Invalid source type.</source>
<translation>Niepoprawny typ źródła.</translation>
</message>
<message>
- <location line="+394"/>
+ <location line="+398"/>
<source>Could not locate media source.</source>
<translation>Nie można znaleźć źródła mediów.</translation>
</message>
@@ -144,7 +144,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Phonon::MMF</name>
<message>
- <location filename="../src/3rdparty/phonon/mmf/audiooutput.cpp" line="+108"/>
+ <location filename="../src/3rdparty/phonon/mmf/audiooutput.cpp" line="+98"/>
<source>Audio Output</source>
<translation>Wyjście dźwięku</translation>
</message>
@@ -166,12 +166,12 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<name>Phonon::MMF::EffectFactory</name>
<message>
<location filename="../src/3rdparty/phonon/mmf/effectfactory.cpp" line="+65"/>
- <source>audio equalizer</source>
+ <source>Audio Equalizer</source>
<translation>Korektor graficzny</translation>
</message>
<message>
<location line="+2"/>
- <source>Bass boost</source>
+ <source>Bass Boost</source>
<translation>Wzmocnienie basów</translation>
</message>
<message>
@@ -202,6 +202,14 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
</message>
</context>
<context>
+ <name>Phonon::MMF::MediaObject</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/mmf/mediaobject.cpp" line="+291"/>
+ <source>Media type could not be determined</source>
+ <translation>Nie można określić typu mediów</translation>
+ </message>
+</context>
+<context>
<name>Phonon::VolumeSlider</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+42"/>
@@ -268,7 +276,7 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<context>
<name>Q3FileDialog</name>
<message>
- <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+4495"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+4493"/>
<source>%1
File not found.
Check path and filename.</source>
@@ -285,7 +293,7 @@ Sprawdź ścieżkę i nazwę pliku.</translation>
<location line="-1924"/>
<location line="+49"/>
<location line="+2149"/>
- <location filename="../src/qt3support/dialogs/q3filedialog_mac.cpp" line="+112"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog_mac.cpp" line="+133"/>
<source>All Files (*)</source>
<translation>Wszystkie pliki (*)</translation>
</message>
@@ -905,8 +913,8 @@ na
<context>
<name>QAbstractSocket</name>
<message>
- <location filename="../src/network/socket/qabstractsocket.cpp" line="+940"/>
- <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+636"/>
+ <location filename="../src/network/socket/qabstractsocket.cpp" line="+949"/>
+ <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+646"/>
<location filename="../src/network/socket/qsocks5socketengine.cpp" line="+691"/>
<source>Connection refused</source>
<translation>Połączenie odrzucone</translation>
@@ -925,8 +933,8 @@ na
<translation>Przekroczony czas połączenia</translation>
</message>
<message>
- <location line="-548"/>
- <location line="+789"/>
+ <location line="-555"/>
+ <location line="+805"/>
<location line="+208"/>
<source>Operation on socket is not supported</source>
<translation>Operacja na gnieździe nieobsługiwana</translation>
@@ -970,7 +978,7 @@ na
<message>
<location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+250"/>
<source>Press</source>
- <translation type="unfinished">Wciśnij</translation>
+ <translation>Wciśnij</translation>
</message>
</context>
<context>
@@ -996,7 +1004,7 @@ na
<translation>Niekompatybilność biblioteki Qt</translation>
</message>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2290"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2280"/>
<source>QT_LAYOUT_DIRECTION</source>
<comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
<translation>LTR</translation>
@@ -1173,7 +1181,7 @@ na
<context>
<name>QDB2Driver</name>
<message>
- <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+1254"/>
+ <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+1253"/>
<source>Unable to connect</source>
<translation>Nie można nawiązać połączenia</translation>
</message>
@@ -1196,7 +1204,7 @@ na
<context>
<name>QDB2Result</name>
<message>
- <location line="-1031"/>
+ <location line="-1030"/>
<location line="+240"/>
<source>Unable to execute statement</source>
<translation>Nie można wykonać polecenia</translation>
@@ -1284,7 +1292,7 @@ na
<context>
<name>QDialogButtonBox</name>
<message>
- <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+653"/>
+ <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+669"/>
<source>Abort</source>
<translation>Przerwij</translation>
</message>
@@ -1511,7 +1519,7 @@ na
<message>
<location line="+23"/>
<source>Cannot remove source file</source>
- <translation>Nie można usunąć oryginalnego pilku</translation>
+ <translation>Nie można usunąć oryginalnego pliku</translation>
</message>
<message>
<location line="+130"/>
@@ -1575,7 +1583,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Czy na pewno chcesz skasować &apos;%1&apos;?</translation>
</message>
<message>
- <location line="+425"/>
+ <location line="+419"/>
<source>Recent Places</source>
<translation>Ostatnie miejsca</translation>
</message>
@@ -1586,7 +1594,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Powrót</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-410"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-404"/>
<source>Could not delete directory.</source>
<translation>Nie można skasować katalogu.</translation>
</message>
@@ -1803,9 +1811,8 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
<message>
<location line="+1"/>
- <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+1"/>
<source>%1 bytes</source>
- <translation>%1 b</translation>
+ <translation>%1 bajtów</translation>
</message>
<message>
<location line="+77"/>
@@ -1854,62 +1861,67 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<source>Computer</source>
<translation>Komputer</translation>
</message>
+ <message>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+1"/>
+ <source>%1 byte(s)</source>
+ <translation>%1 bajt(ów)</translation>
+ </message>
</context>
<context>
<name>QFontDatabase</name>
<message>
<location filename="../src/gui/text/qfontdatabase.cpp" line="+102"/>
- <location line="+1335"/>
+ <location line="+1342"/>
<source>Normal</source>
<translation>Normalny</translation>
</message>
<message>
- <location line="-1332"/>
+ <location line="-1339"/>
<location line="+12"/>
- <location line="+1308"/>
+ <location line="+1315"/>
<source>Bold</source>
<translation>Pogrubiony</translation>
</message>
<message>
- <location line="-1317"/>
- <location line="+1319"/>
+ <location line="-1324"/>
+ <location line="+1326"/>
<source>Demi Bold</source>
<translation>Na wpół pogrubiony</translation>
</message>
<message>
- <location line="-1316"/>
+ <location line="-1323"/>
<location line="+18"/>
- <location line="+1294"/>
+ <location line="+1301"/>
<source>Black</source>
<translatorcomment>it&apos;s about font weight</translatorcomment>
<translation>Bardzo gruby</translation>
</message>
<message>
- <location line="-1304"/>
+ <location line="-1311"/>
<source>Demi</source>
<translation>Na wpół</translation>
</message>
<message>
<location line="+6"/>
- <location line="+1304"/>
+ <location line="+1311"/>
<source>Light</source>
<translatorcomment>it&apos;s about font weight</translatorcomment>
<translation>Cienki</translation>
</message>
<message>
- <location line="-1158"/>
- <location line="+1161"/>
+ <location line="-1165"/>
+ <location line="+1168"/>
<source>Italic</source>
<translation>Kursywa</translation>
</message>
<message>
- <location line="-1158"/>
- <location line="+1160"/>
+ <location line="-1165"/>
+ <location line="+1167"/>
<source>Oblique</source>
<translation>Pochyły</translation>
</message>
<message>
- <location line="+703"/>
+ <location line="+704"/>
<source>Any</source>
<translation>Każdy</translation>
</message>
@@ -2073,6 +2085,11 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<source>Runic</source>
<translation>Runiczny</translation>
</message>
+ <message>
+ <location line="+3"/>
+ <source>N&apos;Ko</source>
+ <translation>N&apos;Ko</translation>
+ </message>
</context>
<context>
<name>QFontDialog</name>
@@ -2272,7 +2289,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QHostInfo</name>
<message>
- <location filename="../src/network/kernel/qhostinfo_p.h" line="+183"/>
+ <location filename="../src/network/kernel/qhostinfo_p.h" line="+185"/>
<source>Unknown error</source>
<translation>Nieznany błąd</translation>
</message>
@@ -2326,7 +2343,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Podłączony do hosta %1</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+572"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+581"/>
<location filename="../src/qt3support/network/q3http.cpp" line="+17"/>
<source>Connection closed</source>
<translation>Połączenie zakończone</translation>
@@ -2633,7 +2650,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QIODevice</name>
<message>
- <location filename="../src/corelib/global/qglobal.cpp" line="+2067"/>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2081"/>
<source>No space left on device</source>
<translation>Brak wolnego miejsca na urządzeniu</translation>
</message>
@@ -2653,7 +2670,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Zbyt wiele otwartych plików</translation>
</message>
<message>
- <location filename="../src/corelib/io/qiodevice.cpp" line="+1561"/>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1556"/>
<source>Unknown error</source>
<translation>Nieznany błąd</translation>
</message>
@@ -2717,7 +2734,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Błąd podczas weryfikacji danych we wtyczce &apos;%1&apos;</translation>
</message>
<message>
- <location line="+347"/>
+ <location line="+350"/>
<source>The plugin &apos;%1&apos; uses incompatible Qt library. (%2.%3.%4) [%5]</source>
<translation>Wtyczka &apos;%1&apos; używa niepoprawnej wersji biblioteki QT. (%2.%3.%4) [%5]</translation>
</message>
@@ -2769,37 +2786,37 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QLineEdit</name>
<message>
- <location filename="../src/gui/widgets/qlineedit.cpp" line="+1996"/>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2033"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
<message>
- <location line="-5"/>
+ <location line="-6"/>
<source>Cu&amp;t</source>
<translation>W&amp;ytnij</translation>
</message>
<message>
- <location line="+15"/>
+ <location line="+19"/>
<source>Delete</source>
<translation>Skasuj</translation>
</message>
<message>
- <location line="-5"/>
+ <location line="-7"/>
<source>&amp;Paste</source>
<translation>&amp;Wklej</translation>
</message>
<message>
- <location line="-17"/>
+ <location line="-21"/>
<source>&amp;Redo</source>
<translation>&amp;Przywróć</translation>
</message>
<message>
- <location line="+28"/>
+ <location line="+36"/>
<source>Select All</source>
<translation>Zaznacz wszystko</translation>
</message>
<message>
- <location line="-32"/>
+ <location line="-40"/>
<source>&amp;Undo</source>
<translation>&amp;Cofnij</translation>
</message>
@@ -2808,7 +2825,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<name>QLocalServer</name>
<message>
<location filename="../src/network/socket/qlocalserver.cpp" line="+224"/>
- <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+256"/>
+ <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+246"/>
<source>%1: Name error</source>
<translation>%1: Błąd nazwy</translation>
</message>
@@ -2902,7 +2919,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QMYSQLDriver</name>
<message>
- <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1423"/>
+ <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1431"/>
<source>Unable to begin transaction</source>
<translation>Nie można rozpocząć transakcji</translation>
</message>
@@ -2912,7 +2929,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nie można potwierdzić transakcji</translation>
</message>
<message>
- <location line="-168"/>
+ <location line="-167"/>
<source>Unable to connect</source>
<translation>Nie można nawiązać połączenia</translation>
</message>
@@ -2922,7 +2939,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nie można otworzyć bazy danych &apos;</translation>
</message>
<message>
- <location line="+196"/>
+ <location line="+195"/>
<source>Unable to rollback transaction</source>
<translation>Nie można wycofać transakcji</translation>
</message>
@@ -2930,7 +2947,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QMYSQLResult</name>
<message>
- <location line="-433"/>
+ <location line="-432"/>
<location line="+21"/>
<source>Unable to bind outvalues</source>
<translation>Nie można powiązać wartości zewnętrznych</translation>
@@ -2951,12 +2968,13 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nie można wykonać polecenia</translation>
</message>
<message>
- <location line="-522"/>
+ <location line="-531"/>
+ <location line="+31"/>
<source>Unable to fetch data</source>
<translation>Nie można pobrać danych</translation>
</message>
<message>
- <location line="+380"/>
+ <location line="+358"/>
<location line="+8"/>
<source>Unable to prepare statement</source>
<translation>Nie można przygotować polecenia</translation>
@@ -3332,27 +3350,30 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkAccessFileBackend</name>
<message>
+ <location filename="../src/network/access/qfilenetworkreply.cpp" line="+83"/>
<location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+100"/>
<source>Request for opening non-local file %1</source>
<translation>Żądanie otwarcia zdalnego pliku %1</translation>
</message>
<message>
- <location line="+45"/>
+ <location line="+31"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+45"/>
<source>Error opening %1: %2</source>
<translation>Błąd otwierania %1: %2</translation>
</message>
<message>
- <location line="+38"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+38"/>
<source>Write error writing to %1: %2</source>
<translation>Błąd w trakcie zapisywania do %1: %2</translation>
</message>
<message>
- <location line="+48"/>
+ <location filename="../src/network/access/qfilenetworkreply.cpp" line="-11"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+48"/>
<source>Cannot open %1: Path is a directory</source>
<translation>Nie można otworzyć %1: Ścieżka jest katalogiem</translation>
</message>
<message>
- <location line="+21"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+21"/>
<source>Read error reading from %1: %2</source>
<translation>Błąd w trakcie czytania z %1: %2</translation>
</message>
@@ -3418,7 +3439,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QOCIDriver</name>
<message>
- <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+1932"/>
+ <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+1939"/>
<source>Unable to initialize</source>
<comment>QOCIDriver</comment>
<translation>Nie można dokonać inicjalizacji</translation>
@@ -3447,8 +3468,8 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QOCIResult</name>
<message>
- <location line="-972"/>
- <location line="+161"/>
+ <location line="-979"/>
+ <location line="+168"/>
<location line="+15"/>
<source>Unable to bind column for batch execute</source>
<translation>Nie można powiązać kolumny dla wykonania zestawu poleceń</translation>
@@ -3552,7 +3573,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Nie można przygotować polecenia</translation>
</message>
<message>
- <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+190"/>
+ <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+189"/>
<location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-199"/>
<location line="+576"/>
<source>Unable to fetch last</source>
@@ -3611,7 +3632,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QPPDOptionsModel</name>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1198"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/>
<source>Name</source>
<translation>Nazwa</translation>
</message>
@@ -3919,15 +3940,15 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<message>
<location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+24"/>
<source>Print all</source>
- <translation>Wydrukuj wszystko</translation>
+ <translation>Drukuj wszystko</translation>
</message>
<message>
<location line="+2"/>
<source>Print range</source>
- <translation>Wydrukuj zakres</translation>
+ <translation>Drukuj zakres</translation>
</message>
<message>
- <location filename="../src/gui/painting/qprinterinfo_unix.cpp" line="+471"/>
+ <location filename="../src/gui/painting/qprinterinfo_unix.cpp" line="+473"/>
<location line="+199"/>
<source>unknown</source>
<translation>nieznany</translation>
@@ -3972,15 +3993,15 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<location line="+13"/>
<location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="-2"/>
<source>Print</source>
- <translation>Wydrukuj</translation>
+ <translation>Drukowanie</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-357"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-359"/>
<source>Print To File ...</source>
- <translation>Wydrukuj do pliku ...</translation>
+ <translation>Drukuj do pliku ...</translation>
</message>
<message>
- <location line="+80"/>
+ <location line="+82"/>
<source>File %1 is not writable.
Please choose a different file name.</source>
<translation>Plik %1 jest plikiem tylko do odczytu.
@@ -4013,7 +4034,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+227"/>
<source>Print selection</source>
- <translation>Wydrukuj zaznaczone</translation>
+ <translation>Drukuj zaznaczone</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="-232"/>
@@ -4171,7 +4192,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Niestandardowy</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-524"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-523"/>
<location line="+68"/>
<source>&amp;Options &gt;&gt;</source>
<translation>&amp;Opcje &gt;&gt;</translation>
@@ -4179,7 +4200,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="-63"/>
<source>&amp;Print</source>
- <translation>&amp;Drukuj</translation>
+ <translation>Wy&amp;drukuj</translation>
</message>
<message>
<location line="+67"/>
@@ -4189,12 +4210,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+253"/>
<source>Print to File (PDF)</source>
- <translation>Wydrukuj do pliku (PDF)</translation>
+ <translation>Drukuj do pliku (PDF)</translation>
</message>
<message>
<location line="+1"/>
<source>Print to File (Postscript)</source>
- <translation>Wydrukuj do pliku (Postscript)</translation>
+ <translation>Drukuj do pliku (Postscript)</translation>
</message>
<message>
<location line="+47"/>
@@ -4222,7 +4243,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+68"/>
<source>Print Preview</source>
- <translation>Wydrukuj podgląd</translation>
+ <translation>Podgląd wydruku</translation>
</message>
<message>
<location line="+30"/>
@@ -4349,12 +4370,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location/>
<source>Print range</source>
- <translation>Wydrukuj zakres</translation>
+ <translation>Zakres wydruku</translation>
</message>
<message>
<location/>
<source>Print all</source>
- <translation>Wydrukuj wszystko</translation>
+ <translation>Drukuj wszystko</translation>
</message>
<message>
<location/>
@@ -4483,7 +4504,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QProcess</name>
<message>
- <location filename="../src/corelib/io/qprocess_unix.cpp" line="+402"/>
+ <location filename="../src/corelib/io/qprocess_unix.cpp" line="+406"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="+137"/>
<source>Could not open input redirection for reading</source>
<translation>Nie można otworzyć wejściowego przekierowania do odczytu</translation>
@@ -4500,7 +4521,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Błąd zasobów (błąd forkowania): %1</translation>
</message>
<message>
- <location line="+252"/>
+ <location line="+258"/>
<location line="+52"/>
<location line="+74"/>
<location line="+66"/>
@@ -4664,7 +4685,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QSQLiteDriver</name>
<message>
- <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+555"/>
+ <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+551"/>
<source>Error closing database</source>
<translation>Błąd zamykania bazy danych</translation>
</message>
@@ -4707,8 +4728,8 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nie można wykonać polecenia</translation>
</message>
<message>
- <location line="-133"/>
- <location line="+66"/>
+ <location line="-129"/>
+ <location line="+62"/>
<location line="+8"/>
<source>Unable to fetch row</source>
<translation>Nie można pobrać wiersza danych</translation>
@@ -4719,7 +4740,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nie można skasować polecenia</translation>
</message>
<message>
- <location line="-152"/>
+ <location line="-148"/>
<source>No query</source>
<translation>Brak zapytania</translation>
</message>
@@ -4744,7 +4765,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+2"/>
<source>Ignore-count</source>
- <translation type="unfinished"></translation>
+ <translation>Licznik pominięć</translation>
</message>
<message>
<location line="+2"/>
@@ -4754,7 +4775,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+2"/>
<source>Hit-count</source>
- <translation>Ilość trafień</translation>
+ <translation>Licznik trafień</translation>
</message>
</context>
<context>
@@ -5031,7 +5052,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+6"/>
<source>Debug Output</source>
- <translation>Wyjscie debuggera</translation>
+ <translation>Wyjście debuggera</translation>
</message>
<message>
<location line="+6"/>
@@ -5167,7 +5188,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location filename="../src/corelib/kernel/qsharedmemory_symbian.cpp" line="+83"/>
- <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+80"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+81"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+87"/>
<source>%1: permission denied</source>
<translation>%1: brak dostępu</translation>
@@ -5262,7 +5283,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QShortcut</name>
<message>
- <location filename="../src/gui/kernel/qkeysequence.cpp" line="+1143"/>
+ <location filename="../src/gui/kernel/qkeysequence.cpp" line="+1249"/>
<source>+</source>
<translation>+</translation>
</message>
@@ -5273,12 +5294,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Alt</translation>
</message>
<message>
- <location line="-767"/>
+ <location line="-871"/>
<source>Back</source>
<translation>Back</translation>
</message>
<message>
- <location line="-23"/>
+ <location line="-25"/>
<source>Backspace</source>
<translation>Backspace</translation>
</message>
@@ -5288,7 +5309,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Backtab</translation>
</message>
<message>
- <location line="+31"/>
+ <location line="+33"/>
<source>Bass Boost</source>
<translation>Wzmocnienie basów</translation>
</message>
@@ -5303,7 +5324,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Basy w górę</translation>
</message>
<message>
- <location line="+59"/>
+ <location line="+149"/>
<source>Call</source>
<translation>Wywołaj</translation>
</message>
@@ -5313,12 +5334,457 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Caps Lock</translation>
</message>
<message>
- <location line="-53"/>
+ <location line="-145"/>
<source>CapsLock</source>
<translation>CapsLock</translation>
</message>
<message>
- <location line="+70"/>
+ <location line="+49"/>
+ <source>Monitor Brightness Up</source>
+ <translation>Zwiększ jasność monitora</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Monitor Brightness Down</source>
+ <translation>Zmniejsz jasność monitora</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Light On/Off</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Brightness Up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Brightness Down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Power Off</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Wake Up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Eject</source>
+ <translation>Wysuń</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Screensaver</source>
+ <translation>Wygaszacz ekranu</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>WWW</source>
+ <translation>WWW</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Sleep</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>LightBulb</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Shop</source>
+ <translation>Sklep</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>History</source>
+ <translation>Historia</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Favorite</source>
+ <translation>Dodaj do ulubionych</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hot Links</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Adjust Brightness</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Finance</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Community</source>
+ <translation>Społeczność</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Rewind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Back Forward</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Application Left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Application Right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Book</source>
+ <translation>Książka</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CD</source>
+ <translation>CD</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Calculator</source>
+ <translation>Kalkulator</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Clear</source>
+ <translation>Wyczyść</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Clear Grab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Close</source>
+ <translation>Zamknij</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy</source>
+ <translation>Skopiuj</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cut</source>
+ <translation>Wytnij</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Display</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>DOS</source>
+ <translation>DOS</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Documents</source>
+ <translation>Dokumenty</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Spreadsheet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Browser</source>
+ <translation>Przeglądarka</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Game</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Go</source>
+ <translation>Przejdź</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>iTouch</source>
+ <translation>iTouch</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Logoff</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Market</source>
+ <translation>Rynek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Meeting</source>
+ <translation>Spotkanie</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Menu</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Menu PB</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>My Sites</source>
+ <translation>Moje strony</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>News</source>
+ <translation>Wiadomości</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Home Office</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Option</source>
+ <translation>Opcje</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Paste</source>
+ <translation>Wklej</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Phone</source>
+ <translation>Telefon</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reply</source>
+ <translation>Odpowiedz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reload</source>
+ <translation>Przeładuj</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotate Windows</source>
+ <translation>Obróć okna</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotation PB</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotation KB</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save</source>
+ <translation>Zachowaj</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Send</source>
+ <translation>Wyślij</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Spellchecker</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Split Screen</source>
+ <translation>Podziel ekran</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Support</source>
+ <translation>Pomoc techniczna</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Task Panel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Terminal</source>
+ <translation>Terminal</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tools</source>
+ <translation>Narzędzia</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Travel</source>
+ <translation>Podróże</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Video</source>
+ <translation>Wideo</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Word Processor</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>XFer</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom In</source>
+ <translation>Powiększ</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom Out</source>
+ <translation>Pomniejsz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Away</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Messenger</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>WebCam</source>
+ <translation>WebCam</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Mail Forward</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Pictures</source>
+ <translation>Zdjęcia</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Music</source>
+ <translation>Muzyka</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Battery</source>
+ <translation>Bateria</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bluetooth</source>
+ <translation>Bluetooth</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Wireless</source>
+ <translation>Bezprzewodowy</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ultra Wide Band</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Forward</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Repeat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Random Play</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Subtitle</source>
+ <translation>Napisy</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Cycle Track</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Time</source>
+ <translation>Czas</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>View</source>
+ <translation>Widok</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Top Menu</source>
+ <translation>Menu główne</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Suspend</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hibernate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+24"/>
<source>Context1</source>
<translation>Kontekst1</translation>
</message>
@@ -5338,23 +5804,23 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Kontekst4</translation>
</message>
<message>
- <location line="+564"/>
+ <location line="+578"/>
<location line="+135"/>
<source>Ctrl</source>
<translation>Ctrl</translation>
</message>
<message>
- <location line="-784"/>
+ <location line="-890"/>
<source>Del</source>
<translation>Del</translation>
</message>
<message>
- <location line="+70"/>
+ <location line="+162"/>
<source>Delete</source>
<translation>Delete</translation>
</message>
<message>
- <location line="-61"/>
+ <location line="-153"/>
<source>Down</source>
<translation>Dół</translation>
</message>
@@ -5374,37 +5840,37 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Esc</translation>
</message>
<message>
- <location line="+78"/>
+ <location line="+170"/>
<source>Escape</source>
<translation>Escape</translation>
</message>
<message>
- <location line="+732"/>
+ <location line="+746"/>
<source>F%1</source>
<translation>F%1</translation>
</message>
<message>
- <location line="-766"/>
+ <location line="-870"/>
<source>Favorites</source>
<translation>Ulubione</translation>
</message>
<message>
- <location line="+51"/>
+ <location line="+141"/>
<source>Flip</source>
<translation>Odwróć</translation>
</message>
<message>
- <location line="-68"/>
+ <location line="-158"/>
<source>Forward</source>
<translation>Do przodu</translation>
</message>
<message>
- <location line="+67"/>
+ <location line="+157"/>
<source>Hangup</source>
<translation>Zawieś</translation>
</message>
<message>
- <location line="-71"/>
+ <location line="-163"/>
<source>Help</source>
<translation>Pomoc</translation>
</message>
@@ -5414,22 +5880,22 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Home</translation>
</message>
<message>
- <location line="+32"/>
+ <location line="+34"/>
<source>Home Page</source>
<translation>Strona startowa</translation>
</message>
<message>
- <location line="-37"/>
+ <location line="-39"/>
<source>Ins</source>
<translation>Ins</translation>
</message>
<message>
- <location line="+70"/>
+ <location line="+162"/>
<source>Insert</source>
<translation>Insert</translation>
</message>
<message>
- <location line="-26"/>
+ <location line="-116"/>
<source>Launch (0)</source>
<translation>Uruchom (0)</translation>
</message>
@@ -5519,14 +5985,14 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Uruchom przeglądarkę mediów</translation>
</message>
<message>
- <location line="-36"/>
+ <location line="-38"/>
<source>Left</source>
<translation>Lewo</translation>
</message>
<message>
- <location line="+28"/>
+ <location line="+30"/>
<source>Media Next</source>
- <translation>Następna ścieżka </translation>
+ <translation>Następna ścieżka</translation>
</message>
<message>
<location line="-3"/>
@@ -5549,18 +6015,18 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Zatrzymaj</translation>
</message>
<message>
- <location line="-17"/>
+ <location line="-19"/>
<source>Menu</source>
<translation>Menu</translation>
</message>
<message>
- <location line="+637"/>
+ <location line="+743"/>
<location line="+130"/>
<source>Meta</source>
<translation>Meta</translation>
</message>
<message>
- <location line="-704"/>
+ <location line="-718"/>
<source>No</source>
<translation>Nie</translation>
</message>
@@ -5575,17 +6041,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Number Lock</translation>
</message>
<message>
- <location line="-54"/>
+ <location line="-146"/>
<source>NumLock</source>
<translation>NumLock</translation>
</message>
<message>
- <location line="+27"/>
+ <location line="+29"/>
<source>Open URL</source>
<translation>Otwórz adres</translation>
</message>
<message>
- <location line="+24"/>
+ <location line="+114"/>
<source>Page Down</source>
<translation>Strona do góry</translation>
</message>
@@ -5595,7 +6061,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Strona w dół</translation>
</message>
<message>
- <location line="-62"/>
+ <location line="-154"/>
<source>Pause</source>
<translation>Pauza</translation>
</message>
@@ -5612,20 +6078,20 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="-8"/>
<source>Print</source>
- <translation>Print</translation>
+ <translation>Wydrukuj</translation>
</message>
<message>
- <location line="+60"/>
+ <location line="+152"/>
<source>Print Screen</source>
<translation>Wydrukuj zawartość ekranu</translation>
</message>
<message>
- <location line="-40"/>
+ <location line="-130"/>
<source>Refresh</source>
<translation>Odśwież</translation>
</message>
<message>
- <location line="-25"/>
+ <location line="-27"/>
<source>Return</source>
<translation>Powrót</translation>
</message>
@@ -5635,38 +6101,39 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Prawo</translation>
</message>
<message>
- <location line="+60"/>
+ <location line="+152"/>
<source>Scroll Lock</source>
<translation>Scroll Lock</translation>
</message>
<message>
- <location line="-54"/>
+ <location line="-146"/>
<source>ScrollLock</source>
<translation>ScrollLock</translation>
</message>
<message>
- <location line="+24"/>
+ <location line="+26"/>
<source>Search</source>
<translation>Szukaj</translation>
</message>
<message>
- <location line="+38"/>
+ <location line="+106"/>
+ <location line="+22"/>
<source>Select</source>
<translation>Wybierz</translation>
</message>
<message>
- <location line="+574"/>
+ <location line="+588"/>
<location line="+138"/>
<source>Shift</source>
<translation>Shift</translation>
</message>
<message>
- <location line="-796"/>
+ <location line="-902"/>
<source>Space</source>
<translation>Spacja</translation>
</message>
<message>
- <location line="+47"/>
+ <location line="+49"/>
<source>Standby</source>
<translation>Tryb oczekiwania</translation>
</message>
@@ -5676,22 +6143,22 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Zatrzymaj</translation>
</message>
<message>
- <location line="-18"/>
+ <location line="-20"/>
<source>SysReq</source>
<translation>SysReq</translation>
</message>
<message>
- <location line="+69"/>
+ <location line="+161"/>
<source>System Request</source>
<translation>Żądanie systemu</translation>
</message>
<message>
- <location line="-78"/>
+ <location line="-170"/>
<source>Tab</source>
<translation>Tabulator</translation>
</message>
<message>
- <location line="+36"/>
+ <location line="+38"/>
<source>Treble Down</source>
<translation>Soprany w dół</translation>
</message>
@@ -5701,12 +6168,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Soprany w górę</translation>
</message>
<message>
- <location line="-22"/>
+ <location line="-24"/>
<source>Up</source>
<translation>Góra</translation>
</message>
<message>
- <location line="+16"/>
+ <location line="+18"/>
<source>Volume Down</source>
<translation>Przycisz</translation>
</message>
@@ -5721,7 +6188,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Zrób głośniej</translation>
</message>
<message>
- <location line="+52"/>
+ <location line="+142"/>
<source>Yes</source>
<translation>Tak</translation>
</message>
@@ -5822,7 +6289,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nieznany kod błędu (0x%1) pośrednika SOCKS wersji 5</translation>
</message>
<message>
- <location line="+685"/>
+ <location line="+689"/>
<source>Network operation timed out</source>
<translation>Przekroczony czas operacji sieciowej</translation>
</message>
@@ -5830,7 +6297,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QSoftKeyManager</name>
<message>
- <location filename="../src/gui/kernel/qsoftkeymanager.cpp" line="+78"/>
+ <location filename="../src/gui/kernel/qsoftkeymanager.cpp" line="+79"/>
<source>Ok</source>
<translation>OK</translation>
</message>
@@ -5855,7 +6322,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Anuluj</translation>
</message>
<message>
- <location line="+151"/>
+ <location line="+176"/>
<source>Exit</source>
<translation>Wyjście</translation>
</message>
@@ -5958,7 +6425,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Niepoprawna lub pusta lista szyfrów (%1)</translation>
</message>
<message>
- <location line="+62"/>
+ <location line="+42"/>
+ <source>Private key does not certify public key, %1</source>
+ <translation>Prywatny klucz nie uwiarygodnia publicznego, %1</translation>
+ </message>
+ <message>
+ <location line="+20"/>
<source>Error creating SSL session, %1</source>
<translation>Błąd tworzenia sesji SSL, %1</translation>
</message>
@@ -5983,15 +6455,125 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Błąd ładowania prywatnego klucza, %1</translation>
</message>
<message>
- <location line="+7"/>
- <source>Private key does not certificate public key, %1</source>
- <translation>Prywatny klucz nie uwiarygodnia publicznego, %1</translation>
+ <location filename="../src/network/ssl/qsslerror.cpp" line="+213"/>
+ <source>No error</source>
+ <translation>Brak błędu</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The issuer certificate could not be found</source>
+ <translation>Nie można odnaleźć wydawcy certyfikatu</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate signature could not be decrypted</source>
+ <translation>Nie można odszyfrować podpisu certyfikatu</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The public key in the certificate could not be read</source>
+ <translation>Nie można odczytać publicznego klucza w certyfikacie</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The signature of the certificate is invalid</source>
+ <translation>Niepoprawny podpis certyfikatu</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate is not yet valid</source>
+ <translation>Certyfikat nie jest jeszcze ważny</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate has expired</source>
+ <translation>Certyfikat utracił ważność</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate&apos;s notBefore field contains an invalid time</source>
+ <translation>Pole &quot;notBefore&quot; certyfikatu zawiera niepoprawną datę</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate&apos;s notAfter field contains an invalid time</source>
+ <translation>Pole &quot;notAfter&quot; certyfikatu zawiera niepoprawną datę</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate is self-signed, and untrusted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root certificate of the certificate chain is self-signed, and untrusted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The issuer certificate of a locally looked up certificate could not be found</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>No certificates could be verified</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>One of the CA certificates is invalid</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The basicConstraints path length parameter has been exceeded</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The supplied certificate is unsuitable for this purpose</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root CA certificate is not trusted for this purpose</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root CA certificate is marked to reject the specified purpose</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The peer did not present any certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The host name did not match any of the valid hosts for this certificate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unknown error</source>
+ <translation>Nieznany błąd</translation>
</message>
</context>
<context>
<name>QStateMachine</name>
<message>
- <location filename="../src/corelib/statemachine/qstatemachine.cpp" line="+998"/>
+ <location filename="../src/corelib/statemachine/qstatemachine.cpp" line="+1028"/>
<source>Missing initial state in compound state &apos;%1&apos;</source>
<translation>Brak stanu początkowego w stanie złożonym &apos;%1&apos;</translation>
</message>
@@ -6045,7 +6627,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QTDSDriver</name>
<message>
- <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+584"/>
+ <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+595"/>
<source>Unable to open connection</source>
<translation>Nie można otworzyć połączenia</translation>
</message>
@@ -6079,7 +6661,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QTextControl</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+2018"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2034"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -6179,7 +6761,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QUnicodeControlCharacterMenu</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+933"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+948"/>
<source>Insert Unicode control character</source>
<translation>Wstaw znak kontroli Unicode</translation>
</message>
@@ -6237,7 +6819,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QWebFrame</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+711"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+712"/>
<source>Request cancelled</source>
<translation>Prośba anulowana</translation>
</message>
@@ -6657,13 +7239,13 @@ Proszę wybrać inną nazwę pliku.</translation>
<location line="+2"/>
<source>Movie time scrubber</source>
<comment>Media controller element</comment>
- <translation type="unfinished"></translation>
+ <translation>Suwak czasu</translation>
</message>
<message>
<location line="+2"/>
<source>Movie time scrubber thumb</source>
<comment>Media controller element</comment>
- <translation type="unfinished"></translation>
+ <translation>Uchwyt suwaka czasu</translation>
</message>
<message>
<location line="+2"/>
@@ -6779,7 +7361,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Wizytator sieciowy - %2</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+406"/>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+416"/>
<source>Bad HTTP request</source>
<translation>Niepoprawna komenda HTTP</translation>
</message>
@@ -6883,7 +7465,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1708"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1827"/>
<source>JavaScript Alert - %1</source>
<translation>Ostrzeżenie JavaScript - %1</translation>
</message>
@@ -6908,9 +7490,9 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Skrypt na tej stronie nie działa poprawnie. Czy chcesz przerwać ten skrypt?</translation>
</message>
<message>
- <location line="+383"/>
+ <location line="+381"/>
<source>Move the cursor to the next character</source>
- <translation>Przesuń kursor do nastepnego znaku</translation>
+ <translation>Przesuń kursor do następnego znaku</translation>
</message>
<message>
<location line="+3"/>
@@ -6920,7 +7502,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+3"/>
<source>Move the cursor to the next word</source>
- <translation>Przesuń kursor do nastepnego słowa</translation>
+ <translation>Przesuń kursor do następnego słowa</translation>
</message>
<message>
<location line="+3"/>
@@ -6930,7 +7512,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+3"/>
<source>Move the cursor to the next line</source>
- <translation>Przesuń kursor do nastepnej linii</translation>
+ <translation>Przesuń kursor do następnej linii</translation>
</message>
<message>
<location line="+3"/>
@@ -7080,7 +7662,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+4"/>
<source>Insert Bulleted List</source>
- <translation>Wstaw listę wypunktową</translation>
+ <translation>Wstaw listę wypunktowaną</translation>
</message>
<message>
<location line="+4"/>
@@ -7129,7 +7711,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5672"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5723"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -7557,7 +8139,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+274"/>
<source>The standalone pseudo attribute must appear after the encoding.</source>
- <translation>Pseudo atrybut &quot;standalone&quot; musi pojawić sie po &quot;encoding&quot;.</translation>
+ <translation>Pseudo atrybut &quot;standalone&quot; musi pojawić się po &quot;encoding&quot;.</translation>
</message>
<message>
<location filename="../src/corelib/xml/qxmlstream_p.h" line="+562"/>
@@ -7752,17 +8334,22 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+32"/>
<source>A positional predicate must evaluate to a single numeric value.</source>
- <translation>Wynikiem predykatu pozycyjnego musi być pojedyńcza wartość liczbowa.</translation>
+ <translation>Wynikiem predykatu pozycyjnego musi być pojedyncza wartość liczbowa.</translation>
</message>
<message>
- <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+137"/>
+ <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+113"/>
+ <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.</source>
+ <translation>Docelowa nazwa w instrukcji przetwarzania nie może być %1 w żadnej kombinacji wielkich i małych liter. Dlatego nazwa %2 jest niepoprawna.</translation>
+ </message>
+ <message>
+ <location line="+24"/>
<source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source>
<translation>%1 nie jest poprawną nazwą docelową w instrukcji przetwarzania. Nazwa musi być wartością %2, np. %3.</translation>
</message>
<message>
<location filename="../src/xmlpatterns/expr/qpath.cpp" line="+109"/>
<source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source>
- <translation>Ostatni krok w ścieżce musi zawierać albo wezły albo wartości atomowe. Nie może zawierać obu jednocześnie.</translation>
+ <translation>Ostatni krok w ścieżce musi zawierać albo węzły albo wartości atomowe. Nie może zawierać obu jednocześnie.</translation>
</message>
<message>
<location filename="../src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp" line="+84"/>
@@ -7818,7 +8405,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="+94"/>
<source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source>
- <translation>Po %1 musi następowac %2 lub %3, lecz nie na końcu zastępczego ciągu.</translation>
+ <translation>Po %1 musi następować %2 lub %3, lecz nie na końcu zastępczego ciągu.</translation>
</message>
<message>
<location line="+39"/>
@@ -7907,7 +8494,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>%1 jest nieznanym typem schematu.</translation>
</message>
<message>
- <location line="-7041"/>
+ <location line="-7254"/>
+ <source>A template with name %1 has already been declared.</source>
+ <translation>Szablon o nazwie %1 został już zadeklarowany.</translation>
+ </message>
+ <message>
+ <location line="+213"/>
<source>Only one %1 declaration can occur in the query prolog.</source>
<translation>Tylko jedna deklaracja %1 może się pojawić w prologu zapytania.</translation>
</message>
@@ -7962,12 +8554,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Cecha &quot;Import modułu&quot; nie jest obsługiwana</translation>
</message>
<message>
- <location line="+52"/>
- <source>No value is available for the external variable by name %1.</source>
- <translation>Brak wartości dla zewnętrznej zmiennej o nazwie %1.</translation>
- </message>
- <message>
- <location line="+114"/>
+ <location line="+166"/>
<source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source>
<translation>Przestrzeń nazw %1 jest zarezerwowana, dlatego funkcje zdefiniowane przez użytkownika nie mogą jej użyć. Spróbuj predefiniowany przedrostek %2, który istnieje w takich przypadkach.</translation>
</message>
@@ -7987,12 +8574,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Zewnętrzne funkcje nie są obsługiwane. Wszystkie obsługiwane funkcje mogą być używane bezpośrednio, bez ich uprzedniego deklarowania jako zewnętrzne</translation>
</message>
<message>
- <location line="+37"/>
- <source>An argument by name %1 has already been declared. Every argument name must be unique.</source>
- <translation>Argument o nazwie %1 został już zadeklarowany. Każda nazwa argumentu musi być unikatowa.</translation>
- </message>
- <message>
- <location line="+456"/>
+ <location line="+493"/>
<source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source>
<translation>Nazwa zmiennej powiązanej w wyrażeniu &quot;for&quot; musi być inna od zmiennej pozycjonującej. W związku z tym dwie zmienne o nazwie %1 kolidują ze sobą.</translation>
</message>
@@ -8019,12 +8601,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="-152"/>
<source>W3C XML Schema identity constraint selector</source>
- <translation>Selektor ograniczenia jednostki W3C XML Schema</translation>
+ <translation>Selektor narzucenia niepowtarzalności W3C XML Schema</translation>
</message>
<message>
<location line="+3"/>
<source>W3C XML Schema identity constraint field</source>
- <translation>Pole ograniczenia jednostki W3C XML Schema</translation>
+ <translation>Pole narzucenia niepowtarzalności W3C XML Schema</translation>
</message>
<message>
<location line="+4"/>
@@ -8032,37 +8614,37 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Wystąpiła konstrukcja która jest niedozwolona w bieżącym języku (%1).</translation>
</message>
<message>
- <location line="+583"/>
- <source>No variable by name %1 exists</source>
- <translation>Zmienna o nazwie %1 nie istnieje</translation>
- </message>
- <message>
- <location line="-464"/>
- <source>A template by name %1 has already been declared.</source>
- <translation>Szablon o nazwie %1 został już zadeklarowany.</translation>
+ <location line="+3700"/>
+ <source>The keyword %1 cannot occur with any other mode name.</source>
+ <translation>Słowo kluczowe %1 nie może wystąpić z inną nazwą trybu.</translation>
</message>
<message>
- <location line="+3581"/>
- <source>The keyword %1 cannot occur with any other mode name.</source>
- <translation>Słowo kluczowe %1 nie może wystapić z inną nazwą trybu.</translation>
+ <location line="-3117"/>
+ <source>No variable with name %1 exists</source>
+ <translation>Zmienna o nazwie %1 nie istnieje</translation>
</message>
<message>
- <location line="+29"/>
- <source>The value of attribute %1 must of type %2, which %3 isn&apos;t.</source>
+ <location line="+3146"/>
+ <source>The value of attribute %1 must be of type %2, which %3 isn&apos;t.</source>
<translation>Wartość atrybutu %1 musi być typu %2, którym nie jest %3.</translation>
</message>
<message>
<location line="+75"/>
- <source>The prefix %1 can not be bound. By default, it is already bound to the namespace %2.</source>
+ <source>The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.</source>
<translation>Przedrostek %1 nie może być powiązany. Jest on domyślnie powiązany z przestrzenią nazw %2.</translation>
</message>
<message>
<location line="+312"/>
- <source>A variable by name %1 has already been declared.</source>
+ <source>A variable with name %1 has already been declared.</source>
<translation>Zmienna o nazwie %1 została już zadeklarowana.</translation>
</message>
<message>
- <location line="+135"/>
+ <location line="+39"/>
+ <source>No value is available for the external variable with name %1.</source>
+ <translation>Brak wartości dla zewnętrznej zmiennej o nazwie %1.</translation>
+ </message>
+ <message>
+ <location line="+96"/>
<source>A stylesheet function must have a prefixed name.</source>
<translation>Funkcja arkusza stylu musi zawierać nazwę z przedrostkiem.</translation>
</message>
@@ -8072,7 +8654,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Przestrzeń nazw dla funkcji zdefiniowanej przez użytkownika nie może być pusta (spróbuj predefiniowany przedrostek %1, który stworzono specjalnie do takich sytuacji)</translation>
</message>
<message>
- <location line="+294"/>
+ <location line="+115"/>
+ <source>An argument with name %1 has already been declared. Every argument name must be unique.</source>
+ <translation>Argument o nazwie %1 został już zadeklarowany. Każda nazwa argumentu musi być unikatowa.</translation>
+ </message>
+ <message>
+ <location line="+179"/>
<source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source>
<translation>Gdy funkcja %1 jest wykorzystana do dopasowania wewnątrz wzorca, jej argument musi być referencją do zmiennej lub napisem.</translation>
</message>
@@ -8113,11 +8700,16 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+462"/>
- <source>No function by name %1 is available.</source>
+ <source>No function with name %1 is available.</source>
<translation>Żadna funkcja o nazwie %1 nie jest dostępna.</translation>
</message>
<message>
- <location line="+102"/>
+ <location line="+250"/>
+ <source>An attribute with name %1 has already appeared on this element.</source>
+ <translation>Atrybut o nazwie %1 już się pojawił w tym elemencie.</translation>
+ </message>
+ <message>
+ <location line="-148"/>
<source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source>
<translation>Przestrzeń nazw URI nie może być pustym ciągiem w powiązaniu z przedrostkiem, %1.</translation>
</message>
@@ -8152,12 +8744,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Przestrzeń nazw URI nie może być stałą i nie może używać zawartych w niej wyrażeń.</translation>
</message>
<message>
- <location line="+16"/>
- <source>An attribute by name %1 has already appeared on this element.</source>
- <translation>Atrybut o nazwie %1 już się pojawił w tym elemencie.</translation>
- </message>
- <message>
- <location line="+61"/>
+ <location line="+77"/>
<source>A direct element constructor is not well-formed. %1 is ended with %2.</source>
<translation>Konstruktor elementu bezpośredniego nie jest dobrze sformatowany. %1 jest zakończony %2.</translation>
</message>
@@ -8262,11 +8849,6 @@ Proszę wybrać inną nazwę pliku.</translation>
<source>Modulus division (%1) by zero (%2) is undefined.</source>
<translation>Dzielenie modulo (%1) przez zero (%2) jest niezdefiniowane.</translation>
</message>
- <message>
- <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="-24"/>
- <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.</source>
- <translation>Docelowa nazwa w instrukcji przetwarzania nie może być %1 w żadnej kombinacji wielkich i małych liter. Dlatego nazwa %2 jest niepoprawna.</translation>
- </message>
<message numerus="yes">
<location filename="../src/xmlpatterns/functions/qabstractfunctionfactory.cpp" line="+77"/>
<source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
@@ -8409,7 +8991,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+166"/>
<source>In a simplified stylesheet module, attribute %1 must be present.</source>
- <translation>W uproszczonym module arkuszu stylu musi wystapić atrybut %1.</translation>
+ <translation>W uproszczonym module arkuszu stylu musi wystąpić atrybut %1.</translation>
</message>
<message>
<location line="+72"/>
@@ -8419,7 +9001,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+9"/>
<source>Element %1 must have at least one of the attributes %2 or %3.</source>
- <translation>Element %1 musi posiadać przynajmiej jeden z atrybutów: %2 lub %3.</translation>
+ <translation>Element %1 musi posiadać przynajmniej jeden z atrybutów: %2 lub %3.</translation>
</message>
<message>
<location line="+28"/>
@@ -8531,12 +9113,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+25"/>
<source>%1 is not allowed to derive from %2 by restriction as the latter defines it as final.</source>
- <translation>Nie można wywieść %1 z %2 ograniczając go ponieważ jest on zdefiniowany jako ostateczny.</translation>
+ <translation>Nie można wywieść %1 z %2 ograniczając go ponieważ jest on zdefiniowany jako końcowy.</translation>
</message>
<message>
<location line="+5"/>
<source>%1 is not allowed to derive from %2 by extension as the latter defines it as final.</source>
- <translation>Nie można wywieść %1 z %2 rozszerzając go ponieważ jest on zdefiniowany jako ostateczny.</translation>
+ <translation>Nie można wywieść %1 z %2 rozszerzając go ponieważ jest on zdefiniowany jako końcowy.</translation>
</message>
<message>
<location line="+31"/>
@@ -8562,13 +9144,13 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+6"/>
<source>Simple type %1 cannot derive from %2 as the latter defines restriction as final.</source>
- <translation>Typ prosty %1 nie może wywodzić się z %2 ponieważ ten ostatni jest zdefiniowany jako ostateczny.</translation>
+ <translation>Typ prosty %1 nie może wywodzić się z %2 ponieważ ten ostatni jest zdefiniowany jako końcowy.</translation>
</message>
<message>
<location line="+13"/>
<location line="+484"/>
<source>Variety of item type of %1 must be either atomic or union.</source>
- <translation>Typem elementu %1 musi być albo typ atomowy albo unia.</translation>
+ <translation>Typem elementów listy %1 musi być albo typ atomowy albo unia.</translation>
</message>
<message>
<location line="-474"/>
@@ -8595,12 +9177,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+6"/>
<source>Base type of simple type %1 has defined derivation by restriction as final.</source>
- <translation>Typ podstawowy dla typu prostego %1 ma zdefiniowane wywodzenie poprzez ograniczenie jako ostateczne.</translation>
+ <translation>Typ podstawowy dla typu prostego %1 ma zdefiniowane wywodzenie poprzez ograniczenie jako końcowe.</translation>
</message>
<message>
<location line="+6"/>
<source>Item type of base type does not match item type of %1.</source>
- <translation>Typ elementu w podstawowym typie nie pasuje do typu %1.</translation>
+ <translation>Typ elementów listy typu podstawowego nie pasuje do typu elementów listy %1.</translation>
</message>
<message>
<location line="+26"/>
@@ -8657,7 +9239,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+37"/>
<source>Content model of complex type %1 is not a valid extension of content model of %2.</source>
- <translation>Model zawartości typu złożonego %1 nie jest poprawnym rozszerzenien modelu zawartości %2.</translation>
+ <translation>Model zawartości typu złożonego %1 nie jest poprawnym rozszerzeniem modelu zawartości %2.</translation>
</message>
<message>
<location line="+10"/>
@@ -8687,7 +9269,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+35"/>
<source>Item type of simple type %1 cannot be a complex type.</source>
- <translation>Typ elementu w prostym typie %1 nie może być typem złożonym.</translation>
+ <translation>Typ elementów listy w prostym typie %1 nie może być typem złożonym.</translation>
</message>
<message>
<location line="+44"/>
@@ -8731,7 +9313,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="-389"/>
<source>%1 facet contains invalid regular expression</source>
- <translation>Aspekt %1 zawiera niepoprawe wyrażenie regularne</translation>
+ <translation>Aspekt %1 zawiera niepoprawne wyrażenie regularne</translation>
</message>
<message>
<location line="+15"/>
@@ -8902,7 +9484,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+18"/>
<source>processContent of base wildcard must be weaker than derived wildcard.</source>
- <translation>&quot;processContent&quot; podstawowego znacznika musi być słabszy od wywiedzionego znacznika.</translation>
+ <translation>&quot;processContent&quot; podstawowego dżokera musi być słabszy od wywiedzionego dżokera.</translation>
</message>
<message>
<location line="+39"/>
@@ -8913,7 +9495,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+28"/>
<source>Particle contains non-deterministic wildcards.</source>
- <translation>Element zawiera nieokreślone znaczniki.</translation>
+ <translation>Element zawiera nieokreślone dżokery.</translation>
</message>
<message>
<location filename="../src/xmlpatterns/schema/qxsdschemahelper.cpp" line="+691"/>
@@ -8933,13 +9515,13 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+5"/>
- <source>Derived attribute %1 does not exists in the base definition.</source>
- <translation>Wywyiedziony atrybut %1 nie istnieje w podstawowej definicji.</translation>
+ <source>Derived attribute %1 does not exist in the base definition.</source>
+ <translation>Wywiedziony atrybut %1 nie istnieje w podstawowej definicji.</translation>
</message>
<message>
<location line="+11"/>
<source>Derived attribute %1 does not match the wildcard in the base definition.</source>
- <translation>Wywiedziony atrybut %1 nie pasuje do znacznika w podstawowej definicji.</translation>
+ <translation>Wywiedziony atrybut %1 nie pasuje do dżokera w podstawowej definicji.</translation>
</message>
<message>
<location line="+17"/>
@@ -8954,12 +9536,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+5"/>
<source>Derived wildcard is not a subset of the base wildcard.</source>
- <translation>Wywiedziony znacznik nie jest podzbiorem podstawowego znacznika.</translation>
+ <translation>Wywiedziony dżoker nie jest podzbiorem podstawowego dżokera.</translation>
</message>
<message>
<location line="+5"/>
<source>%1 of derived wildcard is not a valid restriction of %2 of base wildcard</source>
- <translation>%1 wywiedzionego znacznika nie jest poprawnym ograniczeniem %2 podstawowego znacznika</translation>
+ <translation>%1 wywiedzionego dżokera nie jest poprawnym ograniczeniem %2 podstawowego dżokera</translation>
</message>
<message>
<location line="+23"/>
@@ -8984,12 +9566,12 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+10"/>
<source>%1 references identity constraint %2 that is no %3 or %4 element.</source>
- <translation>%1 odwołuje się do ograniczenia jednostki %2 które nie jest elementem %3 ani %4.</translation>
+ <translation>%1 odwołuje się do narzucenia niepowtarzalności %2 które nie jest elementem %3 ani %4.</translation>
</message>
<message>
<location line="+10"/>
<source>%1 has a different number of fields from the identity constraint %2 that it references.</source>
- <translation>%1 posiada inna liczbę pól od ograniczenia jednostki %2 które się do niego odwołuje.</translation>
+ <translation>%1 posiada inna liczbę pól od narzucenia niepowtarzalności %2 które się do niego odwołuje.</translation>
</message>
<message>
<location line="+23"/>
@@ -8999,7 +9581,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+84"/>
<source>Item type %1 of %2 element cannot be resolved.</source>
- <translation>Nie można rozwiązać typu elementu %1 w elemencie %2.</translation>
+ <translation>Nie można rozwiązać typu elementów listy %1 w elemencie %2.</translation>
</message>
<message>
<location line="+31"/>
@@ -9100,17 +9682,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+52"/>
<source>Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.</source>
- <translation>Znacznik atrybutu %1 nie jest poprawnym ograniczeniem znacznika atrybutu typu podstawowego %2.</translation>
+ <translation>Atrybut dżokera %1 nie jest poprawnym ograniczeniem atrybutu dżokera typu podstawowego %2.</translation>
</message>
<message>
<location line="+7"/>
<source>%1 has attribute wildcard but its base type %2 has not.</source>
- <translation>%1 posiada znacznik atrybutu lecz jego typ podstawowy %2 go nie posiada.</translation>
+ <translation>%1 posiada atrybut dżokera lecz jego typ podstawowy %2 go nie posiada.</translation>
</message>
<message>
<location line="+26"/>
<source>Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.</source>
- <translation>Nie można wyrazić unii znacznika atrybutu typu %1 i znacznika atrybutu jego typu podstawowego %2.</translation>
+ <translation>Nie można wyrazić unii atrybutu dżokera typu %1 i atrybutu dżokera jego typu podstawowego %2.</translation>
</message>
<message>
<location line="+48"/>
@@ -9181,17 +9763,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+18"/>
<source>Element %1 does not match namespace constraint of wildcard in base particle.</source>
- <translation>Element %1 nie pasuje do znacznika w ograniczeniu przestrzeni nazw w elemencie podstawowym.</translation>
+ <translation>Element %1 nie pasuje do ograniczenia przestrzeni nazw dżokera w elemencie podstawowym.</translation>
</message>
<message>
<location line="+11"/>
<source>Wildcard in derived particle is not a valid subset of wildcard in base particle.</source>
- <translation>Znacznik w wywiedzionym elemencie nie jest poprawnym podzbiorem znacznika w elemencie podstawowym.</translation>
+ <translation>Dżoker w wywiedzionym elemencie nie jest poprawnym podzbiorem dżokera w elemencie podstawowym.</translation>
</message>
<message>
<location line="+5"/>
<source>processContent of wildcard in derived particle is weaker than wildcard in base particle.</source>
- <translation>&quot;processContent&quot; znacznika w wywiedzionym elemencie jest słabszy od znacznika w podstawowym elemencie.</translation>
+ <translation>&quot;processContent&quot; dżokera w wywiedzionym elemencie jest słabszy od dżokera w podstawowym elemencie.</translation>
</message>
<message>
<location line="+240"/>
@@ -9385,7 +9967,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+131"/>
- <source>Component with id %1 has been defined previously.</source>
+ <source>Component with ID %1 has been defined previously.</source>
<translation>Komponent o identyfikatorze %1 został uprzednio zdefiniowany.</translation>
</message>
<message>
@@ -9421,7 +10003,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+11"/>
<source>Identity constraint %1 already defined.</source>
- <translation>Ograniczenie jednostki %1 jest już zdefiniowane.</translation>
+ <translation>Narzucenie niepowtarzalności %1 jest już zdefiniowane.</translation>
</message>
<message>
<location line="+11"/>
@@ -9800,11 +10382,16 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+6"/>
- <source>Fixed value constrained not allowed if element is nillable.</source>
+ <source>Fixed value constraint not allowed if element is nillable.</source>
<translation>Ograniczenie stałej wartości jest niedozwolone gdy element jest zerowalny.</translation>
</message>
<message>
- <location line="+32"/>
+ <location line="+230"/>
+ <source>Element %1 cannot contain other elements, as it has a fixed content.</source>
+ <translation>Element %1 nie może zawierać innych elementów ponieważ posiada on stałą zawartość.</translation>
+ </message>
+ <message>
+ <location line="-198"/>
<source>Specified type %1 is not validly substitutable with element type %2.</source>
<translation>Podany typ %1 nie jest poprawnie zastępowalny typem elementu %2.</translation>
</message>
@@ -9848,19 +10435,14 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Element %1 zawiera niedozwolony text.</translation>
</message>
<message>
- <location line="+18"/>
- <source>Element %1 can not contain other elements, as it has a fixed content.</source>
- <translation>Element %1 nie może zawierać innych elementów ponieważ posiada on stałą zawartość.</translation>
- </message>
- <message>
- <location line="+43"/>
+ <location line="+61"/>
<source>Element %1 is missing required attribute %2.</source>
<translation>Brak wymaganego atrybutu %2 w elemencie %1.</translation>
</message>
<message>
<location line="+29"/>
<source>Attribute %1 does not match the attribute wildcard.</source>
- <translation>Atrybut %1 nie pasuje do znacznika atrybutu.</translation>
+ <translation>Atrybut %1 nie pasuje do atrybutu dżokera.</translation>
</message>
<message>
<location line="+9"/>
@@ -9912,7 +10494,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+40"/>
<source>No referenced value found for key reference %1.</source>
- <translation>Brak wartości do której odwołuje sie klucz %1.</translation>
+ <translation>Brak wartości do której odwołuje się klucz %1.</translation>
</message>
<message>
<location line="+64"/>
diff --git a/translations/qvfb_pl.ts b/translations/qvfb_pl.ts
index bc3313e..9b85ad9 100644
--- a/translations/qvfb_pl.ts
+++ b/translations/qvfb_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>AnimationSaveWidget</name>
<message>
- <location filename="../tools/qvfb/qvfb.cpp" line="+865"/>
+ <location filename="../tools/qvfb/qvfb.cpp" line="+868"/>
<location line="+204"/>
<source>Record</source>
<translation>Nagraj</translation>
@@ -260,6 +260,11 @@
<source>BGR format</source>
<translation>format BGR</translation>
</message>
+ <message>
+ <location/>
+ <source>800x480</source>
+ <translation>800x480</translation>
+ </message>
</context>
<context>
<name>DeviceSkin</name>
@@ -322,12 +327,12 @@
<context>
<name>QVFb</name>
<message>
- <location filename="../tools/qvfb/qvfb.cpp" line="-501"/>
+ <location filename="../tools/qvfb/qvfb.cpp" line="-504"/>
<source>Browse...</source>
<translation>Przeglądaj...</translation>
</message>
<message>
- <location line="+140"/>
+ <location line="+143"/>
<source>Load Custom Skin...</source>
<translation>Załaduj skórki użytkownika...</translation>
</message>