kpty: declare KPtyPrivate and KPtyDevicePrivate as class rather than struct

because Q_DECLARE_PUBLIC() declares class clangs emmits warning that the
classes were previously declared as structs, this change is kinda of revert
of previous series of struct <-> class warnings fixes and may need changes
in other places (such as konsole from kde-baseapps) to fix the same issues
given that now the forementioned classes declaration has changed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2015-10-31 13:03:20 +02:00
parent 295393eaae
commit 352b640187
4 changed files with 6 additions and 4 deletions

View file

@ -23,7 +23,7 @@
#include "kpty_export.h"
struct KPtyPrivate;
class KPtyPrivate;
struct termios;
/**

View file

@ -27,9 +27,10 @@
#include <QtCore/QByteArray>
struct KPtyPrivate {
class KPtyPrivate {
Q_DECLARE_PUBLIC(KPty)
public:
KPtyPrivate(KPty* parent);
virtual ~KPtyPrivate();
#ifndef HAVE_OPENPTY

View file

@ -245,9 +245,10 @@ static void qt_ignore_sigpipe()
#define NO_INTR(ret,func) do { ret = func; } while (ret < 0 && errno == EINTR)
struct KPtyDevicePrivate : public KPtyPrivate {
class KPtyDevicePrivate : public KPtyPrivate {
Q_DECLARE_PUBLIC(KPtyDevice)
public:
KPtyDevicePrivate(KPty* parent) :
KPtyPrivate(parent),
emittedReadyRead(false), emittedBytesWritten(false),

View file

@ -25,7 +25,7 @@
#include <QtCore/QIODevice>
struct KPtyDevicePrivate;
class KPtyDevicePrivate;
#define Q_DECLARE_PRIVATE_MI(Class, SuperClass) \
inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(SuperClass::d_ptr); } \