summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-15 13:29:48 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-09-15 13:29:48 (GMT)
commit9d96ff055390cea8996b68dc4aef39512fbd9c96 (patch)
tree525c1afc933bba0f3f00bbcbfc560d10db439179 /src/gui
parentb13365187b58ecc2d259589ab523a7d0da84dc83 (diff)
parentf42f5c457b3368adb4c92e521dc56969f138bdd3 (diff)
downloadQt-9d96ff055390cea8996b68dc4aef39512fbd9c96.zip
Qt-9d96ff055390cea8996b68dc4aef39512fbd9c96.tar.gz
Qt-9d96ff055390cea8996b68dc4aef39512fbd9c96.tar.bz2
Merge commit 'qt-mainline/4.6' into kinetic-declarativeui
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp45
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h1
-rw-r--r--src/gui/image/qimagereader.cpp3
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/painting/qdrawutil.cpp6
-rw-r--r--src/gui/painting/qdrawutil.h2
-rw-r--r--src/gui/widgets/qlineedit.cpp6
-rw-r--r--src/gui/widgets/qlineedit_p.cpp5
10 files changed, 36 insertions, 52 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 26489c5..ee87323 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -493,6 +493,12 @@ void QGraphicsGrayscaleEffect::setStrength(qreal strength)
emit strengthChanged(strength);
}
+/*! \fn void QGraphicsGrayscaleEffect::strengthChanged(qreal strength)
+ This signal is emitted whenever setStrength() changes the grayscale
+ strength property. \a strength contains the new strength value of
+ the grayscale effect.
+ */
+
/*!
\reimp
*/
@@ -602,6 +608,12 @@ void QGraphicsColorizeEffect::setStrength(qreal strength)
emit strengthChanged(strength);
}
+/*! \fn void QGraphicsColorizeEffect::strengthChanged(qreal strength)
+ This signal is emitted whenever setStrength() changes the colorize
+ strength property. \a strength contains the new strength value of
+ the colorize effect.
+ */
+
/*!
\fn void QGraphicsColorizeEffect::colorChanged(const QColor &color)
@@ -782,6 +794,8 @@ void QGraphicsPixelizeEffect::draw(QPainter *painter, QGraphicsEffectSource *sou
QGraphicsBlurEffect::QGraphicsBlurEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsBlurEffectPrivate, parent)
{
+ Q_D(QGraphicsBlurEffect);
+ d->filter->setQuality(Qt::SmoothTransformation);
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index f57f65f..5897ae4 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -257,9 +257,9 @@ void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem,
}
/*!
- Anchors two or four edges of \a firstItem with the corresponding edges of \secondItem,
- so that \a firstItem has the same size as \a secondItem in the dimensions specified by
- \a orientation.
+ Anchors two or four edges of \a firstItem with the corresponding
+ edges of \a secondItem, so that \a firstItem has the same size as
+ \a secondItem in the dimensions specified by \a orientations.
Calling this convenience function with the following arguments
\code
@@ -288,45 +288,6 @@ void QGraphicsAnchorLayout::addAnchors(QGraphicsLayoutItem *firstItem,
}
/*!
- \fn QGraphicsAnchorLayout::addLeftAndRightAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
-
- Anchors the left and right edges of \a firstItem to the same edges of
- \a secondItem.
-
- This convenience function is equivalent to calling
- \code
- l->addAnchor(firstItem, Qt::AnchorLeft, secondItem, Qt::AnchorLeft);
- l->addAnchor(firstItem, Qt::AnchorRight, secondItem, Qt::AnchorRight);
- \endcode
-*/
-
-/*!
- \fn QGraphicsAnchorLayout::addTopAndBottomAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
-
- Anchors the top and bottom edges of \a firstItem to the same edges of
- \a secondItem.
-
- This convenience function is equivalent to calling
- \code
- l->addAnchor(firstItem, Qt::AnchorTop, secondItem, Qt::AnchorTop);
- l->addAnchor(firstItem, Qt::AnchorBottom, secondItem, Qt::AnchorBottom);
- \endcode
-*/
-
-/*!
- \fn QGraphicsAnchorLayout::addAllAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
-
- Anchors all edges (left, right, top and bottom) of \a firstItem to the same edges of
- \a secondItem.
-
- This convenience function is equivalent to calling
- \code
- l->addLeftAndRightAnchors(firstItem, secondItem);
- l->addTopAndBottomAnchors(firstItem, secondItem);
- \endcode
-*/
-
-/*!
Sets the default horizontal spacing for the anchor layout to \a spacing.
\sa horizontalSpacing(), setVerticalSpacing(), setSpacing()
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 838bd34..81eeb39 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2830,6 +2830,8 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
if (climb) {
while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible())
f = f->d_ptr->focusScopeItem;
+ if (f != q_ptr)
+ f->d_ptr->setSubFocus();
}
// Update the scene's focus item.
@@ -4979,7 +4981,7 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem)
if (parent->d_ptr->subFocusItem != q_ptr)
break;
parent->d_ptr->subFocusItem = 0;
- subFocusItemChange();
+ parent->d_ptr->subFocusItemChange();
} while (!parent->isPanel() && (parent = parent->d_ptr->parent));
}
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index bc0f30f..665f33f 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -551,7 +551,6 @@ Q_SIGNALS:
void zChanged();
void rotationChanged();
void scaleChanged();
- void focusChanged();
protected:
QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent, QGraphicsScene *scene);
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 5cd768f..aff186b 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -696,13 +696,12 @@ bool QImageReader::autoDetectImageFormat() const
/*!
-
Specifies that the image reader should decide which plugin to use
solely based on the contents in the datastream.
Setting this flag means that all image plugins gets loaded. Each
plugin will read the first bytes in the image data and decide if
- the plugin is compatible or not.
+ the plugin is compatible or not. The flag is set to \a ignored.
This also disables auto detecting image format.
*/
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 2530f38..aec757f 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -145,7 +145,7 @@ static int qtkeyForMacSymbol(const QChar ch)
#else
static bool qt_sequence_no_mnemonics = false;
#endif
-void Q_AUTOTEST_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; }
+void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; }
/*!
\class QKeySequence
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index 17cf196..7be8e04 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1044,7 +1044,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs,
Holds the rules used to draw a pixmap or image split into nine segments,
similar to \l{http://www.w3.org/TR/css3-background/}{CSS3 border-images}.
- \sa Qt::TileRule, QMargins
+ \sa Qt::TileRule, QMargins, qDrawBorderPixmap
*/
/*! \fn QTileRules::QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
@@ -1060,7 +1060,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs,
/*!
\fn void qDrawBorderPixmap(QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap)
\since 4.6
- \relates QMargins
+ \relates QPainter
Draws the given \a pixmap into the given \a target rectangle, using the
given \a painter. The pixmap will be split into nine segments and drawn
@@ -1156,6 +1156,8 @@ static inline void qDrawHorizontallyRoundedPixmap(QPainter *painter, const QRect
/*!
\since 4.6
+ \relates QPainter
+
Draws the indicated \a sourceRect rectangle from the given \a pixmap into
the given \a targetRect rectangle, using the given \a painter. The pixmap
will be split into nine segments according to the given \a targetMargins
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index ce89e22..3a2dd0e 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -135,7 +135,7 @@ Q_GUI_EXPORT QT3_SUPPORT void qDrawArrow(QPainter *p, Qt::ArrowType type, Qt::GU
struct QTileRules
{
- inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule = Qt::Stretch)
+ inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
: horizontal(horizontalRule), vertical(verticalRule) {}
inline QTileRules(Qt::TileRule rule = Qt::Stretch)
: horizontal(rule), vertical(rule) {}
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index a55ca8e..37e57cf 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2047,7 +2047,11 @@ void QLineEdit::changeEvent(QEvent *ev)
d->control->setFont(font());
break;
case QEvent::StyleChange:
- d->control->setPasswordCharacter(style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter));
+ {
+ QStyleOptionFrameV2 opt;
+ initStyleOption(&opt);
+ d->control->setPasswordCharacter(style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, this));
+ }
update();
break;
case QEvent::LayoutDirectionChange:
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 4fe02a2..148da1b 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -159,7 +159,10 @@ void QLineEditPrivate::init(const QString& txt)
QObject::connect(control, SIGNAL(updateNeeded(const QRect &)),
q, SLOT(update()));
- control->setPasswordCharacter(q->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter));
+
+ QStyleOptionFrameV2 opt;
+ q->initStyleOption(&opt);
+ control->setPasswordCharacter(q->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, q));
#ifndef QT_NO_CURSOR
q->setCursor(Qt::IBeamCursor);
#endif