summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-05-05 09:22:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-05 09:22:53 +0200
commit1f278c6e1126a41e83aec83e2eeacb96ee08e74b (patch)
treec544d6d79205bf77ae9aefe860a88965bceff995 /src/corelib
parenta5bba1f9da376840d92f2008d8ba8433753b1847 (diff)
parente6286ca289db11463d13ec4d31055995b32ad258 (diff)
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/doc/qtcore.qdocconf3
-rw-r--r--src/corelib/io/qloggingcategory.cpp6
-rw-r--r--src/corelib/kernel/qmetatype.h1
-rw-r--r--src/corelib/tools/qtimezoneprivate_mac.mm8
4 files changed, 10 insertions, 8 deletions
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index c8eb15a7f7..c9c8f1da54 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -26,7 +26,8 @@ qhp.QtCore.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtcore/qtcore.tags
-depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtqml qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
+depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
+# depends += qtqml # Qt namespace collides with QtQml::Qt, see QTBUG-38630
headerdirs += ..
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 08ecd67dc8..518052e537 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -62,6 +62,12 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
by a string - at runtime. Whether a category should be actually logged or
not can be checked with the \l isEnabled() methods.
+ All objects are meant to be configured by a common registry (see also
+ \l{Configuring Categories}). Different objects can also represent the same
+ category. It's therefore not recommended to export objects across module
+ boundaries, nor to manipulate the objects directly, nor to inherit from
+ QLoggingCategory.
+
\section1 Creating category objects
The Q_LOGGING_CATEGORY() and the Q_DECLARE_LOGGING_CATEGORY() macros
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 80567d6a71..3b35a51e2c 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -777,6 +777,7 @@ struct VariantData
const void *data;
const uint flags;
private:
+ // copy constructor allowed to be implicit to silence level 4 warning from MSVC
VariantData &operator=(const VariantData &) Q_DECL_EQ_DELETE;
};
diff --git a/src/corelib/tools/qtimezoneprivate_mac.mm b/src/corelib/tools/qtimezoneprivate_mac.mm
index 49930490ff..7985b78712 100644
--- a/src/corelib/tools/qtimezoneprivate_mac.mm
+++ b/src/corelib/tools/qtimezoneprivate_mac.mm
@@ -89,7 +89,7 @@ QTimeZonePrivate *QMacTimeZonePrivate::clone()
void QMacTimeZonePrivate::init(const QByteArray &ianaId)
{
if (availableTimeZoneIds().contains(ianaId)) {
- m_nstz = [NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))];
+ m_nstz = [[NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))] retain];
if (m_nstz)
m_id = ianaId;
}
@@ -142,7 +142,6 @@ QString QMacTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
NSString *macLocaleCode = QCFString::toNSString(locale.name());
NSLocale *macLocale = [[NSLocale alloc] initWithLocaleIdentifier:macLocaleCode];
const QString result = QCFString::toQString([m_nstz localizedName:style locale:macLocale]);
- [macLocaleCode release];
[macLocale release];
return result;
}
@@ -192,7 +191,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::data(qint64 forMSecsSinceEpoch) cons
data.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:date];
data.standardTimeOffset = data.offsetFromUtc - data.daylightTimeOffset;
data.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:date]);
- [date release];
return data;
}
@@ -203,8 +201,6 @@ bool QMacTimeZonePrivate::hasTransitions() const
NSDate *epoch = [NSDate dateWithTimeIntervalSince1970:0];
const NSDate *date = [m_nstz nextDaylightSavingTimeTransitionAfterDate:epoch];
const bool result = ([date timeIntervalSince1970] > [epoch timeIntervalSince1970]);
- [epoch release];
- [date release];
return result;
}
@@ -224,7 +220,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::nextTransition(qint64 afterMSecsSinc
tran.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:nextDate];
tran.standardTimeOffset = tran.offsetFromUtc - tran.daylightTimeOffset;
tran.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:nextDate]);
- [nextDate release];
return tran;
}
@@ -246,7 +241,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::previousTransition(qint64 beforeMSec
nextDate = [m_nstz nextDaylightSavingTimeTransitionAfterDate:nextDate];
nextSecs = [nextDate timeIntervalSince1970];
}
- [nextDate release];
}
if (secsList.size() >= 1)
return data(qint64(secsList.last()) * 1000);