WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
27118
[QT] Wrong of declaration of writeOnlyProperty: READ function is always required.
https://bugs.webkit.org/show_bug.cgi?id=27118
Summary
[QT] Wrong of declaration of writeOnlyProperty: READ function is always requi...
Antonio Gomes
Reported
2009-07-09 07:38:49 PDT
tst_qwebframe.cpp we have: (...) class MyQObject : public QObject { Q_OBJECT (...) Q_PROPERTY(int writeOnlyProperty WRITE setWriteOnlyProperty) (...) which is wrong and triggers a compile warning while building ... (...) /home/agomes/reps/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp:88: Warning: Property declaration writeOnlyProperty has no READ accessor function. The property will be invalid. (...) --> See statement in
http://chaos.troll.no/~tavestbo/webkit/domapi/qobject.html#Q_PROPERTY
"...The property name and type and the READ function are required..."
Attachments
Add attachment
proposed patch, testcase, etc.
Jędrzej Nowacki
Comment 1
2009-11-26 03:10:04 PST
In general Qt discourage to declare write-only properties. In all cases, apart from one, the warning is correct. In this particular case we need a hack to test the JavaScript functionality. In the JavaScript concept of write-only property exists, we can't change it. We can support the feature, but in the same time we discourage to use it. According to logs, there was a bigger discussion about the problem. I'm closing the bug, but if you disagree, feel free to reopen it.
Laszlo Gombos
Comment 2
2009-11-29 15:36:31 PST
I looked into this a while bug and draw the same conclusion as Jędrzej. Just for future reference - I think the warning is coming from moc and not from the C/C++ compiler.
Csaba Osztrogonác
Comment 3
2010-08-02 09:16:47 PDT
***
Bug 43356
has been marked as a duplicate of this bug. ***
Csaba Osztrogonác
Comment 4
2010-08-02 09:20:26 PDT
(In reply to
comment #2
)
> I looked into this a while bug and draw the same conclusion as Jędrzej. > > Just for future reference - I think the warning is coming from moc and not from the C/C++ compiler.
Yes, this warning is coming from moc, and doesn't block build if we add -Werror option to gcc:
https://bugs.webkit.org/show_bug.cgi?id=43191
But unfortunately it makes the compiling step orange on the buildbot. :( Is there a correct way to hide this warning to make the bot green?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug