From f923f896bca0d0d8459c35a5ef8e0d0171cbe664 Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Tue, 15 Dec 2009 17:50:16 -0800
Subject: [PATCH] client changes to work with new version of Qt (4.6) and to do
 some cleanup at plugin exit so that cookies more betterer than what they did
 before.

---
 indra/media_plugins/webkit/media_plugin_webkit.cpp | 7 +++++--
 indra/newview/CMakeLists.txt                       | 2 ++
 indra/newview/viewer_manifest.py                   | 1 +
 indra/test_apps/llplugintest/CMakeLists.txt        | 1 +
 install.xml                                        | 4 ++--
 5 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 276ad39dfba..76e2c080beb 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -626,7 +626,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
 			}
 			else if(message_name == "cleanup")
 			{
-				// TODO: clean up here
+				// DTOR most likely won't be called but the recent change to the way this process
+				// is (not) killed means we see this message and can do what we need to here.
+				// Note: this cleanup is ultimately what writes cookies to the disk
+				LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this );
+				LLQtWebKit::getInstance()->reset();
 			}
 			else if(message_name == "shm_added")
 			{
@@ -635,7 +639,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
 				info.mSize = (size_t)message_in.getValueS32("size");
 				std::string name = message_in.getValue("name");
 				
-				
 //				std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name 
 //					<< ", size: " << info.mSize 
 //					<< ", address: " << info.mAddress 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 72630cc413f..a6679c5fbf1 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1784,6 +1784,7 @@ if (WINDOWS)
     qtnetworkd4.dll
     qtopengld4.dll
     qtwebkitd4.dll
+    qtxmlpatternsd4.dll
     ssleay32.dll
     )
   copy_if_different(
@@ -1803,6 +1804,7 @@ if (WINDOWS)
     qtnetwork4.dll
     qtopengl4.dll
     qtwebkit4.dll
+    qtxmlpatterns4.dll    
     ssleay32.dll
     )
   copy_if_different(
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 32fdd41be2c..5090dc9ce42 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -324,6 +324,7 @@ def construct(self):
             self.path("qtnetwork4.dll")
             self.path("qtopengl4.dll")
             self.path("qtwebkit4.dll")
+            self.path("qtxmlpatternsd4.dll")
             self.path("ssleay32.dll")
             self.end_prefix()
 
diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 0011daaec6e..12310f9ecdc 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -435,6 +435,7 @@ if(WINDOWS)
     qtnetwork4.dll
     qtopengl4.dll
     qtwebkit4.dll
+    qtxmlpatterns4.dll
     ssleay32.dll
     )
   copy_if_different(
diff --git a/install.xml b/install.xml
index 2d60f07c11d..3ce7a37bde0 100644
--- a/install.xml
+++ b/install.xml
@@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard</string>
           <key>windows</key>
           <map>
             <key>md5sum</key>
-            <string>92cff05661b5547caae7cc6c66d09870</string>
+            <string>3846354e2e20a98c0401317eb114ff5e</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091123.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20091215.tar.bz2</uri>
           </map>
         </map>
       </map>
-- 
GitLab