Title: [110422] trunk
Revision
110422
Author
[email protected]
Date
2012-03-12 05:57:31 -0700 (Mon, 12 Mar 2012)

Log Message

[Qt] Fix build with newer Qt 5.

Reviewed by Tor Arne Vestbø.

Source/WebCore:

* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::fileListNameForWidth): Use DefaultCodec instead of the
deprecated CodecForTR.

Tools:

Newer Qt 5 renames QDeclarativeFoo to QQmlFoo and provides backwards compatible
renames, which however do trigger a #warning. Until we _require_ a newer Qt 5
we should disable -Werror.

Also load(moc) for the availability of QMAKE_MOC in various derived sources. The
implicit load was removed recently.

* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/unix/default_post.prf:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110421 => 110422)


--- trunk/Source/WebCore/ChangeLog	2012-03-12 12:31:41 UTC (rev 110421)
+++ trunk/Source/WebCore/ChangeLog	2012-03-12 12:57:31 UTC (rev 110422)
@@ -1,3 +1,13 @@
+2012-03-12  Simon Hausmann  <[email protected]>
+
+        [Qt] Fix build with newer Qt 5.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::fileListNameForWidth): Use DefaultCodec instead of the
+        deprecated CodecForTR.
+
 2012-03-12  Hans Wennborg  <[email protected]>
 
         Speech _javascript_ API: SpeechRecognitionEvent

Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (110421 => 110422)


--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2012-03-12 12:31:41 UTC (rev 110421)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2012-03-12 12:57:31 UTC (rev 110422)
@@ -884,7 +884,7 @@
         int n = filenames.size();
         string = QCoreApplication::translate("QWebPage", "%n file(s)",
                                              "number of chosen file",
-                                             QCoreApplication::CodecForTr, n);
+                                             QCoreApplication::DefaultCodec, n);
     }
 
     return string;

Modified: trunk/Tools/ChangeLog (110421 => 110422)


--- trunk/Tools/ChangeLog	2012-03-12 12:31:41 UTC (rev 110421)
+++ trunk/Tools/ChangeLog	2012-03-12 12:57:31 UTC (rev 110422)
@@ -1,3 +1,19 @@
+2012-03-12  Simon Hausmann  <[email protected]>
+
+        [Qt] Fix build with newer Qt 5.
+
+        Reviewed by Tor Arne Vestbø.
+
+        Newer Qt 5 renames QDeclarativeFoo to QQmlFoo and provides backwards compatible
+        renames, which however do trigger a #warning. Until we _require_ a newer Qt 5
+        we should disable -Werror.
+
+        Also load(moc) for the availability of QMAKE_MOC in various derived sources. The
+        implicit load was removed recently.
+
+        * qmake/mkspecs/features/default_pre.prf:
+        * qmake/mkspecs/features/unix/default_post.prf:
+
 2012-03-11  Maciej Stachowiak  <[email protected]>
 
         Add --instruments option to sunspider to profile with Instruments

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (110421 => 110422)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-03-12 12:31:41 UTC (rev 110421)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-03-12 12:57:31 UTC (rev 110422)
@@ -7,6 +7,10 @@
 
 load(functions)
 
+# Derived sources often need QMAKE_MOC
+load(qt_functions)
+load(moc)
+
 # FIXME: In this case we probably want to exit early so that we
 # don't load all of the custom build tweaks needlessly.
 pro_file = $$_PRO_FILE_ # Checking the variable directly does not work

Modified: trunk/Tools/qmake/mkspecs/features/unix/default_post.prf (110421 => 110422)


--- trunk/Tools/qmake/mkspecs/features/unix/default_post.prf	2012-03-12 12:31:41 UTC (rev 110421)
+++ trunk/Tools/qmake/mkspecs/features/unix/default_post.prf	2012-03-12 12:57:31 UTC (rev 110422)
@@ -6,7 +6,10 @@
 
 # Treat warnings as errors on x86/Linux/GCC
 linux-g++* {
-    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
+    isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386) {
+        # Disable -Werror for declarative stuff until we _require_ a Qt 5 with the new names.
+        !contains(QT, declarative): QMAKE_CXXFLAGS += -Werror
+    }
 
     greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to