What is the general rule to include files in a Qt add-on module, more specific, 
when should include files be prefixed with the module name?

If I look at QTcpSocket.h I see:
#include <QtNetwork/qabstractsocket.h>
#include <QtCore/qvariant.h>

Includes prefixed with the module name.

In QTcpSocket.cpp:
#include “qtcpsocket.h”
#include “qtcpsocket_p.h”
#include “qlist.h”
#include “qhostaddress.h”

Includes not prefixed.

If I look at qdbusabstractadaptor.cpp:
#include <QtCore/qcoreapplication.h>
#include <QtCore/qset.h>
…
#include “qdbusabstractadaptor.h”

Includes not related to the dbus adaptor are prefixed with the QtCore module 
name, the other is not prefixed.

Sometimes private header files are included prefixed with private 
(private/…_p.h), sometimes not.

Is there a general rule, best practice to follow for include files when 
implementing a module or add-on for Qt?

Thanks,

Kurt
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to