зеркало из https://github.com/nextcloud/desktop.git
Don't call QElapsedTimer::restart on uninitialized timer
That's an undefined behavior. Since we don't use the return value anyway, we should just use start()
This commit is contained in:
Родитель
03aa7e3044
Коммит
f88431adbf
|
@ -160,7 +160,7 @@ bool AccountState::isConnected() const
|
|||
|
||||
void AccountState::tagLastSuccessfullETagRequest()
|
||||
{
|
||||
_timeSinceLastETagCheck.restart();
|
||||
_timeSinceLastETagCheck.start();
|
||||
}
|
||||
|
||||
void AccountState::checkConnectivity()
|
||||
|
|
|
@ -348,7 +348,7 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList &list)
|
|||
|
||||
if (newGuiLogCount > 0) {
|
||||
// restart the gui log timer now that we show a notification
|
||||
_guiLogTimer.restart();
|
||||
_guiLogTimer.start();
|
||||
|
||||
// Assemble a tray notification
|
||||
QString msg = tr("You received %n new notification(s) from %2.", "", accNotified[accNotified.keys().at(0)]).arg(accNotified.keys().at(0));
|
||||
|
|
|
@ -629,7 +629,7 @@ void Folder::startSync(const QStringList &pathList)
|
|||
}
|
||||
_csyncUnavail = false;
|
||||
|
||||
_timeSinceLastSyncStart.restart();
|
||||
_timeSinceLastSyncStart.start();
|
||||
_syncResult.setStatus(SyncResult::SyncPrepare);
|
||||
emit syncStateChange();
|
||||
|
||||
|
@ -798,7 +798,7 @@ void Folder::slotSyncFinished(bool success)
|
|||
QTimer::singleShot(200, this, SLOT(slotEmitFinishedDelayed()));
|
||||
|
||||
_lastSyncDuration = _timeSinceLastSyncStart.elapsed();
|
||||
_timeSinceLastSyncDone.restart();
|
||||
_timeSinceLastSyncDone.start();
|
||||
|
||||
// Increment the follow-up sync counter if necessary.
|
||||
if (anotherSyncNeeded == ImmediateFollowUp) {
|
||||
|
|
|
@ -159,11 +159,11 @@ void DiscoveryJob::update_job_update_callback(bool local,
|
|||
if (updateJob) {
|
||||
// Don't wanna overload the UI
|
||||
if (!updateJob->_lastUpdateProgressCallbackCall.isValid()) {
|
||||
updateJob->_lastUpdateProgressCallbackCall.restart(); // first call
|
||||
updateJob->_lastUpdateProgressCallbackCall.start(); // first call
|
||||
} else if (updateJob->_lastUpdateProgressCallbackCall.elapsed() < 200) {
|
||||
return;
|
||||
} else {
|
||||
updateJob->_lastUpdateProgressCallbackCall.restart();
|
||||
updateJob->_lastUpdateProgressCallbackCall.start();
|
||||
}
|
||||
|
||||
QByteArray pPath(dirUrl);
|
||||
|
|
Загрузка…
Ссылка в новой задаче