summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp16
-rw-r--r--src/corelib/animation/qabstractanimation_p.h11
-rw-r--r--src/corelib/codecs/codecs.pri4
-rw-r--r--src/corelib/io/qsettings.cpp6
-rw-r--r--src/corelib/kernel/qmetaobject_p.h11
5 files changed, 34 insertions, 14 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 04342e7..641b42b 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -168,7 +168,7 @@ Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
QUnifiedTimer::QUnifiedTimer() :
QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
currentAnimationIdx(0), consistentTiming(false), slowMode(false),
- isPauseTimerActive(false), runningLeafAnimations(0)
+ slowdownFactor(5.0f), isPauseTimerActive(false), runningLeafAnimations(0)
{
time.invalidate();
}
@@ -205,12 +205,18 @@ void QUnifiedTimer::ensureTimerUpdate()
void QUnifiedTimer::updateAnimationsTime()
{
+ qint64 totalElapsed = time.elapsed();
// ignore consistentTiming in case the pause timer is active
int delta = (consistentTiming && !isPauseTimerActive) ?
- timingInterval : time.elapsed() - lastTick;
- if (slowMode)
- delta /= 5;
- lastTick = time.elapsed();
+ timingInterval : totalElapsed - lastTick;
+ if (slowMode) {
+ if (slowdownFactor > 0)
+ delta = qRound(delta / slowdownFactor);
+ else
+ delta = 0;
+ }
+
+ lastTick = totalElapsed;
//we make sure we only call update time if the time has actually changed
//it might happen in some cases that the time doesn't change because events are delayed
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index fcfe824..d3d4098 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -145,8 +145,9 @@ public:
*/
void setConsistentTiming(bool consistent) { consistentTiming = consistent; }
- //this facilitates fine-tuning of complex animations
+ //these facilitate fine-tuning of complex animations
void setSlowModeEnabled(bool enabled) { slowMode = enabled; }
+ void setSlowdownFactor(qreal factor) { slowdownFactor = factor; }
/*
this is used for updating the currentTime of all animations in case the pause
@@ -171,11 +172,17 @@ private:
ElapsedTimer time;
- int lastTick;
+ qint64 lastTick;
int timingInterval;
int currentAnimationIdx;
bool consistentTiming;
bool slowMode;
+
+ // This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick
+ // when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16)
+ // stops all animations.
+ qreal slowdownFactor;
+
// bool to indicate that only pause animations are active
bool isPauseTimerActive;
diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri
index c572e08..46d7dd4 100644
--- a/src/corelib/codecs/codecs.pri
+++ b/src/corelib/codecs/codecs.pri
@@ -31,6 +31,10 @@ unix {
DEFINES += GNU_LIBICONV
!mac:LIBS_PRIVATE *= -liconv
+ } else:contains(QT_CONFIG,sun-libiconv) {
+ HEADERS += codecs/qiconvcodec_p.h
+ SOURCES += codecs/qiconvcodec.cpp
+ DEFINES += GNU_LIBICONV
} else:!symbian {
# no iconv, so we put all plugins in the library
HEADERS += \
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 64015ce..f802412 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2274,9 +2274,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
be different instances of your application running at the same
time or different applications altogether) to read and write to
the same system locations. It uses advisory file locking and a
- smart merging algorithm to ensure data integrity. Changes
- performed by another process aren't visible in the current
- process until sync() is called.
+ smart merging algorithm to ensure data integrity. Note that sync()
+ imports changes made by other processes (in addition to writing
+ the changes from this QSettings).
\section1 Platform-Specific Notes
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index b538787..4a03874 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -276,12 +276,15 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
++templdepth;
if (c == '>')
--templdepth;
- if (templdepth == 0) {
+ if (templdepth == 0 || (templdepth == 1 && c == ',')) {
result += normalizeTypeInternal(tt, t-1, fixScope, false);
result += c;
- if (*t == '>')
- result += ' '; // avoid >>
- break;
+ if (templdepth == 0) {
+ if (*t == '>')
+ result += ' '; // avoid >>
+ break;
+ }
+ tt = t;
}
}
}