[Telepathy-commits] [telepathy-qt4/master] Avoid circular dependency between Connection and PendingChannel, fixing compilation

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Jan 5 09:30:33 PST 2009


Also include the correct version of the Channel header in
pending-channel.cpp
---
 TelepathyQt4/Client/connection.h        |    7 +------
 TelepathyQt4/Client/pending-channel.cpp |    2 +-
 TelepathyQt4/Client/pending-channel.h   |    3 +--
 tests/pinocchio/chan-basics.cpp         |    1 +
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/TelepathyQt4/Client/connection.h b/TelepathyQt4/Client/connection.h
index 452d736..4947e96 100644
--- a/TelepathyQt4/Client/connection.h
+++ b/TelepathyQt4/Client/connection.h
@@ -48,6 +48,7 @@
 namespace Telepathy {
 namespace Client {
 class Connection;
+class PendingChannel;
 }
 }
 
@@ -63,12 +64,6 @@ class Connection;
 #include <QDBusPendingCallWatcher>
 #include <QStringList>
 
-namespace Telepathy {
-namespace Client {
-class PendingChannel;
-}
-};
-
 namespace Telepathy
 {
 namespace Client
diff --git a/TelepathyQt4/Client/pending-channel.cpp b/TelepathyQt4/Client/pending-channel.cpp
index ef0f44f..2f97080 100644
--- a/TelepathyQt4/Client/pending-channel.cpp
+++ b/TelepathyQt4/Client/pending-channel.cpp
@@ -23,7 +23,7 @@
 #include "pending-channel.h"
 #include "pending-channel.moc.hpp"
 
-#include <TelepathyQt4/Client/channel.h>
+#include <TelepathyQt4/Client/Channel>
 #include <TelepathyQt4/debug-internal.h>
 
 namespace Telepathy
diff --git a/TelepathyQt4/Client/pending-channel.h b/TelepathyQt4/Client/pending-channel.h
index 8ffe296..b9c52b5 100644
--- a/TelepathyQt4/Client/pending-channel.h
+++ b/TelepathyQt4/Client/pending-channel.h
@@ -45,8 +45,6 @@
  * interfaces.
  */
 
-#include <TelepathyQt4/Client/Channel>
-#include <TelepathyQt4/Client/Connection>
 #include <TelepathyQt4/Client/PendingOperation>
 #include <TelepathyQt4/Constants>
 #include <TelepathyQt4/Types>
@@ -54,6 +52,7 @@
 namespace Telepathy {
 namespace Client {
 class Channel;
+class Connection;
 }
 }
 
diff --git a/tests/pinocchio/chan-basics.cpp b/tests/pinocchio/chan-basics.cpp
index 699e4be..f616f0a 100644
--- a/tests/pinocchio/chan-basics.cpp
+++ b/tests/pinocchio/chan-basics.cpp
@@ -8,6 +8,7 @@
 #include <TelepathyQt4/Client/Channel>
 #include <TelepathyQt4/Client/Connection>
 #include <TelepathyQt4/Client/ConnectionManager>
+#include <TelepathyQt4/Client/PendingChannel>
 
 #include <tests/pinocchio/lib.h>
 
-- 
1.5.6.5



More information about the Telepathy-commits mailing list