summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-10-16 08:11:14 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-10-16 08:11:14 (GMT)
commit4f48e43dc4f8237875d7d4a61bf4e55ab92e3941 (patch)
tree0436d256b8812a5ff638d799710d3b20b4459716 /src/corelib
parent9935ad5366463429ed4aa9b8db03c4605586f866 (diff)
parent2348200bfb277450cb2e79f6054d95b3041b10db (diff)
downloadQt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.zip
Qt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.tar.gz
Qt-4f48e43dc4f8237875d7d4a61bf4e55ab92e3941.tar.bz2
Merge commit 'origin/4.6' into mmfphonon
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qsettings.cpp24
-rw-r--r--src/corelib/io/qurl.cpp9
-rw-r--r--src/corelib/kernel/qobject.cpp5
3 files changed, 25 insertions, 13 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 1fd2165..a1c9833 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2565,8 +2565,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Example:
\snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 10
- The scope is QSettings::UserScope and the format is
- QSettings::NativeFormat.
+ The scope is set to QSettings::UserScope, and the format is
+ set to QSettings::NativeFormat (i.e. calling setDefaultFormat()
+ before calling this constructor has no effect).
\sa setDefaultFormat(), {Fallback Mechanism}
*/
@@ -2583,11 +2584,12 @@ QSettings::QSettings(const QString &organization, const QString &application, QO
If \a scope is QSettings::UserScope, the QSettings object searches
user-specific settings first, before it searches system-wide
- settings as a fallback. If \a scope is
- QSettings::SystemScope, the QSettings object ignores user-specific
- settings and provides access to system-wide settings.
+ settings as a fallback. If \a scope is QSettings::SystemScope, the
+ QSettings object ignores user-specific settings and provides
+ access to system-wide settings.
- The storage format is QSettings::NativeFormat.
+ The storage format is set to QSettings::NativeFormat (i.e. calling
+ setDefaultFormat() before calling this constructor has no effect).
If no application name is given, the QSettings object will
only access the organization-wide \l{Fallback Mechanism}{locations}.
@@ -2668,6 +2670,8 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent)
The scope is QSettings::UserScope and the format is
defaultFormat() (QSettings::NativeFormat by default).
+ Use setDefaultFormat() before calling this constructor
+ to change the default format used by this constructor.
The code
@@ -3352,10 +3356,12 @@ QVariant QSettings::value(const QString &key, const QVariant &defaultValue) cons
/*!
\since 4.4
- Sets the default file format to the given \a format, used for storing
- settings for the QSettings(QObject *) constructor.
+ Sets the default file format to the given \a format, which is used
+ for storing settings for the QSettings(QObject *) constructor.
- If no default format is set, QSettings::NativeFormat is used.
+ If no default format is set, QSettings::NativeFormat is used. See
+ the documentation for the QSettings constructor you are using to
+ see if that constructor will ignore this function.
\sa format()
*/
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 22d0019..6001d9d 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3874,10 +3874,15 @@ QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const
}
}
- if (host.startsWith(QLatin1Char('[')))
+ if (host.startsWith(QLatin1Char('['))) {
url += host.toLatin1();
- else
+ } else if (host.contains(QLatin1Char(':'))) {
+ url += '[';
+ url += host.toLatin1();
+ url += ']';
+ } else {
url += QUrl::toAce(host);
+ }
if (!(options & QUrl::RemovePort) && port != -1) {
url += ':';
url += QString::number(port).toAscii();
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index a8120cf..7be19b3 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -3332,6 +3332,7 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign
QObjectConnectionListVector *connectionLists = sender->d_func()->connectionLists;
if (!connectionLists) {
+ locker.unlock();
if (qt_signal_spy_callback_set.signal_end_callback != 0)
qt_signal_spy_callback_set.signal_end_callback(sender, signal_absolute_index);
return;
@@ -3401,11 +3402,11 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign
}
#endif
- locker.relock();
-
if (qt_signal_spy_callback_set.slot_end_callback != 0)
qt_signal_spy_callback_set.slot_end_callback(receiver, method);
+ locker.relock();
+
QObjectPrivate::resetCurrentSender(receiver, &currentSender, previousSender);
if (connectionLists->orphaned)