Merge integration refs/builds/qtci/dev/1617802255
This commit is contained in:
commit
5712853061
@ -129,8 +129,13 @@ void QPauseAnimation::setDuration(int msecs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Q_D(QPauseAnimation);
|
Q_D(QPauseAnimation);
|
||||||
d->duration.setValue(msecs);
|
|
||||||
d->duration.notify();
|
if (msecs != d->duration) {
|
||||||
|
d->duration = msecs;
|
||||||
|
d->duration.notify();
|
||||||
|
} else {
|
||||||
|
d->duration.removeBindingUnlessInWrapper();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QBindable<int> QPauseAnimation::bindableDuration()
|
QBindable<int> QPauseAnimation::bindableDuration()
|
||||||
|
@ -257,9 +257,11 @@ void QTimer::start()
|
|||||||
void QTimer::start(int msec)
|
void QTimer::start(int msec)
|
||||||
{
|
{
|
||||||
Q_D(QTimer);
|
Q_D(QTimer);
|
||||||
|
const bool intervalChanged = msec != d->inter;
|
||||||
d->inter.setValue(msec);
|
d->inter.setValue(msec);
|
||||||
start();
|
start();
|
||||||
d->inter.notify();
|
if (intervalChanged)
|
||||||
|
d->inter.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -753,6 +755,7 @@ QBindable<bool> QTimer::bindableSingleShot()
|
|||||||
void QTimer::setInterval(int msec)
|
void QTimer::setInterval(int msec)
|
||||||
{
|
{
|
||||||
Q_D(QTimer);
|
Q_D(QTimer);
|
||||||
|
const bool intervalChanged = msec != d->inter;
|
||||||
d->inter.setValue(msec);
|
d->inter.setValue(msec);
|
||||||
if (d->id != INV_TIMER) { // create new timer
|
if (d->id != INV_TIMER) { // create new timer
|
||||||
QObject::killTimer(d->id); // restart timer
|
QObject::killTimer(d->id); // restart timer
|
||||||
@ -761,7 +764,8 @@ void QTimer::setInterval(int msec)
|
|||||||
// as timer state actually does not change
|
// as timer state actually does not change
|
||||||
}
|
}
|
||||||
|
|
||||||
d->inter.markDirty();
|
if (intervalChanged)
|
||||||
|
d->inter.markDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
int QTimer::interval() const
|
int QTimer::interval() const
|
||||||
|
@ -1740,6 +1740,24 @@ QDateTimeParser::findTimeZoneName(QStringView str, const QDateTime &when) const
|
|||||||
int index = std::distance(str.cbegin(),
|
int index = std::distance(str.cbegin(),
|
||||||
std::find_if(str.cbegin(), str.cend(), invalidZoneNameCharacter));
|
std::find_if(str.cbegin(), str.cend(), invalidZoneNameCharacter));
|
||||||
|
|
||||||
|
// Limit name fragments (between slashes) to 20 characters.
|
||||||
|
// (Valid time-zone IDs are allowed up to 14 and Android has quirks up to 17.)
|
||||||
|
// Limit number of fragments to six; no known zone name has more than four.
|
||||||
|
int lastSlash = -1;
|
||||||
|
int count = 0;
|
||||||
|
Q_ASSERT(index <= str.size());
|
||||||
|
while (lastSlash < index) {
|
||||||
|
int slash = str.indexOf(QLatin1Char('/'), lastSlash + 1);
|
||||||
|
if (slash < 0)
|
||||||
|
slash = index; // i.e. the end of the candidate text
|
||||||
|
else if (++count > 5)
|
||||||
|
index = slash; // Truncate
|
||||||
|
if (slash - lastSlash > 20)
|
||||||
|
index = lastSlash + 20; // Truncate
|
||||||
|
// If any of those conditions was met, index <= slash, so this exits the loop:
|
||||||
|
lastSlash = slash;
|
||||||
|
}
|
||||||
|
|
||||||
for (; index > systemLength; --index) { // Find longest match
|
for (; index > systemLength; --index) { // Find longest match
|
||||||
str.truncate(index);
|
str.truncate(index);
|
||||||
QTimeZone zone(str.toLatin1());
|
QTimeZone zone(str.toLatin1());
|
||||||
|
@ -929,8 +929,12 @@ void QMovie::setSpeed(int percentSpeed)
|
|||||||
Q_D(QMovie);
|
Q_D(QMovie);
|
||||||
if (!d->speed && d->movieState == Running)
|
if (!d->speed && d->movieState == Running)
|
||||||
d->nextImageTimer.start(nextFrameDelay());
|
d->nextImageTimer.start(nextFrameDelay());
|
||||||
d->speed.setValue(percentSpeed);
|
if (percentSpeed != d->speed) {
|
||||||
d->speed.notify();
|
d->speed = percentSpeed;
|
||||||
|
d->speed.notify();
|
||||||
|
} else {
|
||||||
|
d->speed.removeBindingUnlessInWrapper();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int QMovie::speed() const
|
int QMovie::speed() const
|
||||||
|
Loading…
Reference in New Issue
Block a user