Closed Bug 974335 Opened 10 years ago Closed 10 years ago

Refactor Qt Widget Backend implementation

Categories

(Core Graveyard :: Widget: Qt, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(6 files, 3 obsolete files)

Qt widget backend become non-compilable in recent mozilla-central, so I decided to make it work again, also cleanup implementation, drop Qt4 support, and switch it completely to QWindow based implementation which is available in current Qt5 core base  library.

Also it will remove dependency on Qt5Widget, which is kind of deprecated.
Attached patch Configure and make file changes (obsolete) — Splinter Review
Attachment #8378322 - Flags: review?(mh+mozilla)
First of all it does not compile due to unified sources, at second we don't care that much about plugins now
Attachment #8378324 - Flags: review?(masayuki)
Mainly build fixes, and adaptation to new Qt backend implementation
Attachment #8378329 - Flags: review?(bjacob)
Build fix, drop Qt4 dependency and QtWidgets library. Switch world to QWindow
Attachment #8378332 - Flags: review?(doug.turner)
Not sure if this need to be reviewed, it is not part of default build...
But if Doug could look at it overall, would be nice
Attachment #8378335 - Flags: review?(doug.turner)
Here is try build with all patches applied, looks good so far:
https://tbpl.mozilla.org/?tree=Try&rev=def59a5b0a7d
Attachment #8378329 - Flags: review?(bjacob) → review+
If this is really all the Qt-specific changes that you need to make under gfx/gl, then I'm very pleased, this is a lot better than the old code which had to do contortions to reuse Qt's existing GL context.
Attachment #8378454 - Flags: review?(gwright)
Blocks: 910754
Comment on attachment 8378454 [details] [diff] [review]
Make Qt backend build same skia files as GTK backend

Review of attachment 8378454 [details] [diff] [review]:
-----------------------------------------------------------------

you need to modify generate_mozbuild.py now rather than moz.build directly, as moz.build is autogenerated.
Attachment #8378454 - Flags: review?(gwright) → review-
> as moz.build is autogenerated.

Probably moz.build should say that in the beginning of the file
Attachment #8378454 - Attachment is obsolete: true
Attachment #8378568 - Flags: review?(gwright)
Attachment #8378568 - Flags: review?(gwright) → review+
Comment on attachment 8378322 [details] [diff] [review]
Configure and make file changes

Review of attachment 8378322 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +4430,5 @@
>      if test -z "$QTDIR"; then
>          case $QT_VERSION in
>          5.*)
>              AC_MSG_RESULT("Using qt5: $QT_VERSION")
> +            PKG_CHECK_MODULES(MOZ_QT, Qt5Gui Qt5Network Qt5Core Qt5Quick, ,

modules="Qt5Gui Qt5Network Qt5Core Qt5Quick"
if test -n "$NS_PRINTING"; then
    modules="$modules Qt5PrintSupport"
fi
PKG_CHECK_MODULES(MOZ_QT, $modules,
...

@@ +4468,3 @@
>              MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui/$QT_VERSION/QtGui"
> +            if test "$NS_PRINTING"; then
> +                MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"

You're putting Qt5Widgets here, but not int the pkg-config version.

::: dom/src/geolocation/Makefile.in
@@ +8,3 @@
>  CXXFLAGS += $(MOZ_QT_CFLAGS)
>  endif
> +

trailing newline
Attachment #8378322 - Flags: review?(mh+mozilla) → feedback+
> > +            if test "$NS_PRINTING"; then
> > +                MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"
> 
> You're putting Qt5Widgets here, but not int the pkg-config version.

main requirement here is Qt5PrintSupport, Qt5PrintSupport.pc does  pull Qt5Widgets dependency automatically, that is why I'm not pointing that dependency there.

In theory would be nice to get Printing without Qt5Widgets dependency... but that probably long term plan.
Attachment #8378322 - Attachment is obsolete: true
Attachment #8378615 - Flags: review?(mh+mozilla)
Attachment #8378615 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8378324 [details] [diff] [review]
Remove Qt includes and dependency from plugins

I'm not a good person for reviewing this. Although, it looks fine.

Josh, are you managing around here?
Attachment #8378324 - Flags: review?(masayuki) → review?(joshmoz)
Attachment #8378324 - Flags: review?(joshmoz) → review+
Comment on attachment 8378332 [details] [diff] [review]
Shared Widget changes

lgtm
Attachment #8378332 - Flags: review?(doug.turner) → review+
Comment on attachment 8378335 [details] [diff] [review]
Qt Build only changes, Drop Qt4, QtWidget dependency, switch to QWindow

Review of attachment 8378335 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/plugins/test/testplugin/nptest_qt.cpp
@@ +33,4 @@
>  #include "nptest_platform.h"
>  #include "npapi.h"
>  
>  struct _PlatformData {

Is this struct needed?

@@ +61,2 @@
>    printf("NPERR_INCOMPATIBLE_VERSION_ERROR\n");
>    return NPERR_INCOMPATIBLE_VERSION_ERROR;

does this plugin just never load now?

::: dom/system/unix/nsHapticFeedback.cpp
@@ -1,1 @@
>  /* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-

this file is QT only now.  Having it in dom/system/unix is probalby wrong.

Please rename dom/system/unix/nsHapticFeedback.cpp to dom/system/unix/QTHapticFeedback.cpp.

You many need to create a stub nsHapticFeedback.cpp.
Depends on: 974272
Blocks: 1008668
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: