summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgberg <gberg@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-23 19:30:42 (GMT)
committergberg <gberg@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-23 19:30:42 (GMT)
commit654699a9aea6e6099f723e25d6a0a001b19f79e1 (patch)
tree3bd3f2e44bd3c910d69241d3c4d619be12202627
parentd365e901a749961b5c55a26db76bef26b0555579 (diff)
downloadkrfb-654699a9aea6e6099f723e25d6a0a001b19f79e1.tar.gz
krfb-654699a9aea6e6099f723e25d6a0a001b19f79e1.tar.xz
Fix all the #includes to not be complete chaos.
git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb@1189037 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--abstractconnectioncontroller.cpp9
-rw-r--r--abstractconnectioncontroller.h4
-rw-r--r--abstractrfbserver.cpp11
-rw-r--r--abstractrfbserver.h3
-rw-r--r--connectiondialog.cpp6
-rw-r--r--connectiondialog.h3
-rw-r--r--events.cpp4
-rw-r--r--events.h6
-rw-r--r--framebuffer.cpp6
-rw-r--r--framebuffer.h11
-rw-r--r--framebuffermanager.h1
-rw-r--r--framebufferplugin.h1
-rw-r--r--invitation.h5
-rw-r--r--invitationmanager.cpp2
-rw-r--r--invitationmanager.h4
-rw-r--r--invitedialog.cpp6
-rw-r--r--krfbconnectioncontroller.cpp33
-rw-r--r--krfbserver.cpp35
-rw-r--r--main.cpp25
-rw-r--r--manageinvitationsdialog.cpp30
-rw-r--r--manageinvitationsdialog.h3
-rw-r--r--personalinvitedialog.cpp15
-rw-r--r--personalinvitedialog.h6
-rw-r--r--servermanager.cpp1
-rw-r--r--trayicon.cpp19
-rw-r--r--trayicon.h4
26 files changed, 133 insertions, 120 deletions
diff --git a/abstractconnectioncontroller.cpp b/abstractconnectioncontroller.cpp
index 2980bb9..edb23f7 100644
--- a/abstractconnectioncontroller.cpp
+++ b/abstractconnectioncontroller.cpp
@@ -20,16 +20,19 @@
* Boston, MA 02110-1301, USA.
*/
-#include <KDebug>
-
#include "abstractconnectioncontroller.h"
#include "abstractrfbserver.h"
#include "connectiondialog.h"
-#include "events.h"
+
+#include <KDebug>
#include <string.h>
+// events.h includes Xlib.h, which must always be included after all Qt headers,
+// so this must always be the last #include.
+#include "events.h"
+
static void clientGoneHook(rfbClientPtr cl)
{
AbstractConnectionController *cc = static_cast<AbstractConnectionController *>(cl->clientData);
diff --git a/abstractconnectioncontroller.h b/abstractconnectioncontroller.h
index f7ad390..846a48a 100644
--- a/abstractconnectioncontroller.h
+++ b/abstractconnectioncontroller.h
@@ -22,10 +22,10 @@
#ifndef KRFB_ABSTRACTCONNECTIONCONTROLLER_H
#define KRFB_ABSTRACTCONNECTIONCONTROLLER_H
-#include <QtCore/QObject>
-
#include "rfb.h"
+#include <QtCore/QObject>
+
class AbstractRfbServer;
class AbstractConnectionController : public QObject
diff --git a/abstractrfbserver.cpp b/abstractrfbserver.cpp
index 3c61330..f255a3c 100644
--- a/abstractrfbserver.cpp
+++ b/abstractrfbserver.cpp
@@ -18,24 +18,23 @@
* Boston, MA 02110-1301, USA.
*/
-#include "servermanager.h"
-
#include "abstractrfbserver.h"
#include "abstractconnectioncontroller.h"
#include "framebuffer.h"
#include "invitationmanager.h"
#include "krfbconfig.h"
+#include "servermanager.h"
#include "sockethelpers.h"
-#include <QtCore/QPointer>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QTimer>
-
#include <KDebug>
#include <KLocale>
#include <KMessageBox>
+#include <QtCore/QPointer>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QTimer>
+
#include <X11/Xutil.h>
#include <X11/extensions/XTest.h>
diff --git a/abstractrfbserver.h b/abstractrfbserver.h
index db40c60..e7f4671 100644
--- a/abstractrfbserver.h
+++ b/abstractrfbserver.h
@@ -23,12 +23,11 @@
#define KRFB_ABSTRACTRFBSERVER_H
#include "framebuffer.h"
+#include "rfb.h"
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
-#include "rfb.h"
-
class AbstractConnectionController;
class AbstractRfbServer : public QObject
diff --git a/connectiondialog.cpp b/connectiondialog.cpp
index b267047..4f3d148 100644
--- a/connectiondialog.cpp
+++ b/connectiondialog.cpp
@@ -19,13 +19,13 @@
#include "connectiondialog.h"
-#include <QCheckBox>
-#include <QLabel>
-
#include <KIconLoader>
#include <KLocale>
#include <KStandardGuiItem>
+#include <QtGui/QCheckBox>
+#include <QtGui/QLabel>
+
ConnectionDialog::ConnectionDialog( QWidget *parent )
: KDialog( parent )
{
diff --git a/connectiondialog.h b/connectiondialog.h
index 30f0ae2..d9a407c 100644
--- a/connectiondialog.h
+++ b/connectiondialog.h
@@ -20,9 +20,10 @@
#ifndef CONNECTIONDIALOG_H
#define CONNECTIONDIALOG_H
-#include <KDialog>
#include "ui_connectionwidget.h"
+#include <KDialog>
+
class QWidget;
class ConnectionDialog : public KDialog, public Ui::ConnectionWidget
diff --git a/events.cpp b/events.cpp
index 9a52c4d..47ddccf 100644
--- a/events.cpp
+++ b/events.cpp
@@ -12,8 +12,8 @@
#include "abstractconnectioncontroller.h"
-#include <QApplication>
-#include <QX11Info>
+#include <QtGui/QApplication>
+#include <QtGui/QX11Info>
#include <X11/Xutil.h>
#include <X11/keysym.h>
diff --git a/events.h b/events.h
index 25dabf7..e40f9f3 100644
--- a/events.h
+++ b/events.h
@@ -11,9 +11,9 @@
#ifndef EVENTS_H
#define EVENTS_H
-#include <QDesktopWidget>
-#include <QEvent>
-#include <QString>
+#include <QtCore/QEvent>
+#include <QtCore/QString>
+#include <QtGui/QDesktopWidget>
#include <X11/Xlib.h>
diff --git a/framebuffer.cpp b/framebuffer.cpp
index 4004046..d529ab5 100644
--- a/framebuffer.cpp
+++ b/framebuffer.cpp
@@ -8,9 +8,8 @@
*/
#include "framebuffer.h"
-#include "framebuffer.moc"
-#include <config-krfb.h>
+#include "config-krfb.h"
#include <X11/Xutil.h>
@@ -69,3 +68,6 @@ void FrameBuffer::stopMonitor()
{
}
+
+#include "framebuffer.moc"
+
diff --git a/framebuffer.h b/framebuffer.h
index 1f8363c..1f55acf 100644
--- a/framebuffer.h
+++ b/framebuffer.h
@@ -10,14 +10,15 @@
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
-#include <QObject>
-#include <QRect>
-#include <QList>
-#include <QWidget>
+#include "rfb.h"
#include <kdemacros.h>
-#include "rfb.h"
+#include <QtCore/QObject>
+#include <QtCore/QRect>
+#include <QtCore/QList>
+
+#include <QtGui/QWidget>
class FrameBuffer;
/**
diff --git a/framebuffermanager.h b/framebuffermanager.h
index e91354f..56ed6d6 100644
--- a/framebuffermanager.h
+++ b/framebuffermanager.h
@@ -29,6 +29,7 @@
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QWeakPointer>
+
#include <QtGui/QWidget>
class FrameBufferPlugin;
diff --git a/framebufferplugin.h b/framebufferplugin.h
index 69f9300..11ab081 100644
--- a/framebufferplugin.h
+++ b/framebufferplugin.h
@@ -24,6 +24,7 @@
#include <kdemacros.h>
#include <QtCore/QVariantList>
+
#include <QtGui/QWidget>
class FrameBuffer;
diff --git a/invitation.h b/invitation.h
index 40a8da9..67ca95d 100644
--- a/invitation.h
+++ b/invitation.h
@@ -20,10 +20,9 @@
#include <KApplication>
#include <KConfig>
-#include <QObject>
-
-#include <QDateTime>
+#include <QtCore/QDateTime>
+#include <QtCore/QObject>
const int INVITATION_DURATION = 60*60;
diff --git a/invitationmanager.cpp b/invitationmanager.cpp
index 697658d..c9df012 100644
--- a/invitationmanager.cpp
+++ b/invitationmanager.cpp
@@ -13,7 +13,7 @@
#include <KConfig>
#include <KGlobal>
-#include <QTimer>
+#include <QtCore/QTimer>
class InvitationManagerPrivate
{
diff --git a/invitationmanager.h b/invitationmanager.h
index ba39e15..bc3270b 100644
--- a/invitationmanager.h
+++ b/invitationmanager.h
@@ -9,10 +9,10 @@
#ifndef INVITATIONMANAGER_H
#define INVITATIONMANAGER_H
-#include <QObject>
-#include <QList>
#include "invitation.h"
+#include <QtCore/QList>
+#include <QtCore/QObject>
class InvitationManagerPrivate;
/**
diff --git a/invitedialog.cpp b/invitedialog.cpp
index 8417bdc..1cf7c18 100644
--- a/invitedialog.cpp
+++ b/invitedialog.cpp
@@ -19,14 +19,14 @@
#include "invitedialog.h"
-#include <kiconloader.h>
-#include <klocale.h>
+#include <KIconLoader>
+#include <KLocale>
#include <KStandardGuiItem>
+#include <QtGui/QCursor>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QToolTip>
-#include <QtGui/QCursor>
InviteDialog::InviteDialog( QWidget *parent )
: KDialog( parent )
diff --git a/krfbconnectioncontroller.cpp b/krfbconnectioncontroller.cpp
index 3b7be3e..c3f1486 100644
--- a/krfbconnectioncontroller.cpp
+++ b/krfbconnectioncontroller.cpp
@@ -22,31 +22,34 @@
#include "krfbconnectioncontroller.h"
-#include <QX11Info>
-#include <QHostInfo>
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QTcpSocket>
-#include <QTimer>
+#include "connectiondialog.h"
+#include "invitationmanager.h"
+#include "krfbconfig.h"
+#include "krfbserver.h"
+#include "sockethelpers.h"
#include <KConfig>
+#include <KDebug>
#include <KGlobal>
-#include <KUser>
-#include <KNotification>
#include <KLocale>
-#include <KDebug>
+#include <KNotification>
+#include <KUser>
+#include <QtCore/QTimer>
-#include "invitationmanager.h"
-#include "connectiondialog.h"
-#include "events.h"
-#include "krfbserver.h"
-#include "sockethelpers.h"
+#include <QtGui/QApplication>
+#include <QtGui/QDesktopWidget>
+#include <QtGui/QX11Info>
-#include "krfbconfig.h"
+#include <QtNetwork/QHostInfo>
+#include <QtNetwork/QTcpSocket>
#include <X11/Xutil.h>
+// events.h includes Xlib.h, which must always be included after all Qt headers,
+// so this must always be the last #include.
+#include "events.h"
+
static bool checkPassword(const QString &p, unsigned char *ochallenge, const char *response, int len)
{
if ((len == 0) && (p.length() == 0)) {
diff --git a/krfbserver.cpp b/krfbserver.cpp
index db6e220..500f4ba 100644
--- a/krfbserver.cpp
+++ b/krfbserver.cpp
@@ -8,35 +8,34 @@
version 2 of the License, or (at your option) any later version.
*/
-#include "servermanager.h"
-
#include "krfbserver.h"
-#include "krfbserver.moc"
+#include "abstractconnectioncontroller.h"
+#include "framebuffer.h"
+#include "framebuffermanager.h"
+#include "krfbconfig.h"
#include "krfbconnectioncontroller.h"
+#include "invitationmanager.h"
+#include "servermanager.h"
+#include "sockethelpers.h"
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QTimer>
-#include <QHostInfo>
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QPointer>
+#include <dnssd/publicservice.h>
#include <KGlobal>
#include <KUser>
#include <KLocale>
#include <KDebug>
#include <KMessageBox>
-#include <dnssd/publicservice.h>
-#include "abstractconnectioncontroller.h"
-#include "framebuffer.h"
-#include "framebuffermanager.h"
-#include "krfbconfig.h"
-#include "invitationmanager.h"
-#include "sockethelpers.h"
+#include <QtCore/QPointer>
+#include <QtCore/QTimer>
+
+#include <QtGui/QApplication>
+#include <QtGui/QDesktopWidget>
+#include <QtNetwork/QHostInfo>
+#include <QtNetwork/QTcpServer>
+#include <QtNetwork/QTcpSocket>
KrfbServer::KrfbServer()
: AbstractRfbServer()
@@ -97,3 +96,5 @@ enum rfbNewClientAction KrfbServer::handleNewClient(struct _rfbClientRec * cl)
}
+#include "krfbserver.moc"
+
diff --git a/main.cpp b/main.cpp
index d6c421a..424cee7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -15,24 +15,23 @@
* *
***************************************************************************/
-#include "trayicon.h"
-//#include "configuration.h"
#include "krfbserver.h"
#include "manageinvitationsdialog.h"
#include "servermanager.h"
+#include "trayicon.h"
-#include <QPixmap>
-#include <kaction.h>
-#include <kdebug.h>
+#include <KAboutApplicationDialog>
+#include <KAboutData>
+#include <KAction>
+#include <KApplication>
+#include <KCmdLineArgs>
+#include <KDebug>
+#include <KLocale>
+#include <KMessageBox>
#include <KNotification>
-#include <ksystemtrayicon.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kaboutapplicationdialog.h>
-#include <klocale.h>
-#include <kapplication.h>
-#include <kmessagebox.h>
-#include <qwindowdefs.h>
+
+#include <QtGui/QPixmap>
+#include <QtGui/qwindowdefs.h>
#include <signal.h>
diff --git a/manageinvitationsdialog.cpp b/manageinvitationsdialog.cpp
index 2d3911a..44781ea 100644
--- a/manageinvitationsdialog.cpp
+++ b/manageinvitationsdialog.cpp
@@ -7,33 +7,30 @@
version 2 of the License, or (at your option) any later version.
*/
#include "manageinvitationsdialog.h"
-#include "manageinvitationsdialog.moc"
-#include "personalinvitedialog.h"
#include "invitationmanager.h"
#include "invitation.h"
#include "krfbconfig.h"
#include "krfbserver.h"
+#include "personalinvitedialog.h"
#include "servermanager.h"
+#include "ui_configtcp.h"
+#include "ui_configsecurity.h"
-#include <QWidget>
-#include <QToolTip>
-#include <QCursor>
-#include <QDateTime>
-#include <QNetworkInterface>
-
-#include <KStandardGuiItem>
+#include <KConfigDialog>
+#include <KGlobal>
#include <KIconLoader>
#include <KLocale>
-#include <KGlobal>
-#include <KConfigDialog>
#include <KMessageBox>
-#include <KToolInvocation>
+#include <KStandardGuiItem>
#include <KSystemTimeZone>
+#include <KToolInvocation>
-// settings dialog
-#include "ui_configtcp.h"
-#include "ui_configsecurity.h"
+#include <QtGui/QWidget>
+#include <QtGui/QToolTip>
+#include <QtGui/QCursor>
+#include <QtCore/QDateTime>
+#include <QtNetwork/QNetworkInterface>
class TCP: public QWidget, public Ui::TCP {
public:
@@ -241,3 +238,6 @@ void ManageInvitationsDialog::selectionChanged()
deleteOneButton->setEnabled(invitationWidget->selectedItems().size() > 0);
}
+
+#include "manageinvitationsdialog.moc"
+
diff --git a/manageinvitationsdialog.h b/manageinvitationsdialog.h
index d7f171a..3a869de 100644
--- a/manageinvitationsdialog.h
+++ b/manageinvitationsdialog.h
@@ -10,9 +10,10 @@
#ifndef MANAGEINVITATIONSDIALOG_H
#define MANAGEINVITATIONSDIALOG_H
-#include <KDialog>
#include "ui_manageinvitations.h"
+#include <KDialog>
+
/**
@author Alessandro Praduroux <pradu@pradu.it>
*/
diff --git a/personalinvitedialog.cpp b/personalinvitedialog.cpp
index 9b3bce3..cb30d06 100644
--- a/personalinvitedialog.cpp
+++ b/personalinvitedialog.cpp
@@ -18,16 +18,16 @@
*/
#include "personalinvitedialog.h"
-#include "personalinvitedialog.moc"
+
+#include "krfbconfig.h"
+
+#include <KIconLoader>
+#include <KLocale>
#include <QtGui/QLabel>
#include <QtGui/QToolTip>
-#include <QNetworkInterface>
-#include <kiconloader.h>
-#include <klocale.h>
-
-#include "krfbconfig.h"
+#include <QtNetwork/QNetworkInterface>
PersonalInviteDialog::PersonalInviteDialog( QWidget *parent )
: KDialog( parent )
@@ -97,3 +97,6 @@ void PersonalInviteDialog::showWhatsthis(const QString &link)
}
}
+
+#include "personalinvitedialog.moc"
+
diff --git a/personalinvitedialog.h b/personalinvitedialog.h
index b926c3c..d3f4491 100644
--- a/personalinvitedialog.h
+++ b/personalinvitedialog.h
@@ -20,10 +20,12 @@
#ifndef PERSONALINVITEDIALOG_H
#define PERSONALINVITEDIALOG_H
-#include <qdatetime.h>
-#include <KDialog>
#include "ui_personalinvitewidget.h"
+#include <KDialog>
+
+#include <QtCore/QDateTime>
+
class QWidget;
class PersonalInviteDialog : public KDialog, public Ui::PersonalInviteWidget
{
diff --git a/servermanager.cpp b/servermanager.cpp
index 22141b7..a56a6e9 100644
--- a/servermanager.cpp
+++ b/servermanager.cpp
@@ -21,7 +21,6 @@
#include "servermanager.h"
#include "sockethelpers.h"
-
#include "rfb.h"
#include <KDebug>
diff --git a/trayicon.cpp b/trayicon.cpp
index b4c57ce..5d30cb4 100644
--- a/trayicon.cpp
+++ b/trayicon.cpp
@@ -17,18 +17,17 @@
#include "trayicon.h"
-#include <kstandardaction.h>
-#include <klocale.h>
-#include <kdialog.h>
-#include <kmenu.h>
-#include <kglobal.h>
-#include <kactioncollection.h>
-#include <kaboutapplicationdialog.h>
-#include <KNotification>
-
-#include "manageinvitationsdialog.h"
#include "invitedialog.h"
+#include "manageinvitationsdialog.h"
+#include <KAboutApplicationDialog>
+#include <KActionCollection>
+#include <KDialog>
+#include <KGlobal>
+#include <KLocale>
+#include <KMenu>
+#include <KNotification>
+#include <KStandardAction>
TrayIcon::TrayIcon(KDialog *d)
: KStatusNotifierItem(d),
diff --git a/trayicon.h b/trayicon.h
index ce0849f..757bbcf 100644
--- a/trayicon.h
+++ b/trayicon.h
@@ -18,10 +18,10 @@
#ifndef TRAYICON_H
#define TRAYICON_H
-#include <kpassivepopup.h>
#include <KActionCollection>
+#include <KPassivePopup>
+#include <KStatusNotifierItem>
#include <KToggleAction>
-#include <kstatusnotifieritem.h>
class KDialog;