Bug 974335 - Refactor Qt Widget Backend implementation. Build changes . r=glandium

This commit is contained in:
Oleg Romashin 2014-02-20 18:08:58 -08:00
Родитель 04bd92326d
Коммит 03b2b6e348
6 изменённых файлов: 64 добавлений и 41 удалений

Просмотреть файл

@ -4398,6 +4398,19 @@ AC_SUBST(MOZ_ENABLE_STARTUP_NOTIFICATION)
AC_SUBST(MOZ_STARTUP_NOTIFICATION_CFLAGS)
AC_SUBST(MOZ_STARTUP_NOTIFICATION_LIBS)
dnl ========================================================
dnl Disable printing
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(printing,
[ --disable-printing Disable printing support],
NS_PRINTING=,
NS_PRINTING=1)
if test "$NS_PRINTING"; then
AC_DEFINE(NS_PRINTING)
AC_DEFINE(NS_PRINT_PREVIEW)
fi
dnl ========================================================
dnl = QT support
dnl ========================================================
@ -4418,19 +4431,20 @@ then
case $QT_VERSION in
5.*)
AC_MSG_RESULT("Using qt5: $QT_VERSION")
PKG_CHECK_MODULES(MOZ_QT, Qt5Gui Qt5Network Qt5Core Qt5OpenGL Qt5Widgets Qt5PrintSupport, ,
PKG_CHECK_MODULES(MOZ_QT, Qt5Gui Qt5Network Qt5Core Qt5Quick, ,
[
AC_MSG_ERROR([$MOZ_QT_PKG_ERRORS Need qtbase development packages, (On Ubuntu, you might try installing the packages qtbase5-dev libqt5opengl5-dev.)])
])
QT5INCDIR=`pkg-config --variable=includedir Qt5Gui`
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QT5INCDIR/QtGui/$QT_VERSION/QtGui"
;;
4.*)
AC_MSG_RESULT("Using qt4: $QT_VERSION")
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore QtOpenGL, ,
[
AC_MSG_ERROR([$MOZ_QT_PKG_ERRORS Need qt4 development package, (On Ubuntu, you might try installing the packages libqt4-dev libqt4-opengl-dev.)])
])
if test "$NS_PRINTING"; then
PKG_CHECK_MODULES(MOZ_QT_WIDGETS, Qt5PrintSupport, ,
[
AC_MSG_ERROR([$MOZ_QT_PKG_ERRORS Need qtbase widgets development package])
])
MOZ_QT_LIBS="$MOZ_QT_LIBS $MOZ_QT_WIDGETS_LIBS"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $MOZ_QT_WIDGETS_CFLAGS"
fi
;;
*)
AC_MSG_ERROR([* * * Unsupported Qt Version: $QT_VERSION])
@ -4447,20 +4461,15 @@ then
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtDeclarative"
case $QT_VERSION in
5.*)
AC_MSG_RESULT("Using qt5: $QT_VERSION")
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQt5Gui -lQt5Network -lQt5Core -lQt5Xml -lQt5OpenGL"
MOZ_QT_LIBS="$MOZ_QT_LIBS -L$QTDIR/lib/ -lQt5Gui -lQt5Network -lQt5Core -lQt5Xml"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui/$QT_VERSION/QtGui"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtWidgets"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtPrintSupport"
MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"
;;
4.*)
AC_MSG_RESULT("Using qt4: $QT_VERSION")
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtXml -lQtOpenGL"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/Qt"
if test "$NS_PRINTING"; then
MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtPrintSupport"
fi
;;
*)
AC_MSG_ERROR([* * * Unsupported Qt Version: $QT_VERSION])
@ -4471,12 +4480,10 @@ then
HOST_RCC="$QTDIR/bin/rcc"
fi
if test -z "$HOST_MOC"; then
AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
incorrect])
AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is incorrect])
fi
if test -z "$HOST_RCC"; then
AC_MSG_ERROR([No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is
incorrect])
AC_MSG_ERROR([No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is incorrect])
fi
MOC=$HOST_MOC
@ -4525,6 +4532,30 @@ incorrect])
])
fi
MOZ_ENABLE_QT5FEEDBACK=
PKG_CHECK_MODULES(_QT5FEEDBACK, Qt0Feedback,
MOZ_ENABLE_QT5FEEDBACK=1,
MOZ_ENABLE_QT5FEEDBACK=)
if test "$MOZ_ENABLE_QT5FEEDBACK"; then
MOZ_ENABLE_QT5FEEDBACK=1
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QT5FEEDBACK_CFLAGS"
MOZ_QT_LIBS="$MOZ_QT_LIBS $_QT5FEEDBACK_LIBS"
AC_DEFINE(MOZ_ENABLE_QT5FEEDBACK)
AC_SUBST(MOZ_ENABLE_QT5FEEDBACK)
fi
MOZ_ENABLE_QT5GEOPOSITION=
PKG_CHECK_MODULES(_QT5GEOPOSITION, Qt5Positioning,
MOZ_ENABLE_QT5GEOPOSITION=1,
MOZ_ENABLE_QT5GEOPOSITION=)
if test "$MOZ_ENABLE_QT5GEOPOSITION"; then
MOZ_ENABLE_QT5GEOPOSITION=1
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QT5GEOPOSITION_CFLAGS"
MOZ_QT_LIBS="$MOZ_QT_LIBS $_QT5GEOPOSITION_LIBS"
AC_DEFINE(MOZ_ENABLE_QT5GEOPOSITION)
AC_SUBST(MOZ_ENABLE_QT5GEOPOSITION)
fi
if test "$MOZ_ENABLE_CONTENTACTION"; then
MOZ_ENABLE_CONTENTACTION=1
AC_DEFINE(MOZ_ENABLE_CONTENTACTION)
@ -4960,19 +4991,6 @@ if test "${MOZ_WIDGET_TOOLKIT}" = "linuxgl" -a "$ACCESSIBILITY" != "1"; then
AC_MSG_ERROR(["Accessibility is required for the linuxgl widget backend"])
fi
dnl ========================================================
dnl Disable printing
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(printing,
[ --disable-printing Disable printing support],
NS_PRINTING=,
NS_PRINTING=1)
if test "$NS_PRINTING"; then
AC_DEFINE(NS_PRINTING)
AC_DEFINE(NS_PRINT_PREVIEW)
fi
dnl Turn off webrtc for OS's we don't handle yet, but allow
dnl --enable-webrtc to override. Can disable for everything in
dnl the master list above.

Просмотреть файл

@ -4,6 +4,6 @@
include $(topsrcdir)/config/rules.mk
ifdef MOZ_ENABLE_QTMOBILITY
ifdef MOZ_ENABLE_QT5GEOPOSITION
CXXFLAGS += $(MOZ_QT_CFLAGS)
endif

Просмотреть файл

@ -26,7 +26,7 @@ LOCAL_INCLUDES += [
'/dom/ipc',
]
if CONFIG['MOZ_ENABLE_QTMOBILITY']:
if CONFIG['MOZ_ENABLE_QT5GEOPOSITION']:
LOCAL_INCLUDES += [
'/dom/system/unix',
]

Просмотреть файл

@ -4,6 +4,6 @@
include $(topsrcdir)/config/rules.mk
ifdef MOZ_ENABLE_QTMOBILITY
ifdef MOZ_ENABLE_QT5GEOPOSITION
CXXFLAGS += $(MOZ_QT_CFLAGS)
endif

Просмотреть файл

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['MOZ_ENABLE_QTMOBILITY']:
if CONFIG['MOZ_ENABLE_QT5GEOPOSITION']:
GENERATED_SOURCES += [
'moc_QTMLocationProvider.cpp',
]
@ -16,6 +16,11 @@ if CONFIG['MOZ_ENABLE_QTMOBILITY']:
'/dom/src/geolocation',
]
if CONFIG['MOZ_ENABLE_QT5FEEDBACK']:
SOURCES += [
'nsHapticFeedback.cpp',
]
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -226,7 +226,7 @@ if os_linux:
'src/base/message_pump_qt.cc',
]
GENERATED_SOURCES += [
'src/base/moc_message_pump_qt.cc',
'moc_message_pump_qt.cc',
]
if not CONFIG['MOZ_NATIVE_LIBEVENT']:
if CONFIG['OS_TARGET'] != 'Android':
@ -263,7 +263,7 @@ if os_bsd:
'src/base/message_pump_qt.cc',
]
GENERATED_SOURCES += [
'src/base/moc_message_pump_qt.cc',
'moc_message_pump_qt.cc',
]
if not CONFIG['MOZ_NATIVE_LIBEVENT']:
SOURCES += [