diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-03 20:39:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-05 19:43:14 (GMT) |
commit | 772b2ec0243d7b55d91e4027d828881d18093ed0 (patch) | |
tree | 83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/Avatars | |
parent | 0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff) | |
download | swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.zip swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2 |
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/Avatars')
-rw-r--r-- | Swiften/Avatars/AvatarStorage.h | 2 | ||||
-rw-r--r-- | Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp | 3 | ||||
-rw-r--r-- | Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp | 5 | ||||
-rw-r--r-- | Swiften/Avatars/VCardUpdateAvatarManager.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/Swiften/Avatars/AvatarStorage.h b/Swiften/Avatars/AvatarStorage.h index d1aff39..c33d38b 100644 --- a/Swiften/Avatars/AvatarStorage.h +++ b/Swiften/Avatars/AvatarStorage.h @@ -8,10 +8,10 @@ #include <boost/filesystem/path.hpp> #include <string> +#include <Swiften/Base/ByteArray.h> namespace Swift { class JID; - class ByteArray; class AvatarStorage { public: diff --git a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp index 23b4169..1c23821 100644 --- a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp +++ b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp @@ -10,6 +10,7 @@ #include <cppunit/extensions/TestFactoryRegistry.h> #include <boost/bind.hpp> +#include <QA/Checker/IO.h> #include <Swiften/Elements/VCard.h> #include <Swiften/Avatars/VCardAvatarManager.h> #include <Swiften/Avatars/AvatarMemoryStorage.h> @@ -42,7 +43,7 @@ class VCardAvatarManagerTest : public CppUnit::TestFixture { avatarStorage = new AvatarMemoryStorage(); vcardStorage = new VCardMemoryStorage(); vcardManager = new VCardManager(ownJID, iqRouter, vcardStorage); - avatar1 = ByteArray("abcdefg"); + avatar1 = createByteArray("abcdefg"); avatar1Hash = Hexify::hexify(SHA1::getHash(avatar1)); user1 = JID("user1@bar.com/bla"); user2 = JID("user2@foo.com/baz"); diff --git a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp index 2a3b3fd..966e4ef 100644 --- a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp +++ b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp @@ -10,6 +10,7 @@ #include <cppunit/extensions/TestFactoryRegistry.h> #include <boost/bind.hpp> +#include <QA/Checker/IO.h> #include <Swiften/Elements/VCardUpdate.h> #include <Swiften/Avatars/VCardUpdateAvatarManager.h> #include <Swiften/Avatars/AvatarMemoryStorage.h> @@ -44,7 +45,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture { avatarStorage = new AvatarMemoryStorage(); vcardStorage = new VCardMemoryStorage(); vcardManager = new VCardManager(ownJID, iqRouter, vcardStorage); - avatar1 = ByteArray("abcdefg"); + avatar1 = createByteArray("abcdefg"); avatar1Hash = Hexify::hexify(SHA1::getHash(avatar1)); user1 = JID("user1@bar.com/bla"); user2 = JID("user2@foo.com/baz"); @@ -163,7 +164,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture { IQ::ref createVCardResult(const ByteArray& avatar) { VCard::ref vcard(new VCard()); - if (!avatar.isEmpty()) { + if (!avatar.empty()) { vcard->setPhoto(avatar); } return IQ::createResult(JID("baz@fum.com"), stanzaChannel->sentStanzas[0]->getID(), vcard); diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.cpp b/Swiften/Avatars/VCardUpdateAvatarManager.cpp index 26665c1..0c3ad23 100644 --- a/Swiften/Avatars/VCardUpdateAvatarManager.cpp +++ b/Swiften/Avatars/VCardUpdateAvatarManager.cpp @@ -50,7 +50,7 @@ void VCardUpdateAvatarManager::handleVCardChanged(const JID& from, VCard::ref vC return; } - if (vCard->getPhoto().isEmpty()) { + if (vCard->getPhoto().empty()) { setAvatarHash(from, ""); } else { |