summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qdir.cpp8
-rw-r--r--src/corelib/io/qiodevice.cpp4
-rw-r--r--src/corelib/io/qresource.cpp9
-rw-r--r--src/corelib/tools/qscopedpointer.cpp55
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm10
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp19
-rw-r--r--src/gui/widgets/qlineedit_p.cpp2
-rw-r--r--src/svg/qgraphicssvgitem.cpp4
8 files changed, 89 insertions, 22 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index dc7f17e..69b3af4 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -993,15 +993,15 @@ void QDir::setNameFilters(const QStringList &nameFilters)
/*!
\obsolete
+
+ Use QDir::addSearchPath() with a prefix instead.
+
Adds \a path to the search paths searched in to find resources
that are not specified with an absolute path. The default search
path is to search only in the root (\c{:/}).
- Use QDir::addSearchPath() with a prefix instead.
-
- \sa {The Qt Resource System}, QResource::addSearchPath()
+ \sa {The Qt Resource System}
*/
-
void QDir::addResourceSearchPath(const QString &path)
{
#ifdef QT_BUILD_CORE_LIB
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 4e14ba8..662100a 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1003,8 +1003,8 @@ QByteArray QIODevice::readAll()
to a maximum of \a maxSize - 1 bytes, stores the characters in \a
data, and returns the number of bytes read. If a line could not be
read but no error ocurred, this function returns 0. If an error
- occurs, this function returns what it could the length of what
- could be read, or -1 if nothing was read.
+ occurs, this function returns the length of what could be read, or
+ -1 if nothing was read.
A terminating '\0' byte is always appended to \a data, so \a
maxSize must be larger than 1.
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index adfbb15..6d33c8b 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -555,16 +555,15 @@ QStringList QResource::children() const
/*!
\obsolete
+ Use QDir::addSearchPath() with a prefix instead.
+
Adds \a path to the search paths searched in to find resources that are
not specified with an absolute path. The \a path must be an absolute
path (start with \c{/}).
The default search path is to search only in the root (\c{:/}). The last
path added will be consulted first upon next QResource creation.
-
- Use QDir::addSearchPath() with a prefix instead.
*/
-
void
QResource::addSearchPath(const QString &path)
{
@@ -578,6 +577,10 @@ QResource::addSearchPath(const QString &path)
}
/*!
+ \obsolete
+
+ Use QDir::searchPaths() instead.
+
Returns the current search path list. This list is consulted when
creating a relative resource.
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 12badf0..e7dd769 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -225,4 +225,59 @@ QT_BEGIN_NAMESPACE
Swap this pointer with \a other.
*/
+/*!
+ \class QScopedArrayPointer
+
+ \brief The QScopedArrayPointer class stores a pointer to a
+ dynamically allocated array of objects, and deletes it upon
+ destruction.
+
+ \since 4.6
+ \reentrant
+ \ingroup misc
+
+ A QScopedArrayPointer is a QScopedPointer that defaults to
+ deleting the object it is pointing to with the delete[] operator. It
+ also features operator[] for convenience, so we can write:
+
+ \code
+ void foo()
+ {
+ QScopedArrayPointer<int> i(new int[10]);
+ i[2] = 42;
+ ...
+ return; // our integer array is now deleted using delete[]
+ }
+ \endcode
+*/
+
+/*!
+ \fn QScopedArrayPointer::QScopedArrayPointer(T *p = 0)
+
+ Constructs this QScopedArrayPointer instance and sets its pointer
+ to \a p.
+*/
+
+/*!
+ \fn T *QScopedArrayPointer::operator[](int i)
+
+ Provides access to entry \a i of the scoped pointer's array of
+ objects.
+
+ If the contained pointer is \c null, behavior is undefined.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn T *QScopedArrayPointer::operator[](int i) const
+
+ Provides access to entry \a i of the scoped pointer's array of
+ objects.
+
+ If the contained pointer is \c null, behavior is undefined.
+
+ \sa isNull()
+*/
+
QT_END_NAMESPACE
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index bdcb872..8af0d2b 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -96,6 +96,7 @@ QT_USE_NAMESPACE
- (void)finishOffWithCode:(NSInteger)result;
- (void)showColorPanel;
- (void)exec;
+- (void)setResultSet:(BOOL)result;
@end
@implementation QCocoaColorPanelDelegate
@@ -158,6 +159,11 @@ QT_USE_NAMESPACE
[super dealloc];
}
+- (void)setResultSet:(BOOL)result
+{
+ mResultSet = result;
+}
+
- (BOOL)windowShouldClose:(id)window
{
Q_UNUSED(window);
@@ -320,7 +326,7 @@ QT_USE_NAMESPACE
} else {
mPriv->colorDialog()->accept();
}
- }
+ }
}
}
@@ -433,7 +439,7 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
priv:this];
[colorPanel setDelegate:static_cast<QCocoaColorPanelDelegate *>(delegate)];
}
-
+ [delegate setResultSet:false];
setCocoaPanelColor(initial);
[static_cast<QCocoaColorPanelDelegate *>(delegate) showColorPanel];
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 2f208b7..bd214e1 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -414,12 +414,6 @@
/*!
\enum QGraphicsItem::GraphicsItemChange
- ItemVisibleHasChanged,
- ItemEnabledHasChanged,
- ItemSelectedHasChanged,
- ItemParentHasChanged,
- ItemSceneHasChanged
-
This enum describes the state changes that are notified by
QGraphicsItem::itemChange(). The notifications are sent as the state
changes, and in some cases, adjustments can be made (see the documentation
@@ -647,9 +641,16 @@
are children of a modal panel are not blocked.
The values are:
- \value NonModal The panel is not modal and does not block input to other panels.
- \value PanelModal The panel is modal to a single item hierarchy and blocks input to its parent pane, all grandparent panels, and all siblings of its parent and grandparent panels.
- \value SceneModal The window is modal to the entire scene and blocks input to all panels.
+
+ \value NonModal The panel is not modal and does not block input to
+ other panels. This is the default value for panels.
+
+ \value PanelModal The panel is modal to a single item hierarchy
+ and blocks input to its parent pane, all grandparent panels, and
+ all siblings of its parent and grandparent panels.
+
+ \value SceneModal The window is modal to the entire scene and
+ blocks input to all panels.
\sa QGraphicsItem::setPanelModality(), QGraphicsItem::panelModality(), QGraphicsItem::ItemIsPanel
*/
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 1aa7a2b..2c76a5c 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -129,7 +129,7 @@ void QLineEditPrivate::_q_editFocusChange(bool e)
void QLineEditPrivate::_q_selectionChanged()
{
Q_Q(QLineEdit);
- if (control->preeditAreaText().isEmpty()) {
+ if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) {
QStyleOptionFrameV2 opt;
q->initStyleOption(&opt);
bool showCursor = control->hasSelectedText() ?
diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp
index 7e80e50..69ff7a3 100644
--- a/src/svg/qgraphicssvgitem.cpp
+++ b/src/svg/qgraphicssvgitem.cpp
@@ -267,6 +267,7 @@ int QGraphicsSvgItem::type() const
/*!
\property QGraphicsSvgItem::maximumCacheSize
+ \since 4.6
This property holds the maximum size of the device coordinate cache
for this item.
@@ -312,7 +313,8 @@ QSize QGraphicsSvgItem::maximumCacheSize() const
/*!
\property QGraphicsSvgItem::elementId
-
+ \since 4.6
+
This property holds the element's XML ID.
*/