Unreviewed. Fix GTK+ build with GCC 4.9 after r218244.
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2017 10:41:33 +0000 (10:41 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2017 10:41:33 +0000 (10:41 +0000)
It seems that GCC 4.9 gets confused by enum named General and value of Print enum named General too. This
renames the Print enum value as Generic.

* Shared/API/APIError.h:
* Shared/gtk/WebErrorsGtk.cpp:
(WebKit::printError):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitError):
(toWebCoreError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218250 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/APIError.h
Source/WebKit2/Shared/gtk/WebErrorsGtk.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp

index f0be735..dbb0099 100644 (file)
@@ -1,3 +1,17 @@
+2017-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. Fix GTK+ build with GCC 4.9 after r218244.
+
+        It seems that GCC 4.9 gets confused by enum named General and value of Print enum named General too. This
+        renames the Print enum value as Generic.
+
+        * Shared/API/APIError.h:
+        * Shared/gtk/WebErrorsGtk.cpp:
+        (WebKit::printError):
+        * UIProcess/API/gtk/WebKitPrivate.cpp:
+        (toWebKitError):
+        (toWebCoreError):
+
 2017-06-13  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Do not mix C and C++ API error constants
index 514af3f..442d676 100644 (file)
@@ -90,7 +90,7 @@ public:
 
 #if PLATFORM(GTK)
     enum Print {
-        General = 599,
+        Generic = 599,
         PrinterNotFound = 500,
         InvalidPageRange = 501
     };
index 9fbf21d..4b42daa 100644 (file)
@@ -36,7 +36,7 @@ namespace WebKit {
 
 ResourceError printError(const URL& failingURL, const String& localizedDescription)
 {
-    return ResourceError(API::Error::webKitPrintErrorDomain(), API::Error::Print::General, failingURL, localizedDescription);
+    return ResourceError(API::Error::webKitPrintErrorDomain(), API::Error::Print::Generic, failingURL, localizedDescription);
 }
 
 ResourceError printerNotFoundError(const URL& failingURL)
index bec6f11..eb78f83 100644 (file)
@@ -109,7 +109,7 @@ unsigned toWebKitError(unsigned webCoreError)
         return WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
     case API::Error::Download::Destination:
         return WEBKIT_DOWNLOAD_ERROR_DESTINATION;
-    case API::Error::Print::General:
+    case API::Error::Print::Generic:
         return WEBKIT_PRINT_ERROR_GENERAL;
     case API::Error::Print::PrinterNotFound:
         return WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
@@ -153,7 +153,7 @@ unsigned toWebCoreError(unsigned webKitError)
     case WEBKIT_DOWNLOAD_ERROR_DESTINATION:
         return API::Error::Download::Destination;
     case WEBKIT_PRINT_ERROR_GENERAL:
-        return API::Error::Print::General;
+        return API::Error::Print::Generic;
     case WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND:
         return API::Error::Print::PrinterNotFound;
     case WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE: