Despite not using `std::thread` or `QThread` anywhere, still getting following problems:
1. Always a runtime debug error log from Qt:
QObject::connect: Cannot queue arguments of type 'QAbstractSocket::SocketError'
(Make sure 'QAbstractSocket::SocketError' is registered using qRegisterMetaType().)
2. Intermittent crash on `TcpSocket::flush()` method; I use this method to make sure that the TCP is written immediately; Now sometimes the app crashes exactly at this method with `SIGPIPE`

Upon searching internet, found that people suggest that to fix 1st problem (i.e. the meta error), I need to register using qRegisterMetaType(), when we have multiple threads.
Same multithreading is referred as a cause for the 2nd problem as well; see this and this.

But I don't have more than 1 thread!
My socket code looks like below:
Qt Code:
  1. struct Socket : public QSslSocket
  2. {
  3. Q_OBJECT public:
  4.  
  5. void ConnectSlots ()
  6. {
  7. const auto connectionType = Qt::QueuedConnection;
  8. connect(this, SIGNAL(readyRead()), this, SLOT(ReceiveData()), connectionType);
  9. connect(this, SIGNAL(disconnected()), this, SLOT(Disconnected()), connectionType);
  10. connect(this, SIGNAL(error(QAbstractSocket::SocketError)),
  11. this, SLOT(Error(QAbstractSocket::SocketError)), connectionType);
  12. // ^^^^^^^ error comes whether I comment this or not
  13. }
  14.  
  15. public slots:
  16. void ReceiveData () { ... }
  17. void Disconnected () { ... }
  18. void Error () { ... }
  19. }
To copy to clipboard, switch view to plain text mode 
Question: Is Qt creating any internal thread by itself for read/write purpose? (I hope not). How to fix above 2 issues?