Clang: Improve interfaces

The interfaces should never used to handle ownership. So it is now using
protected destructors. Copy operations are forbidden too.

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c35-a-base-class-destructor-should-be-either-public-and-virtual-or-protected-and-nonvirtual

Change-Id: Ib0b60a73a7ec130973b5cb0095cc5b2f10fa0758
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-03-12 14:08:18 +01:00
parent f1e02c0826
commit 9c4bfbe20a
52 changed files with 186 additions and 316 deletions

View File

@@ -54,7 +54,9 @@ class CLANGSUPPORT_EXPORT ConnectionClient : public QObject
public:
ConnectionClient(const QString &connectionName);
virtual ~ConnectionClient();
ConnectionClient(const ConnectionClient &) = delete;
ConnectionClient &operator=(const ConnectionClient &) = delete;
void startProcessAndConnectToServerAsynchronously();
void disconnectFromServer();
@@ -82,6 +84,9 @@ signals:
void disconnectedFromLocalSocket();
void processFinished();
protected:
~ConnectionClient();
protected:
QIODevice *ioDevice();
const QTemporaryDir &temporaryDirectory() const;