Index: kurltest.h
===================================================================
--- kurltest.h	(revision 1139063)
+++ kurltest.h	(working copy)
@@ -70,6 +70,7 @@
     void testIdn();
     void testUriMode();
     void testToLocalFile();
+    void testQueryItemRemoval();
 };
 
 #endif
Index: kurltest.cpp
===================================================================
--- kurltest.cpp	(revision 1139063)
+++ kurltest.cpp	(working copy)
@@ -1962,3 +1962,18 @@
   QCOMPARE( urlWithHost.toLocalFile(), localFile );
   QCOMPARE( urlWithoutHost.toLocalFile(), localFile );
 }
+
+void KUrlTest::testQueryItemRemoval()
+{
+    KUrl url("http://www.foobar.com/");
+    url.addQueryItem(QLatin1String("foo"), QLatin1String("bar"));
+    KUrl url2(url);
+    KUrl url3(url);
+
+    url2.removeQueryItem(QLatin1String("foo"));
+    QCOMPARE(url, url2);
+
+    url3.addQueryItem(QLatin1String("foo2"), QLatin1String("bar2"));
+    url3.removeQueryItem(QLatin1String("foo2"));
+    QCOMPARE(url, url3);
+}
