Index: src/OFDictionary.h ================================================================== --- src/OFDictionary.h +++ src/OFDictionary.h @@ -91,15 +91,10 @@ /** * @brief An array of all objects. */ @property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects; -/** - * @brief The dictionary as a URI query string. - */ -@property (readonly, nonatomic) OFString *URIQueryString; - /** * @brief Creates a new OFDictionary. * * @return A new autoreleased OFDictionary */ Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -630,44 +630,10 @@ objc_autoreleasePoolPop(pool2); } [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @";\n}"]; - [ret makeImmutable]; - - objc_autoreleasePoolPop(pool); - - return ret; -} - -- (OFString *)URIQueryString -{ - OFMutableString *ret = [OFMutableString string]; - void *pool = objc_autoreleasePoolPush(); - OFEnumerator *keyEnumerator = [self keyEnumerator]; - OFEnumerator *objectEnumerator = [self objectEnumerator]; - OFCharacterSet *allowed = [OFURIQueryPartAllowedCharacterSet - URIQueryPartAllowedCharacterSet]; - bool first = true; - OFObject *key, *object; - - while ((key = [keyEnumerator nextObject]) != nil && - (object = [objectEnumerator nextObject]) != nil) { - if OF_UNLIKELY (first) - first = false; - else - [ret appendString: @"&"]; - - [ret appendString: [key.description - stringByAddingPercentEncodingWithAllowedCharacters: - allowed]]; - [ret appendString: @"="]; - [ret appendString: [object.description - stringByAddingPercentEncodingWithAllowedCharacters: - allowed]]; - } - [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; Index: tests/OFDictionaryTests.m ================================================================== --- tests/OFDictionaryTests.m +++ tests/OFDictionaryTests.m @@ -249,15 +249,10 @@ TEST(@"Detection of mutation during Fast Enumeration", ok) [mutableDict removeObjectForKey: @""]; - TEST(@"-[URIQueryString]", - [[[OFDictionary dictionaryWithKeysAndObjects: @"foo", @"bar", - @"q&x", @"q=x", nil] - URIQueryString] isEqual: @"q%26x=q%3Dx&foo=bar"]) - #ifdef OF_HAVE_BLOCKS { __block size_t j = 0; __block bool blockOk = true; Index: tests/OFURITests.m ================================================================== --- tests/OFURITests.m +++ tests/OFURITests.m @@ -232,11 +232,12 @@ OFInvalidFormatException, mutableURI.percentEncodedHost = @"[12:34") EXPECT_EXCEPTION( @"-[setPercentEncodedHost:] with invalid characters fails #3", - OFInvalidFormatException, mutableURI.percentEncodedHost = @"[a::g]") + OFInvalidFormatException, + mutableURI.percentEncodedHost = @"[a::g]") TEST(@"-[setUser:]", (mutableURI.user = @"us:er") && [mutableURI.percentEncodedUser isEqual: @"us%3Aer"])