diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-01-07 13:32:02 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-01-10 12:54:53 +0100 |
commit | 0de6c26ac17c90f513329fdbe87ef036fc25925a (patch) | |
tree | 34073f867f729cc49eed8c20835e188b5083eae8 /src/network/socket/qlocalsocket.h | |
parent | 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152 (diff) |
QLocalSocket - deprecate ambiguous 'error' overloads
QLocalSocket::error is overloaded as a signal and an accessor (for the
error reported by the signal). This means connecting to the signal using
a pointer to member function would require ambiguity resolution. We
deprecate the old accessor (to be removed in Qt 6) and introduce a new one -
'socketError'.
[ChangeLog][Deprecation Notice] QLocalSocket::error() (the getter) is deprecated; superseded by socketError().
Task-number: QTBUG-80369
Change-Id: Iab346f7b4cd1024dee9e5ef71b4b7e09f6d95b12
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/socket/qlocalsocket.h')
-rw-r--r-- | src/network/socket/qlocalsocket.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/socket/qlocalsocket.h b/src/network/socket/qlocalsocket.h index 1876a6ac0d..9cf76d1022 100644 --- a/src/network/socket/qlocalsocket.h +++ b/src/network/socket/qlocalsocket.h @@ -97,7 +97,12 @@ public: virtual bool canReadLine() const override; virtual bool open(OpenMode openMode = ReadWrite) override; virtual void close() override; - LocalSocketError error() const; + +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use socketError()") LocalSocketError error() const; +#endif // QT_DEPRECATED_SINCE(5, 15) + + LocalSocketError socketError() const; bool flush(); bool isValid() const; qint64 readBufferSize() const; |