mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use error callback to log errors in QMLManager
Instead of manually logging errors after each potentially error-producing function, use the error-callback. The error texts are accumulated in the QMLManager object for further use. The text is transported to the QMLManager object via a queued connection. Thus, errors can be reported from other threads without having to deal with manual locking. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
df81a39aa5
commit
f8f14c5edb
2 changed files with 32 additions and 16 deletions
|
@ -58,6 +58,8 @@ public:
|
|||
};
|
||||
|
||||
static QMLManager *instance();
|
||||
Q_INVOKABLE void registerError(const QString &error);
|
||||
QString consumeError();
|
||||
|
||||
QString cloudUserName() const;
|
||||
void setCloudUserName(const QString &cloudUserName);
|
||||
|
@ -200,6 +202,7 @@ private:
|
|||
QString m_ssrfGpsWebUserid;
|
||||
QString m_startPageText;
|
||||
QString m_logText;
|
||||
QString m_lastError;
|
||||
bool m_locationServiceEnabled;
|
||||
bool m_locationServiceAvailable;
|
||||
bool m_verboseEnabled;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue