Closed Bug 275456 Opened 20 years ago Closed 20 years ago

[qt] objdir builds of embedding widget broken

Categories

(Core Graveyard :: Ports: Qt, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 273824

People

(Reporter: Biesinger, Assigned: zack)

Details

Attachments

(3 files)

there are several problems with objdir builds of the qt port (i.e. where srcdir
!= build dir).  I'm suspecting they were caused by bug 267318.

1. for some reason, when the QtPromptService.cpp : $(UI_HSRCS) rule is present
in the Makefile, QtPromptService.cpp is searched in the objdir instead of the
source dir, and is obviously not found.

what is that rule supposed to do anyway? the cpp file already exists, and thus
can't depend on other files...

I suspect what's really meant is:
QtPromptService.$(OBJ_SUFFIX) : $(UI_HSRCS)


2. when that is fixed, c++ complains about missing ui_alert.h files. that's
because QtPromptService.cpp is located in the srcdir, but ui_alert.h is in the
objdir, and the Makefile does not alter the include path.

3. finally, the include path in ui_alert.cpp for ui_alert.h is messed up, it
looks like:
#include "ui_/home/chb/mozilla/embedding/browser/qt/src/alert.h"

This is probably due to this invocation of uic:
/usr/lib/qt3/bin/uic -L `(cd ../../../../dist; pwd)`/lib/designer
/home/chb/mozilla/embedding/browser/qt/src/alert.ui -i
ui_/home/chb/mozilla/embedding/browser/qt/src/alert.h -o ui_alert.cpp

I can't find any documentation for that uic option, so I can't say that for
sure... and I don't know Makefiles enough to fix this.

some relevant lxr urls:
http://lxr.mozilla.org/seamonkey/source/embedding/browser/qt/src/config/qtconfig.mk
http://lxr.mozilla.org/seamonkey/source/embedding/browser/qt/src/config/qtrules.mk
http://lxr.mozilla.org/seamonkey/source/embedding/browser/qt/src/Makefile.in#50

Finally... maybe $(srcdir)/config/qt{config,rules}.mk should be part of the
global config.mk/rules.mk...
Attached patch partial patchSplinter Review
patch that fixed 1 and 2 for me; but note that the commenting out of the
QtPromptService dependency is probably wrong. the LOCAL_INCLUDES part does look
like a correct change to me though.
> I suspect what's really meant is:
> QtPromptService.$(OBJ_SUFFIX) : $(UI_HSRCS)
yes, that was the idea, so that the ui_*.h files included from
QtPromptService.cpp are generated

> This is probably due to this invocation of uic:
> /usr/lib/qt3/bin/uic -L `(cd ../../../../dist; pwd)`/lib/designer
> /home/chb/mozilla/embedding/browser/qt/src/alert.ui -i
> ui_/home/chb/mozilla/embedding/browser/qt/src/alert.h -o ui_alert.cpp
-L adds directory to library path (QApplication::addLibraryPath).
So that you can generate code from designer's .ui file which contains
the qgeckoembed widget. This probably makes sense only for some example
which uses this widget.
The tricky `(cd ...)` was required on win32 because for some reason
the relative path didn't work
well the part of the uic line that I referred to was the -i option:
-i ui_/home/chb/mozilla/...

note the slash inside the filename...
here is the fix
Attached patch qtrules fixSplinter Review
(In reply to comment #4)
> here is the fix
and some other fix for typo recently introduced by code cleaning in toolkit/
Attached patch qapp typoSplinter Review
I suck. sorry for filing a duplicate.

*** This bug has been marked as a duplicate of 273824 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
QA Contact: cbiesinger → ports-qt
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: