Age | Commit message (Collapse) | Author |
|
|
|
The AccountManager creates AccountState objects, and stores them in a
shared pointer.
Previously, the raw pointer was given out, and stored in other objects.
That made removal very tricky: when an account gets removed, the
underlying object gets deleted, and then all classes that listen get
notified of the deletion. Those classes would sometimes put a nullptr
into the AccountState pointer they stored, and in each usage would
(hopefully) check for a nullptr. The problem was that a number of checks
were missing, which the clang static analyser pointed out.
This patch changes nearly all uses of a raw pointer into the shared
pointer, thereby making sure all usages have a valid reference, even
when account deletion happens. The two places where a raw pointer is
still used, now put it into a refcounted pointer as soon as possible.
|
|
* Replaced obsolete foreach-loops with for-loops
* Added a copy of queries into SqlDatabase::close
* Used const reference to avoid unneeded copying
* Fixed Qt containers possible detach within for-loop
* Removed unneeded copies before for-loops
|
|
|
|
Qt's JSON API is confusing, it doesn't convert to a string as one expects.
|
|
(cherry picked from commit e86416fff7c74174e699802cec46da8ca3c3aad5)
|
|
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.
This commit only contains calls that were automatically converted with clazy.
|
|
|
|
Use qCInfo for anything that has general value for support and
development. Use qCWarning for any recoverable error and qCCritical
for anything that could result in data loss or would identify a serious
issue with the code.
Issue #5647
|
|
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.
Issue #5647
|
|
|
|
See #5180
|
|
|
|
|
|
Also avoid memory leaks if it is not connected.
|
|
based on review feedback.
|
|
That cleans the ActivityWidget class
|