summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp14
-rw-r--r--Swift/QtUI/QtSwift.h11
2 files changed, 7 insertions, 18 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index d9879a2..d61f94c 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -26,9 +26,9 @@
#include "SwifTools/Application/PlatformApplicationPathProvider.h"
#include "Swiften/Avatars/AvatarFileStorage.h"
#include "Swiften/Disco/CapsFileStorage.h"
-#include "Swiften/VCards/VCardFileStorageFactory.h"
#include "Swiften/Base/String.h"
#include "Swiften/Base/Platform.h"
+#include "Swift/Controllers/FileStoragesFactory.h"
#include "Swiften/Elements/Presence.h"
#include "Swiften/Client/Client.h"
#include "Swift/Controllers/MainController.h"
@@ -95,9 +95,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
tabs_ = options.count("no-tabs") && !(splitter_ > 0) ? NULL : new QtChatTabs();
settings_ = new QtSettingsProvider();
applicationPathProvider_ = new PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME);
- avatarStorage_ = new AvatarFileStorage(applicationPathProvider_->getAvatarDir());
- vcardStorageFactory_ = new VCardFileStorageFactory(applicationPathProvider_->getDataDir());
- capsStorage_ = new CapsFileStorage(applicationPathProvider_->getDataDir() / "caps");
+ storagesFactory_ = new FileStoragesFactory(applicationPathProvider_->getDataDir());
chatWindowFactory_ = new QtChatWindowFactory(splitter_, settings_, tabs_, "");
soundPlayer_ = new QtSoundPlayer(applicationPathProvider_);
#if defined(HAVE_GROWL)
@@ -147,9 +145,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
xmlConsoleWidgetFactory,
chatListWindowFactory,
mucSearchWindowFactory,
- avatarStorage_,
- capsStorage_,
- vcardStorageFactory_,
+ storagesFactory_,
dock_,
notifier_,
options.count("latency-debug") > 0);
@@ -197,9 +193,7 @@ QtSwift::~QtSwift() {
foreach (QtChatListWindowFactory* factory, chatListWindowFactories_) {
delete factory;
}
- delete capsStorage_;
- delete avatarStorage_;
- delete vcardStorageFactory_;
+ delete storagesFactory_;
}
}
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h
index d72faaa..59fa746 100644
--- a/Swift/QtUI/QtSwift.h
+++ b/Swift/QtUI/QtSwift.h
@@ -4,8 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtSwift_H
-#define SWIFT_QtSwift_H
+#pragma once
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/options_description.hpp>
@@ -31,7 +30,7 @@ class QSplitter;
namespace Swift {
class Dock;
class Notifier;
- class VCardStorageFactory;
+ class StoragesFactory;
class AutoUpdater;
class ApplicationPathProvider;
class AvatarStorage;
@@ -70,9 +69,7 @@ namespace Swift {
Dock* dock_;
QtChatTabs* tabs_;
ApplicationPathProvider* applicationPathProvider_;
- AvatarStorage* avatarStorage_;
- CapsStorage* capsStorage_;
- VCardStorageFactory* vcardStorageFactory_;
+ StoragesFactory* storagesFactory_;
AutoUpdater* autoUpdater_;
Notifier* notifier_;
#if defined(SWIFTEN_PLATFORM_MACOSX)
@@ -83,5 +80,3 @@ namespace Swift {
#endif
};
}
-
-#endif