summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-11-08 19:26:36 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-11-08 19:26:36 (GMT)
commite77d80d9258699295ad793a8a94e369be5e31a36 (patch)
treeb75f1a644740e9d216701e0095c1bd14573dbcdd /Swift/Controllers/UnitTest/MockMainWindow.h
parentb6003bea740e8898127ec135e230eed421924370 (diff)
downloadswift-e77d80d9258699295ad793a8a94e369be5e31a36.zip
swift-e77d80d9258699295ad793a8a94e369be5e31a36.tar.bz2
Fix for crash on login failure. Scaffoling for testing roster stuff.
Diffstat (limited to 'Swift/Controllers/UnitTest/MockMainWindow.h')
-rw-r--r--Swift/Controllers/UnitTest/MockMainWindow.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Swift/Controllers/UnitTest/MockMainWindow.h b/Swift/Controllers/UnitTest/MockMainWindow.h
new file mode 100644
index 0000000..9d2389b
--- /dev/null
+++ b/Swift/Controllers/UnitTest/MockMainWindow.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "Swift/Controllers/MainWindow.h"
+#include "Swiften/Roster/TreeWidget.h"
+
+namespace Swift {
+ class MockMainWindow : public MainWindow {
+ public:
+ MockMainWindow(TreeWidget* treeWidget) {treeWidget_ = treeWidget;};
+ virtual ~MockMainWindow() {};
+ virtual TreeWidget* getTreeWidget() {return treeWidget_;};
+ virtual void setMyName(const String& /*name*/) {};;
+ virtual void setMyAvatarPath(const String& /*path*/) {};
+ virtual void setMyStatusText(const String& /*status*/) {};
+ virtual void setMyStatusType(StatusShow::Type /*type*/) {};
+
+ private:
+ TreeWidget* treeWidget_;
+ };
+}