summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 8670ddb..caa3624 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -19,19 +19,25 @@
namespace Swift{
-QtSwift::QtSwift() {
- QSplitter* splitter = new QSplitter();
+QtSwift::QtSwift(bool netbookMode) {
+ if (netbookMode) {
+ splitter_ = new QSplitter();
+ } else {
+ splitter_ = NULL;
+ }
treeWidgetFactory_ = new QtTreeWidgetFactory();
- loginWindowFactory_ = new QtLoginWindowFactory(splitter);
+ loginWindowFactory_ = new QtLoginWindowFactory(splitter_);
rosterWindowFactory_ = new QtMainWindowFactory(treeWidgetFactory_);
- chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter);
+ chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter_);
systemTray_ = new QtSystemTray();
QCoreApplication::setApplicationName("Swift");
QCoreApplication::setOrganizationName("Swift");
QCoreApplication::setOrganizationDomain("swift.im");
settings_ = new QtSettingsProvider();
application_ = new PlatformApplication("Swift");
- splitter->show();
+ if (splitter_) {
+ splitter_->show();
+ }
mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_);
}
@@ -44,6 +50,7 @@ QtSwift::~QtSwift() {
delete settings_;
delete application_;
delete systemTray_;
+ delete splitter_;
}
}