Title: [128051] trunk/Source
Revision
128051
Author
[email protected]
Date
2012-09-10 06:08:13 -0700 (Mon, 10 Sep 2012)

Log Message

[Qt] Fix deprecation failures if QT_NO_DEPRECATED enabled
https://bugs.webkit.org/show_bug.cgi?id=96258

Patch by Kevin Funk <[email protected]> on 2012-09-10
Reviewed by Simon Hausmann.

Sync with latest changes in Qt5.

Source/WebCore:

* platform/qt/RenderThemeQt.cpp:
* platform/qt/SharedTimerQt.cpp:

Source/WebKit2:

* WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
* WebProcess/qt/WebProcessQt.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128050 => 128051)


--- trunk/Source/WebCore/ChangeLog	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebCore/ChangeLog	2012-09-10 13:08:13 UTC (rev 128051)
@@ -1,3 +1,15 @@
+2012-09-10  Kevin Funk  <[email protected]>
+
+        [Qt] Fix deprecation failures if QT_NO_DEPRECATED enabled
+        https://bugs.webkit.org/show_bug.cgi?id=96258
+
+        Reviewed by Simon Hausmann.
+
+        Sync with latest changes in Qt5.
+
+        * platform/qt/RenderThemeQt.cpp:
+        * platform/qt/SharedTimerQt.cpp:
+
 2012-09-10  Christophe Dumez  <[email protected]>
 
         [EFL] Create a toggle button for closed captions

Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (128050 => 128051)


--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -867,7 +867,7 @@
         int n = fileList->length();
         string = QCoreApplication::translate("QWebPage", "%n file(s)",
                                              "number of chosen file",
-                                             QCoreApplication::DefaultCodec, n);
+                                             n);
     }
 
     return string;

Modified: trunk/Source/WebCore/platform/qt/SharedTimerQt.cpp (128050 => 128051)


--- trunk/Source/WebCore/platform/qt/SharedTimerQt.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebCore/platform/qt/SharedTimerQt.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -33,7 +33,7 @@
 #include <QBasicTimer>
 #include <QCoreApplication>
 #include <QDebug>
-#include <QWeakPointer>
+#include <QPointer>
 #include <wtf/CurrentTime.h>
 
 namespace WebCore {
@@ -83,7 +83,7 @@
 
 SharedTimerQt* SharedTimerQt::inst()
 {
-    static QWeakPointer<SharedTimerQt> timer;
+    static QPointer<SharedTimerQt> timer;
     if (!timer) {
         timer = new SharedTimerQt();
         timer.data()->connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), SLOT(destroy()));

Modified: trunk/Source/WebKit2/ChangeLog (128050 => 128051)


--- trunk/Source/WebKit2/ChangeLog	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-10 13:08:13 UTC (rev 128051)
@@ -1,3 +1,15 @@
+2012-09-10  Kevin Funk  <[email protected]>
+
+        [Qt] Fix deprecation failures if QT_NO_DEPRECATED enabled
+        https://bugs.webkit.org/show_bug.cgi?id=96258
+
+        Reviewed by Simon Hausmann.
+
+        Sync with latest changes in Qt5.
+
+        * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
+        * WebProcess/qt/WebProcessQt.cpp:
+
 2012-09-10  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Sanitize the suggested filename when building the download destination URI

Modified: trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp (128050 => 128051)


--- trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -39,8 +39,8 @@
 #include <wtf/OwnArrayPtr.h>
 
 #if PLATFORM(QT)
+#include <QPointer>
 #include <QSocketNotifier>
-#include <QWeakPointer>
 #elif PLATFORM(GTK)
 #include <glib.h>
 #endif
@@ -175,7 +175,7 @@
     }
 
 private:
-    QWeakPointer<QSocketNotifier> const m_socketNotifier;
+    QPointer<QSocketNotifier> const m_socketNotifier;
 };
 #endif
 

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp (128050 => 128051)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -43,7 +43,7 @@
 ResourceError cancelledError(const ResourceRequest& request)
 {
     ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(),
-                                        QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
+                                        QCoreApplication::translate("QWebFrame", "Request cancelled"));
     error.setIsCancellation(true);
     return error;    
 }
@@ -51,37 +51,37 @@
 ResourceError blockedError(const ResourceRequest& request)
 {
     return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url().string(),
-                         QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "Request blocked"));
 }
 
 ResourceError cannotShowURLError(const ResourceRequest& request)
 {
     return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowURL, request.url().string(),
-                         QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "Cannot show URL"));
 }
 
 ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
 {
     return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url().string(),
-                         QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change"));
 }
 
 ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
 {
     return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url().string(),
-                         QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "Cannot show mimetype"));
 }
 
 ResourceError fileDoesNotExistError(const ResourceResponse& response)
 {
     return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url().string(),
-                         QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "File does not exist"));
 }
 
 ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
 {
     return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url().string(),
-                         QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine", 0, QCoreApplication::UnicodeUTF8));
+                         QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine"));
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp (128050 => 128051)


--- trunk/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -73,7 +73,7 @@
         return 0;
 
     qint64 bytesRead = maxlen < m_bytesAvailable ? maxlen : m_bytesAvailable;
-    if (qMemCopy(data, static_cast<char*>(m_sharedMemory->data()) + m_sharedMemorySize - m_bytesAvailable, bytesRead)) {
+    if (memcpy(data, static_cast<char*>(m_sharedMemory->data()) + m_sharedMemorySize - m_bytesAvailable, bytesRead)) {
         m_bytesAvailable -= bytesRead;
         return bytesRead;
     }

Modified: trunk/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp (128050 => 128051)


--- trunk/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp	2012-09-10 13:06:30 UTC (rev 128050)
+++ trunk/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp	2012-09-10 13:08:13 UTC (rev 128051)
@@ -98,7 +98,7 @@
     // The Mac port of WebKit2 uses a fudge factor of 1000 here to account for misalignment, however,
     // that tends to overestimate the memory quite a bit (1 byte misalignment ~ 48 MiB misestimation).
     // We use 1024 * 1023 for now to keep the estimation error down to +/- ~1 MiB.
-    uint64_t freeVolumeSpace = WebCore::getVolumeFreeSizeForPath(diskCache->cacheDirectory().toAscii().constData()) / 1024 / 1023;
+    uint64_t freeVolumeSpace = WebCore::getVolumeFreeSizeForPath(diskCache->cacheDirectory().toLocal8Bit().constData()) / 1024 / 1023;
 
     // The following variables are initialised to 0 because WebProcess::calculateCacheSizes might not
     // set them in some rare cases.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to