[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:16:20 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b95d6c412617033eed795ce91bc0c325079517c1
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jun 4 00:19:07 2002 +0000
* acconfig.h: Remove APPLE_CHANGES (done in compiler invocation),
_KWQ_ (not needed any more), _KWQ_PEDANTIC_ (not needed any more),
and _KWQ_IOSTREAM_ (set by KWQDef.h now).
* configure.in: Remove explict gcc3 and g++3; not needed on Jaguar.
Remove APPLE_CHANGES, _KWQ_, _KWQK_PEDANTIC_, and _KWQ_IOSTREAM_.
Do an AC_SUBST on COMMON_CFLAGS so the flags are used to generate the
.pfe files. Add conditional stuff so that WebCore exports less and
the Tests subdirectory is not build in Deployment style builds.
* Makefile.am: Only build Tests subdir when configure.in says it should.
* Tests/draw/*: Removed.
* Tests/qt/qbuffer-test.cpp: (main): Update for QBuffer changes.
* Tests/qt/qrect-test.cpp: (main): Remove unused variable.
* Tools/jersey/README: Fix newlines.
* Tools/jersey/html/advanced.html: Fix newlines.
WebCore:
Get rid of many unneeded APPLE_CHANGES.
Also get rid of _KWQ_ and _KWQ_PEDANTIC_.
* WebCore.exp: Don't export DomShared::ref/deref any more.
* WebCore-tests.exp: Changed around as needed due to changes in
the classes being tested.
* khtml/html/htmlparser.cpp:
* khtml/html/htmltokenizer.cpp:
Simplified APPLE_CHANGES for better merging.
* khtml/dom/dom_misc.h:
* khtml/dom/dom_misc.cpp:
* khtml/dom/html_document.cpp:
* khtml/khtmlview.cpp:
* khtml/ecma/kjs_css.h:
* khtml/ecma/kjs_dom.cpp:
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_window.cpp:
* khtml/html/html_formimpl.cpp:
* khtml/html/html_objectimpl.cpp:
* khtml/misc/helper.cpp:
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_flow.cpp:
* khtml/rendering/render_form.cpp:
* khtml/rendering/render_text.cpp:
* khtml/xml/xml_tokenizer.h:
* kwq/qt/qtextedit.h:
Remove now-unneeded APPLE_CHANGES.
* khtml/misc/loader.cpp: (CachedImage::pixmap): Turned off more of
the QMovie code.
* khtml/html/html_documentimpl.cpp:
* khtml/html/htmltokenizer.h:
* khtml/xml/dom_elementimpl.h:
* kwq/KWQKHTMLPart.mm:
Formatting and other minor tweaks.
* kwq/KWQApplication.mm: (QApplication::sendEvent): Implemented.
* kwq/KWQChar.mm: (QChar::direction): Improved implementation.
* kwq/KWQCollection.h: Removed.
* kwq/KWQIcon.h: Removed.
* kwq/Makefile.am: Removed following files.
* kwq/KWQKCompletionBox.mm: Removed.
* kwq/KWQKFactory.mm: Removed.
* kwq/KWQListBox.mm: Removed.
* kwq/KWQKImageIO.mm: Removed.
* kwq/KWQObject.mm: (QObject::event): Added, does nothing.
(QObject::inherits): Put in real implementation (good enough for us).
* kwq/WCWebDataSource.h: Removed extern declaration of global.
* kwq/KWQCursor.mm: (QCursor::handle): Made the handle be an
NSCursor *.
* kwq/external.h: Moved [IFWebView setFrameSize:] here.
Got rid of IFAnimatedImage.
* kwq/KWQDef.h: Remove unused Q_INT8, Q_INT16, Q_UINT8, Q_UINT16,
QCOORD, WFlags, WId, ASSERT, CHECK_PTR, Q_EXPORT, Q_PACKED,
QT_STATIC_CONST, QT_STATIC_CONST_IMPL. Define _KWQ_IOSTREAM_ only
when NDEBUG is not defined.
* kwq/KWQBuffer.mm:
* kwq/KWQCString.mm:
* kwq/KWQCollection.mm:
* kwq/KWQCompletion.h:
* kwq/KWQCompletion.mm:
* kwq/KWQFrame.h:
* kwq/KWQFrame.mm:
* kwq/KWQHBox.mm:
* kwq/KWQKFileItem.mm:
* kwq/KWQKIconLoader.mm:
* kwq/KWQKLineEdit.mm:
* kwq/KWQKProtocolManager.mm:
* kwq/KWQLabel.mm:
* kwq/KWQListBox.h:
* kwq/KWQMovie.mm:
* kwq/KWQWidget.mm:
* kwq/KWQxml.mm:
* kwq/qt/qbuffer.h:
* kwq/kdecore/kdebug.h:
* kwq/kdecore/kglobal.h:
* kwq/kdecore/kglobalsettings.h:
* kwq/kdecore/kiconloader.h:
* kwq/kdecore/kstaticdeleter.h:
* kwq/kdecore/kstringhandler.h:
* kwq/kdeui/kcombobox.h:
* kwq/kdeui/kcompletionbox.h:
* kwq/kdeui/klineedit.h:
* kwq/kdeui/klistbox.h:
* kwq/kdeui/kmessagebox.h:
* kwq/kio/kfileitem.h:
* kwq/kio/kimageio.h:
* kwq/kio/kmimetype.h:
* kwq/kio/kprotocolmanager.h:
* kwq/kio/netaccess.h:
* kwq/qt/qxml.h:
* kwq/kparts/browserinterface.h:
* kwq/kparts/factory.h:
* kwq/kparts/part.h:
* kwq/qt/qarray.h:
* kwq/qt/qcollection.h:
* kwq/qt/qcstring.h:
* kwq/qt/qcursor.h:
* kwq/qt/qdict.h:
* kwq/qt/qhbox.h:
* kwq/qt/qlabel.h:
* kwq/qt/qlist.h:
* kwq/qt/qmap.h:
* kwq/qt/qmovie.h:
* kwq/qt/qobject.h:
* kwq/qt/qpaintdevicemetrics.h:
* kwq/qt/qpainter.h:
* kwq/qt/qpoint.h:
* kwq/qt/qradiobutton.h:
* kwq/qt/qrect.h:
* kwq/qt/qregion.h:
* kwq/qt/qscrollview.h:
* kwq/qt/qsize.h:
* kwq/qt/qstack.h:
* kwq/qt/qstringlist.h:
* kwq/qt/qtextedit.h:
* kwq/qt/qvaluelist.h:
* kwq/qt/qvector.h:
* kwq/qt/qwidget.h:
* kwq/qt/qxml.h:
Removed unused stuff.
* kwq/KWQListBox.mm:
* kwq/KWQMapImpl.h:
* kwq/KWQMapImpl.mm:
* kwq/KWQPainter.mm:
* kwq/KWQPoint.mm:
* kwq/KWQRadioButton.mm:
* kwq/KWQRect.mm:
* kwq/KWQRegion.mm:
* kwq/KWQScrollBar.h:
* kwq/KWQScrollView.mm:
* kwq/KWQSize.mm:
* kwq/KWQStringList.mm:
* kwq/KWQbrowserinterface.mm:
Simplified.
* kwq/kdecore/kurl.h:
Added include to match what's expected by clients.
* kwq/qt/qobjectlist.h: Added. Empty file to make includers happy.
* kwq/khtml/khtml_printsettings.h: Added. Empty file.
* kwq/qt/qobjectlist.h: Added. Empty file.
* kwq/kio/kssl/ksslkeygen.h: Define just enough to make callers
happy.
* kwq/qt/qobject.h: Added event().
* kwq/kparts/part.h: Added bool return type to event().
* kwq/qt/qvector.h: Added QGVector base class.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a4cbb55..48f9f22 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,168 @@
+2002-06-03 Darin Adler <darin at apple.com>
+
+ Get rid of many unneeded APPLE_CHANGES.
+ Also get rid of _KWQ_ and _KWQ_PEDANTIC_.
+
+ * WebCore.exp: Don't export DomShared::ref/deref any more.
+ * WebCore-tests.exp: Changed around as needed due to changes in
+ the classes being tested.
+
+ * khtml/html/htmlparser.cpp:
+ * khtml/html/htmltokenizer.cpp:
+ Simplified APPLE_CHANGES for better merging.
+
+ * khtml/dom/dom_misc.h:
+ * khtml/dom/dom_misc.cpp:
+ * khtml/dom/html_document.cpp:
+ * khtml/khtmlview.cpp:
+ * khtml/ecma/kjs_css.h:
+ * khtml/ecma/kjs_dom.cpp:
+ * khtml/ecma/kjs_dom.h:
+ * khtml/ecma/kjs_window.cpp:
+ * khtml/html/html_formimpl.cpp:
+ * khtml/html/html_objectimpl.cpp:
+ * khtml/misc/helper.cpp:
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_flow.cpp:
+ * khtml/rendering/render_form.cpp:
+ * khtml/rendering/render_text.cpp:
+ * khtml/xml/xml_tokenizer.h:
+ * kwq/qt/qtextedit.h:
+ Remove now-unneeded APPLE_CHANGES.
+
+ * khtml/misc/loader.cpp: (CachedImage::pixmap): Turned off more of
+ the QMovie code.
+
+ * khtml/html/html_documentimpl.cpp:
+ * khtml/html/htmltokenizer.h:
+ * khtml/xml/dom_elementimpl.h:
+ * kwq/KWQKHTMLPart.mm:
+ Formatting and other minor tweaks.
+
+ * kwq/KWQApplication.mm: (QApplication::sendEvent): Implemented.
+ * kwq/KWQChar.mm: (QChar::direction): Improved implementation.
+
+ * kwq/KWQCollection.h: Removed.
+ * kwq/KWQIcon.h: Removed.
+
+ * kwq/Makefile.am: Removed following files.
+ * kwq/KWQKCompletionBox.mm: Removed.
+ * kwq/KWQKFactory.mm: Removed.
+ * kwq/KWQListBox.mm: Removed.
+ * kwq/KWQKImageIO.mm: Removed.
+
+ * kwq/KWQObject.mm: (QObject::event): Added, does nothing.
+ (QObject::inherits): Put in real implementation (good enough for us).
+
+ * kwq/WCWebDataSource.h: Removed extern declaration of global.
+
+ * kwq/KWQCursor.mm: (QCursor::handle): Made the handle be an
+ NSCursor *.
+
+ * kwq/external.h: Moved [IFWebView setFrameSize:] here.
+ Got rid of IFAnimatedImage.
+
+ * kwq/KWQDef.h: Remove unused Q_INT8, Q_INT16, Q_UINT8, Q_UINT16,
+ QCOORD, WFlags, WId, ASSERT, CHECK_PTR, Q_EXPORT, Q_PACKED,
+ QT_STATIC_CONST, QT_STATIC_CONST_IMPL. Define _KWQ_IOSTREAM_ only
+ when NDEBUG is not defined.
+
+ * kwq/KWQBuffer.mm:
+ * kwq/KWQCString.mm:
+ * kwq/KWQCollection.mm:
+ * kwq/KWQCompletion.h:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQFrame.h:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKLineEdit.mm:
+ * kwq/KWQKProtocolManager.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQListBox.h:
+ * kwq/KWQMovie.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQxml.mm:
+ * kwq/qt/qbuffer.h:
+ * kwq/kdecore/kdebug.h:
+ * kwq/kdecore/kglobal.h:
+ * kwq/kdecore/kglobalsettings.h:
+ * kwq/kdecore/kiconloader.h:
+ * kwq/kdecore/kstaticdeleter.h:
+ * kwq/kdecore/kstringhandler.h:
+ * kwq/kdeui/kcombobox.h:
+ * kwq/kdeui/kcompletionbox.h:
+ * kwq/kdeui/klineedit.h:
+ * kwq/kdeui/klistbox.h:
+ * kwq/kdeui/kmessagebox.h:
+ * kwq/kio/kfileitem.h:
+ * kwq/kio/kimageio.h:
+ * kwq/kio/kmimetype.h:
+ * kwq/kio/kprotocolmanager.h:
+ * kwq/kio/netaccess.h:
+ * kwq/qt/qxml.h:
+ * kwq/kparts/browserinterface.h:
+ * kwq/kparts/factory.h:
+ * kwq/kparts/part.h:
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qhbox.h:
+ * kwq/qt/qlabel.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qmovie.h:
+ * kwq/qt/qobject.h:
+ * kwq/qt/qpaintdevicemetrics.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qradiobutton.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qregion.h:
+ * kwq/qt/qscrollview.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qstringlist.h:
+ * kwq/qt/qtextedit.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ * kwq/qt/qwidget.h:
+ * kwq/qt/qxml.h:
+ Removed unused stuff.
+
+ * kwq/KWQListBox.mm:
+ * kwq/KWQMapImpl.h:
+ * kwq/KWQMapImpl.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPoint.mm:
+ * kwq/KWQRadioButton.mm:
+ * kwq/KWQRect.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollBar.h:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSize.mm:
+ * kwq/KWQStringList.mm:
+ * kwq/KWQbrowserinterface.mm:
+ Simplified.
+
+ * kwq/kdecore/kurl.h:
+ Added include to match what's expected by clients.
+
+ * kwq/qt/qobjectlist.h: Added. Empty file to make includers happy.
+
+ * kwq/khtml/khtml_printsettings.h: Added. Empty file.
+ * kwq/qt/qobjectlist.h: Added. Empty file.
+
+ * kwq/kio/kssl/ksslkeygen.h: Define just enough to make callers
+ happy.
+
+ * kwq/qt/qobject.h: Added event().
+ * kwq/kparts/part.h: Added bool return type to event().
+ * kwq/qt/qvector.h: Added QGVector base class.
+
2002-06-01 Darin Adler <darin at apple.com>
* kwq/KWQPtrDictImpl.mm: (KWQPtrDictPrivate::~KWQPtrDictPrivate):
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a4cbb55..48f9f22 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,168 @@
+2002-06-03 Darin Adler <darin at apple.com>
+
+ Get rid of many unneeded APPLE_CHANGES.
+ Also get rid of _KWQ_ and _KWQ_PEDANTIC_.
+
+ * WebCore.exp: Don't export DomShared::ref/deref any more.
+ * WebCore-tests.exp: Changed around as needed due to changes in
+ the classes being tested.
+
+ * khtml/html/htmlparser.cpp:
+ * khtml/html/htmltokenizer.cpp:
+ Simplified APPLE_CHANGES for better merging.
+
+ * khtml/dom/dom_misc.h:
+ * khtml/dom/dom_misc.cpp:
+ * khtml/dom/html_document.cpp:
+ * khtml/khtmlview.cpp:
+ * khtml/ecma/kjs_css.h:
+ * khtml/ecma/kjs_dom.cpp:
+ * khtml/ecma/kjs_dom.h:
+ * khtml/ecma/kjs_window.cpp:
+ * khtml/html/html_formimpl.cpp:
+ * khtml/html/html_objectimpl.cpp:
+ * khtml/misc/helper.cpp:
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_flow.cpp:
+ * khtml/rendering/render_form.cpp:
+ * khtml/rendering/render_text.cpp:
+ * khtml/xml/xml_tokenizer.h:
+ * kwq/qt/qtextedit.h:
+ Remove now-unneeded APPLE_CHANGES.
+
+ * khtml/misc/loader.cpp: (CachedImage::pixmap): Turned off more of
+ the QMovie code.
+
+ * khtml/html/html_documentimpl.cpp:
+ * khtml/html/htmltokenizer.h:
+ * khtml/xml/dom_elementimpl.h:
+ * kwq/KWQKHTMLPart.mm:
+ Formatting and other minor tweaks.
+
+ * kwq/KWQApplication.mm: (QApplication::sendEvent): Implemented.
+ * kwq/KWQChar.mm: (QChar::direction): Improved implementation.
+
+ * kwq/KWQCollection.h: Removed.
+ * kwq/KWQIcon.h: Removed.
+
+ * kwq/Makefile.am: Removed following files.
+ * kwq/KWQKCompletionBox.mm: Removed.
+ * kwq/KWQKFactory.mm: Removed.
+ * kwq/KWQListBox.mm: Removed.
+ * kwq/KWQKImageIO.mm: Removed.
+
+ * kwq/KWQObject.mm: (QObject::event): Added, does nothing.
+ (QObject::inherits): Put in real implementation (good enough for us).
+
+ * kwq/WCWebDataSource.h: Removed extern declaration of global.
+
+ * kwq/KWQCursor.mm: (QCursor::handle): Made the handle be an
+ NSCursor *.
+
+ * kwq/external.h: Moved [IFWebView setFrameSize:] here.
+ Got rid of IFAnimatedImage.
+
+ * kwq/KWQDef.h: Remove unused Q_INT8, Q_INT16, Q_UINT8, Q_UINT16,
+ QCOORD, WFlags, WId, ASSERT, CHECK_PTR, Q_EXPORT, Q_PACKED,
+ QT_STATIC_CONST, QT_STATIC_CONST_IMPL. Define _KWQ_IOSTREAM_ only
+ when NDEBUG is not defined.
+
+ * kwq/KWQBuffer.mm:
+ * kwq/KWQCString.mm:
+ * kwq/KWQCollection.mm:
+ * kwq/KWQCompletion.h:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQFrame.h:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKLineEdit.mm:
+ * kwq/KWQKProtocolManager.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQListBox.h:
+ * kwq/KWQMovie.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQxml.mm:
+ * kwq/qt/qbuffer.h:
+ * kwq/kdecore/kdebug.h:
+ * kwq/kdecore/kglobal.h:
+ * kwq/kdecore/kglobalsettings.h:
+ * kwq/kdecore/kiconloader.h:
+ * kwq/kdecore/kstaticdeleter.h:
+ * kwq/kdecore/kstringhandler.h:
+ * kwq/kdeui/kcombobox.h:
+ * kwq/kdeui/kcompletionbox.h:
+ * kwq/kdeui/klineedit.h:
+ * kwq/kdeui/klistbox.h:
+ * kwq/kdeui/kmessagebox.h:
+ * kwq/kio/kfileitem.h:
+ * kwq/kio/kimageio.h:
+ * kwq/kio/kmimetype.h:
+ * kwq/kio/kprotocolmanager.h:
+ * kwq/kio/netaccess.h:
+ * kwq/qt/qxml.h:
+ * kwq/kparts/browserinterface.h:
+ * kwq/kparts/factory.h:
+ * kwq/kparts/part.h:
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qhbox.h:
+ * kwq/qt/qlabel.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qmovie.h:
+ * kwq/qt/qobject.h:
+ * kwq/qt/qpaintdevicemetrics.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qradiobutton.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qregion.h:
+ * kwq/qt/qscrollview.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qstringlist.h:
+ * kwq/qt/qtextedit.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ * kwq/qt/qwidget.h:
+ * kwq/qt/qxml.h:
+ Removed unused stuff.
+
+ * kwq/KWQListBox.mm:
+ * kwq/KWQMapImpl.h:
+ * kwq/KWQMapImpl.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPoint.mm:
+ * kwq/KWQRadioButton.mm:
+ * kwq/KWQRect.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollBar.h:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSize.mm:
+ * kwq/KWQStringList.mm:
+ * kwq/KWQbrowserinterface.mm:
+ Simplified.
+
+ * kwq/kdecore/kurl.h:
+ Added include to match what's expected by clients.
+
+ * kwq/qt/qobjectlist.h: Added. Empty file to make includers happy.
+
+ * kwq/khtml/khtml_printsettings.h: Added. Empty file.
+ * kwq/qt/qobjectlist.h: Added. Empty file.
+
+ * kwq/kio/kssl/ksslkeygen.h: Define just enough to make callers
+ happy.
+
+ * kwq/qt/qobject.h: Added event().
+ * kwq/kparts/part.h: Added bool return type to event().
+ * kwq/qt/qvector.h: Added QGVector base class.
+
2002-06-01 Darin Adler <darin at apple.com>
* kwq/KWQPtrDictImpl.mm: (KWQPtrDictPrivate::~KWQPtrDictPrivate):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a4cbb55..48f9f22 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,168 @@
+2002-06-03 Darin Adler <darin at apple.com>
+
+ Get rid of many unneeded APPLE_CHANGES.
+ Also get rid of _KWQ_ and _KWQ_PEDANTIC_.
+
+ * WebCore.exp: Don't export DomShared::ref/deref any more.
+ * WebCore-tests.exp: Changed around as needed due to changes in
+ the classes being tested.
+
+ * khtml/html/htmlparser.cpp:
+ * khtml/html/htmltokenizer.cpp:
+ Simplified APPLE_CHANGES for better merging.
+
+ * khtml/dom/dom_misc.h:
+ * khtml/dom/dom_misc.cpp:
+ * khtml/dom/html_document.cpp:
+ * khtml/khtmlview.cpp:
+ * khtml/ecma/kjs_css.h:
+ * khtml/ecma/kjs_dom.cpp:
+ * khtml/ecma/kjs_dom.h:
+ * khtml/ecma/kjs_window.cpp:
+ * khtml/html/html_formimpl.cpp:
+ * khtml/html/html_objectimpl.cpp:
+ * khtml/misc/helper.cpp:
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_flow.cpp:
+ * khtml/rendering/render_form.cpp:
+ * khtml/rendering/render_text.cpp:
+ * khtml/xml/xml_tokenizer.h:
+ * kwq/qt/qtextedit.h:
+ Remove now-unneeded APPLE_CHANGES.
+
+ * khtml/misc/loader.cpp: (CachedImage::pixmap): Turned off more of
+ the QMovie code.
+
+ * khtml/html/html_documentimpl.cpp:
+ * khtml/html/htmltokenizer.h:
+ * khtml/xml/dom_elementimpl.h:
+ * kwq/KWQKHTMLPart.mm:
+ Formatting and other minor tweaks.
+
+ * kwq/KWQApplication.mm: (QApplication::sendEvent): Implemented.
+ * kwq/KWQChar.mm: (QChar::direction): Improved implementation.
+
+ * kwq/KWQCollection.h: Removed.
+ * kwq/KWQIcon.h: Removed.
+
+ * kwq/Makefile.am: Removed following files.
+ * kwq/KWQKCompletionBox.mm: Removed.
+ * kwq/KWQKFactory.mm: Removed.
+ * kwq/KWQListBox.mm: Removed.
+ * kwq/KWQKImageIO.mm: Removed.
+
+ * kwq/KWQObject.mm: (QObject::event): Added, does nothing.
+ (QObject::inherits): Put in real implementation (good enough for us).
+
+ * kwq/WCWebDataSource.h: Removed extern declaration of global.
+
+ * kwq/KWQCursor.mm: (QCursor::handle): Made the handle be an
+ NSCursor *.
+
+ * kwq/external.h: Moved [IFWebView setFrameSize:] here.
+ Got rid of IFAnimatedImage.
+
+ * kwq/KWQDef.h: Remove unused Q_INT8, Q_INT16, Q_UINT8, Q_UINT16,
+ QCOORD, WFlags, WId, ASSERT, CHECK_PTR, Q_EXPORT, Q_PACKED,
+ QT_STATIC_CONST, QT_STATIC_CONST_IMPL. Define _KWQ_IOSTREAM_ only
+ when NDEBUG is not defined.
+
+ * kwq/KWQBuffer.mm:
+ * kwq/KWQCString.mm:
+ * kwq/KWQCollection.mm:
+ * kwq/KWQCompletion.h:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQFrame.h:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKLineEdit.mm:
+ * kwq/KWQKProtocolManager.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQListBox.h:
+ * kwq/KWQMovie.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQxml.mm:
+ * kwq/qt/qbuffer.h:
+ * kwq/kdecore/kdebug.h:
+ * kwq/kdecore/kglobal.h:
+ * kwq/kdecore/kglobalsettings.h:
+ * kwq/kdecore/kiconloader.h:
+ * kwq/kdecore/kstaticdeleter.h:
+ * kwq/kdecore/kstringhandler.h:
+ * kwq/kdeui/kcombobox.h:
+ * kwq/kdeui/kcompletionbox.h:
+ * kwq/kdeui/klineedit.h:
+ * kwq/kdeui/klistbox.h:
+ * kwq/kdeui/kmessagebox.h:
+ * kwq/kio/kfileitem.h:
+ * kwq/kio/kimageio.h:
+ * kwq/kio/kmimetype.h:
+ * kwq/kio/kprotocolmanager.h:
+ * kwq/kio/netaccess.h:
+ * kwq/qt/qxml.h:
+ * kwq/kparts/browserinterface.h:
+ * kwq/kparts/factory.h:
+ * kwq/kparts/part.h:
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qhbox.h:
+ * kwq/qt/qlabel.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qmovie.h:
+ * kwq/qt/qobject.h:
+ * kwq/qt/qpaintdevicemetrics.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qradiobutton.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qregion.h:
+ * kwq/qt/qscrollview.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qstringlist.h:
+ * kwq/qt/qtextedit.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ * kwq/qt/qwidget.h:
+ * kwq/qt/qxml.h:
+ Removed unused stuff.
+
+ * kwq/KWQListBox.mm:
+ * kwq/KWQMapImpl.h:
+ * kwq/KWQMapImpl.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPoint.mm:
+ * kwq/KWQRadioButton.mm:
+ * kwq/KWQRect.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollBar.h:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSize.mm:
+ * kwq/KWQStringList.mm:
+ * kwq/KWQbrowserinterface.mm:
+ Simplified.
+
+ * kwq/kdecore/kurl.h:
+ Added include to match what's expected by clients.
+
+ * kwq/qt/qobjectlist.h: Added. Empty file to make includers happy.
+
+ * kwq/khtml/khtml_printsettings.h: Added. Empty file.
+ * kwq/qt/qobjectlist.h: Added. Empty file.
+
+ * kwq/kio/kssl/ksslkeygen.h: Define just enough to make callers
+ happy.
+
+ * kwq/qt/qobject.h: Added event().
+ * kwq/kparts/part.h: Added bool return type to event().
+ * kwq/qt/qvector.h: Added QGVector base class.
+
2002-06-01 Darin Adler <darin at apple.com>
* kwq/KWQPtrDictImpl.mm: (KWQPtrDictPrivate::~KWQPtrDictPrivate):
diff --git a/WebCore/Makefile.am b/WebCore/Makefile.am
index a05f6b4..5728356 100644
--- a/WebCore/Makefile.am
+++ b/WebCore/Makefile.am
@@ -78,16 +78,16 @@ framework-header-stamp:
ln -sf Versions/Current/PrivateHeaders $(FRAMEWORK_DIR)/PrivateHeaders
touch $@
-framework-dylib-stamp: $(libwebcore_dylib_OBJECTS) $(libwebcore_dylib_DEPENDENCIES) WebCore-combined.exp
+framework-dylib-stamp: $(libwebcore_dylib_OBJECTS) $(libwebcore_dylib_DEPENDENCIES) $(WEBCORE_EXPORTS)
mkdir -p $(FRAMEWORK_DIR)/Versions/$(FRAMEWORK_VERSION)
rm -f $(FRAMEWORK_DIR)/Versions/Current
ln -sf $(FRAMEWORK_VERSION) $(FRAMEWORK_DIR)/Versions/Current
$(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) $(FRAMEWORK_LINKFLAGS) $(libwebcore_dylib_OBJECTS) -o $(FRAMEWORK_DYLIB)
- nmedit -s WebCore-combined.exp - $(FRAMEWORK_DYLIB)
+ nmedit -s $(WEBCORE_EXPORTS) - $(FRAMEWORK_DYLIB)
+ if test -n "$(STRIP_FLAGS)"; then strip $(STRIP_FLAGS) - $(FRAMEWORK_DYLIB); fi
ln -sf Versions/Current/$(FRAMEWORK_NAME) $(FRAMEWORK_DIR)/$(FRAMEWORK_NAME)
touch $@
-
CLEANFILES = $(noinst_DATA)
# can't use CLEANFILES for this because it doesn't work for directories
clean-am:
diff --git a/WebCore/WebCore-tests.exp b/WebCore/WebCore-tests.exp
index d9d030a..56bdfdc 100644
--- a/WebCore/WebCore-tests.exp
+++ b/WebCore/WebCore-tests.exp
@@ -34,11 +34,10 @@ __ZN11KWQListImplC1ERKS_
__ZN11KWQListImplD1Ev
__ZN11QStringList5splitERK5QCharRK7QStringb
__ZN11QStringList5splitERK7QStringS2_b
-__ZN11QStringListC1Ev
-__ZN11QStringListD1Ev
__ZN12KWQArrayImpl4fillEPKvi
__ZN12KWQArrayImpl6resizeEm
__ZN12KWQArrayImpl9duplicateEPKvm
+__ZN12KWQArrayImplC1ERKS_
__ZN12KWQArrayImplC1Em
__ZN12KWQArrayImplC1Emm
__ZN12KWQArrayImplD1Ev
@@ -63,12 +62,7 @@ __ZN14KWQPtrDictImplC1ERKS_
__ZN14KWQPtrDictImplC1EiPFvPvEPK24CFDictionaryKeyCallBacks
__ZN14KWQPtrDictImplD1Ev
__ZN14KWQPtrDictImplD2Ev
-__ZN14QPtrCollection10autoDeleteEv
-__ZN14QPtrCollection13setAutoDeleteEb
-__ZN14QPtrCollectionC2ERKS_
-__ZN14QPtrCollectionC2Ev
__ZN14QPtrCollectionD2Ev
-__ZN14QPtrCollectionaSERKS_
__ZN16KWQValueListImpl10appendNodeEP20KWQValueListNodeImpl
__ZN16KWQValueListImpl11prependNodeEP20KWQValueListNodeImpl
__ZN16KWQValueListImpl14removeIteratorER24KWQValueListIteratorImpl
@@ -83,7 +77,6 @@ __ZN16KWQValueListImplC1ERKS_
__ZN16KWQValueListImplD1Ev
__ZN16KWQValueListImplaSERKS_
__ZN18KWQMapIteratorImpl17incrementInternalEv
-__ZN18KWQMapIteratorImplC2ERKS_
__ZN18KWQMapIteratorImplC2Ev
__ZN19KWQDictIteratorImplC1ERK11KWQDictImpl
__ZN19KWQListIteratorImpl6toLastEv
@@ -131,8 +124,6 @@ __ZN5QFileC1ERK7QString
__ZN5QFileD1Ev
__ZN5QRectC1Eiiii
__ZN5QRectC1Ev
-__ZN5QSize8setWidthEi
-__ZN5QSize9setHeightEi
__ZN5QSizeC1Eii
__ZN5QSizeC1Ev
__ZN5QTime5startEv
@@ -143,10 +134,6 @@ __ZN5QTimeC1Ev
__ZN6QPointC1Ev
__ZN7QBuffer10writeBlockEPKcj
__ZN7QBuffer4openEi
-__ZN7QBuffer5closeEv
-__ZN7QBuffer6isOpenEv
-__ZN7QBufferC1Ev
-__ZN7QBufferD1Ev
__ZN7QRegExpC1EPKc
__ZN7QRegExpC1ERK7QStringbb
__ZN7QRegExpD1Ev
@@ -179,7 +166,6 @@ __ZN7QStringpLEc
__ZN8QCString8truncateEj
__ZN8QCStringC1EPKc
__ZN8QCStringC1EPKcj
-__ZN8QCStringC1ERKS_
__ZN8QCStringC1Ei
__ZN8QCStringC1Ev
__ZN8QCStringpLEPKc
@@ -247,19 +233,13 @@ __ZNK5QDate5monthEv
__ZNK5QDate6daysToERKS_
__ZNK5QFile4sizeEv
__ZNK5QFile6existsEv
-__ZNK5QRect3topEv
-__ZNK5QRect4leftEv
__ZNK5QRect4sizeEv
__ZNK5QRect5rightEv
-__ZNK5QRect5widthEv
__ZNK5QRect6bottomEv
-__ZNK5QRect6heightEv
__ZNK5QRect6isNullEv
__ZNK5QRect7isValidEv
-__ZNK5QRectanERKS_
+__ZNK5QRect9intersectERKS_
__ZNK5QSize10expandedToERKS_
-__ZNK5QSize5widthEv
-__ZNK5QSize6heightEv
__ZNK5QSize7isValidEv
__ZNK5QTime4hourEv
__ZNK5QTime4msecEv
@@ -268,10 +248,6 @@ __ZNK5QTime6minuteEv
__ZNK5QTime6secondEv
__ZNK5QTime6secsToERKS_
__ZNK6QPoint15manhattanLengthEv
-__ZNK6QPoint1xEv
-__ZNK6QPoint1yEv
-__ZNK7QBuffer4sizeEv
-__ZNK7QBuffer6bufferEv
__ZNK7QRegExp5matchERK7QStringiPib
__ZNK7QRegExp7patternEv
__ZNK7QString15stripWhiteSpaceEv
@@ -303,12 +279,12 @@ __ZNK7QString8toUShortEPbi
__ZNK8QCString3midEjj
__ZNK8QCString4findEPKcib
__ZNK8QCString5lowerEv
-__ZNK8QCString6isNullEv
__ZNK8QCString6lengthEv
__ZNK8QCString7isEmptyEv
__ZNK8QCString8containsEcb
__ZNK9QDateTime4timeEv
__ZNK9QDateTime6secsToERKS_
+__ZTV14QPtrCollection
__ZeqRK5QRectS1_
__ZeqRK5QSizeS1_
__ZeqRK7QStringPKc
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index ddd74ab..2950829 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -11,8 +11,6 @@ __ZN16KWQKHTMLPartImpl7setViewEP9KHTMLView
__ZN16KWQKHTMLPartImpl8slotDataEP8NSStringPKcib
__ZN3DOM12DocumentImpl19updateStyleSelectorEv
__ZN3DOM9DOMStringD1Ev
-__ZN3DOM9DomShared3refEv
-__ZN3DOM9DomShared5derefEv
__ZN4KURLC1EPKci
__ZN4KURLD1Ev
__ZN5khtml5Cache13getStatisticsEv
diff --git a/WebCore/khtml/dom/dom_misc.cpp b/WebCore/khtml/dom/dom_misc.cpp
index 22a4b02..3a4b82f 100644
--- a/WebCore/khtml/dom/dom_misc.cpp
+++ b/WebCore/khtml/dom/dom_misc.cpp
@@ -22,9 +22,6 @@
#include "dom_misc.h"
using namespace DOM;
-#ifdef APPLE_CHANGES
-#include <stdio.h>
-#endif /* APPLE_CHANGES */
DomShared::~DomShared()
{
@@ -38,25 +35,3 @@ bool DomShared::deleteMe()
}
-#ifdef APPLE_CHANGES
-void *DomShared::instanceToCheck;
-
-void DomShared::ref()
-{
- if (((void *)this) == instanceToCheck){
- printf ("0x%08x incrementing ref %d\n", (unsigned int)this, _ref);
- }
- _ref++;
-}
-
-void DomShared::deref()
-{
- if (((void *)this) == instanceToCheck){
- fprintf (stdout, "0x%08x decrementing ref %d\n", (unsigned int)this, _ref);
- }
- if(_ref)
- _ref--;
- if(!_ref && deleteMe())
- delete this;
-}
-#endif /* APPLE_CHANGES */
diff --git a/WebCore/khtml/dom/dom_misc.h b/WebCore/khtml/dom/dom_misc.h
index eaacf6d..9ebb003 100644
--- a/WebCore/khtml/dom/dom_misc.h
+++ b/WebCore/khtml/dom/dom_misc.h
@@ -41,15 +41,8 @@ public:
*/
virtual bool deleteMe();
-#ifdef APPLE_CHANGES
- static void *instanceToCheck;
-
- void ref();
- void deref();
-#else /* APPLE_CHANGES not defined */
void ref() { _ref++; }
void deref() { if(_ref) _ref--; if(!_ref && deleteMe()) delete this; }
-#endif /* APPLE_CHANGES not defined */
bool hasOneRef() const { return _ref == 1; }
unsigned int refCount() const { return _ref; }
diff --git a/WebCore/khtml/dom/html_document.cpp b/WebCore/khtml/dom/html_document.cpp
index 27eb3f4..2eee0c5 100644
--- a/WebCore/khtml/dom/html_document.cpp
+++ b/WebCore/khtml/dom/html_document.cpp
@@ -170,25 +170,15 @@ HTMLCollection HTMLDocument::all() const
DOMString HTMLDocument::cookie() const
{
-#ifdef APPLE_CHANGES
-// FIXME: implement cookies
- fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
- return DOMString("");
-#else /* APPLE_CHANGES not defined */
if (!impl) return DOMString();
return ((HTMLDocumentImpl *)impl)->cookie();
-#endif /* APPLE_CHANGES not defined */
}
void HTMLDocument::setCookie( const DOMString & value )
{
-#ifdef APPLE_CHANGES
- fprintf(stderr, "ERROR %s:%d %s (NOT YET IMPLEMENTED)\n", __FILE__, __LINE__, __FUNCTION__);
-#else /* APPLE_CHANGES not defined */
if (impl)
((HTMLDocumentImpl *)impl)->setCookie(value);
-#endif /* APPLE_CHANGES not defined */
}
void HTMLDocument::open( )
diff --git a/WebCore/khtml/ecma/kjs_css.h b/WebCore/khtml/ecma/kjs_css.h
index 06d3020..d5bc6ac 100644
--- a/WebCore/khtml/ecma/kjs_css.h
+++ b/WebCore/khtml/ecma/kjs_css.h
@@ -30,9 +30,6 @@
#include <dom/css_rule.h>
#include "kjs_binding.h"
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#define id id_
-#endif /* APPLE_CHANGES, __OBJC__ */
namespace KJS {
class DOMCSSStyleDeclaration : public DOMObject {
@@ -298,8 +295,5 @@ namespace KJS {
Value getDOMCounter(ExecState *exec, DOM::Counter c);
}; // namespace
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#undef id
-#endif /* APPLE_CHANGES, __OBJC__ */
#endif
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index b1403a8..b0522a0 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -392,11 +392,11 @@ UString DOMNode::toString(ExecState *) const
DOM::Element e = node;
if ( !e.isNull() ) {
-#if APPLE_CHANGES
- s = KJS::UString(e.nodeName().string());
-#else /* not APPLE_CHANGES */
+#ifdef APPLE_CHANGES
+ s = UString(e.nodeName().string());
+#else
s = e.nodeName().string();
-#endif /* not APPLE_CHANGES */
+#endif
} else
s = className(); // fallback
@@ -723,9 +723,7 @@ Value DOMDocument::getValueProperty(ExecState *exec, int token) const
{
KHTMLPart* part = docimpl->view()->part();
if ( part ) {
-#ifndef APPLE_CHANGES
if (part->d->m_bComplete) return String("complete");
-#endif
if (docimpl->parsing()) return String("loading");
return String("loaded");
// What does the interactive value mean ?
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index 65dfab5..269d2f3 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -28,13 +28,6 @@
#include "ecma/kjs_binding.h"
-#if APPLE_CHANGES
-#include <qvaluelist.h>
-#endif
-
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#define id id_
-#endif /* APPLE_CHANGES, __OBJC__ */
namespace KJS {
class DOMNode : public DOMObject {
@@ -298,8 +291,5 @@ namespace KJS {
};
}; // namespace
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#undef id
-#endif /* APPLE_CHANGES, __OBJC__ */
#endif
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index a481275..39e5084 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -49,10 +49,6 @@
#include "xml/dom_docimpl.h"
#include "html/html_documentimpl.h"
-#if APPLE_CHANGES
-#include <qlineedit.h>
-#endif
-
using namespace KJS;
namespace KJS {
@@ -1099,13 +1095,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
KParts::ReadOnlyPart *newPart = 0L;
emit part->browserExtension()->createNewWindow("", uargs,winargs,newPart);
-#ifdef APPLE_CHANGES
- // We don't implement QObject::inherits, but we can assume this
- // part will be an html part.
- if (newPart) {
-#else
if (newPart && newPart->inherits("KHTMLPart")) {
-#endif
KHTMLPart *khtmlpart = static_cast<KHTMLPart*>(newPart);
//qDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window);
khtmlpart->setOpener(part);
@@ -1129,12 +1119,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if (!url.isEmpty())
emit khtmlpart->browserExtension()->openURLRequest(url,uargs);
return Window::retrieve(khtmlpart); // global object
-#ifdef APPLE_CHANGES
- // Make braces match for the benefit of prepare-ChangeLog
- } else
-#else
} else
-#endif
return Undefined();
}
}
diff --git a/WebCore/khtml/html/html_documentimpl.cpp b/WebCore/khtml/html/html_documentimpl.cpp
index 3fde5a9..6965c49 100644
--- a/WebCore/khtml/html/html_documentimpl.cpp
+++ b/WebCore/khtml/html/html_documentimpl.cpp
@@ -129,9 +129,9 @@ DOMString HTMLDocumentImpl::lastModified() const
DOMString HTMLDocumentImpl::cookie() const
{
-#if APPLE_CHANGES
+#ifdef APPLE_CHANGES
return DOMString();
-#else /* not APPLE_CHANGES */
+#else
QCString replyType;
QByteArray params, reply;
QDataStream stream(params, IO_WriteOnly);
@@ -157,7 +157,7 @@ DOMString HTMLDocumentImpl::cookie() const
QString result;
stream2 >> result;
return DOMString(result);
-#endif /* not APPLE_CHANGES */
+#endif // APPLE_CHANGES
}
void HTMLDocumentImpl::setCookie( const DOMString & value )
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 26682f0..cc1bc7c 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -1801,11 +1801,7 @@ void HTMLSelectElementImpl::notifyOptionSelected(HTMLOptionElementImpl *selected
HTMLKeygenElementImpl::HTMLKeygenElementImpl(DocumentPtr* doc, HTMLFormElementImpl* f)
: HTMLSelectElementImpl(doc, f)
{
-#ifdef APPLE_CHANGES
- QStringList keys;
-#else
QStringList keys = KSSLKeyGen::supportedKeySizes();
-#endif
for (QStringList::Iterator i = keys.begin(); i != keys.end(); ++i) {
HTMLOptionElementImpl* o = new HTMLOptionElementImpl(doc, form());
addChild(o);
@@ -1837,7 +1833,6 @@ bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
encoded_values += enc_name;
-#ifndef APPLE_CHANGES
// pop up the fancy certificate creation dialog here
KSSLKeyGen *kg = new KSSLKeyGen(static_cast<RenderWidget *>(m_render)->widget(), "Key Generator", true);
@@ -1845,7 +1840,6 @@ bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
successful = (QDialog::Accepted == kg->exec());
delete kg;
-#endif
encoded_values += "deadbeef";
diff --git a/WebCore/khtml/html/html_objectimpl.cpp b/WebCore/khtml/html/html_objectimpl.cpp
index b493730..b05138c 100644
--- a/WebCore/khtml/html/html_objectimpl.cpp
+++ b/WebCore/khtml/html/html_objectimpl.cpp
@@ -314,12 +314,9 @@ void HTMLObjectElementImpl::attach()
void HTMLObjectElementImpl::detach()
{
- // FIXME:MERGE do we need this unload event?
-#ifndef APPLE_CHANGES
if (attached())
// ### do this when we are actualy removed from document instead
dispatchHTMLEvent(EventImpl::UNLOAD_EVENT,false,false);
-#endif
HTMLElementImpl::detach();
}
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index 1e62d4b..eb929dd 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -1196,14 +1196,12 @@ void KHTMLParser::popOneBlock()
if (current->maintainsState()) {
#ifdef APPLE_CHANGES
if (document->document()){
- document->document()->registerMaintainsState(current);
- QString state(document->document()->nextState());
- if (!state.isNull()) current->restoreState(state);
- }
-#else
+#endif
document->document()->registerMaintainsState(current);
QString state(document->document()->nextState());
if (!state.isNull()) current->restoreState(state);
+#ifdef APPLE_CHANGES
+ }
#endif
}
if (current->renderer())
diff --git a/WebCore/khtml/html/htmltokenizer.cpp b/WebCore/khtml/html/htmltokenizer.cpp
index ca8b642..136f0d9 100644
--- a/WebCore/khtml/html/htmltokenizer.cpp
+++ b/WebCore/khtml/html/htmltokenizer.cpp
@@ -453,23 +453,14 @@ void HTMLTokenizer::scriptHandler()
void HTMLTokenizer::scriptExecution( const QString& str, QString scriptURL,
int baseLine)
{
+#ifdef APPLE_CHANGES
+ if (!view->part())
+ return;
+#endif
bool oldscript = script;
script = false;
QString url;
-#ifdef APPLE_CHANGES
- if (view->part()){
- m_executingScript++;
- if (scriptURL.isNull())
- url = static_cast<DocumentImpl*>(view->part()->document().handle())->URL();
- else
- url = scriptURL;
-
- view->part()->executeScript(url,baseLine,Node(),str);
- m_executingScript--;
- script = oldscript;
- }
-#else
m_executingScript++;
if (scriptURL.isNull())
url = static_cast<DocumentImpl*>(view->part()->document().handle())->URL();
@@ -479,7 +470,6 @@ void HTMLTokenizer::scriptExecution( const QString& str, QString scriptURL,
view->part()->executeScript(url,baseLine,Node(),str);
m_executingScript--;
script = oldscript;
-#endif
}
void HTMLTokenizer::parseComment(DOMStringIt &src)
diff --git a/WebCore/khtml/html/htmltokenizer.h b/WebCore/khtml/html/htmltokenizer.h
index d50c205..c3ea931 100644
--- a/WebCore/khtml/html/htmltokenizer.h
+++ b/WebCore/khtml/html/htmltokenizer.h
@@ -44,9 +44,12 @@ class HTMLTokenizer;
#include "xml/dom_elementimpl.h"
#include "xml/dom_docimpl.h"
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#define id id_
-#endif /* APPLE_CHANGES, __OBJC__ */
+#ifdef APPLE_CHANGES
+#ifdef __OBJC__
+#define id id_AVOID_KEYWORD
+#endif
+#endif
+
class KHTMLParser;
class KHTMLView;
@@ -345,9 +348,10 @@ protected:
KHTMLView *view;
};
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
+
+#ifdef APPLE_CHANGES
#undef id
-#endif /* APPLE_CHANGES, __OBJC__ */
+#endif
#endif // HTMLTOKENIZER
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 7f3a466..1c741fe 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -38,9 +38,7 @@
#include "misc/htmlhashes.h"
#include "misc/helper.h"
#include "khtml_settings.h"
-#ifndef APPLE_CHANGES
#include "khtml_printsettings.h"
-#endif
#include <kcursor.h>
#include <ksimpleconfig.h>
@@ -55,10 +53,8 @@
#include <kimageio.h>
#include <assert.h>
#include <kdebug.h>
-#ifndef APPLE_CHANGES
#include <kurldrag.h>
#include <qobjectlist.h>
-#endif
#define PAINT_BUFFER_HEIGHT 128
@@ -94,10 +90,8 @@ public:
{
underMouse = 0;
reset();
-#ifndef APPLE_CHANGES
tp=0;
paintBuffer=0;
-#endif /* APPLE_CHANGES not defined */
formCompletions=0;
prevScrollbarVisible = true;
timerId = 0;
@@ -108,11 +102,9 @@ public:
~KHTMLViewPrivate()
{
delete formCompletions;
-#ifndef APPLE_CHANGES
delete tp; tp = 0;
delete paintBuffer; paintBuffer =0;
-#endif /* APPLE_CHANGES not defined */
if (underMouse)
underMouse->deref();
delete tooltip;
@@ -152,12 +144,7 @@ public:
updateRect = QRect();
}
-#ifdef APPLE_CHANGES
- // The paintBuffer ivar is obsolete,
- // and should probably be removed at some point
-#else /* APPLE_CHANGES not defined */
QPainter *tp;
-#endif /* APPLE_CHANGES not defined */
QPixmap *paintBuffer;
NodeImpl *underMouse;
@@ -269,7 +256,7 @@ void KHTMLView::init()
#ifndef APPLE_CHANGES
if(!d->paintBuffer) d->paintBuffer = new QPixmap(PAINT_BUFFER_HEIGHT, PAINT_BUFFER_HEIGHT);
if(!d->tp) d->tp = new QPainter();
-#endif /* APPLE_CHANGES not defined */
+#endif
setFocusPolicy(QWidget::StrongFocus);
viewport()->setFocusPolicy( QWidget::WheelFocus );
@@ -294,10 +281,10 @@ void KHTMLView::clear()
d->reset();
#ifdef APPLE_CHANGES
- killTimer(d->timerId);
- killTimer(d->repaintTimerId);
- d->timerId = 0;
- d->repaintTimerId = 0;
+ killTimer(d->timerId);
+ killTimer(d->repaintTimerId);
+ d->timerId = 0;
+ d->repaintTimerId = 0;
#else
killTimers();
#endif
@@ -414,11 +401,7 @@ void KHTMLView::drawContents( QPainter *p, int ex, int ey, int ew, int eh )
#endif /* APPLE_CHANGES not defined */
khtml::DrawContentsEvent event( p, ex, ey, ew, eh );
-#ifdef APPLE_CHANGES
- m_part->event(&event);
-#else /* APPLE_CHANGES not defined */
QApplication::sendEvent( m_part, &event );
-#endif /* APPLE_CHANGES not defined */
}
@@ -513,11 +496,7 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
if (!swallowEvent) {
khtml::MousePressEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
-#ifdef APPLE_CHANGES
- m_part->event(&event);
-#else /* APPLE_CHANGES not defined */
QApplication::sendEvent( m_part, &event );
-#endif /* APPLE_CHANGES not defined */
emit m_part->nodeActivated(mev.innerNode);
}
@@ -556,11 +535,7 @@ void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
if (!swallowEvent) {
khtml::MouseDoubleClickEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
-#ifdef APPLE_CHANGES
- m_part->event(&event);
-#else /* APPLE_CHANGES not defined */
QApplication::sendEvent( m_part, &event );
-#endif /* APPLE_CHANGES not defined */
// ###
//if ( url.length() )
@@ -658,11 +633,7 @@ void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
if (!swallowEvent) {
khtml::MouseMoveEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
-#ifdef APPLE_CHANGES
- m_part->event(&event);
-#else /* APPLE_CHANGES not defined */
QApplication::sendEvent( m_part, &event );
-#endif /* APPLE_CHANGES not defined */
}
}
@@ -696,11 +667,7 @@ void KHTMLView::viewportMouseReleaseEvent( QMouseEvent * _mouse )
if (!swallowEvent) {
khtml::MouseReleaseEvent event( _mouse, xm, ym, mev.url, mev.target, mev.innerNode );
-#ifdef APPLE_CHANGES
- m_part->event(&event);
-#else /* APPLE_CHANGES not defined */
QApplication::sendEvent( m_part, &event );
-#endif /* APPLE_CHANGES not defined */
}
}
@@ -1533,13 +1500,6 @@ void KHTMLView::timerEvent ( QTimerEvent *e )
killTimer(d->repaintTimerId);
#ifdef APPLE_CHANGES
-// if (_lockFocus()){
-// QPainter p(this);
-//
-// drawContents (&p, d->updateRect.x(), d->updateRect.y(), d->updateRect.width(), d->updateRect.height());
-//
-// _unlockFocus();
-// }
_displayRect (d->updateRect);
#else
updateContents( d->updateRect );
diff --git a/WebCore/khtml/misc/helper.cpp b/WebCore/khtml/misc/helper.cpp
index d106f29..59c9f8e 100644
--- a/WebCore/khtml/misc/helper.cpp
+++ b/WebCore/khtml/misc/helper.cpp
@@ -152,21 +152,12 @@ using namespace khtml;
static HTMLColors *htmlColors = 0L;
-#ifdef APPLE_CHANGES
-// FIXME: do we really need static delete support here?
-#else /* APPLE_CHANGES not defined */
static KStaticDeleter<HTMLColors> hcsd;
-#endif /* APPLE_CHANGES not defined */
void khtml::setNamedColor(QColor &color, const QString &_name)
{
if( !htmlColors )
-#ifdef APPLE_CHANGES
- // FIXME: do we really need static delete support here?
- htmlColors = new HTMLColors();
-#else /* APPLE_CHANGES not defined */
htmlColors = hcsd.setObject( new HTMLColors );
-#endif /* APPLE_CHANGES not defined */
int pos;
QString name = _name;
@@ -185,9 +176,9 @@ void khtml::setNamedColor(QColor &color, const QString &_name)
if (len == 6)
{
#ifdef APPLE_CHANGES
- // recognize #12345 (append a '0')
+ // recognize #12345 (duplicate the last character)
if(name[0] == '#') {
- name += '0';
+ name += name.right(1);
}
else if ((!name[0].isLetter() && !name[0].isDigit())) {
color = QColor();
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index c98a376..4786639 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -592,6 +592,10 @@ const QPixmap &CachedImage::pixmap( ) const
if(errorOccured)
return *Cache::brokenPixmap;
+#ifdef APPLE_CHANGES
+ if (p)
+ return *p;
+#else
if(m)
{
if(m->framePixmap().size() != m->getValidRect().size() && m->getValidRect().size().isValid())
@@ -610,6 +614,7 @@ const QPixmap &CachedImage::pixmap( ) const
}
else if(p)
return *p;
+#endif // APPLE_CHANGES
return *Cache::nullPixmap;
}
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index efb425a..4cb10f1 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1022,11 +1022,7 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start)
// remove leading spaces
while(!start.atEnd() &&
#ifndef QT_NO_UNICODETABLES
-#ifdef APPLE_CHANGES
- ( start.current() == ' ' || start.obj->isSpecial() )
-#else /* APPLE_CHANGES not defined */
( start.direction() == QChar::DirWS || start.obj->isSpecial() )
-#endif /* APPLE_CHANGES not defined */
#else
( start.current() == ' ' || start.obj->isSpecial() )
#endif
@@ -1171,6 +1167,11 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start)
// IMPORTANT: pos is > length here!
tmpW += t->width(lastSpace, pos - lastSpace, f);
}
+#ifdef APPLE_CHANGES
+#if 0
+ }
+#endif
+#endif
} else
KHTMLAssert( false );
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 66bc392..3aa1180 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -127,9 +127,7 @@ void RenderFlow::print(QPainter *p, int _x, int _y, int _w, int _h,
if((_ty > _y + _h) || (_ty + h < _y))
{
//kdDebug( 6040 ) << "cut!" << endl;
-//#ifndef APPLE_CHANGES
return;
-//#endif /* APPLE_CHANGES not defined */
}
}
@@ -268,9 +266,7 @@ void RenderFlow::layout()
// kdDebug( 6040 ) << "childrenInline()=" << childrenInline() << endl;
if(childrenInline()) {
// ### make bidi resumeable so that we can get rid of this ugly hack
-//#ifndef APPLE_CHANGES
if (!m_blockBidi)
-//#endif
layoutInlineChildren();
}
else
@@ -537,6 +533,9 @@ void RenderFlow::insertSpecialObject(RenderObject *o)
// We should never get here, as insertSpecialObject() should only ever be called with positioned or floating
// objects.
KHTMLAssert(false);
+#ifdef APPLE_CHANGES
+ newObj = 0; // keep gcc's uninitialized variable warnings happy
+#endif
}
newObj->count = specialObjects->count();
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 5551571..e25da11 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -27,9 +27,6 @@
#include <kfiledialog.h>
#include <kcompletionbox.h>
#include <kcursor.h>
-#if APPLE_CHANGES
-#include <kglobalsettings.h>
-#endif /* APPLE_CHANGES */
#include <qstyle.h>
@@ -74,9 +71,9 @@ short RenderFormElement::baselinePosition( bool f ) const
{
#ifdef APPLE_CHANGES
return RenderWidget::baselinePosition( f ) - 6 - QFontMetrics( style()->font() ).descent();
-#else /* APPLE_CHANGES not defined */
+#else
return RenderWidget::baselinePosition( f ) - 2 - QFontMetrics( style()->font() ).descent();
-#endif /* APPLE_CHANGES not defined */
+#endif
}
short RenderFormElement::calcReplacedWidth(bool*) const
@@ -187,8 +184,6 @@ void RenderFormElement::layout()
#ifdef APPLE_CHANGES
void RenderFormElement::performAction(QObject::Actions action)
{
- //fprintf (stdout, "RenderFormElement::performAction(): %d\n", action);
-
if (m_widget)
m_widget->endEditing();
@@ -199,9 +194,6 @@ void RenderFormElement::performAction(QObject::Actions action)
void RenderFormElement::slotClicked()
{
-#ifdef APPLE_CHANGES
- //fprintf (stdout, "RenderFormElement::slotClicked():\n");
-#endif /* APPLE_CHANGES */
if(isRenderButton()) {
ref();
QMouseEvent e2( QEvent::MouseButtonRelease, m_mousePos, m_button, m_state);
@@ -233,13 +225,8 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element)
b->setAutoMask(true);
b->setMouseTracking(true);
setQWidget(b);
-#ifdef APPLE_CHANGES
- connect(b,"SIGNAL(stateChanged(int))",this,"SLOT(slotStateChanged(int))");
- connect(b, "SIGNAL(clicked())", this, "SLOT(slotClicked())");
-#else /* APPLE_CHANGES not defined */
connect(b,SIGNAL(stateChanged(int)),this,SLOT(slotStateChanged(int)));
connect(b, SIGNAL(clicked()), this, SLOT(slotClicked()));
-#endif /* APPLE_CHANGES not defined */
}
@@ -268,7 +255,6 @@ void RenderCheckBox::performAction(QObject::Actions action)
{
QCheckBox* cb = static_cast<QCheckBox*>( m_widget );
- //fprintf (stdout, "RenderCheckBox::performAction(): %d\n", action);
if (action == QObject::ACTION_CHECKBOX_CLICKED)
slotStateChanged(cb->isChecked() ? 2 : 0);
}
@@ -290,11 +276,7 @@ RenderRadioButton::RenderRadioButton(HTMLInputElementImpl *element)
b->setAutoMask(true);
b->setMouseTracking(true);
setQWidget(b);
-#ifdef APPLE_CHANGES
- connect(b, "SIGNAL(clicked())", this, "SLOT(slotClicked())");
-#else /* APPLE_CHANGES not defined */
connect(b, SIGNAL(clicked()), this, SLOT(slotClicked()));
-#endif /* APPLE_CHANGES not defined */
}
void RenderRadioButton::updateFromElement()
@@ -306,9 +288,6 @@ void RenderRadioButton::updateFromElement()
void RenderRadioButton::slotClicked()
{
-#ifdef APPLE_CHANGES
- //fprintf (stdout, "RenderRadioButton::slotClicked():\n");
-#endif /* APPLE_CHANGES */
element()->setChecked(widget()->isChecked());
// emit mouseClick event etc
@@ -338,16 +317,13 @@ RenderSubmitButton::RenderSubmitButton(HTMLInputElementImpl *element)
setQWidget(p);
p->setAutoMask(true);
p->setMouseTracking(true);
+ connect(p, SIGNAL(clicked()), this, SLOT(slotClicked()));
#ifdef APPLE_CHANGES
- connect(p, "SIGNAL(clicked())", this, "SLOT(slotClicked())");
-
// Need to store a reference to this object and then invoke slotClicked on it.
//p->setAction (&RenderFormElement::slotClicked);
//p->setRenderObject (this);
p->setTarget (this);
-#else /* APPLE_CHANGES not defined */
- connect(p, SIGNAL(clicked()), this, SLOT(slotClicked()));
-#endif /* APPLE_CHANGES not defined */
+#endif
}
QString RenderSubmitButton::rawText()
@@ -406,13 +382,12 @@ QString RenderSubmitButton::defaultLabel() {
short RenderSubmitButton::baselinePosition( bool f ) const
{
#ifdef APPLE_CHANGES
- //return RenderFormElement::baselinePosition( f );
- // FIXED: [rjw] Where does this magic number '8' come from. It's also used above in
+ // FIXED: [rjw] Where does this magic number '8' come from? It's also used above in
// RenderSubmitButton::calcMinMaxWidth().
return RenderWidget::baselinePosition( f ) - 8 - QFontMetrics( style()->font() ).descent();
-#else /* APPLE_CHANGES not defined */
+#else
return RenderFormElement::baselinePosition( f );
-#endif /* APPLE_CHANGES not defined */
+#endif
}
// -------------------------------------------------------------------------------
@@ -421,9 +396,9 @@ RenderImageButton::RenderImageButton(HTMLInputElementImpl *element)
: RenderImage(element)
{
// ### support DOMActivate event when clicked
-#ifdef APPLE_CHANGES
+#ifdef APPLE_CHANGES
button = new KWQInvisibleButton(this);
-#endif /* APPLE_CHANGES */
+#endif
}
#ifdef APPLE_CHANGES
@@ -500,13 +475,8 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
: RenderFormElement(element)
{
LineEditWidget *edit = new LineEditWidget(view()->viewport());
-#ifdef APPLE_CHANGES
- connect(edit,"SIGNAL(returnPressed())", this, "SLOT(slotReturnPressed())");
- connect(edit,"SIGNAL(textChanged(const QString &))",this,"SLOT(slotTextChanged(const QString &))");
-#else /* APPLE_CHANGES not defined */
connect(edit,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
connect(edit,SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
-#endif /* APPLE_CHANGES not defined */
if(element->inputType() == HTMLInputElementImpl::PASSWORD)
edit->setEchoMode( QLineEdit::Password );
@@ -522,7 +492,7 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
setQWidget(edit);
#ifdef APPLE_CHANGES
edit->setTarget (this);
-#endif /* APPLE_CHANGES */
+#endif
}
void RenderLineEdit::slotReturnPressed()
@@ -576,9 +546,9 @@ void RenderLineEdit::calcMinMaxWidth()
} else
#ifdef APPLE_CHANGES
s = QSize( w + 6, h + 6 ).expandedTo( QApplication::globalStrut() );
-#else /* APPLE_CHANGES not defined */
+#else
s = QSize( w + 4, h + 4 ).expandedTo( QApplication::globalStrut() );
-#endif /* APPLE_CHANGES not defined */
+#endif
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@@ -612,7 +582,6 @@ void RenderLineEdit::performAction(QObject::Actions action)
{
KLineEdit *edit = static_cast<KLineEdit*>(m_widget);
- //fprintf (stdout, "RenderLineEdit::performAction(): %d text value = %s\n", action, edit->text().latin1());
if (action == QObject::ACTION_TEXT_FIELD_END_EDITING)
slotTextChanged(edit->text());
else if (action == QObject::ACTION_TEXT_FIELD)
@@ -647,21 +616,12 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element)
m_edit = new LineEditWidget(w);
-#ifdef APPLE_CHANGES
- connect(m_edit, "SIGNAL(returnPressed())", this, "SLOT(slotReturnPressed())");
- connect(m_edit, "SIGNAL(textChanged(const QString &))", this, "SLOT(slotTextChanged(const QString &))");
-#else /* APPLE_CHANGES not defined */
connect(m_edit, SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
connect(m_edit, SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
-#endif /* APPLE_CHANGES not defined */
m_button = new QPushButton(i18n("Browse..."), w);
m_button->setFocusPolicy(QWidget::ClickFocus);
-#ifdef APPLE_CHANGES
- connect(m_button, "SIGNAL(clicked())", this, "SLOT(slotClicked())");
-#else /* APPLE_CHANGES not defined */
connect(m_button,SIGNAL(clicked()), this, SLOT(slotClicked()));
-#endif /* APPLE_CHANGES not defined */
w->setStretchFactor(m_edit, 2);
w->setFocusProxy(m_edit);
@@ -989,10 +949,10 @@ void RenderSelect::layout( )
// NSBrowser has problems drawing scrollbar correctly when its size is too small.
if (height < 60)
height = 60;
-#else /* APPLE_CHANGES not defined */
+#else
width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width();
height = size*height + 2*w->frameWidth();
-#endif /* APPLE_CHANGES not defined */
+#endif
setIntrinsicWidth( width );
setIntrinsicHeight( height );
@@ -1068,7 +1028,6 @@ void RenderSelect::slotSelected(int index)
#ifdef APPLE_CHANGES
void RenderSelect::performAction(QObject::Actions action)
{
- //fprintf (stdout, "RenderSelect::performAction(): %d\n", action);
if (action == QObject::ACTION_LISTBOX_CLICKED)
slotSelectionChanged();
else if (action == QObject::ACTION_COMBOBOX_CLICKED){
@@ -1108,11 +1067,7 @@ KListBox* RenderSelect::createListBox()
lb->setSelectionMode(m_multiple ? QListBox::Extended : QListBox::Single);
// ### looks broken
//lb->setAutoMask(true);
-#ifdef APPLE_CHANGES
- connect( lb, "SIGNAL(selectionChanged())", this, "SLOT(slotSelectionChanged())" );
-#else /* APPLE_CHANGES not defined */
connect( lb, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
-#endif /* APPLE_CHANGES not defined */
m_ignoreSelectEvents = false;
lb->setMouseTracking(true);
@@ -1122,11 +1077,7 @@ KListBox* RenderSelect::createListBox()
ComboBoxWidget *RenderSelect::createComboBox()
{
ComboBoxWidget *cb = new ComboBoxWidget(view()->viewport());
-#ifdef APPLE_CHANGES
- connect(cb, "SIGNAL(activated(int))", this, "SLOT(slotSelected(int))");
-#else /* APPLE_CHANGES not defined */
connect(cb, SIGNAL(activated(int)), this, SLOT(slotSelected(int)));
-#endif /* APPLE_CHANGES not defined */
return cb;
}
@@ -1212,11 +1163,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element)
TextAreaWidget *edit = new TextAreaWidget(element->wrap(), view());
setQWidget(edit);
-#ifdef APPLE_CHANGES
- connect(edit, "SIGNAL(textChanged())", this, "SLOT(slotTextChanged())");
-#else /* APPLE_CHANGES not defined */
connect(edit,SIGNAL(textChanged()),this,SLOT(slotTextChanged()));
-#endif /* APPLE_CHANGES not defined */
}
RenderTextArea::~RenderTextArea()
@@ -1319,9 +1266,6 @@ QString RenderTextArea::text()
#ifdef APPLE_CHANGES
void RenderTextArea::performAction(QObject::Actions action)
{
- //TextAreaWidget *edit = static_cast<TextAreaWidget*>(m_widget);
-
- //fprintf (stdout, "RenderTextArea::performAction(): %d text value = %s\n", action, edit->text().latin1());
if (action == QObject::ACTION_TEXT_AREA_END_EDITING)
slotTextChanged();
}
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 2b985e1..88dfc56 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -66,19 +66,19 @@ void TextSlave::printDecoration( QPainter *pt, RenderText* p, int _tx, int _ty,
if ( end )
width -= p->paddingRight() + p->borderRight();
-#if APPLE_CHANGES
+#ifdef APPLE_CHANGES
if(deco & UNDERLINE) {
QConstString s(p->str->s + m_start, m_len);
pt->drawUnderlineForText(_tx, _ty + m_baseline, s.string());
}
-#else /* APPLE_CHANGES not defined */
+#else
int underlineOffset = ( pt->fontMetrics().height() + m_baseline ) / 2;
if(underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
if(deco & UNDERLINE){
pt->drawLine(_tx, _ty + underlineOffset, _tx + width, _ty + underlineOffset );
}
-#endif /* APPLE_CHANGES not defined */
+#endif
if(deco & OVERLINE)
pt->drawLine(_tx, _ty, _tx + width, _ty );
if(deco & LINE_THROUGH)
@@ -213,11 +213,7 @@ int TextSlaveArray::findFirstMatching(Item d) const
if ( (*this)[mid] == 0 ) // null item greater
res = -1;
else
-#ifdef APPLE_CHANGES
- res = ((TextSlaveArray*)this)->compareItems( d, (*this)[mid] );
-#else /* APPLE_CHANGES not defined */
res = ((QGVector*)this)->compareItems( d, (*this)[mid] );
-#endif /* APPLE_CHANGES not defined */
if ( res < 0 )
n2 = mid - 1;
else if ( res > 0 )
@@ -230,11 +226,7 @@ int TextSlaveArray::findFirstMatching(Item d) const
/* if ( !found )
return -1; */
// search to first one equal or bigger
-#ifdef APPLE_CHANGES
- while ( found && (mid > 0) && !((TextSlaveArray*)this)->compareItems(d, (*this)[mid-1]) )
-#else /* APPLE_CHANGES not defined */
while ( found && (mid > 0) && !((QGVector*)this)->compareItems(d, (*this)[mid-1]) )
-#endif /* APPLE_CHANGES not defined */
mid--;
return mid;
}
@@ -610,9 +602,7 @@ void RenderText::printObject( QPainter *p, int /*x*/, int y, int /*w*/, int h,
void RenderText::print( QPainter *p, int x, int y, int w, int h,
int tx, int ty)
{
-//#ifndef APPLE_CHANGES
if (style()->visibility() != VISIBLE) return;
-//#endif /* APPLE_CHANGES not defined */
int s = m_lines.count() - 1;
if ( s < 0 ) return;
diff --git a/WebCore/khtml/xml/dom_elementimpl.h b/WebCore/khtml/xml/dom_elementimpl.h
index 8078139..83b3f87 100644
--- a/WebCore/khtml/xml/dom_elementimpl.h
+++ b/WebCore/khtml/xml/dom_elementimpl.h
@@ -29,9 +29,11 @@
#include "dom/dom_element.h"
#include "xml/dom_stringimpl.h"
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
-#define id id_
-#endif /* APPLE_CHANGES, __OBJC__ */
+#ifdef APPLE_CHANGES
+#ifdef __OBJC__
+#define id id_AVOID_KEYWORD
+#endif
+#endif
namespace khtml {
class CSSStyleSelector;
@@ -292,8 +294,8 @@ protected:
}; //namespace
-#if defined(APPLE_CHANGES) && defined(__OBJC__)
+#ifdef APPLE_CHANGES
#undef id
-#endif /* APPLE_CHANGES, __OBJC__ */
+#endif
#endif
diff --git a/WebCore/khtml/xml/xml_tokenizer.h b/WebCore/khtml/xml/xml_tokenizer.h
index 61e1cbf..21e9c5f 100644
--- a/WebCore/khtml/xml/xml_tokenizer.h
+++ b/WebCore/khtml/xml/xml_tokenizer.h
@@ -114,10 +114,8 @@ public:
virtual void finish() = 0;
virtual void setOnHold(bool /*_onHold*/) {}
-#ifndef APPLE_CHANGES
signals:
void finishedParsing();
-#endif
};
class XMLTokenizer : public Tokenizer, public khtml::CachedObjectClient
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index 9759290..4ccf27d 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -84,8 +84,7 @@ void QApplication::restoreOverrideCursor()
bool QApplication::sendEvent(QObject *o, QEvent *e)
{
- _logNotYetImplemented();
- return false;
+ return o ? o->event(e) : false;
}
void QApplication::sendPostedEvents(QObject *receiver, int event_type)
diff --git a/WebCore/kwq/KWQBuffer.h b/WebCore/kwq/KWQBuffer.h
index f7dc289..e361aa6 100644
--- a/WebCore/kwq/KWQBuffer.h
+++ b/WebCore/kwq/KWQBuffer.h
@@ -26,62 +26,27 @@
#ifndef QBUFFER_H_
#define QBUFFER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QBUFFER ======================================================
-
-#ifdef USING_BORROWED_QBUFFER
-#include <_qbuffer.h>
-#else
-
#include <KWQDef.h>
#include <qarray.h>
#include <qstring.h>
#include <qiodevice.h>
-// class QBuffer ===============================================================
-
class QBuffer {
public:
+ QBuffer() : pos(0) { }
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QBuffer();
- ~QBuffer();
-
- // member functions --------------------------------------------------------
-
- QByteArray buffer() const;
- uint size() const;
- bool isOpen();
- bool open(int);
- void close();
+ QByteArray buffer() const { return ba; }
+ uint size() const { return ba.size(); }
+ bool isOpen() const { return opened; }
+ void open(int);
+ void close() { opened = false; }
int writeBlock(const char *, uint);
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QBuffer(const QBuffer &);
- QBuffer &operator=(const QBuffer &);
-
bool opened;
QByteArray ba;
uint pos;
-}; // class QBuffer ============================================================
-
-#endif // USING_BORROWED_QBUFFER
+};
#endif
diff --git a/WebCore/kwq/KWQBuffer.mm b/WebCore/kwq/KWQBuffer.mm
index de9a4cb..090dcfd 100644
--- a/WebCore/kwq/KWQBuffer.mm
+++ b/WebCore/kwq/KWQBuffer.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,54 +22,17 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qbuffer.h>
-#ifndef USING_BORROWED_QBUFFER
-
-#include <qiodevice.h>
-
-QBuffer::QBuffer() : opened(false), pos(0)
-{
-}
-
-QBuffer::~QBuffer()
-{
-}
-
-
-QByteArray QBuffer::buffer() const
-{
- return ba;
-}
-
-uint QBuffer::size() const
+void QBuffer::open(int)
{
- return ba.size();
-}
-
-bool QBuffer::isOpen()
-{
- return opened;
-}
-
-bool QBuffer::open(int mode)
-{
- if (mode == IO_WriteOnly) {
+ if (!opened) {
opened = true;
- pos = 0;
- return true;
- } else {
- return false;
+ pos = 0;
}
}
-void QBuffer::close()
-{
- opened = false;
-}
-
int QBuffer::writeBlock(const char *data, uint len)
{
// FIXME: could easily be optimized a lot - leave extra space in
@@ -85,6 +48,3 @@ int QBuffer::writeBlock(const char *data, uint len)
return len;
}
-
-
-#endif
diff --git a/WebCore/kwq/KWQCString.h b/WebCore/kwq/KWQCString.h
index e568190..2a5cfa6 100644
--- a/WebCore/kwq/KWQCString.h
+++ b/WebCore/kwq/KWQCString.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,55 +26,27 @@
#ifndef QCSTRING_H_
#define QCSTRING_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTRING ======================================================
-
-#ifdef USING_BORROWED_QSTRING
-#include <_qcstring.h>
-#else
-
-// FIXME: does our implementation of QCString really need to inherit from
-// QByteArray and QArray?
-
-#include "qarray.h"
+#include <qarray.h>
+#include <string.h>
+#include <KWQDef.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <string.h>
-
typedef QMemArray<char> QByteArray;
-// class QCString ==============================================================
-
class QCString : public QByteArray {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QCString();
QCString(int);
QCString(const char *);
QCString(const char *, uint);
- QCString(const QCString &);
-
- ~QCString() {}
-
- // member functions --------------------------------------------------------
bool isEmpty() const;
- bool isNull() const;
- int find(const char *, int index=0, bool cs=TRUE) const;
- int contains(char, bool cs=TRUE) const;
+ bool isNull() const { return data() == 0; }
+ int find(const char *, int index=0, bool cs=true) const;
+ int contains(char, bool cs=true) const;
uint length() const;
bool truncate(uint);
QCString lower() const;
@@ -83,10 +55,7 @@ public:
QCString right(uint) const;
QCString mid(uint, uint len=0xffffffff) const;
- // operators ---------------------------------------------------------------
-
- operator const char *() const;
- QCString &operator=(const QCString &);
+ operator const char *() const { return data(); }
QCString &operator=(const char *);
QCString &operator+=(const char *);
QCString &operator+=(char);
@@ -95,22 +64,13 @@ public:
friend std::ostream &operator<<(std::ostream &, const QCString &);
#endif
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
bool resize(uint);
+};
-}; // class QCString ===========================================================
-
-
-// operators associated with QCString ==========================================
-
-bool operator==(const char *s1, const QCString &s2);
bool operator==(const QCString &s1, const char *s2);
-bool operator!=(const char *s1, const QCString &s2);
-bool operator!=(const QCString &s1, const char *s2);
-
-#endif // USING_BORROWED_QSTRING
+inline bool operator==(const char *s1, const QCString &s2) { return s2 == s1; }
+inline bool operator!=(const QCString &s1, const char *s2) { return !(s1 == s2); }
+inline bool operator!=(const char *s1, const QCString &s2) { return !(s1 == s2); }
#endif
diff --git a/WebCore/kwq/KWQCString.mm b/WebCore/kwq/KWQCString.mm
index 83c0d9f..3cdfa77 100644
--- a/WebCore/kwq/KWQCString.mm
+++ b/WebCore/kwq/KWQCString.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,25 +23,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// FIXME: obviously many functions here can be made inline
-
#include <qcstring.h>
-#ifndef USING_BORROWED_QSTRING
-
-#ifdef _KWQ_IOSTREAM_
-#include <iostream>
-#endif
-
-#include <string.h>
#include <ctype.h>
-#define qmemmove(dest,src,len) memmove((dest),(src),(len))
-#define qstrdup(s) strdup((s))
-#define qstrncpy(dest,src,len) strncpy((dest),(src),(len))
-#define qstricmp(s1,s2) strcasecmp((s1),(s2))
-#define qstrnicmp(s1,s2,len) strncasecmp((s1),(s2),(len))
-
QCString::QCString() : QByteArray(0)
{
}
@@ -75,22 +60,13 @@ QCString::QCString(const char *s, uint max)
data()[len] = 0;
}
-QCString::QCString(const QCString &s) : QByteArray(s)
-{
-}
-
bool QCString::isEmpty() const
{
const char *s = data();
return !(s && *s);
}
-bool QCString::isNull() const
-{
- return data() == NULL;
-}
-
-int QCString::find(const char *s, int index=0, bool cs=TRUE) const
+int QCString::find(const char *s, int index, bool cs) const
{
int result;
char *tmp;
@@ -129,7 +105,7 @@ int QCString::find(const char *s, int index=0, bool cs=TRUE) const
return result;
}
-int QCString::contains(char c, bool cs=TRUE) const
+int QCString::contains(char c, bool cs) const
{
int result;
char *tmp;
@@ -174,7 +150,7 @@ bool QCString::resize(uint len)
oldlen = length();
if (!QByteArray::resize(len)) {
- return FALSE;
+ return false;
}
if (len) {
*(data() + len-1) = '\0';
@@ -184,7 +160,7 @@ bool QCString::resize(uint len)
*(data()) = '\0';
}
- return TRUE;
+ return true;
}
bool QCString::truncate(uint pos)
@@ -279,19 +255,10 @@ QCString QCString::mid(uint index, uint len) const
}
}
-QCString::operator const char *() const
-{
- return (const char *)data();
-}
-
-QCString &QCString::operator=(const QCString &s)
-{
- return (QCString &)assign(s);
-}
-
QCString &QCString::operator=(const char *assignFrom)
{
- return (QCString &)duplicate(assignFrom, (assignFrom ? (strlen(assignFrom) + 1) : 1));
+ duplicate(assignFrom, (assignFrom ? strlen(assignFrom) : 0) + 1);
+ return *this;
}
QCString& QCString::operator+=(const char *s)
@@ -323,17 +290,6 @@ QCString &QCString::operator+=(char c)
return *this;
}
-bool operator==(const char *s1, const QCString &s2)
-{
- if (s2.size() == 0 && !s1) {
- return FALSE;
- }
- else if (s2.size() == 0 && s1) {
- return TRUE;
- }
- return (strcmp(s1, s2) == 0);
-}
-
bool operator==(const QCString &s1, const char *s2)
{
if (s1.size() == 0 && !s2) {
@@ -345,36 +301,9 @@ bool operator==(const QCString &s1, const char *s2)
return (strcmp(s1, s2) == 0);
}
-bool operator!=(const char *s1, const QCString &s2)
-{
- if (s2.size() == 0 && !s1) {
- return TRUE;
- }
- else if (s2.size() == 0 && s1) {
- return FALSE;
- }
- return (strcmp(s1, s2) != 0);
-}
-
-bool operator!=(const QCString &s1, const char *s2)
-{
- if (s1.size() == 0 && !s2) {
- return TRUE;
- }
- else if (s1.size() == 0 && s2) {
- return FALSE;
- }
- return (strcmp(s1, s2) != 0);
-}
-
#ifdef _KWQ_IOSTREAM_
std::ostream &operator<<(std::ostream &o, const QCString &s)
{
return o << (const char *)s.data();
}
#endif
-
-#else // USING_BORROWED_QSTRING
-// This will help to keep the linker from complaining about empty archives
-void KWQCString_Dummy() {}
-#endif // USING_BORROWED_QSTRING
diff --git a/WebCore/kwq/KWQChar.mm b/WebCore/kwq/KWQChar.mm
index 291f5c2..b684049 100644
--- a/WebCore/kwq/KWQChar.mm
+++ b/WebCore/kwq/KWQChar.mm
@@ -119,6 +119,8 @@ QChar QChar::upper() const
QChar::Direction QChar::direction() const
{
// FIXME: unimplemented because we don't do BIDI yet
+ if (c == ' ')
+ return DirWS;
return DirL;
}
@@ -128,7 +130,7 @@ bool QChar::mirrored() const
_logNotYetImplemented();
// return whether character should be reversed if text direction is
// reversed
- return FALSE;
+ return false;
}
QChar QChar::mirroredChar() const
diff --git a/WebCore/kwq/KWQCollection.h b/WebCore/kwq/KWQCollection.h
index 1311262..a1cb8ca 100644
--- a/WebCore/kwq/KWQCollection.h
+++ b/WebCore/kwq/KWQCollection.h
@@ -32,15 +32,17 @@ class QPtrCollection {
public:
typedef void *Item;
- bool autoDelete();
- void setAutoDelete(bool autoDelete);
+ bool autoDelete() { return del_item; }
+ void setAutoDelete(bool autoDelete) { del_item = autoDelete; }
+
+ QPtrCollection(const QPtrCollection &) : del_item(false) { }
+ QPtrCollection &operator=(const QPtrCollection &) { return *this; }
+
protected:
- QPtrCollection();
- QPtrCollection(const QPtrCollection &);
- QPtrCollection &operator=(const QPtrCollection &);
+ QPtrCollection() : del_item(false) { }
virtual ~QPtrCollection();
- bool del_item; // default FALSE
+ bool del_item;
};
-#endif /* QCOLLECTION_H */
+#endif
diff --git a/WebCore/kwq/KWQCollection.mm b/WebCore/kwq/KWQCollection.mm
index 136df65..1242d40 100644
--- a/WebCore/kwq/KWQCollection.mm
+++ b/WebCore/kwq/KWQCollection.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,36 +25,6 @@
#include <qcollection.h>
-#ifndef USING_BORROWED_QCOLLECTION
-
-QPtrCollection::QPtrCollection() :
- del_item(FALSE)
-{
-}
-
-QPtrCollection::QPtrCollection(const QPtrCollection &other) :
- del_item(FALSE)
-{
-}
-
-QPtrCollection &QPtrCollection::operator=(const QPtrCollection &other)
-{
- return *this; // don't copy del_item
-}
-
QPtrCollection::~QPtrCollection()
{
}
-
-bool QPtrCollection::autoDelete()
-{
- return del_item;
-}
-
-void QPtrCollection::setAutoDelete(bool autoDelete)
-{
- del_item = autoDelete;
-}
-
-#endif
-
diff --git a/WebCore/kwq/KWQCompletion.h b/WebCore/kwq/KWQCompletion.h
index 86f6762..76b7fb8 100644
--- a/WebCore/kwq/KWQCompletion.h
+++ b/WebCore/kwq/KWQCompletion.h
@@ -26,95 +26,17 @@
#ifndef KWQCOMPLETION_H_
#define KWQCOMPLETION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qstringlist.h>
-// class KCompletion ===========================================================
-
class KCompletion : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KCompletion();
- virtual ~KCompletion();
-
- // member functions --------------------------------------------------------
-
void setItems(const QStringList &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCompletion(const KCompletion &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCompletion &operator=(const KCompletion &);
-#endif
-
-}; // class KCompletion ========================================================
-
-
-// class KCompletionBase =======================================================
+};
class KCompletionBase {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KCompletionBase();
- virtual ~KCompletionBase();
-
- // member functions --------------------------------------------------------
-
- KCompletion *completionObject(bool hsig = true);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCompletionBase(const KCompletionBase &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCompletionBase &operator=(const KCompletionBase &);
-#endif
-
-}; // class KCompletionBase ====================================================
-
+ virtual KCompletion *completionObject();
+};
#endif
diff --git a/WebCore/kwq/KWQCompletion.mm b/WebCore/kwq/KWQCompletion.mm
index 94f5a31..4504bbd 100644
--- a/WebCore/kwq/KWQCompletion.mm
+++ b/WebCore/kwq/KWQCompletion.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,36 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <KWQCompletion.h>
-
-KCompletion::KCompletion()
-{
- _logNotYetImplemented();
-}
-
-KCompletion::~KCompletion()
-{
- _logNotYetImplemented();
-}
+#include <kwqdebug.h>
void KCompletion::setItems(const QStringList &)
{
_logNotYetImplemented();
}
-KCompletionBase::KCompletionBase()
-{
- _logNotYetImplemented();
-}
-
-KCompletionBase::~KCompletionBase()
-{
- _logNotYetImplemented();
-}
-
-KCompletion *KCompletionBase::completionObject(bool hsig = true)
+KCompletion *KCompletionBase::completionObject()
{
_logNotYetImplemented();
- return 0L;
+ return 0;
}
diff --git a/WebCore/kwq/KWQCursor.h b/WebCore/kwq/KWQCursor.h
index dc8f6ce..03d1c4a 100644
--- a/WebCore/kwq/KWQCursor.h
+++ b/WebCore/kwq/KWQCursor.h
@@ -47,7 +47,7 @@ public:
QCursor &operator=(const QCursor &);
- int handle() const;
+ NSCursor *handle() const;
private:
NSCursor *cursor;
diff --git a/WebCore/kwq/KWQCursor.mm b/WebCore/kwq/KWQCursor.mm
index 30878df..932d7a7 100644
--- a/WebCore/kwq/KWQCursor.mm
+++ b/WebCore/kwq/KWQCursor.mm
@@ -72,7 +72,7 @@ QCursor &QCursor::operator=(const QCursor &other)
return *this;
}
-int QCursor::handle() const
+NSCursor *QCursor::handle() const
{
- return (int)cursor;
+ return cursor;
}
diff --git a/WebCore/kwq/KWQDef.h b/WebCore/kwq/KWQDef.h
index 944dbf1..7a86b17 100644
--- a/WebCore/kwq/KWQDef.h
+++ b/WebCore/kwq/KWQDef.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef KWQDEF_H_
#define KWQDEF_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifndef KWQ_UNSIGNED_TYPES_DEFINED
#define KWQ_UNSIGNED_TYPES_DEFINED
typedef unsigned char uchar;
@@ -38,18 +34,8 @@ typedef unsigned uint;
typedef unsigned long ulong;
#endif
-typedef char Q_INT8;
-typedef short Q_INT16;
-typedef int Q_INT32;
-
-typedef unsigned char Q_UINT8;
-typedef unsigned short Q_UINT16;
-typedef unsigned int Q_UINT32;
-
-typedef Q_INT32 QCOORD;
-
-typedef uint WFlags;
-typedef int WId;
+typedef int Q_INT32;
+typedef unsigned int Q_UINT32;
#define QMAX(a,b) ((a) > (b) ? (a) : (b))
#define QMIN(a,b) ((a) < (b) ? (a) : (b))
@@ -60,33 +46,23 @@ typedef int WId;
#define QABS(a) (((a) >= 0) ? (a) : -(a))
#ifndef TRUE
-#define TRUE (1)
+#define TRUE 1
#endif
#ifndef FALSE
-#define FALSE (0)
+#define FALSE 0
#endif
-#define ASSERT(a)
-
void qDebug(const char *msg, ...);
void qWarning(const char *msg, ...);
-/* FIXME: Let's not worrying about malloc/new failing for now.... */
-#define CHECK_PTR(p)
-
/* Silly hack to avoid "unused parameter" warnings */
-#define Q_UNUSED(x) x=x;
-
-/* We don't handle this, it's needed in QT for wacky hacking Win32 DLLs */
-#define Q_EXPORT
+#define Q_UNUSED(x) (x)=(x)
-/* unnecessary for our platform */
-#define Q_PACKED
+#define Q_ASSERT(arg) do {} while(0)
-/* Qt const defines */
-#define QT_STATIC_CONST static const
-#define QT_STATIC_CONST_IMPL const
+#ifndef NDEBUG
+#define _KWQ_IOSTREAM_
+#endif
-#define Q_ASSERT(arg) do {} while(0)
#endif
diff --git a/WebCore/kwq/KWQDict.h b/WebCore/kwq/KWQDict.h
index dc1a822..a53b817 100644
--- a/WebCore/kwq/KWQDict.h
+++ b/WebCore/kwq/KWQDict.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,19 +26,6 @@
#ifndef QDICT_H_
#define QDICT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QDICT ========================================================
-
-#ifdef USING_BORROWED_QDICT
-
-#include <_qdict.h>
-
-#else
-
-
#include <qcollection.h>
#include <qstring.h>
@@ -46,98 +33,41 @@
template<class T> class QDictIterator;
-// class QDict =================================================================
-
template <class T> class QDict : public QPtrCollection {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QDict(int size=17, bool caseSensitive=TRUE) : impl(size, caseSensitive, QDict::deleteFunc) {}
- QDict(const QDict<T> &d) : QPtrCollection(d), impl(d.impl) {}
+ QDict(int size=17, bool caseSensitive=true) : impl(size, caseSensitive, QDict::deleteFunc) {}
virtual ~QDict() { impl.clear(del_item); }
- // member functions --------------------------------------------------------
-
virtual void clear() { impl.clear(del_item); }
virtual uint count() const { return impl.count(); }
void insert(const QString &key, const T *value) { impl.insert(key,(void *)value);}
bool remove(const QString &key) { return impl.remove(key,del_item); }
T *find(const QString &key) const { return (T *)impl.find(key); }
- // operators ---------------------------------------------------------------
-
- QDict<T> &operator=(const QDict<T> &d) { impl.assign(d.impl,del_item); QPtrCollection::operator=(d); return *this;}
+ QDict &operator=(const QDict &d) { impl.assign(d.impl, del_item); QPtrCollection::operator=(d); return *this;}
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
KWQDictImpl impl;
friend class QDictIterator<T>;
-}; // class QDict ==============================================================
+};
-// class QDictIterator =========================================================
-
template<class T> class QDictIterator {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDictIterator() {}
-#endif
-
QDictIterator(const QDict<T> &d) : impl(d.impl) {}
- ~QDictIterator() {}
-
- // member functions --------------------------------------------------------
uint count() const { return impl.count(); }
- T *current() const { return (T *) impl.current(); }
+ T *current() const { return (T *)impl.current(); }
QString currentKey() const { return impl.currentStringKey(); }
T *toFirst() { return (T *)impl.toFirst(); }
- // operators ---------------------------------------------------------------
-
- T *operator++() { return (T *)(++impl); }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ T *operator++() { return (T *)++impl; }
private:
KWQDictIteratorImpl impl;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDictIterator(const QDictIterator &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDictIterator &operator=(const QDictIterator &);
-#endif
-
-}; // class QDictIterator ======================================================
-
-#endif // USING_BORROWED_QDICT
+};
#endif
diff --git a/WebCore/kwq/KWQFrame.mm b/WebCore/kwq/KWQFrame.mm
index 71123f4..6d78de9 100644
--- a/WebCore/kwq/KWQFrame.mm
+++ b/WebCore/kwq/KWQFrame.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,30 +22,21 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <KWQFrame.h>
-#include <kwqdebug.h>
-
-QFrame::QFrame()
-{
- _logNeverImplemented();
-}
+#include <qframe.h>
+#include <kwqdebug.h>
QFrame::QFrame(QWidget *parent)
+ : QWidget(parent)
{
- _logNeverImplemented();
}
-
void QFrame::setFrameStyle(int)
{
- _logNeverImplemented();
}
-
int QFrame::frameWidth() const
{
- _logNeverImplemented();
return 0;
}
diff --git a/WebCore/kwq/KWQHBox.mm b/WebCore/kwq/KWQHBox.mm
index deab0ec..e533fe6 100644
--- a/WebCore/kwq/KWQHBox.mm
+++ b/WebCore/kwq/KWQHBox.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,49 +22,29 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <qhbox.h>
-#include <KWQView.h>
-#include <KWQNSTextField.h>
+#include <qhbox.h>
#include <kwqdebug.h>
+#include <KWQView.h>
// This class is ONLY used by FORM <input type=file> elements. It's used
-// to stretch a LineEditWidget. We don't need it.
+// to stretch a LineEditWidget. We probably don't need it at all.
-QHBox::QHBox()
+QHBox::QHBox(QWidget *parent)
+ : QFrame(parent)
{
KWQView *view = (KWQView *)getView();
[view setIsFlipped: NO];
}
-
-QHBox::QHBox(QWidget *)
-{
- _logNotYetImplemented();
-}
-
-
-QHBox::~QHBox()
+// Override the focus proxy to add the line edit widget as a subview.
+void QHBox::setFocusProxy(QWidget *lineEdit)
{
- _logNotYetImplemented();
-}
-
-
-// Override the focus proxy to simply add the line edit widget as a subview.
-void QHBox::setFocusProxy( QWidget *lineEdit)
-{
- KWQView *view = (KWQView *)getView();
- KWQNSTextField *fieldView = (KWQNSTextField *)lineEdit->getView();
-
// Do we also need to set size, or will layout take care of that?
- [view addSubview: fieldView];
+ [getView() addSubview: lineEdit->getView()];
}
-
-bool QHBox::setStretchFactor(QWidget*, int stretch)
+void QHBox::setStretchFactor(QWidget *, int stretch)
{
- _logNotYetImplemented();
- return FALSE;
}
-
diff --git a/WebCore/kwq/KWQIcon.h b/WebCore/kwq/KWQIcon.h
deleted file mode 100644
index 2fd79e6..0000000
--- a/WebCore/kwq/KWQIcon.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KWQICON_H_
-#define KWQICON_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class KIcon =================================================================
-
-class KIcon {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType, Desktop };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- KIcon();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KIcon() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KIcon(const KIcon &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KIcon &operator=(const KIcon &);
-#endif
-
-}; // class KIcon ==============================================================
-
-#endif
diff --git a/WebCore/kwq/KWQKComboBox.h b/WebCore/kwq/KWQKComboBox.h
index ad28290..69ac55c 100644
--- a/WebCore/kwq/KWQKComboBox.h
+++ b/WebCore/kwq/KWQKComboBox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,56 +26,18 @@
#ifndef KCOMBOBOX_H_
#define KCOMBOBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qcombobox.h>
#include <KWQCompletion.h>
-// class KComboBox =============================================================
-
class KComboBox : public QComboBox, public KCompletionBase {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
KComboBox(QWidget *parent=0, const char *name=0);
KComboBox(bool rw, QWidget *parent=0, const char *name=0);
virtual ~KComboBox();
- // member functions --------------------------------------------------------
-#ifdef APPLE_CHANGES
void doneLoading();
void setSize(int size);
-#endif
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KComboBox(const KComboBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KComboBox &operator=(const KComboBox &);
-#endif
-
-}; // class KComboBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKCompletionBox.h b/WebCore/kwq/KWQKCompletionBox.h
index c95a18c..be9b58c 100644
--- a/WebCore/kwq/KWQKCompletionBox.h
+++ b/WebCore/kwq/KWQKCompletionBox.h
@@ -26,48 +26,12 @@
#ifndef KCOMPLETIONBOX_H_
#define KCOMPLETIONBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "klistbox.h"
-
-// class KCompletionBox ========================================================
+#include <klistbox.h>
+#include <kglobalsettings.h>
class KCompletionBox : public KListBox {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KCompletionBox();
- virtual ~KCompletionBox();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCompletionBox(const KCompletionBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCompletionBox &operator=(const KCompletionBox &);
-#endif
-
-}; // class KCompletionBox =====================================================
+ KCompletionBox(QWidget *parent) : KListBox(parent) { }
+};
#endif
diff --git a/WebCore/kwq/KWQKCompletionBox.mm b/WebCore/kwq/KWQKCompletionBox.mm
deleted file mode 100644
index 688d366..0000000
--- a/WebCore/kwq/KWQKCompletionBox.mm
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <kwqdebug.h>
-#include <kcompletionbox.h>
-
-KCompletionBox::KCompletionBox()
-{
- _logNotYetImplemented();
-}
-
-KCompletionBox::~KCompletionBox()
-{
- _logNotYetImplemented();
-}
diff --git a/WebCore/kwq/KWQKDebug.h b/WebCore/kwq/KWQKDebug.h
index 4239407..7fb5bf9 100644
--- a/WebCore/kwq/KWQKDebug.h
+++ b/WebCore/kwq/KWQKDebug.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef KDEBUG_H_
#define KDEBUG_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <qtextstream.h>
@@ -37,54 +33,17 @@ class kdbgstream;
typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
-// class kdbgstream ============================================================
-
class kdbgstream {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
kdbgstream(unsigned int area, unsigned int level, bool print=true);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~kdbgstream() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
- kdbgstream &operator<<(int);
- kdbgstream &operator<<(const char *);
- kdbgstream &operator<<(const void *);
- kdbgstream &operator<<(const QString &);
- kdbgstream &operator<<(const QCString &);
- kdbgstream &operator<<(KDBGFUNC);
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- kdbgstream(const kdbgstream &);
-#endif
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- kdbgstream &operator=(const kdbgstream &);
-#endif
-
-}; // class kdbgstream =========================================================
+ kdbgstream &operator<<(int);
+ kdbgstream &operator<<(const char *);
+ kdbgstream &operator<<(const void *);
+ kdbgstream &operator<<(const QString &);
+ kdbgstream &operator<<(const QCString &);
+ kdbgstream &operator<<(KDBGFUNC);
+};
inline kdbgstream &endl(kdbgstream &s) { s << "\n"; return s; }
diff --git a/WebCore/kwq/KWQKFactory.mm b/WebCore/kwq/KWQKFactory.mm
deleted file mode 100644
index 2a2bfed..0000000
--- a/WebCore/kwq/KWQKFactory.mm
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <kwqdebug.h>
-#include <factory.h>
-
-namespace KParts {
-
-Factory::Factory()
-{
- _logNotYetImplemented();
-}
-
-
-Factory::~Factory()
-{
- _logNotYetImplemented();
-}
-
-
-} // namespace KParts
-
-
diff --git a/WebCore/kwq/KWQKFileItem.h b/WebCore/kwq/KWQKFileItem.h
index 25b38b1..5661937 100644
--- a/WebCore/kwq/KWQKFileItem.h
+++ b/WebCore/kwq/KWQKFileItem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,12 @@
#ifndef KFILEITEM_H_
#define KFILEITEM_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <netaccess.h>
-// class KFileItem =============================================================
-
class KFileItem {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KFileItem(const KIO::UDSEntry &, const KURL &, bool foo=false,
- bool bar=false);
-
- virtual ~KFileItem();
-
- // member functions --------------------------------------------------------
-
+ KFileItem(const KIO::UDSEntry &, const KURL &, bool, bool);
bool isDir() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KFileItem(const KFileItem &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KFileItem &operator=(const KFileItem &);
-#endif
-
-}; // class KFileItem ==========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKFileItem.mm b/WebCore/kwq/KWQKFileItem.mm
index 5a7fca1..1930b65 100644
--- a/WebCore/kwq/KWQKFileItem.mm
+++ b/WebCore/kwq/KWQKFileItem.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,23 +23,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <kfileitem.h>
+#include <kwqdebug.h>
-KFileItem::KFileItem(const KIO::UDSEntry &, const KURL &, bool foo=false,
- bool bar=false)
-{
- _logNotYetImplemented();
-}
-
-
-KFileItem::~KFileItem()
+KFileItem::KFileItem(const KIO::UDSEntry &, const KURL &, bool, bool)
{
_logNotYetImplemented();
}
-
bool KFileItem::isDir() const
{
_logNotYetImplemented();
diff --git a/WebCore/kwq/KWQKGlobal.h b/WebCore/kwq/KWQKGlobal.h
index 0c3bcca..f85d833 100644
--- a/WebCore/kwq/KWQKGlobal.h
+++ b/WebCore/kwq/KWQKGlobal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef KGLOBAL_H_
#define KGLOBAL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <kinstance.h>
@@ -42,20 +38,10 @@ class KWQStaticStringDict;
#define kMin(a, b) ((a) < (b) ? (a) : (b))
#define kMax(a, b) ((a) > (b) ? (a) : (b))
-// class KGlobal ===============================================================
-
class KGlobal {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
static KWQStaticStringDict *staticStringDict;
- // static member functions -------------------------------------------------
-
static KInstance *instance();
static KCharsets *charsets();
static KLocale *locale();
@@ -64,42 +50,11 @@ public:
static const QString &staticQString(const QString &);
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KGlobal() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KGlobal() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
static KWQStaticStringDict *_stringDict;
static KInstance *_instance;
static KLocale *_locale;
static KCharsets *_charsets;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KGlobal(const KGlobal &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KGlobal &operator=(const KGlobal &);
-#endif
-
-}; // class KGlobal ============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKGlobalSettings.h b/WebCore/kwq/KWQKGlobalSettings.h
index 8478383..11ed0ed 100644
--- a/WebCore/kwq/KWQKGlobalSettings.h
+++ b/WebCore/kwq/KWQKGlobalSettings.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,61 +26,15 @@
#ifndef KGLOBALSETTINGS_H_
#define KGLOBALSETTINGS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QFont;
-// class KGlobalSettings =======================================================
-
class KGlobalSettings {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QFont generalFont();
static QFont windowTitleFont();
static QFont menuFont();
static int contrast();
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KGlobalSettings() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings(const KGlobalSettings &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings &operator=(const KGlobalSettings &);
-#endif
-
-}; // class KGlobalSettings ====================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index a9db6e1..56834a5 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -26,6 +26,7 @@
#import <KWQKHTMLPartImpl.h>
#import <html/htmltokenizer.h>
+
#import <html/html_documentimpl.h>
#import <rendering/render_frames.h>
@@ -42,7 +43,8 @@
#undef _KWQ_TIMING
-WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
+static WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
+
void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc func)
{
WCIFWebDataSourceMake = func;
@@ -61,36 +63,6 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-#if 0
-static QString splitUrlTarget(const QString &url, QString *target=0)
-{
- QString result = url;
- if(url.left(7) == "target:")
- {
-#ifdef APPLE_CHANGES
- int pos, end;
- if ((pos = url.find ('#', 7)) != -1){
- result = url.mid(pos+1,url.length()-pos-1);
- }
- if (target){
- pos = url.find ("//", 7);
- if (pos > 0){
- end = url.find ('/', pos+2);
- if (end > 0)
- *target = url.mid (pos+2, end-pos-2);
- }
- }
-#else
- KURL u(url);
- result = u.ref();
- if (target)
- *target = u.host();
-#endif
- }
- return result;
-}
-#endif
-
KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
: part(p)
, d(part->d)
@@ -256,7 +228,7 @@ void KWQKHTMLPartImpl::begin( const KURL &url, int xOffset, int yOffset )
void KWQKHTMLPartImpl::write( const char *str, int len )
{
/* FIXME: hook this code back when we have decoders completely working */
-#ifndef APPLE_CHANGES
+#if 0
if(d->m_bFirstData) {
// determine the parse mode
d->m_doc->determineParseMode( decoded );
@@ -277,9 +249,8 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
}
d->m_doc->applyChanges(true, true);
}
+#endif
-#endif APPLE_CHANGES
-
// begin lines added in lieu of big fixme
if ( !d->m_decoder ) {
d->m_decoder = new khtml::Decoder();
@@ -414,7 +385,7 @@ void KWQKHTMLPartImpl::redirectJS()
}
KParts::URLArgs args;
-#ifndef APPLE_CHANGES
+#if 0
if ( urlcmp( u, m_url.url(), true, true ) )
args.reload = true;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index a9db6e1..56834a5 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -26,6 +26,7 @@
#import <KWQKHTMLPartImpl.h>
#import <html/htmltokenizer.h>
+
#import <html/html_documentimpl.h>
#import <rendering/render_frames.h>
@@ -42,7 +43,8 @@
#undef _KWQ_TIMING
-WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
+static WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
+
void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc func)
{
WCIFWebDataSourceMake = func;
@@ -61,36 +63,6 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-#if 0
-static QString splitUrlTarget(const QString &url, QString *target=0)
-{
- QString result = url;
- if(url.left(7) == "target:")
- {
-#ifdef APPLE_CHANGES
- int pos, end;
- if ((pos = url.find ('#', 7)) != -1){
- result = url.mid(pos+1,url.length()-pos-1);
- }
- if (target){
- pos = url.find ("//", 7);
- if (pos > 0){
- end = url.find ('/', pos+2);
- if (end > 0)
- *target = url.mid (pos+2, end-pos-2);
- }
- }
-#else
- KURL u(url);
- result = u.ref();
- if (target)
- *target = u.host();
-#endif
- }
- return result;
-}
-#endif
-
KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
: part(p)
, d(part->d)
@@ -256,7 +228,7 @@ void KWQKHTMLPartImpl::begin( const KURL &url, int xOffset, int yOffset )
void KWQKHTMLPartImpl::write( const char *str, int len )
{
/* FIXME: hook this code back when we have decoders completely working */
-#ifndef APPLE_CHANGES
+#if 0
if(d->m_bFirstData) {
// determine the parse mode
d->m_doc->determineParseMode( decoded );
@@ -277,9 +249,8 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
}
d->m_doc->applyChanges(true, true);
}
+#endif
-#endif APPLE_CHANGES
-
// begin lines added in lieu of big fixme
if ( !d->m_decoder ) {
d->m_decoder = new khtml::Decoder();
@@ -414,7 +385,7 @@ void KWQKHTMLPartImpl::redirectJS()
}
KParts::URLArgs args;
-#ifndef APPLE_CHANGES
+#if 0
if ( urlcmp( u, m_url.url(), true, true ) )
args.reload = true;
diff --git a/WebCore/kwq/KWQKIONetAccess.h b/WebCore/kwq/KWQKIONetAccess.h
index 86a6e69..abf2b49 100644
--- a/WebCore/kwq/KWQKIONetAccess.h
+++ b/WebCore/kwq/KWQKIONetAccess.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,104 +26,23 @@
#ifndef NETACCESS_H_
#define NETACCESS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qvaluelist.h>
#include <kurl.h>
namespace KIO {
-class UDSAtom;
+class UDSAtom { };
typedef QValueList<UDSAtom> UDSEntry;
-
-// class UDSAtom ===============================================================
-
-class UDSAtom {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- UDSAtom() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~UDSAtom() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class UDSAtom ============================================================
-
-
-// class NetAccess =============================================================
-
class NetAccess {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static bool stat(const KURL &, KIO::UDSEntry &);
static QString lastErrorString();
static bool download(const KURL &, QString &);
static void removeTempFile(const QString &);
+};
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- NetAccess() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~NetAccess() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- NetAccess(const NetAccess &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- NetAccess &operator=(const NetAccess &);
-#endif
-
-}; // class NetAccess ==========================================================
-
-
-} // namespace KIO
+}
#endif
diff --git a/WebCore/kwq/KWQKIconLoader.h b/WebCore/kwq/KWQKIconLoader.h
index 8f61867..9759a23 100644
--- a/WebCore/kwq/KWQKIconLoader.h
+++ b/WebCore/kwq/KWQKIconLoader.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,103 +26,19 @@
#ifndef KICONLOADER_H_
#define KICONLOADER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpixmap.h>
#include <qstring.h>
#include <kinstance.h>
-// class KIcon =================================================================
-
class KIcon {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType, Desktop };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KIcon();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KIcon() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KIcon(const KIcon &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KIcon &operator=(const KIcon &);
-#endif
-
-}; // class KIcon ==============================================================
-
-
-// class KIconLoader ===========================================================
+ enum Context { FileSystem, Desktop };
+ enum States { DefaultState, DisabledState };
+};
class KIconLoader {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KIconLoader();
- ~KIconLoader();
-
- // member functions --------------------------------------------------------
-
- QPixmap loadIcon(const QString &name, int group, int size=0,
- int state=KIcon::DefaultState, QString *path_store=0L,
- bool canReturnNull=false) const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KIconLoader(const KIconLoader &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KIconLoader &operator=(const KIconLoader &);
-#endif
-
-}; // class KIconLoader ========================================================
+ QPixmap loadIcon(const QString &name, int group, int size=0, int state=KIcon::DefaultState) const;
+};
#endif
diff --git a/WebCore/kwq/KWQKIconLoader.mm b/WebCore/kwq/KWQKIconLoader.mm
index 58497e6..9bdba20 100644
--- a/WebCore/kwq/KWQKIconLoader.mm
+++ b/WebCore/kwq/KWQKIconLoader.mm
@@ -26,31 +26,7 @@
#include <kwqdebug.h>
#include <kiconloader.h>
-
-// class KIcon =================================================================
-
-KIcon::KIcon()
-{
- _logNotYetImplemented();
-}
-
-// class KIconLoader ===========================================================
-
-KIconLoader::KIconLoader()
-{
- _logNotYetImplemented();
-}
-
-
-KIconLoader::~KIconLoader()
-{
- _logNotYetImplemented();
-}
-
-
-QPixmap KIconLoader::loadIcon(const QString &name, int group, int size=0,
- int state=KIcon::DefaultState, QString *path_store=0L,
- bool canReturnNull=false) const
+QPixmap KIconLoader::loadIcon(const QString &name, int group, int size, int state) const
{
_logNotYetImplemented();
return QPixmap();
diff --git a/WebCore/kwq/KWQKImageIO.h b/WebCore/kwq/KWQKImageIO.h
index ae26be1..815a588 100644
--- a/WebCore/kwq/KWQKImageIO.h
+++ b/WebCore/kwq/KWQKImageIO.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,63 +26,14 @@
#ifndef KIMAGEIO_H_
#define KIMAGEIO_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstringlist.h>
-// class KImageIO ==============================================================
-
class KImageIO {
public:
+ enum Mode { Reading };
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Mode { Reading, Writing };
-
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static void registerFormats();
- static QStringList mimeTypes(Mode mode=Writing);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KImageIO() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KImageIO() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KImageIO(const KImageIO &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KImageIO &operator=(const KImageIO &);
-#endif
-
-}; // class KImageIO ===========================================================
+ static void registerFormats() { }
+ static QStringList mimeTypes(Mode) { return QStringList(); }
+};
#endif
diff --git a/WebCore/kwq/KWQKImageIO.mm b/WebCore/kwq/KWQKImageIO.mm
index 7ecae1c..e6c8498 100644
--- a/WebCore/kwq/KWQKImageIO.mm
+++ b/WebCore/kwq/KWQKImageIO.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,18 +22,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-#include <kimageio.h>
-
-// class KImageIO ==============================================================
-
-void KImageIO::registerFormats()
-{
- _logNotYetImplemented();
-}
+#include <kimageio.h>
+#include <kwqdebug.h>
-QStringList KImageIO::mimeTypes(Mode mode=Writing)
+QStringList KImageIO::mimeTypes(Mode)
{
// FIXME: need real implementation
QStringList mimeList;
diff --git a/WebCore/kwq/KWQKLineEdit.h b/WebCore/kwq/KWQKLineEdit.h
index bf92cb7..fcd7cf1 100644
--- a/WebCore/kwq/KWQKLineEdit.h
+++ b/WebCore/kwq/KWQKLineEdit.h
@@ -26,57 +26,18 @@
#ifndef KLINEEDIT_H_
#define KLINEEDIT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qlineedit.h>
#include <KWQCompletion.h>
#include "kcompletionbox.h"
-// class __class_name__ ========================================================
-
class KLineEdit : public QLineEdit, public KCompletionBase {
public:
+ KLineEdit(QWidget *parent=0);
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KLineEdit(QWidget *parent=0, const char *name=0);
- virtual ~KLineEdit();
-
- // member functions --------------------------------------------------------
-
- void setMouseTracking(bool);
- virtual void setContextMenuEnabled(bool showMenu);
+ void setContextMenuEnabled(bool showMenu);
KCompletionBox *completionBox(bool create);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KLineEdit(const KLineEdit &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KLineEdit &operator=(const KLineEdit &);
-#endif
-
-}; // class __class_name__ =====================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKLineEdit.mm b/WebCore/kwq/KWQKLineEdit.mm
index c7964db..b641227 100644
--- a/WebCore/kwq/KWQKLineEdit.mm
+++ b/WebCore/kwq/KWQKLineEdit.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,40 +22,22 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <klineedit.h>
-#include <KWQNSTextField.h>
+#include <klineedit.h>
#include <kwqdebug.h>
-KLineEdit::KLineEdit(QWidget *parent, const char *name)
-{
- // This space intentionally left blank.
-}
-
-KLineEdit::~KLineEdit()
-{
- // This space intentionally left blank.
-}
-
-
-void KLineEdit::setMouseTracking(bool)
+KLineEdit::KLineEdit(QWidget *parent)
+ : QLineEdit(parent)
{
- KWQNSTextField *fieldView;
- fieldView = (KWQNSTextField *)getView();
}
-
void KLineEdit::setContextMenuEnabled(bool showMenu)
{
- KWQNSTextField *fieldView;
- fieldView = (KWQNSTextField *)getView();
}
-
KCompletionBox *KLineEdit::completionBox(bool create)
{
_logNotYetImplemented();
- return 0L;
+ return 0;
}
-
diff --git a/WebCore/kwq/KWQKListBox.h b/WebCore/kwq/KWQKListBox.h
index 07c8b4b..e7fd341 100644
--- a/WebCore/kwq/KWQKListBox.h
+++ b/WebCore/kwq/KWQKListBox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,54 +26,11 @@
#ifndef KLISTBOX_H_
#define KLISTBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <KWQListBox.h>
-#include <qwidget.h>
-
-// class KListBox ==============================================================
class KListBox : public QListBox {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KListBox();
- KListBox(QWidget *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KListBox() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KListBox(const KListBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KListBox &operator=(const KListBox &);
-#endif
-
-}; // class KListBox ===========================================================
+ KListBox(QWidget *parent) : QListBox(parent) { }
+};
#endif
diff --git a/WebCore/kwq/KWQKListBox.mm b/WebCore/kwq/KWQKListBox.mm
deleted file mode 100644
index 789a09a..0000000
--- a/WebCore/kwq/KWQKListBox.mm
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include <kwqdebug.h>
-
-#include <klistbox.h>
-
-KListBox::KListBox()
-{
- // This space intentionally left blank.
-}
-
-
-KListBox::KListBox(QWidget *w)
-{
- // This space intentionally left blank.
-}
-
diff --git a/WebCore/kwq/KWQKMimeType.h b/WebCore/kwq/KWQKMimeType.h
index 1381211..031c474 100644
--- a/WebCore/kwq/KWQKMimeType.h
+++ b/WebCore/kwq/KWQKMimeType.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,103 +26,33 @@
#ifndef KMIMETYPE_H_
#define KMIMETYPE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <kdecore/kglobal.h>
#include <kdecore/kurl.h>
#include <sys/types.h>
#include <qstring.h>
-// class KSharedPtr ============================================================
-
template<class T> class KSharedPtr {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
KSharedPtr() { object = 0; }
- KSharedPtr(const KSharedPtr &) {object = 0;}
- ~KSharedPtr() {}
-
- // member functions --------------------------------------------------------
-
- // operators ---------------------------------------------------------------
-
- KSharedPtr &operator=(const KSharedPtr &) {}
T *operator->() { return object; }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
T *object;
-
-
-}; // class KSharedPtr =========================================================
-
-
-// class KMimeType =============================================================
+};
class KMimeType {
public:
-
- // structs -----------------------------------------------------------------
-
- // typedefs ----------------------------------------------------------------
-
typedef KSharedPtr<KMimeType> Ptr;
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static Ptr findByURL(const KURL &, mode_t=0, bool=false, bool=false);
static Ptr mimeType(QString serviceType);
static QString defaultMimeType();
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KMimeType() {}
-#endif
- virtual ~KMimeType();
-
- // member functions --------------------------------------------------------
+ ~KMimeType();
QString name() const;
QString comment() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KMimeType(const KMimeType &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KMimeType &operator=(const KMimeType &);
-#endif
-
-}; // class KMimeType ==========================================================
-
+};
#endif
diff --git a/WebCore/kwq/KWQKPartsBrowserInterface.h b/WebCore/kwq/KWQKPartsBrowserInterface.h
index e8d369e..8746784 100644
--- a/WebCore/kwq/KWQKPartsBrowserInterface.h
+++ b/WebCore/kwq/KWQKPartsBrowserInterface.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef BROWSERINTERFACE_H_
#define BROWSERINTERFACE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qvariant.h>
@@ -37,44 +33,8 @@ namespace KParts {
class BrowserInterface : public QObject {
public:
-
-// class BrowserInterface ======================================================
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- BrowserInterface(QObject *parent, const char *name=0);
- virtual ~BrowserInterface();
-
- // member functions --------------------------------------------------------
-
void callMethod(const char *name, const QVariant &argument);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserInterface(const BrowserInterface &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserInterface &operator=(const BrowserInterface &);
-#endif
-
-}; // class BrowserInterface ===================================================
+};
} // namespace KParts
diff --git a/WebCore/kwq/KWQKPartsBrowserInterface.mm b/WebCore/kwq/KWQKPartsBrowserInterface.mm
index 519cc44..de5d2cb 100644
--- a/WebCore/kwq/KWQKPartsBrowserInterface.mm
+++ b/WebCore/kwq/KWQKPartsBrowserInterface.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,23 +22,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <browserinterface.h>
-namespace KParts {
-
-// class BrowserInterface ======================================================
-
-BrowserInterface::BrowserInterface(QObject *parent, const char *name)
-{
- _logNotYetImplemented();
-}
+#include <kwqdebug.h>
-BrowserInterface::~BrowserInterface()
-{
- _logNotYetImplemented();
-}
+namespace KParts {
void BrowserInterface::callMethod(const char *name, const QVariant &argument)
{
diff --git a/WebCore/kwq/KWQKPartsFactory.h b/WebCore/kwq/KWQKPartsFactory.h
index d5a6c84..5a85674 100644
--- a/WebCore/kwq/KWQKPartsFactory.h
+++ b/WebCore/kwq/KWQKPartsFactory.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,11 @@
#ifndef FACTORY_H_
#define FACTORY_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "part.h"
+#include <part.h>
namespace KParts {
+ class Factory;
+}
-// class Factory ===============================================================
-
-class Factory {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- Factory();
- virtual ~Factory();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Factory(const Factory &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Factory &operator=(const Factory &);
-#endif
-
-}; // class Factory ============================================================
-
-} // namespace KParts
-
#endif
diff --git a/WebCore/kwq/KWQKPartsPart.h b/WebCore/kwq/KWQKPartsPart.h
index 6374d0d..1e71d4b 100644
--- a/WebCore/kwq/KWQKPartsPart.h
+++ b/WebCore/kwq/KWQKPartsPart.h
@@ -52,7 +52,7 @@ public:
void ref() { m_ref++; }
void deref() { if(m_ref) m_ref--; if (!m_ref) delete this; }
- void event(QEvent *event) { customEvent((QCustomEvent *)event); }
+ bool event(QEvent *event) { customEvent((QCustomEvent *)event); return true; }
virtual void customEvent(QCustomEvent *) { }
private:
diff --git a/WebCore/kwq/KWQKProtocolManager.mm b/WebCore/kwq/KWQKProtocolManager.mm
index ed1eee5..a8d9049 100644
--- a/WebCore/kwq/KWQKProtocolManager.mm
+++ b/WebCore/kwq/KWQKProtocolManager.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,45 +23,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-
-#include <qstring.h>
-
#include <kprotocolmanager.h>
-//FIX ME:
-static QString *tempQString = NULL;
-
-bool KProtocolManager::useProxy()
-{
- return FALSE;
-}
-
-
-QString KProtocolManager::httpProxy()
-{
- _logNotYetImplemented();
- if (tempQString == NULL) {
- tempQString = new QString();
- }
-
- return *tempQString;
-}
+#include <qstring.h>
QString KProtocolManager::userAgentForHost( const QString& )
{
- _logNotYetImplemented();
// make us look like msie for now
return QString("Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC)");
}
-
-QString KProtocolManager::proxyFor(const QString &)
-{
- _logNotYetImplemented();
- if (tempQString == NULL) {
- tempQString = new QString();
- }
-
- return *tempQString;
-}
-
diff --git a/WebCore/kwq/KWQKSSLKeyGen.h b/WebCore/kwq/KWQKSSLKeyGen.h
index e69de29..a90b6cf 100644
--- a/WebCore/kwq/KWQKSSLKeyGen.h
+++ b/WebCore/kwq/KWQKSSLKeyGen.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KSSLKEYGEN_H_
+#define KSSLKEYGEN_H_
+
+#include <qstringlist.h>
+
+class QDialog
+{
+public:
+ enum DialogCode { Accepted, Rejected };
+};
+
+class KSSLKeyGen
+{
+public:
+ static QStringList supportedKeySizes() { return QStringList(); }
+ KSSLKeyGen(QWidget *, const char *, bool) { }
+ void setKeySize(int) { }
+ int exec() { return QDialog::Rejected; }
+};
+
+#endif
diff --git a/WebCore/kwq/KWQKStaticDeleter.h b/WebCore/kwq/KWQKStaticDeleter.h
index 0eef1b6..b81df6e 100644
--- a/WebCore/kwq/KWQKStaticDeleter.h
+++ b/WebCore/kwq/KWQKStaticDeleter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,13 @@
#ifndef KSTATICDELETER_H_
#define KSTATICDELETER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class KStaticDeleter ========================================================
+// We don't believe in freeing memory at exit time.
+// It just touches memory pages and slows down quitting.
+// All the users of this just free memory, so it's OK to not delete.
template <class T> class KStaticDeleter {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KStaticDeleter() {}
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KStaticDeleter() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- T *setObject(T *ptr, bool isArray=false) {return ptr;}
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KStaticDeleter(const KStaticDeleter &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KStaticDeleter &operator=(const KStaticDeleter &);
-#endif
-
-}; // class KStaticDeleter =====================================================
+ T *setObject(T *ptr, bool array = false) { return ptr; }
+};
#endif
diff --git a/WebCore/kwq/KWQKStringHandler.h b/WebCore/kwq/KWQKStringHandler.h
index 0f0ce7e..8c38334 100644
--- a/WebCore/kwq/KWQKStringHandler.h
+++ b/WebCore/kwq/KWQKStringHandler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,58 +26,11 @@
#ifndef KSTRINGHANDLER_H_
#define KSTRINGHANDLER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
-// class KStringHandler ========================================================
-
class KStringHandler {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QString csqueeze(const QString &, uint maxlen = 40);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KStringHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KStringHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KStringHandler(const KStringHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KStringHandler &operator=(const KStringHandler &);
-#endif
-
-}; // class KStringHandler =====================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index 651847c..73dd2b3 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -27,6 +27,7 @@
#define KURL_H_
#include <qstring.h>
+#include <qvaluelist.h>
#include <KWQRefPtr.h>
#ifdef __OBJC__
diff --git a/WebCore/kwq/KWQLabel.h b/WebCore/kwq/KWQLabel.h
index 418aadd..9ca179a 100644
--- a/WebCore/kwq/KWQLabel.h
+++ b/WebCore/kwq/KWQLabel.h
@@ -26,51 +26,16 @@
#ifndef QLABEL_H_
#define QLABEL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQFrame.h>
-#include "qwidget.h"
-#include "qstring.h"
-
-// class QLabel ================================================================
+#include <qframe.h>
+#include <qwidget.h>
+#include <qstring.h>
class QLabel : public QFrame {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QLabel() {}
-#endif
-
- QLabel(QWidget *parent);
QLabel(const QString &, QWidget *);
- ~QLabel();
-
- // member functions --------------------------------------------------------
-
- virtual void setText(const QString &);
- virtual void setAlignment(int);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QLabel(const QLabel &);
- QLabel &operator=(const QLabel &);
-}; // class QLabel =============================================================
+ void setText(const QString &);
+ void setAlignment(int);
+};
#endif
diff --git a/WebCore/kwq/KWQLabel.mm b/WebCore/kwq/KWQLabel.mm
index e3ff43b..9753dcb 100644
--- a/WebCore/kwq/KWQLabel.mm
+++ b/WebCore/kwq/KWQLabel.mm
@@ -22,39 +22,20 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qlabel.h>
-// class QLabel ================================================================
-
-QLabel::QLabel(QWidget *parent)
-{
- _logNotYetImplemented();
-}
-
-
-QLabel::QLabel(const QString &, QWidget *)
-{
- _logNotYetImplemented();
-}
-
+#include <kwqdebug.h>
-QLabel::~QLabel()
+QLabel::QLabel(const QString &, QWidget *parent)
+ : QFrame(parent)
{
- _logNotYetImplemented();
}
-
void QLabel::setText(const QString &)
{
- _logNotYetImplemented();
}
-
void QLabel::setAlignment(int)
{
- _logNotYetImplemented();
}
-
-
diff --git a/WebCore/kwq/KWQListBox.h b/WebCore/kwq/KWQListBox.h
index 530c82a..6ff1ac8 100644
--- a/WebCore/kwq/KWQListBox.h
+++ b/WebCore/kwq/KWQListBox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,46 +26,21 @@
#ifndef KWQLISTBOX_H_
#define KWQLISTBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qscrollview.h>
#include <qstring.h>
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-#import <Cocoa/Cocoa.h>
-#endif
-
class QListBoxItem;
class QListBoxText;
-// class QListBox ==============================================================
-
class QListBox : public QScrollView {
friend class QListBoxItem;
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
enum SelectionMode { Single, Multi, Extended, NoSelection };
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QListBox();
+ QListBox(QWidget *parent);
~QListBox();
- // member functions --------------------------------------------------------
-
-#ifdef _KWQ_
int scrollBarWidth() const;
-#endif
uint count() const;
void clear();
@@ -77,41 +52,17 @@ public:
void setSelected(int, bool);
bool isSelected(int);
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QListBox(const QListBox &);
- QListBox &operator=(const QListBox &);
-
QListBoxItem *head;
-}; // class QListBox ===========================================================
-
-
-// class QListBoxItem ==========================================================
+};
class QListBoxItem {
friend class QListBox;
friend class QListBoxText;
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QListBoxItem();
virtual ~QListBoxItem();
- // member functions --------------------------------------------------------
-
void setSelectable(bool);
QListBox *listBox() const;
virtual int width(const QListBox *) const;
@@ -119,52 +70,19 @@ public:
QListBoxItem *next() const;
QListBoxItem *prev() const;
- // operators ---------------------------------------------------------------
-
-
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QListBoxItem(const QListBoxItem &);
- QListBoxItem &operator=(const QListBoxItem &);
-
QString text;
QListBoxItem *previousItem, *nextItem;
QListBox *box;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QListBoxItem =======================================================
-
-
-// class QListBoxText ==========================================================
+private:
+ QListBoxItem(const QListBoxItem &);
+ QListBoxItem &operator=(const QListBoxItem &);
+};
class QListBoxText : public QListBoxItem {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QListBoxText(const QString &text=QString::null);
~QListBoxText();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QListBoxText(const QListBoxText &);
- QListBoxText &operator=(const QListBoxText &);
-
-}; // class QListBoxText =======================================================
+};
#endif
diff --git a/WebCore/kwq/KWQListBox.mm b/WebCore/kwq/KWQListBox.mm
index 192aeb0..8d0c451 100644
--- a/WebCore/kwq/KWQListBox.mm
+++ b/WebCore/kwq/KWQListBox.mm
@@ -90,7 +90,8 @@
@end
-QListBox::QListBox()
+QListBox::QListBox(QWidget *parent)
+ : QScrollView(parent)
{
NSBrowser *browser = [[[NSBrowser alloc] initWithFrame: NSMakeRect (0,0,1,1)] autorelease];
KWQBrowserDelegate *delegate = [[KWQBrowserDelegate alloc] initWithListBox: this];
diff --git a/WebCore/kwq/KWQMap.h b/WebCore/kwq/KWQMap.h
index 7d0eb37..ed4720c 100644
--- a/WebCore/kwq/KWQMap.h
+++ b/WebCore/kwq/KWQMap.h
@@ -26,29 +26,18 @@
#ifndef QMAP_H_
#define QMAP_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QMAP =========================================================
+#include <KWQDef.h>
-#ifdef USING_BORROWED_QMAP
-#include <_qmap.h>
-#else
+#include <KWQMapImpl.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <KWQDef.h>
-
-#include <KWQMapImpl.h>
-
template <class K, class V> class QMap;
template <class K, class V> class QMapIterator;
template <class K, class V> class QMapConstIterator;
-
template <class K, class V> class QMapNode : private KWQMapNodeImpl
{
private:
@@ -59,12 +48,13 @@ template <class K, class V> class QMapNode : private KWQMapNodeImpl
}
// intentionally not defined
- QMapNode(const QMapNode<K,V>&node);
+ QMapNode(const QMapNode&node);
+ QMapNode& operator=(const QMapNode&);
~QMapNode()
{
- delete (QMapNode<K,V> *)left();
- delete (QMapNode<K,V> *)right();
+ delete (QMapNode *)left();
+ delete (QMapNode *)right();
}
K key;
@@ -75,22 +65,10 @@ template <class K, class V> class QMapNode : private KWQMapNodeImpl
friend class QMapConstIterator<K,V>;
};
-// class QMapIterator ==========================================================
-
template<class K, class V> class QMapIterator : private KWQMapIteratorImpl {
public:
- QMapIterator()
- {
- }
-
- QMapIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter)
- {
- }
-
- ~QMapIterator()
- {
- }
-
+ QMapIterator() { }
+
const K& key() const
{
return ((QMapNode<K,V> *)node)->key;
@@ -101,18 +79,12 @@ public:
return ((QMapNode<K,V> *)node)->value;
}
- QMapIterator<K,V> &operator=(const QMapIterator<K,V> &iter)
- {
- node = iter.node;
- return *this;
- }
-
- bool operator==(const QMapIterator<K,V>&iter) const
+ bool operator==(const QMapIterator<K,V> &iter) const
{
return node == iter.node;
}
- bool operator!=(const QMapIterator<K,V>&iter) const
+ bool operator!=(const QMapIterator<K,V> &iter) const
{
return node != iter.node;
}
@@ -136,33 +108,17 @@ public:
private:
QMapIterator(QMapNode<K,V> *n)
{
- node = n;
+ node = n;
}
friend class QMap<K,V>;
friend class QMapConstIterator<K,V>;
-}; // class QMapIterator =======================================================
-
-
-// class QMapConstIterator =====================================================
+};
template<class K, class V> class QMapConstIterator : private KWQMapIteratorImpl {
public:
- QMapConstIterator() : KWQMapIteratorImpl()
- {
- }
-
- QMapConstIterator(const QMapConstIterator<K,V> &citer) : KWQMapIteratorImpl(citer)
- {
- }
-
- QMapConstIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter)
- {
- }
-
- ~QMapConstIterator()
- {
- }
+ QMapConstIterator() { }
+ QMapConstIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter) { }
const K& key() const
{
@@ -174,12 +130,6 @@ public:
return ((QMapNode<K,V> *)node)->value;
}
- QMapConstIterator<K,V> &operator=(const QMapConstIterator<K,V> &citer)
- {
- node = citer.node;
- return *this;
- }
-
bool operator==(const QMapConstIterator<K,V> &citer) const
{
return node == citer.node;
@@ -208,26 +158,13 @@ private:
}
friend class QMap<K,V>;
-}; // class QMapConstIterator ==================================================
-
-
-
-// class QMap ==================================================================
+};
template <class K, class V> class QMap : public KWQMapImpl {
public:
-
- // typedefs ----------------------------------------------------------------
-
typedef QMapIterator<K,V> Iterator;
typedef QMapConstIterator<K,V> ConstIterator;
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-
QMap() :
KWQMapImpl(new QMapNode<K,V>(K(),V()), deleteNode)
{
@@ -238,46 +175,18 @@ public:
{
}
- virtual ~QMap()
- {
- }
-
- // member functions --------------------------------------------------------
-
- void clear()
- {
- clearInternal();
- }
-
- uint count() const
- {
- return countInternal();
- }
-
- Iterator begin()
- {
- return Iterator((QMapNode<K,V> *)beginInternal());
- }
-
- Iterator end()
- {
- return Iterator((QMapNode<K,V> *)endInternal());
- }
+ void clear() { clearInternal(); }
- ConstIterator begin() const
- {
- return ConstIterator((QMapNode<K,V> *)beginInternal());
- }
+ uint count() const { return countInternal(); }
- ConstIterator end() const
- {
- return ConstIterator((QMapNode<K,V> *)endInternal());
- }
+ Iterator begin() { return (QMapNode<K,V> *)beginInternal(); }
+ Iterator end() { return (QMapNode<K,V> *)endInternal(); }
+ ConstIterator begin() const { return (QMapNode<K,V> *)beginInternal(); }
+ ConstIterator end() const { return ConstIterator((QMapNode<K,V> *)endInternal()); }
Iterator insert(const K& key, const V& value)
{
QMapNode<K,V> tmp(key,value);
-
return Iterator((QMapNode<K,V> *)insertInternal(&tmp, true));
}
@@ -316,8 +225,6 @@ public:
}
}
- // operators ---------------------------------------------------------------
-
QMap<K,V>& operator=(const QMap<K,V>&map)
{
QMap<K,V> tmp(map);
@@ -328,11 +235,9 @@ public:
V& operator[](const K& key)
{
QMapNode<K,V> tmp(key, V());
-
return ((QMapNode<K,V> *)insertInternal(&tmp, false))->value;
}
-
protected:
virtual void copyNode(const KWQMapNodeImpl *isrc, KWQMapNodeImpl *idst) const
{
@@ -380,10 +285,10 @@ protected:
delete (QMapNode<K,V> *)inode;
}
-}; // class QMap ===============================================================
-
+};
#ifdef _KWQ_IOSTREAM_
+
template<class K, class V>
inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
{
@@ -402,8 +307,7 @@ inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
return stream << "]";
}
-#endif
-#endif // USING_BORROWED_QMAP
+#endif
#endif
diff --git a/WebCore/kwq/KWQMapImpl.h b/WebCore/kwq/KWQMapImpl.h
index 7a1f6e0..888a3d7 100644
--- a/WebCore/kwq/KWQMapImpl.h
+++ b/WebCore/kwq/KWQMapImpl.h
@@ -26,12 +26,7 @@
#ifndef KWQ_MAP_IMPL_H
#define KWQ_MAP_IMPL_H
-#include <config.h>
-
#include <new>
-#include <iostream>
-
-#ifndef USING_BORROWED_QMAP
#include <KWQRefPtr.h>
@@ -71,23 +66,19 @@ protected:
KWQMapNodeImpl *node;
KWQMapIteratorImpl();
- KWQMapIteratorImpl(const KWQMapIteratorImpl& iter);
void incrementInternal();
};
class KWQMapImpl {
- private:
- // disallow assignment
- KWQMapImpl &operator=(const KWQMapImpl &);
-
protected:
typedef enum { Less = -1, Equal = 0, Greater = 1 } CompareResult;
KWQMapImpl(KWQMapNodeImpl *guard, void (*deleteNode)(KWQMapNodeImpl *));
- KWQMapImpl(const KWQMapImpl &impl);
- KWQMapImpl();
virtual ~KWQMapImpl();
+ KWQMapImpl(const KWQMapImpl &);
+ KWQMapImpl &operator=(const KWQMapImpl &);
+
KWQMapNodeImpl *findInternal(KWQMapNodeImpl *target) const;
KWQMapNodeImpl *insertInternal(KWQMapNodeImpl *nodeToInsert, bool replaceExisting);
void removeEqualInternal(KWQMapNodeImpl *nodeToRemove, bool samePointer = false);
@@ -128,5 +119,3 @@ class KWQMapImpl {
};
#endif
-
-#endif
diff --git a/WebCore/kwq/KWQMapImpl.mm b/WebCore/kwq/KWQMapImpl.mm
index c8f177a..6be3f7b 100644
--- a/WebCore/kwq/KWQMapImpl.mm
+++ b/WebCore/kwq/KWQMapImpl.mm
@@ -111,10 +111,6 @@ KWQMapIteratorImpl::KWQMapIteratorImpl() : node(NULL)
{
}
-KWQMapIteratorImpl::KWQMapIteratorImpl(const KWQMapIteratorImpl& iter) : node(iter.node)
-{
-}
-
void KWQMapIteratorImpl::incrementInternal()
{
node = node->successor();
diff --git a/WebCore/kwq/KWQMemArray.h b/WebCore/kwq/KWQMemArray.h
index cc9c61d..76c2d45 100644
--- a/WebCore/kwq/KWQMemArray.h
+++ b/WebCore/kwq/KWQMemArray.h
@@ -26,38 +26,14 @@
#ifndef QARRAY_H_
#define QARRAY_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QARRAY =======================================================
-
-#ifdef USING_BORROWED_QARRAY
-#include <_qarray.h>
-#else
-
#include <KWQDef.h>
#include <KWQArrayImpl.h>
-// class QMemArray ================================================================
-
template <class T> class QMemArray {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QMemArray() : impl(sizeof(T)) {}
QMemArray(int i) : impl(sizeof(T),i) {}
- QMemArray(const QMemArray<T> &a) : impl(a.impl) {}
- ~QMemArray() {}
- // member functions --------------------------------------------------------
-
bool isEmpty() {return impl.size() == 0; }
T &at(uint u) const {return *(T *)impl.at(u); }
T *data() const { return (T *)impl.data(); }
@@ -69,21 +45,14 @@ public:
bool fill(const T &item, int size=-1) { return impl.fill(&item, size); }
QMemArray<T>& assign(const QMemArray<T> &a) { return *this = a; }
-
- // operators ---------------------------------------------------------------
-
- QMemArray<T> &operator=(const QMemArray<T> &a) { impl = a.impl; return *this; }
T &operator[](int i) const { return at(i); }
bool operator==(const QMemArray<T> &a) const { return impl == a.impl; }
bool operator!=(const QMemArray<T> &a) const { return !(*this == a); }
operator const T*() const { return data(); }
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
KWQArrayImpl impl;
-
-}; // class QMemArray =============================================================
+};
#ifdef _KWQ_IOSTREAM_
@@ -106,7 +75,4 @@ inline std::ostream &operator<<(std::ostream &stream, const QMemArray<T>&a)
#endif
-#endif // USING_BORROWED_QARRAY
-
#endif
-
diff --git a/WebCore/kwq/KWQMovie.h b/WebCore/kwq/KWQMovie.h
index 697fdc7..b383667 100644
--- a/WebCore/kwq/KWQMovie.h
+++ b/WebCore/kwq/KWQMovie.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,73 +26,23 @@
#ifndef QMOVIE_H_
#define QMOVIE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-#include "qasyncio.h"
-#include "qpixmap.h"
-#include "qimage.h"
-#include "qrect.h"
-
-#ifdef _KWQ_
-class QMoviePrivate;
-#endif
-
-// class QMovie ================================================================
+#include <qobject.h>
+#include <qasyncio.h>
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qrect.h>
class QMovie {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Status { EndOfFrame, EndOfLoop, EndOfMovie };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QMovie();
- QMovie(QDataSource*, int bufsize=1024);
- QMovie(const QMovie &);
- ~QMovie();
-
- // member functions --------------------------------------------------------
-
- void unpause();
- void pause();
- void restart();
- bool finished();
- bool running();
+ void unpause() { }
+ void pause() { }
+ void restart() { }
+ bool finished() { return true; }
+ bool running() { return false; }
int frameNumber() const;
const QRect& getValidRect() const;
const QPixmap& framePixmap() const;
- const QImage& frameImage() const;
-
- void connectResize(QObject* receiver, const char *member);
- void connectUpdate(QObject* receiver, const char *member);
- void connectStatus(QObject* receiver, const char *member);
-
- void disconnectResize(QObject* receiver, const char *member=0);
- void disconnectUpdate(QObject* receiver, const char *member=0);
- void disconnectStatus(QObject* receiver, const char *member=0);
-
- // operators ---------------------------------------------------------------
-
- QMovie &operator=(const QMovie &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-private:
-#ifdef _KWQ_
- QMoviePrivate *d;
-#endif
-
-}; // class QMovie =============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQMovie.mm b/WebCore/kwq/KWQMovie.mm
index 81a98ea..07f7263 100644
--- a/WebCore/kwq/KWQMovie.mm
+++ b/WebCore/kwq/KWQMovie.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,152 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qmovie.h>
-class QMoviePrivate {
-friend class QMovie;
-public:
- QMoviePrivate() {
- }
-
- ~QMoviePrivate() {
- }
-
-private:
- QRect rect;
- QPixmap pixmap;
- QImage image;
-};
-
-QMovie::QMovie()
-{
- _logNotYetImplemented();
- d = new QMoviePrivate();
-}
-
-
-QMovie::QMovie(QDataSource*, int bufsize)
-{
- _logPartiallyImplemented();
- d = new QMoviePrivate();
-}
-
-
-QMovie::QMovie(const QMovie &other)
-{
- _logPartiallyImplemented();
- d->rect = other.d->rect;
- d->pixmap = other.d->pixmap;
- d->image = other.d->image;
-}
-
-
-QMovie::~QMovie()
-{
- _logPartiallyImplemented();
- delete d;
-}
-
-
-void QMovie::unpause()
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::pause()
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::restart()
-{
- _logNotYetImplemented();
-}
-
-
-bool QMovie::finished()
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-bool QMovie::running()
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-int QMovie::frameNumber() const
-{
- _logNotYetImplemented();
- return 0;
-}
-
-
const QRect &QMovie::getValidRect() const
{
- _logPartiallyImplemented();
- return d->rect;
+ static QRect rect;
+ return rect;
}
-
const QPixmap &QMovie::framePixmap() const
{
- _logPartiallyImplemented();
- return d->pixmap;
-}
-
-
-const QImage &QMovie::frameImage() const
-{
- _logPartiallyImplemented();
- return d->image;
-}
-
-
-void QMovie::connectResize(QObject* receiver, const char *member)
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::connectUpdate(QObject* receiver, const char *member)
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::connectStatus(QObject* receiver, const char *member)
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::disconnectResize(QObject* receiver, const char *member=0)
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::disconnectUpdate(QObject* receiver, const char *member=0)
-{
- _logNotYetImplemented();
-}
-
-
-void QMovie::disconnectStatus(QObject* receiver, const char *member=0)
-{
- _logNotYetImplemented();
-}
-
-
-QMovie &QMovie::operator=(const QMovie &)
-{
- _logNotYetImplemented();
- return *this;
+ static QPixmap pixmap;
+ return pixmap;
}
diff --git a/WebCore/kwq/KWQObject.h b/WebCore/kwq/KWQObject.h
index d7ea4c4..ec1270b 100644
--- a/WebCore/kwq/KWQObject.h
+++ b/WebCore/kwq/KWQObject.h
@@ -36,9 +36,9 @@
// FIXME: should these macros be in "kwq.h" or other header file?
#define slots
-#define SLOT(x) """## x ##"""
+#define SLOT(x) #x
#define signals protected
-#define SIGNAL(x) """## x ##"""
+#define SIGNAL(x) #x
#define emit
#define Q_OBJECT
#define Q_PROPERTY(text)
@@ -106,7 +106,7 @@ public:
int startTimer(int);
void killTimer(int);
void killTimers();
- virtual void timerEvent( QTimerEvent * );
+ virtual void timerEvent( QTimerEvent * );
void installEventFilter(const QObject *);
void removeEventFilter(const QObject *);
@@ -116,7 +116,9 @@ public:
virtual void performAction(QObject::Actions action);
void emitAction(QObject::Actions action);
- void setTarget (QObject *obj);
+ void setTarget(QObject *obj);
+
+ virtual bool event(QEvent *);
private:
// no copying or assignment
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index fab197f..9d0ab80 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -29,23 +29,20 @@
#include <kwqdebug.h>
-bool QObject::connect(const QObject *sender, const char *signal, const QObject *dest,
- const char *slot)
+bool QObject::connect(const QObject *sender, const char *signal, const QObject *dest, const char *slot)
{
if (sender)
- ((QObject *)sender)->setTarget ((QObject *)dest);
+ ((QObject *)sender)->setTarget((QObject *)dest);
KWQDEBUG ("src = %p, signal = %s, dest = %p, slot = %s\n", sender, signal, dest, slot);
return FALSE;
}
-
-
bool QObject::connect(const QObject *sender, const char *signal, const char *slot) const
{
if (sender)
- ((QObject *)sender)->setTarget ((QObject *)sender);
+ ((QObject *)sender)->setTarget((QObject *)sender);
KWQDEBUG ("src = %p, signal = %s, slot = %s\n", sender, signal, slot);
- return FALSE;
+ return false;
}
@@ -61,11 +58,9 @@ void QObject::performAction(QObject::Actions action)
KWQDEBUG ("action = %d\n", action);
}
-
-bool QObject::disconnect( const QObject *, const char *, const QObject *,
- const char *)
+bool QObject::disconnect( const QObject *, const char *, const QObject *, const char *)
{
- return FALSE;
+ return false;
}
void QObject::setTarget (QObject *t)
@@ -73,45 +68,30 @@ void QObject::setTarget (QObject *t)
target = t;
}
-
-
QObject::QObject(QObject *parent=0, const char *name=0)
{
guardedPtrDummyList.append(this);
}
-
QObject::~QObject()
{
}
-
-// member functions --------------------------------------------------------
-
const char *QObject::name() const
{
- _logNotYetImplemented();
- return "noname";
+ return "";
}
void QObject::setName(const char *)
{
- _logNotYetImplemented();
}
QVariant QObject::property(const char *name) const
{
- _logNeverImplemented();
return QVariant();
}
-bool QObject::inherits(const char *) const
-{
- _logNeverImplemented();
- return FALSE;
-}
-
@interface KWQTimerCallback : NSObject
{
QObject *target;
@@ -137,16 +117,16 @@ bool QObject::inherits(const char *) const
}
@end
-int timerCount = 1;
-
-NSMutableDictionary *timers;
+static NSMutableDictionary *timers;
-void QObject::timerEvent (QTimerEvent *te)
+void QObject::timerEvent(QTimerEvent *te)
{
}
int QObject:: startTimer(int milliseconds)
{
+ static int timerCount = 1;
+
NSNumber *timerId = [NSNumber numberWithInt: timerCount];
if (timers == nil){
@@ -164,7 +144,6 @@ int QObject:: startTimer(int milliseconds)
return timerCount++;
}
-
void QObject::killTimer(int _timerId)
{
NSNumber *timerId = [NSNumber numberWithInt: _timerId];
@@ -175,7 +154,6 @@ void QObject::killTimer(int _timerId)
[timers removeObjectForKey: timerId];
}
-
void QObject::killTimers()
{
NSArray *contexts;
@@ -193,13 +171,11 @@ void QObject::killTimers()
}
}
-
void QObject::installEventFilter(const QObject *)
{
_logNeverImplemented();
}
-
void QObject::removeEventFilter(const QObject *)
{
_logNeverImplemented();
@@ -211,9 +187,40 @@ bool QObject::eventFilter(QObject *o, QEvent *e)
return false;
}
-
void QObject::blockSignals(bool)
{
_logNeverImplemented();
}
+bool QObject::event(QEvent *)
+{
+ return false;
+}
+
+// special includes only for inherits
+
+#import <khtml_part.h>
+#import <khtmlview.h>
+
+bool QObject::inherits(const char *className) const
+{
+ if (strcmp(className, "KHTMLPart") == 0) {
+ return dynamic_cast<const KHTMLPart *>(this);
+ }
+ if (strcmp(className, "KHTMLView") == 0) {
+ return dynamic_cast<const KHTMLView *>(this);
+ }
+ if (strcmp(className, "KParts::Factory") == 0) {
+ return false;
+ }
+ if (strcmp(className, "KParts::ReadOnlyPart") == 0) {
+ return dynamic_cast<const KParts::ReadOnlyPart *>(this);
+ }
+ if (strcmp(className, "QFrame") == 0) {
+ return dynamic_cast<const QFrame *>(this);
+ }
+ if (strcmp(className, "QScrollView") == 0) {
+ return dynamic_cast<const QScrollView *>(this);
+ }
+ return false;
+}
diff --git a/WebCore/kwq/KWQPaintDeviceMetrics.h b/WebCore/kwq/KWQPaintDeviceMetrics.h
index 377ec57..01f7ef8 100644
--- a/WebCore/kwq/KWQPaintDeviceMetrics.h
+++ b/WebCore/kwq/KWQPaintDeviceMetrics.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,61 +26,16 @@
#ifndef QPAINTDEVICEMETRICS_H_
#define QPAINTDEVICEMETRICS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QPaintDevice;
-// class QPaintDeviceMetrics ===================================================
-
class QPaintDeviceMetrics {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
-#endif
-
QPaintDeviceMetrics(const QPaintDevice *);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QPaintDeviceMetrics() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int logicalDpiY() const;
int depth() const;
int width() const;
int height() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QPaintDeviceMetrics(const QPaintDeviceMetrics &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QPaintDeviceMetrics &operator=(const QPaintDeviceMetrics &);
-#endif
-
-}; // class QPaintDeviceMetrics ================================================
+};
#endif
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index 1b6fb8d..5d37ed4 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef QPAINTER_H_
#define QPAINTER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qnamespace.h>
#include <qpaintdevice.h>
#include <qcolor.h>
@@ -46,79 +42,29 @@ class QPixmap;
class QWidget;
class QPainterPrivate;
-// class QWMatrix ==============================================================
-
class QWMatrix {
friend class QPainter;
friend class QPixmap;
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QWMatrix();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QWMatrix() {}
-#endif
-
- // member functions --------------------------------------------------------
-
QWMatrix &scale(double, double);
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QWMatrix(const QWMatrix &);
-#endif
-
-#ifdef _KWQ_
bool empty;
double sx;
double sy;
-#endif
-
-}; // class QWMatrix ===========================================================
-
-
-// class QPainter ==============================================================
+};
class QPainter : public Qt {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
typedef enum { RTL, LTR } TextDirection;
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QPainter();
-
// We may be able to remove this constructor and remove QPaintDevice.
QPainter(const QPaintDevice *);
-
-#ifdef _KWQ_
QPainter(QWidget *);
-#endif
-
~QPainter();
- // member functions --------------------------------------------------------
-
const QFont &font() const;
void setFont(const QFont &);
QFontMetrics fontMetrics() const;
@@ -173,15 +119,7 @@ public:
QPaintDevice *device() const;
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-#ifdef _KWQ_
void drawUnderlineForText(int x, int y, const QString &, int len=-1);
-#endif
private:
// no copying or assignment
@@ -189,7 +127,6 @@ private:
QPainter(const QPainter &);
QPainter &operator=(const QPainter &);
-#ifdef _KWQ_
void _lockFocus();
void _unlockFocus();
@@ -200,10 +137,6 @@ private:
void _drawPoints (const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
QPainterPrivate *data;
-
-#endif
-}; // end class QPainter
-
-// =============================================================================
+};
#endif
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 1b9f065..36674fd 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -610,24 +610,22 @@ void QPainter::setClipping(bool)
_logNotYetImplemented();
}
-
void QPainter::setClipRegion(const QRegion &)
{
_logNotYetImplemented();
}
-
const QRegion &QPainter::clipRegion() const
{
_logPartiallyImplemented();
- return QRegion::null;
+ static QRegion null;
+ return null;
}
-
bool QPainter::hasClipping() const
{
_logNotYetImplemented();
- return 0;
+ return false;
}
void QPainter::setClipRect(const QRect &)
diff --git a/WebCore/kwq/KWQPoint.mm b/WebCore/kwq/KWQPoint.mm
index 0f1aa9e..f69d1bf 100644
--- a/WebCore/kwq/KWQPoint.mm
+++ b/WebCore/kwq/KWQPoint.mm
@@ -25,33 +25,19 @@
#include <qpoint.h>
-#ifndef USING_BORROWED_QPOINT
-
QPoint::QPoint() : xCoord(0), yCoord(0)
{
}
-
QPoint::QPoint(int xIn, int yIn) : xCoord(xIn), yCoord(yIn)
{
}
-int QPoint::x() const
-{
- return xCoord;
-}
-
-int QPoint::y() const
-{
- return yCoord;
-}
-
int QPoint::manhattanLength() const
{
return abs(xCoord) + abs(yCoord);
}
-
QPoint operator+(const QPoint &a, const QPoint &b)
{
return QPoint(a.xCoord + b.xCoord, a.yCoord + b.yCoord);
@@ -68,5 +54,3 @@ std::ostream &operator<<(std::ostream &o, const QPoint &p)
return o << "QPoint: [x: " << p.x() << "; h: " << p.y() << "]";
}
#endif
-
-#endif
diff --git a/WebCore/kwq/KWQPointArray.h b/WebCore/kwq/KWQPointArray.h
index 5125be6..6864a8d 100644
--- a/WebCore/kwq/KWQPointArray.h
+++ b/WebCore/kwq/KWQPointArray.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,14 +26,12 @@
#ifndef QPOINT_H_
#define QPOINT_H_
-#include <config.h>
+#include <KWQDef.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <KWQDef.h>
-
#include "qarray.h"
class QPoint {
@@ -42,8 +40,8 @@ public:
QPoint();
QPoint(int, int);
- int x() const;
- int y() const;
+ int x() const { return xCoord; }
+ int y() const { return yCoord; }
int manhattanLength() const;
@@ -52,8 +50,8 @@ public:
private:
- QCOORD xCoord;
- QCOORD yCoord;
+ int xCoord;
+ int yCoord;
};
@@ -63,7 +61,7 @@ public:
QPointArray() {}
QPointArray(int size) : QMemArray<QPoint>(size) {}
- QPointArray(int, const QCOORD *);
+ QPointArray(int, const int *);
void setPoint(uint, int, int);
#if 0
@@ -72,7 +70,7 @@ public:
#else
bool setPoints(int, int, int, int, int, int, int, int, int);
#endif
- bool setPoints( int nPoints, const QCOORD *points );
+ bool setPoints( int nPoints, const int *points );
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QPoint &);
diff --git a/WebCore/kwq/KWQPointArray.mm b/WebCore/kwq/KWQPointArray.mm
index 00ff4e9..fddb085 100644
--- a/WebCore/kwq/KWQPointArray.mm
+++ b/WebCore/kwq/KWQPointArray.mm
@@ -26,7 +26,7 @@
#include "qpoint.h"
#include <stdarg.h>
-QPointArray::QPointArray(int nPoints, const QCOORD *points)
+QPointArray::QPointArray(int nPoints, const int *points)
{
setPoints( nPoints, points );
}
@@ -38,7 +38,7 @@ void QPointArray::setPoint( uint index, int x, int y )
}
-bool QPointArray::setPoints( int nPoints, const QCOORD *points )
+bool QPointArray::setPoints( int nPoints, const int *points )
{
if ( !resize(nPoints) )
return FALSE;
diff --git a/WebCore/kwq/KWQPtrList.h b/WebCore/kwq/KWQPtrList.h
index cc6502a..33b9369 100644
--- a/WebCore/kwq/KWQPtrList.h
+++ b/WebCore/kwq/KWQPtrList.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,37 +26,20 @@
#ifndef QLIST_H_
#define QLIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QLIST ========================================================
-
-#ifdef USING_BORROWED_QLIST
-#include <_qlist.h>
-#else
-
-#include <iostream>
-
#include <KWQDef.h>
#include <qcollection.h>
-
#include <KWQListImpl.h>
-// class QPtrList =================================================================
+#ifdef _KWQ_IOSTREAM_
+#include <iostream>
+#endif
template <class T> class QPtrListIterator;
template <class T> class QPtrList : public QPtrCollection {
public:
-
- // constructors, copy constructors, and destructors ------------------------
-
QPtrList() : impl(deleteFunc) {}
- QPtrList(const QPtrList<T> &l) : QPtrCollection(l), impl(l.impl) {}
~QPtrList() { if (del_item) { impl.clear(del_item); } }
-
- // member functions --------------------------------------------------------
bool isEmpty() const { return impl.isEmpty(); }
uint count() const { return impl.count(); }
@@ -90,15 +73,8 @@ public:
virtual int compareItems(void *a, void *b) { return a != b; }
- // operators ---------------------------------------------------------------
-
- QPtrList<T> &operator=(const QPtrList<T> &l)
- { impl.assign(l.impl,del_item); QPtrCollection::operator=(l); return *this; }
-
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
static int compareFunc(void *a, void *b, void *data)
{
@@ -109,22 +85,12 @@ public:
friend class QPtrListIterator<T>;
KWQListImpl impl;
-}; // class QPtrList ==============================================================
-
-
-// class QPtrListIterator =========================================================
+};
template <class T> class QPtrListIterator {
public:
-
- // constructors, copy constructors, and destructors ------------------------
-
- QPtrListIterator() {}
- QPtrListIterator(const QPtrListIterator &li) : impl(li.impl) {}
- QPtrListIterator(const QPtrList<T> &l) : impl(l.impl) {}
- ~QPtrListIterator() {}
-
- // member functions --------------------------------------------------------
+ QPtrListIterator() { }
+ QPtrListIterator(const QPtrList<T> &l) : impl(l.impl) { }
uint count() const { return impl.count(); }
T *toFirst() { return (T *)impl.toFirst(); }
@@ -136,12 +102,12 @@ public:
operator T *() const { return (T *)impl.current(); }
T *operator--() { return (T *)(--impl); }
T *operator++() { return (T *)(++impl); }
- QPtrListIterator &operator=(const QPtrListIterator &li) { impl = li.impl; return *this; }
private:
KWQListIteratorImpl impl;
-}; // class QPtrListIterator ======================================================
+};
+#ifdef _KWQ_IOSTREAM_
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
@@ -168,6 +134,6 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
return stream << "]";
}
-#endif // USING_BORROWED_QLIST
+#endif
#endif
diff --git a/WebCore/kwq/KWQPtrStack.h b/WebCore/kwq/KWQPtrStack.h
index 64b883f..730a85e 100644
--- a/WebCore/kwq/KWQPtrStack.h
+++ b/WebCore/kwq/KWQPtrStack.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,52 +26,24 @@
#ifndef QSTACK_H_
#define QSTACK_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTACK =======================================================
-
-#ifdef USING_BORROWED_QSTACK
-#include <_qstack.h>
-#else
-
#include <qlist.h>
-// class QPtrStack ================================================================
-
template<class T> class QPtrStack {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QPtrStack() : list() {}
- QPtrStack(const QPtrStack<T> &s) : list(s.list) {}
- ~QPtrStack() {}
-
- // member functions --------------------------------------------------------
+ QPtrStack() { }
bool isEmpty() const { return list.isEmpty(); }
void push(const T *item) { list.append (item); }
T *pop() { T *tmp = list.getLast(); list.removeLast(); return tmp; }
uint count() const { return list.count(); }
- // operators ---------------------------------------------------------------
-
- QPtrStack<T> &operator=(const QPtrStack<T> &s) { list = s.list; return *this; }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QPtrList<T> list;
-}; // class QPtrStack =============================================================
+};
#ifdef _KWQ_IOSTREAM_
+
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
{
@@ -91,9 +63,6 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
return stream;
}
-
#endif
-#endif // USING_BORROWED_QSTACK
-
#endif
diff --git a/WebCore/kwq/KWQPtrVector.h b/WebCore/kwq/KWQPtrVector.h
index 415e87d..5d713de 100644
--- a/WebCore/kwq/KWQPtrVector.h
+++ b/WebCore/kwq/KWQPtrVector.h
@@ -26,16 +26,6 @@
#ifndef QVECTOR_H_
#define QVECTOR_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QVECTOR ======================================================
-
-#ifdef USING_BORROWED_QVECTOR
-#include <_qvector.h>
-#else
-
#include <iostream>
#include <KWQDef.h>
@@ -43,19 +33,19 @@
#include <KWQVectorImpl.h>
-// class QPtrVector ===============================================================
-template<class T> class QPtrVector : public QPtrCollection {
+class QGVector : public QPtrCollection
+{
public:
+ virtual int compareItems(void *a, void *b) = 0;
+};
- // constructors, copy constructors, and destructors ------------------------
-
+// class QPtrVector ===============================================================
+template<class T> class QPtrVector : public QGVector {
+public:
QPtrVector() : impl(deleteFunc) {}
QPtrVector(uint size) : impl(size, deleteFunc) {}
- QPtrVector(const QPtrVector<T> &v) : QPtrCollection(v), impl(v.impl) {}
~QPtrVector() { if (del_item) { impl.clear(del_item); } }
- // member functions --------------------------------------------------------
-
void clear() { impl.clear(del_item); }
bool isEmpty() const { return impl.isEmpty(); }
uint count() const { return impl.count(); }
@@ -68,20 +58,15 @@ public:
virtual int compareItems(void *a, void *b) { return a != b; }
- // operators ---------------------------------------------------------------
-
T *operator[](int n) const {return (T *)impl.at(n); }
QPtrVector &operator=(const QPtrVector &v)
{ impl.assign(v.impl,del_item); QPtrCollection::operator=(v); return *this; }
+
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
KWQVectorImpl impl;
-}; // class QPtrVector ============================================================
-
-
+};
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
@@ -99,6 +84,4 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
return stream << "]";
}
-#endif // USING_BORROWED_QVECTOR
-
#endif
diff --git a/WebCore/kwq/KWQRadioButton.h b/WebCore/kwq/KWQRadioButton.h
index f0ed6cb..2ac9e86 100644
--- a/WebCore/kwq/KWQRadioButton.h
+++ b/WebCore/kwq/KWQRadioButton.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,15 @@
#ifndef QRADIOBUTTON_H_
#define QRADIOBUTTON_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qbutton.h>
-#include "qwidget.h"
-
-// class QRadioButton ==========================================================
-
class QRadioButton : public QButton {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QRadioButton(QWidget *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QRadioButton() {}
-#endif
-
- // member functions --------------------------------------------------------
void setChecked(bool);
- bool isChecked();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QRadioButton(const QRadioButton &);
- QRadioButton &operator=(const QRadioButton &);
-
-}; // class QRadioButton =======================================================
+ bool isChecked() const;
+};
#endif
diff --git a/WebCore/kwq/KWQRadioButton.mm b/WebCore/kwq/KWQRadioButton.mm
index 14e60da..2f9a785 100644
--- a/WebCore/kwq/KWQRadioButton.mm
+++ b/WebCore/kwq/KWQRadioButton.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,39 +22,26 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include <qradiobutton.h>
#include <KWQView.h>
-#include <kwqdebug.h>
-
-QRadioButton::QRadioButton(QWidget *w) : QButton (w)
+QRadioButton::QRadioButton(QWidget *w) : QButton(w)
{
- KWQNSButton *button;
-
- button = (KWQNSButton *)getView();
+ KWQNSButton *button = (KWQNSButton *)getView();
[button setButtonType: NSRadioButton];
[button sizeToFit];
- //setView (button);
}
-
void QRadioButton::setChecked(bool isChecked)
{
- KWQNSButton *button;
-
- button = (KWQNSButton *)getView();
- if (isChecked)
- [button setState: NSOnState];
- else
- [button setState: NSOffState];
+ KWQNSButton *button = (KWQNSButton *)getView();
+ [button setState: isChecked ? NSOnState : NSOffState];
}
-
-bool QRadioButton::isChecked()
+bool QRadioButton::isChecked() const
{
- KWQNSButton *button;
- button = (KWQNSButton *)getView();
-
- return ([button state] == NSOnState);
+ KWQNSButton *button = (KWQNSButton *)getView();
+ return [button state] == NSOnState;
}
diff --git a/WebCore/kwq/KWQRect.h b/WebCore/kwq/KWQRect.h
index 89375b9..8ef3256 100644
--- a/WebCore/kwq/KWQRect.h
+++ b/WebCore/kwq/KWQRect.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,102 +26,50 @@
#ifndef QRECT_H_
#define QRECT_H_
-#ifdef USING_BORROWED_QRECT
-
-#include <_qrect.h>
-
-#else
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef _KWQ_IOSTREAM_
-#include <iostream>
-#endif
-
-#include <KWQDef.h>
-
-#include "qsize.h"
-#include "qpoint.h"
-
-// class QRect =================================================================
+#include <qsize.h>
+#include <qpoint.h>
class QRect {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QRect();
QRect(QPoint p, QSize s);
QRect(int, int, int, int);
- // QRect(const QRect &);
- // default copy constructor is fine
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QRect() {}
-#endif
-
- // member functions --------------------------------------------------------
bool isNull() const;
bool isValid() const;
bool isEmpty() const;
- int x() const;
- int y() const;
- int left() const;
- int top() const;
+ int x() const { return xp; }
+ int y() const { return yp; }
+ int left() const { return xp; }
+ int top() const { return yp; }
int right() const;
int bottom() const;
- int width() const;
- int height() const;
+ int width() const { return w; }
+ int height() const { return h; }
QPoint topLeft() const;
QSize size() const;
- void setWidth(int);
- void setHeight(int);
+ void setWidth(int width) { w = width; }
+ void setHeight(int height) { h = height; }
QRect intersect(const QRect &) const;
bool intersects(const QRect &) const;
QRect unite(const QRect &) const;
-
- // operators ---------------------------------------------------------------
-
- /* Note: Trolltech seems to want operator= to be a bitwise copy
- * QRect &operator=(const QRect &);
- */
-
- QRect operator&(const QRect &) const;
+
+ inline QRect operator&(const QRect &r) const { return intersect(r); }
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QRect &);
#endif
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
private:
- QCOORD xp;
- QCOORD yp;
- QCOORD w;
- QCOORD h;
+ int xp;
+ int yp;
+ int w;
+ int h;
friend bool operator==(const QRect &, const QRect &);
friend bool operator!=(const QRect &, const QRect &);
-}; // class QRect ==============================================================
-
-// operators associated with QRect =============================================
-
-bool operator==(const QRect &, const QRect &);
-bool operator!=(const QRect &, const QRect &);
-
-#endif
+};
#endif
diff --git a/WebCore/kwq/KWQRect.mm b/WebCore/kwq/KWQRect.mm
index 395e518..c180a0f 100644
--- a/WebCore/kwq/KWQRect.mm
+++ b/WebCore/kwq/KWQRect.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,6 +25,8 @@
#include <qrect.h>
+#include <algorithm>
+
using std::max;
using std::min;
@@ -55,26 +57,6 @@ bool QRect::isEmpty() const
return w > 1 && h > 1;
}
-int QRect::x() const
-{
- return xp;
-}
-
-int QRect::y() const
-{
- return yp;
-}
-
-int QRect::left() const
-{
- return xp;
-}
-
-int QRect::top() const
-{
- return yp;
-}
-
int QRect::right() const
{
return xp + w - 1;
@@ -85,16 +67,6 @@ int QRect::bottom() const
return yp + h - 1;
}
-int QRect::width() const
-{
- return w;
-}
-
-int QRect::height() const
-{
- return h;
-}
-
QPoint QRect::topLeft() const
{
return QPoint(xp,yp);
@@ -105,21 +77,6 @@ QSize QRect::size() const
return QSize(w,h);
}
-void QRect::setWidth(int width)
-{
- w = width;
-}
-
-void QRect::setHeight(int height)
-{
- h = height;
-}
-
-QRect QRect::intersect(const QRect &r) const
-{
- return operator&(r);
-}
-
QRect QRect::unite(const QRect &r) const
{
int nx, ny, nw, nh;
@@ -144,10 +101,10 @@ QRect QRect::unite(const QRect &r) const
bool QRect::intersects(const QRect &r) const
{
- return (intersect(r)).isValid();
+ return intersect(r).isValid();
}
-QRect QRect::operator&(const QRect &r) const
+QRect QRect::intersect(const QRect &r) const
{
int nx, ny, nw, nh;
@@ -171,12 +128,12 @@ QRect QRect::operator&(const QRect &r) const
bool operator==(const QRect &a, const QRect &b)
{
- return a.xp == b.xp && a.yp == b.yp && a.w == b.w && a.h == b.h;
+ return a.xp == b.xp && a.yp == b.yp && a.w == b.w && a.h == b.h;
}
bool operator!=(const QRect &a, const QRect &b)
{
- return a.xp != b.xp || a.yp != b.yp || a.w != b.w || a.h != b.h;
+ return !(a == b);
}
#ifdef _KWQ_IOSTREAM_
diff --git a/WebCore/kwq/KWQRegion.h b/WebCore/kwq/KWQRegion.h
index 90d6c1f..1f35fd5 100644
--- a/WebCore/kwq/KWQRegion.h
+++ b/WebCore/kwq/KWQRegion.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,83 +26,37 @@
#ifndef QREGION_H_
#define QREGION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QREGION ======================================================
-
-#ifdef USING_BORROWED_QREGION
-#include <_qregion.h>
-#include "qpoint.h"
-#include "qimage.h"
-#include "qrect.h"
-#else
-
-#include "qpoint.h"
-#include "qimage.h"
-#include "qrect.h"
+#include <qpoint.h>
+#include <qimage.h>
+#include <qrect.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSBezierPath;
+#else
+class NSBezierPath;
#endif
-// class QRegion ===============================================================
-
class QRegion {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // NOTE: alphabetical order
enum RegionType { Ellipse, Rectangle };
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- static const QRegion null;
-
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QRegion();
QRegion(const QRect &);
- QRegion(int, int, int, int, RegionType t=Rectangle);
+ QRegion(int, int, int, int, RegionType=Rectangle);
QRegion(const QPointArray &);
QRegion(const QRegion &);
~QRegion();
- // member functions --------------------------------------------------------
-
QRegion intersect(const QRegion &) const;
bool contains(const QPoint &) const;
bool isNull() const;
void translate(int deltaX, int deltaY);
QRect boundingRect() const;
- // operators ---------------------------------------------------------------
-
QRegion &operator=(const QRegion &);
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
- struct KWQRegionData {
- RegionType type;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSBezierPath *path;
-#else
- void *path;
-#endif
- } *data;
-
-#ifdef _KWQ_
- void _initialize();
-#endif
-
-}; // class QRegion ============================================================
-
-#endif // USING_BORROWED_QREGION
+ NSBezierPath *path;
+};
#endif
diff --git a/WebCore/kwq/KWQRegion.mm b/WebCore/kwq/KWQRegion.mm
index 04bfd0b..8be5109 100644
--- a/WebCore/kwq/KWQRegion.mm
+++ b/WebCore/kwq/KWQRegion.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,68 +27,44 @@
#include <kwqdebug.h>
-const QRegion QRegion::null;
-
-void QRegion::_initialize()
-{
- data = new KWQRegionData;
- data->type = Rectangle;
- data->path = nil;
-}
-
QRegion::QRegion()
+ : path(nil)
{
- _initialize();
-
- // Create lazily - RJW
- //data->path = [[NSBezierPath alloc] init];
}
QRegion::QRegion(const QRect &rect)
+ : path([[NSBezierPath bezierPathWithRect:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())] retain])
{
- NSRect nsrect;
-
- _initialize();
-
- nsrect = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height());
-
- data->path = [[NSBezierPath bezierPathWithRect:nsrect] retain];
}
QRegion::QRegion(int x, int y, int w, int h, RegionType t=Rectangle)
{
NSRect rect;
- _initialize();
rect = NSMakeRect(x,y,w,h);
if (t == Rectangle) {
- data->path = [[NSBezierPath bezierPathWithRect:rect] retain];
- data->type = Rectangle;
+ path = [[NSBezierPath bezierPathWithRect:rect] retain];
}
else { // Ellipse
- data->path = [[NSBezierPath bezierPathWithOvalInRect:rect] retain];
- data->type = Ellipse;
+ path = [[NSBezierPath bezierPathWithOvalInRect:rect] retain];
}
}
QRegion::QRegion(const QPointArray &arr)
+ : path([[NSBezierPath alloc] init])
{
- _initialize();
_logNotYetImplemented();
}
QRegion::QRegion(const QRegion &other)
+ : path([other.path copy])
{
- _initialize();
- data->path = [[NSBezierPath alloc] init];
- [data->path appendBezierPath:other.data->path];
}
QRegion::~QRegion()
{
- [data->path release];
- delete data;
+ [path release];
}
QRegion QRegion::intersect(const QRegion ®ion) const
@@ -99,54 +75,42 @@ QRegion QRegion::intersect(const QRegion ®ion) const
bool QRegion::contains(const QPoint &point) const
{
- NSPoint nspoint;
-
- nspoint = NSMakePoint(point.x(), point.y());
-
- if (data->path)
- return [data->path containsPoint:nspoint] ? 1 : 0;
- return 0;
+ return path && [path containsPoint:NSMakePoint(point.x(), point.y())];
}
bool QRegion::isNull() const
{
- if (data->path)
- return [data->path elementCount] == 0 ? 1 : 0;
- return 1;
+ return path == nil || [path isEmpty];
}
QRegion &QRegion::operator=(const QRegion &other)
{
- if (data->path) {
- [data->path release];
- }
- data->path = [[NSBezierPath alloc] init];
- [data->path appendBezierPath:other.data->path];
+ NSBezierPath *newPath;
+
+ newPath = [other.path copy];
+ [path release];
+ path = newPath;
return *this;
}
void QRegion::translate(int deltaX, int deltaY)
{
+ if (!path) {
+ return;
+ }
+
NSAffineTransform *translation = [[NSAffineTransform alloc] init];
[translation translateXBy:deltaX yBy:deltaY];
-
- if (!data->path) {
- data->path = [[NSBezierPath alloc] init];
- }
-
- [data->path transformUsingAffineTransform:translation];
-
+ [path transformUsingAffineTransform:translation];
[translation release];
}
-
QRect QRegion::boundingRect() const
{
- if (!data->path) {
+ if (!path) {
return QRect();
}
- NSRect bounds = [data->path bounds];
-
+ NSRect bounds = [path bounds];
return QRect((int)bounds.origin.x, (int)bounds.origin.y, (int)bounds.size.width, (int)bounds.size.height);
}
diff --git a/WebCore/kwq/KWQScrollBar.h b/WebCore/kwq/KWQScrollBar.h
index d3be8e0..6be6ddd 100644
--- a/WebCore/kwq/KWQScrollBar.h
+++ b/WebCore/kwq/KWQScrollBar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,47 +26,14 @@
#ifndef KWQSCROLLVIEW_H_
#define KWQSCROLLVIEW_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qwidget.h>
#include <qpalette.h>
-// class QScrollBar ============================================================
-
class QScrollBar : public QWidget {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QScrollBar(QWidget *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QScrollBar() {}
-#endif
-
- // member functions --------------------------------------------------------
virtual void setPalette(const QPalette &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // note that these are "standard" (no pendantic stuff needed)
- QScrollBar(const QScrollBar &);
- QScrollBar &operator=(const QScrollBar &);
-
-}; // class QScrollBar =========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index e6f9c09..1391020 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,35 +26,13 @@
#ifndef QSCROLLVIEW_H_
#define QSCROLLVIEW_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQScrollBar.h>
-#include <KWQFrame.h>
-#include "qwidget.h"
-
-// class QScrollView ===========================================================
+#include <qframe.h>
class QScrollView : public QFrame {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- // NOTE: alphabetical order
enum ScrollBarMode { AlwaysOff, AlwaysOn, Auto };
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QScrollView(QWidget *parent=0, const char *name=0, WFlags f=0);
- ~QScrollView();
-
- // member functions --------------------------------------------------------
+ QScrollView(QWidget *parent=0, const char *name=0, int f=0);
QWidget* viewport() const;
int visibleWidth() const;
@@ -94,18 +72,6 @@ public:
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QScrollView(const QScrollView &);
- QScrollView &operator=(const QScrollView &);
-
-}; // class QScrollView ========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 6d2c6cf..bcf0f42 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,42 +27,36 @@
#include <kwqdebug.h>
+#include <external.h>
+
/*
This class implementation does NOT actually emulate the Qt QScrollView.
- Instead out WebPageView, like any other NSView can be set as the document
+ Instead our WebPageView, like any other NSView can be set as the document
to a standard NSScrollView.
We do implement the placeWidget() function to essentially addSubview views
onto this view.
*/
-QScrollView::QScrollView(QWidget *parent=0, const char *name=0, WFlags f=0)
+QScrollView::QScrollView(QWidget *parent, const char *name, int f)
+ : QFrame(parent)
{
- _logNeverImplemented();
}
-
-QScrollView::~QScrollView()
-{
- _logNeverImplemented();
-}
-
-
QWidget* QScrollView::viewport() const
{
- return (QWidget *)this;
+ return const_cast<QScrollView *>(this);
}
-
int QScrollView::visibleWidth() const
{
NSScrollView *scrollView = [[getView() superview] superview];
int visibleWidth;
if (scrollView != nil && [scrollView isKindOfClass: [NSScrollView class]])
- visibleWidth = (int)([scrollView documentVisibleRect].size.width);
+ visibleWidth = (int)[scrollView documentVisibleRect].size.width;
else
- visibleWidth = (int)([getView() bounds].size.width);
+ visibleWidth = (int)[getView() bounds].size.width;
return visibleWidth;
}
@@ -73,57 +67,49 @@ int QScrollView::visibleHeight() const
int visibleHeight;
if (scrollView != nil && [scrollView isKindOfClass: [NSScrollView class]])
- visibleHeight = (int)([scrollView documentVisibleRect].size.height);
+ visibleHeight = (int)[scrollView documentVisibleRect].size.height;
else
- visibleHeight = (int)([getView() bounds].size.height);
+ visibleHeight = (int)[getView() bounds].size.height;
return visibleHeight;
}
int QScrollView::contentsWidth() const
{
- NSRect bounds = [getView() bounds];
- return (int)bounds.size.width;
+ return (int)[getView() bounds].size.width;
}
int QScrollView::contentsHeight() const
{
- NSRect bounds = [getView() bounds];
- return (int)bounds.size.height;
+ return (int)[getView() bounds].size.height;
}
-
int QScrollView::contentsX() const
{
return 0;
}
-
int QScrollView::contentsY() const
{
return 0;
}
-
int QScrollView::childX(QWidget *)
{
return 0;
}
-
int QScrollView::childY(QWidget *)
{
return 0;
}
-
void QScrollView::scrollBy(int dx, int dy)
{
_logNeverImplemented();
}
-
void QScrollView::setContentsPos(int x, int y)
{
NSView *view = getView();
@@ -136,67 +122,53 @@ void QScrollView::setContentsPos(int x, int y)
x = 0;
if (y < 0)
y = 0;
- [view scrollPoint: NSMakePoint (x,y)];
+ [view scrollPoint: NSMakePoint(x,y)];
}
-
void QScrollView::setVScrollBarMode(ScrollBarMode)
{
_logNeverImplemented();
}
-
void QScrollView::setHScrollBarMode(ScrollBarMode)
{
_logNeverImplemented();
}
-
void QScrollView::addChild(QWidget* child, int x, int y)
{
NSView *thisView, *subView;
if (child->x() != x || child->y() != y)
- child->move (x, y);
+ child->move(x, y);
thisView = getView();
- if ([thisView isKindOfClass: NSClassFromString(@"NSScrollView")]) {
+ if ([thisView isKindOfClass: [NSScrollView class]]) {
NSScrollView *scrollView = thisView;
thisView = [scrollView documentView];
}
subView = child->getView();
- NSRect wFrame = [subView frame];
-
if ([subView superview] == thisView) {
return;
}
[subView removeFromSuperview];
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)[subView frame].size.width, (int)[subView frame].size.height);
[thisView addSubview: subView];
}
-
void QScrollView::removeChild(QWidget* child)
{
- NSView *subView;
-
- subView = child->getView();
- [subView removeFromSuperview];
+ [child->getView() removeFromSuperview];
}
- at interface IFWebView: NSObject
-- (QWidget *)_widget;
-- (void)setFrameSize: (NSSize)r;
- at end
-
void QScrollView::resizeContents(int w, int h)
{
KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
//if ([nsview isKindOfClass: NSClassFromString(@"IFDynamicScrollBarsView")])
- if ([getView() isKindOfClass: NSClassFromString(@"NSScrollView")]){
+ if ([getView() isKindOfClass: [NSScrollView class]]){
NSScrollView *scrollView = (NSScrollView *)getView();
IFWebView *wview = [scrollView documentView];
@@ -217,7 +189,6 @@ void QScrollView::resizeContents(int w, int h)
}
}
-
void QScrollView::updateContents(int x, int y, int w, int h)
{
KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
@@ -241,7 +212,6 @@ QPoint QScrollView::contentsToViewport(const QPoint &p)
return QPoint(vx, vy);
}
-
void QScrollView::contentsToViewport(int x, int y, int& vx, int& vy)
{
NSView *view = getView();
@@ -256,7 +226,6 @@ void QScrollView::contentsToViewport(int x, int y, int& vx, int& vy)
vy = (int)np.y;
}
-
void QScrollView::viewportToContents(int vx, int vy, int& x, int& y)
{
NSView *view = getView();
@@ -271,44 +240,37 @@ void QScrollView::viewportToContents(int vx, int vy, int& x, int& y)
y = (int)np.y;
}
-
void QScrollView::viewportWheelEvent(QWheelEvent *)
{
_logNeverImplemented();
}
-
QWidget *QScrollView::clipper() const
{
_logNeverImplemented();
return (QWidget *)this;
}
-
void QScrollView::enableClipper(bool)
{
_logNeverImplemented();
}
-
void QScrollView::setStaticBackground(bool)
{
_logNeverImplemented();
}
-
void QScrollView::resizeEvent(QResizeEvent *)
{
_logNeverImplemented();
}
-
void QScrollView::ensureVisible(int,int)
{
_logNeverImplemented();
}
-
void QScrollView::ensureVisible(int,int,int,int)
{
_logNeverImplemented();
diff --git a/WebCore/kwq/KWQSize.h b/WebCore/kwq/KWQSize.h
index 31000ac..6d6ae53 100644
--- a/WebCore/kwq/KWQSize.h
+++ b/WebCore/kwq/KWQSize.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,74 +26,35 @@
#ifndef QSIZE_H_
#define QSIZE_H_
-#ifdef USING_BORROWED_QSIZE
-
-#include <_qsize.h>
-
-#else
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <iostream>
-
#include <KWQDef.h>
-// class QSize =================================================================
+#ifdef _KWQ_IOSTREAM_
+#include <iostream>
+#endif
class QSize {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QSize();
QSize(int,int);
- // QSize(const QSize &);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QSize() {}
-#endif
-
- // member functions --------------------------------------------------------
bool isValid() const;
- int width() const;
- int height() const;
- void setWidth(int);
- void setHeight(int);
+ int width() const { return w; }
+ int height() const { return h; }
+ void setWidth(int width) { w = width; }
+ void setHeight(int height) { h = height; }
QSize expandedTo(const QSize &) const;
- // operators ---------------------------------------------------------------
-
- /* Note: Trolltech seems to want operator= to be a bitwise copy
- * QSize &operator=(const QSize &);
- */
-
friend QSize operator+(const QSize &, const QSize &);
friend bool operator==(const QSize &, const QSize &);
friend bool operator!=(const QSize &, const QSize &);
-
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QSize &);
#endif
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
- QCOORD w;
- QCOORD h;
-
-}; // class QSize ==============================================================
-
-#endif
+private:
+ int w;
+ int h;
+};
#endif
diff --git a/WebCore/kwq/KWQSize.mm b/WebCore/kwq/KWQSize.mm
index fcd3b25..c460927 100644
--- a/WebCore/kwq/KWQSize.mm
+++ b/WebCore/kwq/KWQSize.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,8 +25,6 @@
#include <qsize.h>
-#ifndef USING_BORROWED_QSIZE
-
QSize::QSize() : w(-1), h(-1)
{
}
@@ -37,52 +35,32 @@ QSize::QSize(int width, int height) : w(width), h(height)
bool QSize::isValid() const
{
- return w >= 0 && h>= 0;
-}
-
-int QSize::width() const
-{
- return w;
-}
-
-int QSize::height() const
-{
- return h;
+ return w >= 0 && h >= 0;
}
-void QSize::setWidth(int width)
-{
- w = width;
-}
-void QSize::setHeight(int height)
-{
- h = height;
-}
QSize QSize::expandedTo(const QSize &o) const
{
- return QSize(w > o.w ? w : o.w, h > o.h ? h : o.h);
+ return QSize(w > o.w ? w : o.w, h > o.h ? h : o.h);
}
QSize operator+(const QSize &a, const QSize &b)
{
- return QSize(a.w + b.w, a.h + b.h);
+ return QSize(a.w + b.w, a.h + b.h);
}
bool operator==(const QSize &a, const QSize &b)
{
- return a.w == b.w && a.h == b.h;
+ return a.w == b.w && a.h == b.h;
}
bool operator!=(const QSize &a, const QSize &b)
{
- return a.w != b.w || a.h != b.h;
+ return a.w != b.w || a.h != b.h;
}
#ifdef _KWQ_IOSTREAM_
std::ostream &operator<<(std::ostream &o, const QSize &s)
{
- return o << "QSize: [w: " << s.width() << "; h: " << s.height() << "]";
+ return o << "QSize: [w: " << s.width() << "; h: " << s.height() << "]";
}
#endif
-
-#endif
diff --git a/WebCore/kwq/KWQStringList.h b/WebCore/kwq/KWQStringList.h
index f6f0c6c..f0901a8 100644
--- a/WebCore/kwq/KWQStringList.h
+++ b/WebCore/kwq/KWQStringList.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,55 +26,15 @@
#ifndef QSTRINGLIST_H_
#define QSTRINGLIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTRINGLIST ==================================================
-
-#ifdef USING_BORROWED_QSTRINGLIST
-#include <_qstringlist.h>
-#else
-
-#include "qstring.h"
-#include "qvaluelist.h"
-
-// class QStringList ===========================================================
+#include <qstring.h>
+#include <qvaluelist.h>
class QStringList : public QValueList<QString> {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static QStringList split(const QString &, const QString &,
- bool allowEmptyEntries = FALSE );
- static QStringList split(const QChar &, const QString &,
- bool allowEmptyEntries = FALSE );
-
- // constructors, copy constructors, and destructors ------------------------
-
- QStringList();
- QStringList(const QStringList &);
-
- ~QStringList();
-
- // member functions --------------------------------------------------------
+ static QStringList split(const QString &, const QString &, bool allowEmptyEntries = false);
+ static QStringList split(const QChar &, const QString &, bool allowEmptyEntries = false);
QString join(const QString &) const;
-
- // operators ---------------------------------------------------------------
-
- QStringList &operator=(const QStringList &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QStringList ========================================================
-
-#endif // USING_BORROWED_QSTRINGLIST
+};
#endif
diff --git a/WebCore/kwq/KWQStringList.mm b/WebCore/kwq/KWQStringList.mm
index 3147deb..2d0115c 100644
--- a/WebCore/kwq/KWQStringList.mm
+++ b/WebCore/kwq/KWQStringList.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,17 +22,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qstringlist.h>
-#ifndef USING_BORROWED_QSTRINGLIST
-
#include <CoreFoundation/CoreFoundation.h>
-#include <iostream>
// No need to CFRelease return value
-static CFStringRef QStringToCFString(QString s)
+static CFStringRef GetCFString(const QString &s)
{
CFStringRef cfs = s.getCFMutableString();
if (cfs == NULL) {
@@ -42,12 +38,12 @@ static CFStringRef QStringToCFString(QString s)
}
QStringList QStringList::split(const QString &separator, const QString &s,
- bool allowEmptyEntries = FALSE )
+ bool allowEmptyEntries = FALSE )
{
CFArrayRef cfresult;
QStringList result;
- cfresult = CFStringCreateArrayBySeparatingStrings(NULL, QStringToCFString(s), QStringToCFString(separator));
+ cfresult = CFStringCreateArrayBySeparatingStrings(NULL, GetCFString(s), GetCFString(separator));
CFIndex cfResultSize = CFArrayGetCount(cfresult);
@@ -69,20 +65,6 @@ QStringList QStringList::split(const QChar &separator, const QString &s,
return QStringList::split(QString(separator), s, allowEmptyEntries);
}
-
-QStringList::QStringList()
-{
-}
-
-QStringList::QStringList(const QStringList &l) : QValueList<QString>(l)
-{
-
-}
-
-QStringList::~QStringList()
-{
-}
-
QString QStringList::join(const QString &separator) const
{
QString result;
@@ -96,11 +78,3 @@ QString QStringList::join(const QString &separator) const
return result;
}
-
-QStringList &QStringList::operator=(const QStringList &l)
-{
- (*this).QValueList<QString>::operator=(l);
- return *this;
-}
-
-#endif
diff --git a/WebCore/kwq/KWQTextEdit.h b/WebCore/kwq/KWQTextEdit.h
index 1501f3f..04ebc8a 100644
--- a/WebCore/kwq/KWQTextEdit.h
+++ b/WebCore/kwq/KWQTextEdit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,8 @@ class QTextEdit : public QScrollView
void selectAll();
-#ifdef APPLE_CHANGES
int verticalScrollBarWidth() const;
int horizontalScrollBarHeight() const;
-#endif
};
#endif /* QTEXTEDIT_H_ */
diff --git a/WebCore/kwq/KWQValueList.h b/WebCore/kwq/KWQValueList.h
index 17c53ae..c38c130 100644
--- a/WebCore/kwq/KWQValueList.h
+++ b/WebCore/kwq/KWQValueList.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,102 +26,71 @@
#ifndef QVALUELIST_H_
#define QVALUELIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QVALUELIST ===================================================
-
-#ifdef USING_BORROWED_QVALUELIST
-#include <_qvaluelist.h>
-#else
-
#include <KWQDef.h>
#include <KWQValueListImpl.h>
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
template <class T> class QValueList;
template <class T> class QValueListConstIterator;
template<class T> class QValueListNode : private KWQValueListNodeImpl {
public:
- QValueListNode(const T &val) : KWQValueListNodeImpl(), value(val) {}
- ~QValueListNode() {}
-
+ QValueListNode(const T &val) : value(val) { }
T value;
friend class QValueList<T>;
};
-
-// class QValueListIterator ====================================================
template<class T> class QValueListIterator {
public:
- QValueListIterator() : impl() {}
- QValueListIterator(const QValueListIterator<T> &other) : impl(other.impl) {}
-
- ~QValueListIterator() {}
-
- QValueListIterator &operator=(const QValueListIterator &other) { impl = other.impl; return *this; }
+ QValueListIterator() { }
- bool operator==(const QValueListIterator<T> &other) { return impl == other.impl; }
- bool operator!=(const QValueListIterator<T> &other) { return impl != other.impl; }
+ bool operator==(const QValueListIterator &other) { return impl == other.impl; }
+ bool operator!=(const QValueListIterator &other) { return impl != other.impl; }
const T& operator*() const { return ((const QValueListNode<T> *)impl.node())->value; }
QValueListIterator operator++() { ++impl; return *this; }
T& operator*() { return ((QValueListNode<T> *)impl.node())->value; }
- QValueListIterator<T>& operator--() { --impl; return *this; }
- QValueListIterator operator++(int) { return QValueListIterator<T>(impl++); }
+ QValueListIterator& operator--() { --impl; return *this; }
+ QValueListIterator operator++(int) { return impl++; }
private:
- QValueListIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) {}
+ QValueListIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) { }
KWQValueListIteratorImpl impl;
friend class QValueList<T>;
friend class QValueListConstIterator<T>;
-}; // class QValueListIterator =================================================
-
+};
-// class QValueListConstIterator ===============================================
template<class T> class QValueListConstIterator {
public:
- QValueListConstIterator() : impl() {}
- QValueListConstIterator(const QValueListConstIterator<T> &other) : impl(other.impl) {}
- QValueListConstIterator(const QValueListIterator<T> &other) : impl(other.impl) {}
-
- ~QValueListConstIterator() {}
-
- QValueListConstIterator &operator=(const QValueListConstIterator &other) { impl = other.impl; return *this; }
- bool operator==(const QValueListConstIterator<T> &other) { return impl == other.impl; }
- bool operator!=(const QValueListConstIterator<T> &other) { return impl != other.impl; }
+ QValueListConstIterator() { }
+ QValueListConstIterator(const QValueListIterator<T> &other) : impl(other.impl) { }
+
+ bool operator==(const QValueListConstIterator &other) { return impl == other.impl; }
+ bool operator!=(const QValueListConstIterator &other) { return impl != other.impl; }
const T& operator*() const { return ((const QValueListNode<T> *)impl.node())->value; }
QValueListConstIterator operator++() { ++impl; return *this; }
- QValueListConstIterator operator++(int) { return QValueListConstIterator<T>(impl++); }
+ QValueListConstIterator operator++(int) { return impl++; }
private:
- QValueListConstIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) {}
+ QValueListConstIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) { }
KWQValueListIteratorImpl impl;
friend class QValueList<T>;
-}; // class QValueListConstIterator ============================================
-
+};
-// class QValueList ============================================================
template <class T> class QValueList {
public:
-
typedef QValueListIterator<T> Iterator;
typedef QValueListConstIterator<T> ConstIterator;
- // constructors, copy constructors, and destructors ------------------------
-
- QValueList() : impl(deleteNode, copyNode) {}
- QValueList(const QValueList<T>&other) : impl(other.impl) {}
-
- ~QValueList() {}
+ QValueList() : impl(deleteNode, copyNode) { }
// member functions --------------------------------------------------------
@@ -134,35 +103,34 @@ public:
void remove(const T &val) { QValueListNode<T> node(val); impl.removeEqualNodes(&node, nodesEqual); }
uint contains(const T &val) const { QValueListNode<T> node(val); return impl.containsEqualNodes(&node, nodesEqual); }
- Iterator remove(Iterator iter) { return QValueListIterator<T>(impl.removeIterator(iter.impl)); }
- Iterator fromLast() { return QValueListIterator<T>(impl.fromLast()); }
+ Iterator remove(Iterator iter) { return impl.removeIterator(iter.impl); }
+ Iterator fromLast() { return impl.fromLast(); }
const T& first() const { return ((QValueListNode<T> *)impl.firstNode())->value; }
const T& last() const { return ((QValueListNode<T> *)impl.lastNode())->value; }
- Iterator begin() { return QValueListIterator<T>(impl.begin()); }
- Iterator end() { return QValueListIterator<T>(impl.end()); }
+ Iterator begin() { return impl.begin(); }
+ Iterator end() { return impl.end(); }
- ConstIterator begin() const { return QValueListConstIterator<T>(impl.begin()); }
- ConstIterator end() const { return QValueListConstIterator<T>(impl.end()); }
+ ConstIterator begin() const { return impl.begin(); }
+ ConstIterator end() const { return impl.end(); }
- // operators ---------------------------------------------------------------
-
- QValueList<T>& operator=(const QValueList<T>&other) { impl = other.impl; return *this; }
T& operator[] (uint index) { return ((QValueListNode<T> *)impl.nodeAt(index))->value; }
const T& operator[] (uint index) const { return ((const QValueListNode<T> *)impl.nodeAt(index))->value; }
QValueList<T> &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
-
QValueList<T> &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
private:
KWQValueListImpl impl;
static void deleteNode(KWQValueListNodeImpl *node) { delete (QValueListNode<T> *)node; }
- static bool nodesEqual(const KWQValueListNodeImpl *a, const KWQValueListNodeImpl *b) { return ((QValueListNode<T> *)a)->value == ((QValueListNode<T> *)b)->value; }
- static KWQValueListNodeImpl *copyNode(KWQValueListNodeImpl *node) { return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
-}; // class QValueList =========================================================
+ static bool nodesEqual(const KWQValueListNodeImpl *a, const KWQValueListNodeImpl *b)
+ { return ((QValueListNode<T> *)a)->value == ((QValueListNode<T> *)b)->value; }
+ static KWQValueListNodeImpl *copyNode(KWQValueListNodeImpl *node)
+ { return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
+};
+#ifdef _KWQ_IOSTREAM_
template<class T>
inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
@@ -182,7 +150,6 @@ inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
return o;
}
-
-#endif // USING_BORROWED_QVALUELIST
+#endif
#endif
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index a55e702..ed5130f 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,38 +26,28 @@
#ifndef QWIDGET_H_
#define QWIDGET_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-#include "qpaintdevice.h"
-#include "qpainter.h"
-#include "qpoint.h"
-#include "qsize.h"
-#include "qpalette.h"
-#include "qfont.h"
-#include "qcursor.h"
-#include "qevent.h"
+#include <qobject.h>
+#include <qpaintdevice.h>
+#include <qpainter.h>
+#include <qpoint.h>
+#include <qsize.h>
+#include <qpalette.h>
+#include <qfont.h>
+#include <qcursor.h>
+#include <qevent.h>
#include <KWQStyle.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSView;
+#else
+class NSView;
#endif
class QWidgetPrivate;
-// class QWidget ===============================================================
-
-// FIX ME! RJW - need to check if inheritance from QPaintDevice is really necessary.
-
class QWidget : public QObject, public QPaintDevice {
public:
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
enum WidgetFlags {
WResizeNoErase = 1,
WRepaintNoErase = 1 << 1,
@@ -72,17 +62,9 @@ public:
WheelFocus = 0x7
};
- enum BackgroundMode { NoBackground, };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QWidget(QWidget *parent=0, const char *name=0, WFlags f=0);
+ QWidget(QWidget *parent = 0, const char *name = 0, int f = 0);
~QWidget();
- // member functions --------------------------------------------------------
-
virtual QSize sizeHint() const;
virtual void resize(int,int);
virtual void setActiveWindow();
@@ -144,54 +126,24 @@ public:
virtual void keyReleaseEvent(QKeyEvent *);
virtual void focusOutEvent(QFocusEvent *);
- virtual void setBackgroundMode(BackgroundMode);
-
- virtual void setAcceptDrops(bool);
-
- void erase();
+ enum BackgroundMode { NoBackground };
+ void setBackgroundMode(BackgroundMode) { }
- QWidget *focusWidget() const;
-
- // Required for KWQ
-#ifdef _KWQ_
-
- virtual void paint (void *);
-
- bool _lockFocus();
- void _unlockFocus();
- void _displayRect(QRect rect);
- void _flushWindow();
-
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSView *getView() const;
- void setView(NSView *aView);
- void endEditing();
-#else
- void *getView() const;
- void setView(void *aView);
- void endEditing();
-#endif
-
-#endif _KWQ_
+ void setAcceptDrops(bool) { }
- // operators ---------------------------------------------------------------
+ virtual void paint(void *);
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ void _displayRect(QRect rect);
+
+ NSView *getView() const;
+ void setView(NSView *aView);
+
+ void endEditing();
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QWidget(const QWidget &);
- QWidget &operator=(const QWidget &);
-
- void setCRect( const QRect &r );
void internalSetGeometry( int x, int y, int w, int h );
- void _initialize();
-
QWidgetPrivate *data;
-
-}; // class QWidget ============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index fe5a461..ea15b68 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -52,31 +52,24 @@
class QWidgetPrivate
{
-friend class QWidget;
public:
-
- QWidgetPrivate() { }
-
- ~QWidgetPrivate() {}
-
-private:
QWidget::FocusPolicy focusPolicy;
- QStyle *style;
- QFont font;
- QCursor cursor;
- QPalette pal;
- NSView *view;
+ QStyle *style;
+ QFont font;
+ QCursor cursor;
+ QPalette pal;
+ NSView *view;
int lockCount;
};
-QWidget::QWidget(QWidget *parent=0, const char *name=0, WFlags f=0)
+QWidget::QWidget(QWidget *parent, const char *name, int f)
{
- static QStyle *defaultStyle = new QStyle;
+ static QStyle defaultStyle;
data = new QWidgetPrivate;
data->lockCount = 0;
- data->view = [[KWQView alloc] initWithFrame: NSMakeRect (0,0,0,0) widget: this];
- data->style = defaultStyle;
+ data->view = [[KWQView alloc] initWithFrame:NSMakeRect(0,0,0,0) widget:this];
+ data->style = &defaultStyle;
}
QWidget::~QWidget()
@@ -85,7 +78,6 @@ QWidget::~QWidget()
delete data;
}
-
QSize QWidget::sizeHint() const
{
// May be overriden by subclasses.
@@ -95,7 +87,7 @@ QSize QWidget::sizeHint() const
void QWidget::resize(int w, int h)
{
KWQDEBUG ("%p %s to w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
- internalSetGeometry( pos().x(), pos().y(), w, h );
+ internalSetGeometry(pos().x(), pos().y(), w, h);
}
void QWidget::setActiveWindow()
@@ -103,108 +95,77 @@ void QWidget::setActiveWindow()
_logNeverImplemented();
}
-
void QWidget::setEnabled(bool)
{
- _logNeverImplemented();
}
-
void QWidget::setAutoMask(bool)
{
- _logNeverImplemented();
}
-
void QWidget::setMouseTracking(bool)
{
-// _logNeverImplemented();
}
-
int QWidget::winId() const
{
-/*
- Does this winId need to be valid across sessions? It appears to
- be used by HTMLDocument::setCookie( const DOMString & value ). If
- so we have to rethink the current approach.
-
- Just return the hash of the NSView.
-*/
- return (int)[data->view hash];
+ return (int)this;
}
-
int QWidget::x() const
{
- NSRect vFrame = [getView() frame];
- return (int)vFrame.origin.x;
+ return (int)[getView() frame].origin.x;
}
-
int QWidget::y() const
{
- NSRect vFrame = [getView() frame];
- return (int)vFrame.origin.y;
+ return (int)[getView() frame].origin.y;
}
-
int QWidget::width() const
{
- NSRect vFrame = [getView() frame];
- return (int)vFrame.size.width;
+ return (int)[getView() frame].size.width;
}
-
int QWidget::height() const
{
- NSRect vFrame = [getView() frame];
- return (int)vFrame.size.height;
+ return (int)[getView() frame].size.height;
}
-
QSize QWidget::size() const
{
NSRect vFrame = [getView() frame];
- return QSize ((int)vFrame.size.width, (int)vFrame.size.height);
+ return QSize((int)vFrame.size.width, (int)vFrame.size.height);
}
-
void QWidget::resize(const QSize &s)
{
- resize( s.width(), s.height());
+ resize(s.width(), s.height());
}
-
QPoint QWidget::pos() const
{
NSRect vFrame = [getView() frame];
- return QPoint ((int)vFrame.origin.x, (int)vFrame.origin.y);
+ return QPoint((int)vFrame.origin.x, (int)vFrame.origin.y);
}
-
void QWidget::move(int x, int y)
{
KWQDEBUG ("%p %s to x %d y %d\n", getView(), [[[getView() class] className] cString], x, y);
- internalSetGeometry( x,
- y,
- width(), height() );
+ internalSetGeometry(x, y, width(), height());
}
-
void QWidget::move(const QPoint &p)
{
- move( p.x(), p.y() );
+ move(p.x(), p.y());
}
-
QRect QWidget::frameGeometry() const
{
NSRect vFrame = [getView() frame];
return QRect((int)vFrame.origin.x, (int)vFrame.origin.y, (int)vFrame.size.width, (int)vFrame.size.height);
}
-
QWidget *QWidget::topLevelWidget() const
{
// This is only used by JavaScript to implement the various
@@ -212,61 +173,52 @@ QWidget *QWidget::topLevelWidget() const
// window.moveTo(), window.moveBy(), window.resizeBy(), window.resizeTo(),
// outerWidth, outerHeight.
- // This should return a subclass of QWidget that fronts for an
- // NSWindow.
+ // This should return a subclass of QWidget that fronts for an NSWindow.
return (QWidget *)this;
}
-
QPoint QWidget::mapToGlobal(const QPoint &p) const
{
// This is only used by JavaScript to implement the getting
// the screenX and screen Y coordinates.
NSPoint sp;
- sp = [[data->view window] convertBaseToScreen: [data->view convertPoint: NSMakePoint((float)p.x(), (float)p.y()) toView: nil]];
+ sp = [[data->view window] convertBaseToScreen: [data->view convertPoint: NSMakePoint(p.x(), p.y()) toView: nil]];
return QPoint((int)sp.x, (int)sp.y);
}
-
void QWidget::setFocus()
{
_logNeverImplemented();
}
-
void QWidget::clearFocus()
{
_logNeverImplemented();
}
-
QWidget::FocusPolicy QWidget::focusPolicy() const
{
return data->focusPolicy;
}
-
void QWidget::setFocusPolicy(FocusPolicy fp)
{
data->focusPolicy = fp;
}
-
-void QWidget::setFocusProxy( QWidget *w)
+void QWidget::setFocusProxy(QWidget *w)
{
- if (w != 0)
+ if (w)
data->focusPolicy = w->focusPolicy();
// else? FIXME: [rjw] we need to understand kde's focus policy. I don't
// think this is even relevant for us.
}
-
const QPalette& QWidget::palette() const
{
return data->pal;
}
-
void QWidget::setPalette(const QPalette &palette)
{
data->pal = palette;
@@ -276,16 +228,13 @@ void QWidget::unsetPalette()
{
// Only called by RenderFormElement::layout, which I suspect will
// have to be rewritten. Do nothing.
- _logNeverImplemented();
}
-
QStyle &QWidget::style() const
{
return *data->style;
}
-
void QWidget::setStyle(QStyle *style)
{
// According to the Qt implementation
@@ -296,25 +245,20 @@ void QWidget::setStyle(QStyle *style)
data->style = style;
}
-
QFont QWidget::font() const
{
return data->font;
}
-
void QWidget::setFont(const QFont &font)
{
data->font = font;
}
-
void QWidget::constPolish() const
{
- _logNeverImplemented();
}
-
QSize QWidget::minimumSizeHint() const
{
NSView *view = getView();
@@ -329,20 +273,18 @@ QSize QWidget::minimumSizeHint() const
return QSize(0,0);
}
-
bool QWidget::isVisible() const
{
return [[data->view window] isVisible];
}
-
void QWidget::setCursor(const QCursor &cur)
{
data->cursor = cur;
id view = data->view;
if ([view respondsToSelector:@selector(setCursor:)]) {
- [view setCursor:(NSCursor *)data->cursor.handle()];
+ [view setCursor:data->cursor.handle()];
}
}
@@ -358,127 +300,66 @@ void QWidget::unsetCursor()
bool QWidget::event(QEvent *)
{
- // This will eventually not be called, or called from our implementation
- // of run loop, or something???
- _logNeverImplemented();
- return TRUE;
+ return false;
}
-
bool QWidget::focusNextPrevChild(bool)
{
_logNeverImplemented();
return TRUE;
}
-
bool QWidget::hasMouseTracking() const
{
-// _logNeverImplemented();
return true;
}
-
void QWidget::show()
{
- _logNeverImplemented();
}
-
void QWidget::hide()
{
- _logNeverImplemented();
}
-
-// no copying or assignment
-// note that these are "standard" (no pendantic stuff needed)
-
-
-
-void QWidget::internalSetGeometry( int x, int y, int w, int h )
+void QWidget::internalSetGeometry(int x, int y, int w, int h)
{
- NSView *docview;
-
- //if ([nsview isKindOfClass: NSClassFromString(@"IFDynamicScrollBarsView")])
- //if ([data->view isKindOfClass: NSClassFromString(@"NSScrollView")])
- // docview = [((NSScrollView *)data->view) documentView];
- //else
- docview = data->view;
- [docview setFrame: NSMakeRect (x, y, w, h)];
+ [data->view setFrame:NSMakeRect(x, y, w, h)];
}
-
void QWidget::showEvent(QShowEvent *)
{
- _logNeverImplemented();
}
-
void QWidget::hideEvent(QHideEvent *)
{
- _logNeverImplemented();
}
-
void QWidget::wheelEvent(QWheelEvent *)
{
- _logNeverImplemented();
}
-
void QWidget::keyPressEvent(QKeyEvent *)
{
- _logNeverImplemented();
}
-
void QWidget::keyReleaseEvent(QKeyEvent *)
{
- _logNeverImplemented();
}
-
void QWidget::focusOutEvent(QFocusEvent *)
{
- _logNeverImplemented();
-}
-
-
-void QWidget::setBackgroundMode(BackgroundMode)
-{
- _logNeverImplemented();
}
-
-void QWidget::setAcceptDrops(bool)
+QPoint QWidget::mapFromGlobal(const QPoint &p) const
{
- _logNeverImplemented();
+ NSPoint bp;
+ bp = [[data->view window] convertScreenToBase: [data->view convertPoint: NSMakePoint(p.x(), p.y()) toView: nil]];
+ return QPoint((int)bp.x, (int)bp.y);
}
-
-void QWidget::erase()
+void QWidget::paint(void *)
{
- _logNeverImplemented();
-}
-
-
-QWidget *QWidget::focusWidget() const
-{
- _logNeverImplemented();
- return 0;
-}
-
-
-QPoint QWidget::mapFromGlobal(const QPoint &point) const
-{
- _logNeverImplemented();
- return QPoint(0,0);
-}
-
-void QWidget::paint (void *)
-{
- _logNotYetImplemented();
}
NSView *QWidget::getView() const
@@ -486,12 +367,11 @@ NSView *QWidget::getView() const
return data->view;
}
-
void QWidget::setView(NSView *view)
{
- if (data->view)
- [data->view release];
- data->view = [view retain];
+ [view retain];
+ [data->view release];
+ data->view = view;
}
void QWidget::endEditing()
@@ -503,40 +383,13 @@ void QWidget::endEditing()
[window endEditingFor: nil];
// The previous case is probably not necessary, given that we whack
- // any NSText first repsonders.
+ // any NSText first responders.
firstResponder = [window firstResponder];
- if ([firstResponder isKindOfClass: NSClassFromString(@"NSText")])
+ if ([firstResponder isKindOfClass: [NSText class]])
[window makeFirstResponder: nil];
}
-
-bool QWidget::_lockFocus()
-{
- if ([getView() canDraw]){
- [getView() lockFocus];
- data->lockCount++;
- return 1;
- }
- return 0;
-}
-
-void QWidget::_unlockFocus()
-{
- if (data->lockCount){
- [getView() unlockFocus];
- data->lockCount--;
- }
-}
-
-
-void QWidget::_flushWindow()
-{
- [[getView() window] flushWindow];
-}
-
-
-void QWidget::_displayRect (QRect rect)
+void QWidget::_displayRect(QRect rect)
{
[getView() displayRect: NSMakeRect (rect.x(), rect.y(), rect.width(), rect.height())];
}
-
diff --git a/WebCore/kwq/KWQXml.h b/WebCore/kwq/KWQXml.h
index cedc14c..51f2d92 100644
--- a/WebCore/kwq/KWQXml.h
+++ b/WebCore/kwq/KWQXml.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,451 +26,52 @@
#ifndef QXML_H_
#define QXML_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QString;
-// class QXmlAttributes ========================================================
-
class QXmlAttributes {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlAttributes();
- QXmlAttributes(const QXmlAttributes &);
- virtual ~QXmlAttributes();
-
- // member functions --------------------------------------------------------
-
QString value(const QString &) const;
int length() const;
QString localName(int index) const;
QString value(int index) const;
QString uri(int index) const;
-
- // operators ---------------------------------------------------------------
-
- QXmlAttributes &operator=(const QXmlAttributes &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QXmlAttributes =====================================================
-
-
-// class QXmlInputSource ========================================================
+};
class QXmlInputSource {
public:
+ void setData(const QString &);
+};
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlInputSource();
- virtual ~QXmlInputSource();
-
- // member functions --------------------------------------------------------
-
- virtual void setData(const QString& data);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlInputSource(const QXmlInputSource &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlInputSource &operator=(const QXmlInputSource &);
-#endif
-
-}; // class QXmlInputSource ====================================================
-
-
-// class QXmlDTDHandler ========================================================
-
-class QXmlDTDHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlDTDHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler(const QXmlDTDHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler &operator=(const QXmlDTDHandler &);
-#endif
-
-}; // class QXmlDTDHandler =====================================================
-
-
-// class QXmlDeclHandler ========================================================
-
-class QXmlDeclHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlDeclHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler(const QXmlDeclHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler &operator=(const QXmlDeclHandler &);
-#endif
-
-}; // class QXmlDeclHandler =====================================================
-
-
-// class QXmlErrorHandler ========================================================
-
-class QXmlErrorHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlErrorHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler(const QXmlErrorHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler &operator=(const QXmlErrorHandler &);
-#endif
-
-}; // class QXmlErrorHandler =====================================================
-
-
-// class QXmlLexicalHandler ========================================================
-
-class QXmlLexicalHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlLexicalHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler(const QXmlLexicalHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler &operator=(const QXmlLexicalHandler &);
-#endif
-
-}; // class QXmlLexicalHandler =====================================================
-
-
-// class QXmlContentHandler ========================================================
-
-class QXmlContentHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlContentHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler(const QXmlContentHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler &operator=(const QXmlContentHandler &);
-#endif
-
-}; // class QXmlContentHandler =====================================================
-
-
-// class QXmlDefaultHandler ====================================================
+class QXmlDTDHandler { };
+class QXmlDeclHandler { };
+class QXmlErrorHandler { };
+class QXmlLexicalHandler { };
+class QXmlContentHandler { };
class QXmlDefaultHandler :
public QXmlContentHandler,
public QXmlLexicalHandler,
public QXmlErrorHandler,
public QXmlDeclHandler,
- public QXmlDTDHandler {
-
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlDefaultHandler() {}
- virtual ~QXmlDefaultHandler();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDefaultHandler(const QXmlDefaultHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDefaultHandler &operator=(const QXmlDefaultHandler &);
-#endif
-
-}; // class QXmlDefaultHandler =====================================================
-
-
-// class QXmlSimpleReader ======================================================
+ public QXmlDTDHandler
+{
+};
class QXmlSimpleReader {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlSimpleReader();
- virtual ~QXmlSimpleReader();
-
- // member functions --------------------------------------------------------
-
void setContentHandler(QXmlContentHandler *handler);
bool parse(const QXmlInputSource &input);
void setLexicalHandler(QXmlLexicalHandler *handler);
void setDTDHandler(QXmlDTDHandler *handler);
void setDeclHandler(QXmlDeclHandler *handler);
void setErrorHandler(QXmlErrorHandler *handler);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlSimpleReader(const QXmlSimpleReader &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlSimpleReader &operator=(const QXmlSimpleReader &);
-#endif
-
-}; // class QXmlSimpleReader ===================================================
-
-
-// class QXmlParseException ====================================================
+};
class QXmlParseException {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlParseException();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlParseException() {}
-#endif
-
- // member functions --------------------------------------------------------
-
QString message() const;
int columnNumber() const;
int lineNumber() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlParseException(const QXmlParseException &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlParseException &operator=(const QXmlParseException &);
-#endif
-
-}; // class QXmlParseException =================================================
+};
#endif
diff --git a/WebCore/kwq/KWQXml.mm b/WebCore/kwq/KWQXml.mm
index 9b18e6a..a539e68 100644
--- a/WebCore/kwq/KWQXml.mm
+++ b/WebCore/kwq/KWQXml.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,31 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-
-#include <qstring.h>
-
#include <qxml.h>
-// class QXmlAttributes ========================================================
-
-QXmlAttributes::QXmlAttributes()
-{
- _logNotYetImplemented();
-}
-
-
-QXmlAttributes::QXmlAttributes(const QXmlAttributes &)
-{
- _logNotYetImplemented();
-}
-
-
-QXmlAttributes::~QXmlAttributes()
-{
- _logNotYetImplemented();
-}
+#include <kwqdebug.h>
+#include <qstring.h>
QString QXmlAttributes::value(const QString &) const
{
@@ -55,28 +35,24 @@ QString QXmlAttributes::value(const QString &) const
return QString();
}
-
int QXmlAttributes::length() const
{
_logNotYetImplemented();
return 0;
}
-
QString QXmlAttributes::localName(int index) const
{
_logNotYetImplemented();
return QString();
}
-
QString QXmlAttributes::value(int index) const
{
_logNotYetImplemented();
return QString();
}
-
QString QXmlAttributes::uri(int) const
{
_logNotYetImplemented();
@@ -85,138 +61,57 @@ QString QXmlAttributes::uri(int) const
-QXmlAttributes &QXmlAttributes::operator=(const QXmlAttributes &)
-{
- _logNotYetImplemented();
- return *this;
-}
-
-
-
-
-// class QXmlInputSource ========================================================
-
-
-QXmlInputSource::QXmlInputSource()
-{
- _logNotYetImplemented();
-}
-
-
-QXmlInputSource::~QXmlInputSource()
-{
- _logNotYetImplemented();
-}
-
-
void QXmlInputSource::setData(const QString& data)
{
_logNotYetImplemented();
}
-
-
-
-// class QXmlDTDHandler ========================================================
-
-
-// class QXmlDeclHandler ========================================================
-
-
-// class QXmlErrorHandler ========================================================
-
-
-// class QXmlLexicalHandler ========================================================
-
-
-// class QXmlContentHandler ========================================================
-
-
-// class QXmlDefaultHandler ====================================================
-
-
-QXmlDefaultHandler::~QXmlDefaultHandler()
-{
- _logNotYetImplemented();
-}
-
-
-// class QXmlSimpleReader ======================================================
-
-QXmlSimpleReader::QXmlSimpleReader()
-{
- _logNotYetImplemented();
-}
-
-
-QXmlSimpleReader::~QXmlSimpleReader()
-{
- _logNotYetImplemented();
-}
-
-
void QXmlSimpleReader::setContentHandler(QXmlContentHandler *handler)
{
_logNotYetImplemented();
}
-
bool QXmlSimpleReader::parse(const QXmlInputSource &input)
{
_logNotYetImplemented();
return FALSE;
}
-
void QXmlSimpleReader::setLexicalHandler(QXmlLexicalHandler *handler)
{
_logNotYetImplemented();
}
-
void QXmlSimpleReader::setDTDHandler(QXmlDTDHandler *handler)
{
_logNotYetImplemented();
}
-
void QXmlSimpleReader::setDeclHandler(QXmlDeclHandler *handler)
{
_logNotYetImplemented();
}
-
void QXmlSimpleReader::setErrorHandler(QXmlErrorHandler *handler)
{
_logNotYetImplemented();
}
-// class QXmlParseException ====================================================
-
-QXmlParseException::QXmlParseException()
-{
- _logNotYetImplemented();
-}
-
-
QString QXmlParseException::message() const
{
_logNotYetImplemented();
return QString();
}
-
int QXmlParseException::columnNumber() const
{
_logNotYetImplemented();
return 0;
}
-
int QXmlParseException::lineNumber() const
{
_logNotYetImplemented();
return 0;
}
-
diff --git a/WebCore/kwq/KWQbrowserinterface.mm b/WebCore/kwq/KWQbrowserinterface.mm
index 519cc44..de5d2cb 100644
--- a/WebCore/kwq/KWQbrowserinterface.mm
+++ b/WebCore/kwq/KWQbrowserinterface.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,23 +22,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <browserinterface.h>
-namespace KParts {
-
-// class BrowserInterface ======================================================
-
-BrowserInterface::BrowserInterface(QObject *parent, const char *name)
-{
- _logNotYetImplemented();
-}
+#include <kwqdebug.h>
-BrowserInterface::~BrowserInterface()
-{
- _logNotYetImplemented();
-}
+namespace KParts {
void BrowserInterface::callMethod(const char *name, const QVariant &argument)
{
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index fe84511..98f0159 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -40,11 +40,9 @@ libkwq_o_SOURCES = \
KWQKApplication.mm \
KWQKCharsets.mm \
KWQKComboBox.mm \
- KWQKCompletionBox.mm \
KWQKConfigBase.mm \
KWQKCursor.mm \
KWQKDebug.mm \
- KWQKFactory.mm \
KWQKFileDialog.mm \
KWQKFileItem.mm \
KWQKGlobal.mm \
@@ -56,11 +54,9 @@ libkwq_o_SOURCES = \
KWQKHTMLView.mm \
KWQKHistoryProvider.mm \
KWQKIconLoader.mm \
- KWQKImageIO.mm \
KWQKJavaAppletWidget.mm \
KWQKJob.mm \
KWQKLineEdit.mm \
- KWQKListBox.mm \
KWQKLocale.mm \
KWQKMessageBox.mm \
KWQKMimeType.mm \
diff --git a/WebCore/kwq/WCWebDataSource.h b/WebCore/kwq/WCWebDataSource.h
index 0f4e91f..da932a5 100644
--- a/WebCore/kwq/WCWebDataSource.h
+++ b/WebCore/kwq/WCWebDataSource.h
@@ -23,16 +23,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __WCWEBDATASOURCE__
-#define __WCWEBDATASOURCE__
+#ifndef WCWEBDATASOURCE_H_
+#define WCWEBDATASOURCE_H_
#import <Foundation/Foundation.h>
+typedef id (*WCIFWebDataSourceMakeFunc)(void *, void *, unsigned);
-typedef id (*WCIFWebDataSourceMakeFunc)(void *, void*, unsigned);
-void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc func);
-
-extern WCIFWebDataSourceMakeFunc WCIFWebDataSourceMake;
-
+void WCSetIFWebDataSourceMakeFunc(WCIFWebDataSourceMakeFunc);
#endif /* __WCWEBDATASOURCE__ */
diff --git a/WebCore/kwq/external.h b/WebCore/kwq/external.h
index cbca4eb..a9d85c4 100644
--- a/WebCore/kwq/external.h
+++ b/WebCore/kwq/external.h
@@ -23,11 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __EXTERNAL_H
-#define __EXTERNAL_H_
+#ifndef EXTERNAL_H
+#define EXTERNAL_H_
#import <WebFoundation/WebFoundation.h>
-#include <misc/loader.h>
+#import <misc/loader.h>
class KHTMLPart;
class QWidget;
@@ -82,11 +82,10 @@ namespace khtml {
- (BOOL)_isStopping;
@end
-// This should not be allowed here. data source should not reference view
-// API.
@interface IFWebView: NSObject
- (QWidget *)_widget;
- (QWidget *)_provisionalWidget;
+- (void)setFrameSize: (NSSize)r;
@end
@interface IFWebFrame: NSObject
@@ -141,9 +140,4 @@ typedef enum {
-(int)contentLength;
@end
- at interface IFAnimatedImage : NSImage
-- (void)beginAnimationInView: (NSView *)inRect: (NSPoint)ir fromRect: (NSRect)fr;
-- (void)stopAnimation;
- at end
-
#endif
diff --git a/WebCore/kwq/kdecore/kdebug.h b/WebCore/kwq/kdecore/kdebug.h
index 4239407..7fb5bf9 100644
--- a/WebCore/kwq/kdecore/kdebug.h
+++ b/WebCore/kwq/kdecore/kdebug.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef KDEBUG_H_
#define KDEBUG_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <qtextstream.h>
@@ -37,54 +33,17 @@ class kdbgstream;
typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
-// class kdbgstream ============================================================
-
class kdbgstream {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
kdbgstream(unsigned int area, unsigned int level, bool print=true);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~kdbgstream() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
- kdbgstream &operator<<(int);
- kdbgstream &operator<<(const char *);
- kdbgstream &operator<<(const void *);
- kdbgstream &operator<<(const QString &);
- kdbgstream &operator<<(const QCString &);
- kdbgstream &operator<<(KDBGFUNC);
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- kdbgstream(const kdbgstream &);
-#endif
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- kdbgstream &operator=(const kdbgstream &);
-#endif
-
-}; // class kdbgstream =========================================================
+ kdbgstream &operator<<(int);
+ kdbgstream &operator<<(const char *);
+ kdbgstream &operator<<(const void *);
+ kdbgstream &operator<<(const QString &);
+ kdbgstream &operator<<(const QCString &);
+ kdbgstream &operator<<(KDBGFUNC);
+};
inline kdbgstream &endl(kdbgstream &s) { s << "\n"; return s; }
diff --git a/WebCore/kwq/kdecore/kglobal.h b/WebCore/kwq/kdecore/kglobal.h
index 0c3bcca..f85d833 100644
--- a/WebCore/kwq/kdecore/kglobal.h
+++ b/WebCore/kwq/kdecore/kglobal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef KGLOBAL_H_
#define KGLOBAL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <kinstance.h>
@@ -42,20 +38,10 @@ class KWQStaticStringDict;
#define kMin(a, b) ((a) < (b) ? (a) : (b))
#define kMax(a, b) ((a) > (b) ? (a) : (b))
-// class KGlobal ===============================================================
-
class KGlobal {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
static KWQStaticStringDict *staticStringDict;
- // static member functions -------------------------------------------------
-
static KInstance *instance();
static KCharsets *charsets();
static KLocale *locale();
@@ -64,42 +50,11 @@ public:
static const QString &staticQString(const QString &);
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KGlobal() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KGlobal() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
static KWQStaticStringDict *_stringDict;
static KInstance *_instance;
static KLocale *_locale;
static KCharsets *_charsets;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KGlobal(const KGlobal &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KGlobal &operator=(const KGlobal &);
-#endif
-
-}; // class KGlobal ============================================================
+};
#endif
diff --git a/WebCore/kwq/kdecore/kglobalsettings.h b/WebCore/kwq/kdecore/kglobalsettings.h
index 8478383..11ed0ed 100644
--- a/WebCore/kwq/kdecore/kglobalsettings.h
+++ b/WebCore/kwq/kdecore/kglobalsettings.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,61 +26,15 @@
#ifndef KGLOBALSETTINGS_H_
#define KGLOBALSETTINGS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QFont;
-// class KGlobalSettings =======================================================
-
class KGlobalSettings {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QFont generalFont();
static QFont windowTitleFont();
static QFont menuFont();
static int contrast();
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KGlobalSettings() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings(const KGlobalSettings &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KGlobalSettings &operator=(const KGlobalSettings &);
-#endif
-
-}; // class KGlobalSettings ====================================================
+};
#endif
diff --git a/WebCore/kwq/kdecore/kiconloader.h b/WebCore/kwq/kdecore/kiconloader.h
index 8f61867..9759a23 100644
--- a/WebCore/kwq/kdecore/kiconloader.h
+++ b/WebCore/kwq/kdecore/kiconloader.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,103 +26,19 @@
#ifndef KICONLOADER_H_
#define KICONLOADER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpixmap.h>
#include <qstring.h>
#include <kinstance.h>
-// class KIcon =================================================================
-
class KIcon {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType, Desktop };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KIcon();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KIcon() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KIcon(const KIcon &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KIcon &operator=(const KIcon &);
-#endif
-
-}; // class KIcon ==============================================================
-
-
-// class KIconLoader ===========================================================
+ enum Context { FileSystem, Desktop };
+ enum States { DefaultState, DisabledState };
+};
class KIconLoader {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KIconLoader();
- ~KIconLoader();
-
- // member functions --------------------------------------------------------
-
- QPixmap loadIcon(const QString &name, int group, int size=0,
- int state=KIcon::DefaultState, QString *path_store=0L,
- bool canReturnNull=false) const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KIconLoader(const KIconLoader &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KIconLoader &operator=(const KIconLoader &);
-#endif
-
-}; // class KIconLoader ========================================================
+ QPixmap loadIcon(const QString &name, int group, int size=0, int state=KIcon::DefaultState) const;
+};
#endif
diff --git a/WebCore/kwq/kdecore/kstaticdeleter.h b/WebCore/kwq/kdecore/kstaticdeleter.h
index 0eef1b6..b81df6e 100644
--- a/WebCore/kwq/kdecore/kstaticdeleter.h
+++ b/WebCore/kwq/kdecore/kstaticdeleter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,13 @@
#ifndef KSTATICDELETER_H_
#define KSTATICDELETER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class KStaticDeleter ========================================================
+// We don't believe in freeing memory at exit time.
+// It just touches memory pages and slows down quitting.
+// All the users of this just free memory, so it's OK to not delete.
template <class T> class KStaticDeleter {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KStaticDeleter() {}
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KStaticDeleter() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- T *setObject(T *ptr, bool isArray=false) {return ptr;}
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KStaticDeleter(const KStaticDeleter &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KStaticDeleter &operator=(const KStaticDeleter &);
-#endif
-
-}; // class KStaticDeleter =====================================================
+ T *setObject(T *ptr, bool array = false) { return ptr; }
+};
#endif
diff --git a/WebCore/kwq/kdecore/kstringhandler.h b/WebCore/kwq/kdecore/kstringhandler.h
index 0f0ce7e..8c38334 100644
--- a/WebCore/kwq/kdecore/kstringhandler.h
+++ b/WebCore/kwq/kdecore/kstringhandler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,58 +26,11 @@
#ifndef KSTRINGHANDLER_H_
#define KSTRINGHANDLER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
-// class KStringHandler ========================================================
-
class KStringHandler {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QString csqueeze(const QString &, uint maxlen = 40);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KStringHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KStringHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KStringHandler(const KStringHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KStringHandler &operator=(const KStringHandler &);
-#endif
-
-}; // class KStringHandler =====================================================
+};
#endif
diff --git a/WebCore/kwq/kdecore/kurl.h b/WebCore/kwq/kdecore/kurl.h
index 651847c..73dd2b3 100644
--- a/WebCore/kwq/kdecore/kurl.h
+++ b/WebCore/kwq/kdecore/kurl.h
@@ -27,6 +27,7 @@
#define KURL_H_
#include <qstring.h>
+#include <qvaluelist.h>
#include <KWQRefPtr.h>
#ifdef __OBJC__
diff --git a/WebCore/kwq/kdeui/kcombobox.h b/WebCore/kwq/kdeui/kcombobox.h
index ad28290..69ac55c 100644
--- a/WebCore/kwq/kdeui/kcombobox.h
+++ b/WebCore/kwq/kdeui/kcombobox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,56 +26,18 @@
#ifndef KCOMBOBOX_H_
#define KCOMBOBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qcombobox.h>
#include <KWQCompletion.h>
-// class KComboBox =============================================================
-
class KComboBox : public QComboBox, public KCompletionBase {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
KComboBox(QWidget *parent=0, const char *name=0);
KComboBox(bool rw, QWidget *parent=0, const char *name=0);
virtual ~KComboBox();
- // member functions --------------------------------------------------------
-#ifdef APPLE_CHANGES
void doneLoading();
void setSize(int size);
-#endif
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KComboBox(const KComboBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KComboBox &operator=(const KComboBox &);
-#endif
-
-}; // class KComboBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/kdeui/kcompletionbox.h b/WebCore/kwq/kdeui/kcompletionbox.h
index c95a18c..be9b58c 100644
--- a/WebCore/kwq/kdeui/kcompletionbox.h
+++ b/WebCore/kwq/kdeui/kcompletionbox.h
@@ -26,48 +26,12 @@
#ifndef KCOMPLETIONBOX_H_
#define KCOMPLETIONBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "klistbox.h"
-
-// class KCompletionBox ========================================================
+#include <klistbox.h>
+#include <kglobalsettings.h>
class KCompletionBox : public KListBox {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KCompletionBox();
- virtual ~KCompletionBox();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCompletionBox(const KCompletionBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCompletionBox &operator=(const KCompletionBox &);
-#endif
-
-}; // class KCompletionBox =====================================================
+ KCompletionBox(QWidget *parent) : KListBox(parent) { }
+};
#endif
diff --git a/WebCore/kwq/kdeui/klineedit.h b/WebCore/kwq/kdeui/klineedit.h
index bf92cb7..fcd7cf1 100644
--- a/WebCore/kwq/kdeui/klineedit.h
+++ b/WebCore/kwq/kdeui/klineedit.h
@@ -26,57 +26,18 @@
#ifndef KLINEEDIT_H_
#define KLINEEDIT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qlineedit.h>
#include <KWQCompletion.h>
#include "kcompletionbox.h"
-// class __class_name__ ========================================================
-
class KLineEdit : public QLineEdit, public KCompletionBase {
public:
+ KLineEdit(QWidget *parent=0);
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KLineEdit(QWidget *parent=0, const char *name=0);
- virtual ~KLineEdit();
-
- // member functions --------------------------------------------------------
-
- void setMouseTracking(bool);
- virtual void setContextMenuEnabled(bool showMenu);
+ void setContextMenuEnabled(bool showMenu);
KCompletionBox *completionBox(bool create);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KLineEdit(const KLineEdit &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KLineEdit &operator=(const KLineEdit &);
-#endif
-
-}; // class __class_name__ =====================================================
+};
#endif
diff --git a/WebCore/kwq/kdeui/klistbox.h b/WebCore/kwq/kdeui/klistbox.h
index 07c8b4b..e7fd341 100644
--- a/WebCore/kwq/kdeui/klistbox.h
+++ b/WebCore/kwq/kdeui/klistbox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,54 +26,11 @@
#ifndef KLISTBOX_H_
#define KLISTBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <KWQListBox.h>
-#include <qwidget.h>
-
-// class KListBox ==============================================================
class KListBox : public QListBox {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KListBox();
- KListBox(QWidget *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KListBox() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KListBox(const KListBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KListBox &operator=(const KListBox &);
-#endif
-
-}; // class KListBox ===========================================================
+ KListBox(QWidget *parent) : QListBox(parent) { }
+};
#endif
diff --git a/WebCore/kwq/kdeui/kmessagebox.h b/WebCore/kwq/kdeui/kmessagebox.h
index ca94485..4cd3e7a 100644
--- a/WebCore/kwq/kdeui/kmessagebox.h
+++ b/WebCore/kwq/kdeui/kmessagebox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,29 +26,13 @@
#ifndef KMESSAGEBOX_H_
#define KMESSAGEBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qwidget.h>
#include <qstring.h>
-// class KMessageBox ===========================================================
-
class KMessageBox {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
enum { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 };
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static void error(QWidget *, const QString &,
const QString &caption=QString::null, bool notify=true);
@@ -65,39 +49,6 @@ public:
static void sorry(QWidget *, const QString &,
const QString &caption=QString::null, bool notify=true);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KMessageBox() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KMessageBox() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KMessageBox(const KMessageBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KMessageBox &operator=(const KMessageBox &);
-#endif
-
-}; // class KMessageBox ========================================================
+};
#endif
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/khtml/khtml_printsettings.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/khtml/khtml_printsettings.h
diff --git a/WebCore/kwq/kio/kfileitem.h b/WebCore/kwq/kio/kfileitem.h
index 25b38b1..5661937 100644
--- a/WebCore/kwq/kio/kfileitem.h
+++ b/WebCore/kwq/kio/kfileitem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,12 @@
#ifndef KFILEITEM_H_
#define KFILEITEM_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <netaccess.h>
-// class KFileItem =============================================================
-
class KFileItem {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KFileItem(const KIO::UDSEntry &, const KURL &, bool foo=false,
- bool bar=false);
-
- virtual ~KFileItem();
-
- // member functions --------------------------------------------------------
-
+ KFileItem(const KIO::UDSEntry &, const KURL &, bool, bool);
bool isDir() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KFileItem(const KFileItem &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KFileItem &operator=(const KFileItem &);
-#endif
-
-}; // class KFileItem ==========================================================
+};
#endif
diff --git a/WebCore/kwq/kio/kimageio.h b/WebCore/kwq/kio/kimageio.h
index ae26be1..815a588 100644
--- a/WebCore/kwq/kio/kimageio.h
+++ b/WebCore/kwq/kio/kimageio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,63 +26,14 @@
#ifndef KIMAGEIO_H_
#define KIMAGEIO_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstringlist.h>
-// class KImageIO ==============================================================
-
class KImageIO {
public:
+ enum Mode { Reading };
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Mode { Reading, Writing };
-
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static void registerFormats();
- static QStringList mimeTypes(Mode mode=Writing);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KImageIO() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KImageIO() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KImageIO(const KImageIO &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KImageIO &operator=(const KImageIO &);
-#endif
-
-}; // class KImageIO ===========================================================
+ static void registerFormats() { }
+ static QStringList mimeTypes(Mode) { return QStringList(); }
+};
#endif
diff --git a/WebCore/kwq/kio/kmimetype.h b/WebCore/kwq/kio/kmimetype.h
index 1381211..031c474 100644
--- a/WebCore/kwq/kio/kmimetype.h
+++ b/WebCore/kwq/kio/kmimetype.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,103 +26,33 @@
#ifndef KMIMETYPE_H_
#define KMIMETYPE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <kdecore/kglobal.h>
#include <kdecore/kurl.h>
#include <sys/types.h>
#include <qstring.h>
-// class KSharedPtr ============================================================
-
template<class T> class KSharedPtr {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
KSharedPtr() { object = 0; }
- KSharedPtr(const KSharedPtr &) {object = 0;}
- ~KSharedPtr() {}
-
- // member functions --------------------------------------------------------
-
- // operators ---------------------------------------------------------------
-
- KSharedPtr &operator=(const KSharedPtr &) {}
T *operator->() { return object; }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
T *object;
-
-
-}; // class KSharedPtr =========================================================
-
-
-// class KMimeType =============================================================
+};
class KMimeType {
public:
-
- // structs -----------------------------------------------------------------
-
- // typedefs ----------------------------------------------------------------
-
typedef KSharedPtr<KMimeType> Ptr;
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static Ptr findByURL(const KURL &, mode_t=0, bool=false, bool=false);
static Ptr mimeType(QString serviceType);
static QString defaultMimeType();
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KMimeType() {}
-#endif
- virtual ~KMimeType();
-
- // member functions --------------------------------------------------------
+ ~KMimeType();
QString name() const;
QString comment() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KMimeType(const KMimeType &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KMimeType &operator=(const KMimeType &);
-#endif
-
-}; // class KMimeType ==========================================================
-
+};
#endif
diff --git a/WebCore/kwq/kio/kprotocolmanager.h b/WebCore/kwq/kio/kprotocolmanager.h
index b15feba..1b4b35f 100644
--- a/WebCore/kwq/kio/kprotocolmanager.h
+++ b/WebCore/kwq/kio/kprotocolmanager.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,61 +26,11 @@
#ifndef KPROTOCOLMANAGER_H_
#define KPROTOCOLMANAGER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QString;
-// class KProtocolManager ======================================================
-
class KProtocolManager {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static bool useProxy();
- static QString httpProxy();
static QString userAgentForHost( const QString& );
- static QString proxyFor(const QString &);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KProtocolManager() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KProtocolManager() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KProtocolManager(const KProtocolManager &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KProtocolManager &operator=(const KProtocolManager &);
-#endif
-
-}; // class KProtocolManager ===================================================
+};
#endif
diff --git a/WebCore/kwq/kio/kssl/ksslkeygen.h b/WebCore/kwq/kio/kssl/ksslkeygen.h
index e69de29..a90b6cf 100644
--- a/WebCore/kwq/kio/kssl/ksslkeygen.h
+++ b/WebCore/kwq/kio/kssl/ksslkeygen.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KSSLKEYGEN_H_
+#define KSSLKEYGEN_H_
+
+#include <qstringlist.h>
+
+class QDialog
+{
+public:
+ enum DialogCode { Accepted, Rejected };
+};
+
+class KSSLKeyGen
+{
+public:
+ static QStringList supportedKeySizes() { return QStringList(); }
+ KSSLKeyGen(QWidget *, const char *, bool) { }
+ void setKeySize(int) { }
+ int exec() { return QDialog::Rejected; }
+};
+
+#endif
diff --git a/WebCore/kwq/kio/netaccess.h b/WebCore/kwq/kio/netaccess.h
index 86a6e69..abf2b49 100644
--- a/WebCore/kwq/kio/netaccess.h
+++ b/WebCore/kwq/kio/netaccess.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,104 +26,23 @@
#ifndef NETACCESS_H_
#define NETACCESS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qvaluelist.h>
#include <kurl.h>
namespace KIO {
-class UDSAtom;
+class UDSAtom { };
typedef QValueList<UDSAtom> UDSEntry;
-
-// class UDSAtom ===============================================================
-
-class UDSAtom {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- UDSAtom() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~UDSAtom() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class UDSAtom ============================================================
-
-
-// class NetAccess =============================================================
-
class NetAccess {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static bool stat(const KURL &, KIO::UDSEntry &);
static QString lastErrorString();
static bool download(const KURL &, QString &);
static void removeTempFile(const QString &);
+};
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- NetAccess() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~NetAccess() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- NetAccess(const NetAccess &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- NetAccess &operator=(const NetAccess &);
-#endif
-
-}; // class NetAccess ==========================================================
-
-
-} // namespace KIO
+}
#endif
diff --git a/WebCore/kwq/kparts/browserinterface.h b/WebCore/kwq/kparts/browserinterface.h
index e8d369e..8746784 100644
--- a/WebCore/kwq/kparts/browserinterface.h
+++ b/WebCore/kwq/kparts/browserinterface.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef BROWSERINTERFACE_H_
#define BROWSERINTERFACE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qvariant.h>
@@ -37,44 +33,8 @@ namespace KParts {
class BrowserInterface : public QObject {
public:
-
-// class BrowserInterface ======================================================
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- BrowserInterface(QObject *parent, const char *name=0);
- virtual ~BrowserInterface();
-
- // member functions --------------------------------------------------------
-
void callMethod(const char *name, const QVariant &argument);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- BrowserInterface(const BrowserInterface &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- BrowserInterface &operator=(const BrowserInterface &);
-#endif
-
-}; // class BrowserInterface ===================================================
+};
} // namespace KParts
diff --git a/WebCore/kwq/kparts/factory.h b/WebCore/kwq/kparts/factory.h
index d5a6c84..5a85674 100644
--- a/WebCore/kwq/kparts/factory.h
+++ b/WebCore/kwq/kparts/factory.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,53 +26,11 @@
#ifndef FACTORY_H_
#define FACTORY_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "part.h"
+#include <part.h>
namespace KParts {
+ class Factory;
+}
-// class Factory ===============================================================
-
-class Factory {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- Factory();
- virtual ~Factory();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Factory(const Factory &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Factory &operator=(const Factory &);
-#endif
-
-}; // class Factory ============================================================
-
-} // namespace KParts
-
#endif
diff --git a/WebCore/kwq/kparts/part.h b/WebCore/kwq/kparts/part.h
index 6374d0d..1e71d4b 100644
--- a/WebCore/kwq/kparts/part.h
+++ b/WebCore/kwq/kparts/part.h
@@ -52,7 +52,7 @@ public:
void ref() { m_ref++; }
void deref() { if(m_ref) m_ref--; if (!m_ref) delete this; }
- void event(QEvent *event) { customEvent((QCustomEvent *)event); }
+ bool event(QEvent *event) { customEvent((QCustomEvent *)event); return true; }
virtual void customEvent(QCustomEvent *) { }
private:
diff --git a/WebCore/kwq/qt/qarray.h b/WebCore/kwq/qt/qarray.h
index cc9c61d..76c2d45 100644
--- a/WebCore/kwq/qt/qarray.h
+++ b/WebCore/kwq/qt/qarray.h
@@ -26,38 +26,14 @@
#ifndef QARRAY_H_
#define QARRAY_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QARRAY =======================================================
-
-#ifdef USING_BORROWED_QARRAY
-#include <_qarray.h>
-#else
-
#include <KWQDef.h>
#include <KWQArrayImpl.h>
-// class QMemArray ================================================================
-
template <class T> class QMemArray {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QMemArray() : impl(sizeof(T)) {}
QMemArray(int i) : impl(sizeof(T),i) {}
- QMemArray(const QMemArray<T> &a) : impl(a.impl) {}
- ~QMemArray() {}
- // member functions --------------------------------------------------------
-
bool isEmpty() {return impl.size() == 0; }
T &at(uint u) const {return *(T *)impl.at(u); }
T *data() const { return (T *)impl.data(); }
@@ -69,21 +45,14 @@ public:
bool fill(const T &item, int size=-1) { return impl.fill(&item, size); }
QMemArray<T>& assign(const QMemArray<T> &a) { return *this = a; }
-
- // operators ---------------------------------------------------------------
-
- QMemArray<T> &operator=(const QMemArray<T> &a) { impl = a.impl; return *this; }
T &operator[](int i) const { return at(i); }
bool operator==(const QMemArray<T> &a) const { return impl == a.impl; }
bool operator!=(const QMemArray<T> &a) const { return !(*this == a); }
operator const T*() const { return data(); }
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
KWQArrayImpl impl;
-
-}; // class QMemArray =============================================================
+};
#ifdef _KWQ_IOSTREAM_
@@ -106,7 +75,4 @@ inline std::ostream &operator<<(std::ostream &stream, const QMemArray<T>&a)
#endif
-#endif // USING_BORROWED_QARRAY
-
#endif
-
diff --git a/WebCore/kwq/qt/qbuffer.h b/WebCore/kwq/qt/qbuffer.h
index f7dc289..e361aa6 100644
--- a/WebCore/kwq/qt/qbuffer.h
+++ b/WebCore/kwq/qt/qbuffer.h
@@ -26,62 +26,27 @@
#ifndef QBUFFER_H_
#define QBUFFER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QBUFFER ======================================================
-
-#ifdef USING_BORROWED_QBUFFER
-#include <_qbuffer.h>
-#else
-
#include <KWQDef.h>
#include <qarray.h>
#include <qstring.h>
#include <qiodevice.h>
-// class QBuffer ===============================================================
-
class QBuffer {
public:
+ QBuffer() : pos(0) { }
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QBuffer();
- ~QBuffer();
-
- // member functions --------------------------------------------------------
-
- QByteArray buffer() const;
- uint size() const;
- bool isOpen();
- bool open(int);
- void close();
+ QByteArray buffer() const { return ba; }
+ uint size() const { return ba.size(); }
+ bool isOpen() const { return opened; }
+ void open(int);
+ void close() { opened = false; }
int writeBlock(const char *, uint);
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QBuffer(const QBuffer &);
- QBuffer &operator=(const QBuffer &);
-
bool opened;
QByteArray ba;
uint pos;
-}; // class QBuffer ============================================================
-
-#endif // USING_BORROWED_QBUFFER
+};
#endif
diff --git a/WebCore/kwq/qt/qcollection.h b/WebCore/kwq/qt/qcollection.h
index 1311262..a1cb8ca 100644
--- a/WebCore/kwq/qt/qcollection.h
+++ b/WebCore/kwq/qt/qcollection.h
@@ -32,15 +32,17 @@ class QPtrCollection {
public:
typedef void *Item;
- bool autoDelete();
- void setAutoDelete(bool autoDelete);
+ bool autoDelete() { return del_item; }
+ void setAutoDelete(bool autoDelete) { del_item = autoDelete; }
+
+ QPtrCollection(const QPtrCollection &) : del_item(false) { }
+ QPtrCollection &operator=(const QPtrCollection &) { return *this; }
+
protected:
- QPtrCollection();
- QPtrCollection(const QPtrCollection &);
- QPtrCollection &operator=(const QPtrCollection &);
+ QPtrCollection() : del_item(false) { }
virtual ~QPtrCollection();
- bool del_item; // default FALSE
+ bool del_item;
};
-#endif /* QCOLLECTION_H */
+#endif
diff --git a/WebCore/kwq/qt/qcstring.h b/WebCore/kwq/qt/qcstring.h
index e568190..2a5cfa6 100644
--- a/WebCore/kwq/qt/qcstring.h
+++ b/WebCore/kwq/qt/qcstring.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,55 +26,27 @@
#ifndef QCSTRING_H_
#define QCSTRING_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTRING ======================================================
-
-#ifdef USING_BORROWED_QSTRING
-#include <_qcstring.h>
-#else
-
-// FIXME: does our implementation of QCString really need to inherit from
-// QByteArray and QArray?
-
-#include "qarray.h"
+#include <qarray.h>
+#include <string.h>
+#include <KWQDef.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <string.h>
-
typedef QMemArray<char> QByteArray;
-// class QCString ==============================================================
-
class QCString : public QByteArray {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QCString();
QCString(int);
QCString(const char *);
QCString(const char *, uint);
- QCString(const QCString &);
-
- ~QCString() {}
-
- // member functions --------------------------------------------------------
bool isEmpty() const;
- bool isNull() const;
- int find(const char *, int index=0, bool cs=TRUE) const;
- int contains(char, bool cs=TRUE) const;
+ bool isNull() const { return data() == 0; }
+ int find(const char *, int index=0, bool cs=true) const;
+ int contains(char, bool cs=true) const;
uint length() const;
bool truncate(uint);
QCString lower() const;
@@ -83,10 +55,7 @@ public:
QCString right(uint) const;
QCString mid(uint, uint len=0xffffffff) const;
- // operators ---------------------------------------------------------------
-
- operator const char *() const;
- QCString &operator=(const QCString &);
+ operator const char *() const { return data(); }
QCString &operator=(const char *);
QCString &operator+=(const char *);
QCString &operator+=(char);
@@ -95,22 +64,13 @@ public:
friend std::ostream &operator<<(std::ostream &, const QCString &);
#endif
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
bool resize(uint);
+};
-}; // class QCString ===========================================================
-
-
-// operators associated with QCString ==========================================
-
-bool operator==(const char *s1, const QCString &s2);
bool operator==(const QCString &s1, const char *s2);
-bool operator!=(const char *s1, const QCString &s2);
-bool operator!=(const QCString &s1, const char *s2);
-
-#endif // USING_BORROWED_QSTRING
+inline bool operator==(const char *s1, const QCString &s2) { return s2 == s1; }
+inline bool operator!=(const QCString &s1, const char *s2) { return !(s1 == s2); }
+inline bool operator!=(const char *s1, const QCString &s2) { return !(s1 == s2); }
#endif
diff --git a/WebCore/kwq/qt/qcursor.h b/WebCore/kwq/qt/qcursor.h
index dc8f6ce..03d1c4a 100644
--- a/WebCore/kwq/qt/qcursor.h
+++ b/WebCore/kwq/qt/qcursor.h
@@ -47,7 +47,7 @@ public:
QCursor &operator=(const QCursor &);
- int handle() const;
+ NSCursor *handle() const;
private:
NSCursor *cursor;
diff --git a/WebCore/kwq/qt/qdict.h b/WebCore/kwq/qt/qdict.h
index dc1a822..a53b817 100644
--- a/WebCore/kwq/qt/qdict.h
+++ b/WebCore/kwq/qt/qdict.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,19 +26,6 @@
#ifndef QDICT_H_
#define QDICT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QDICT ========================================================
-
-#ifdef USING_BORROWED_QDICT
-
-#include <_qdict.h>
-
-#else
-
-
#include <qcollection.h>
#include <qstring.h>
@@ -46,98 +33,41 @@
template<class T> class QDictIterator;
-// class QDict =================================================================
-
template <class T> class QDict : public QPtrCollection {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QDict(int size=17, bool caseSensitive=TRUE) : impl(size, caseSensitive, QDict::deleteFunc) {}
- QDict(const QDict<T> &d) : QPtrCollection(d), impl(d.impl) {}
+ QDict(int size=17, bool caseSensitive=true) : impl(size, caseSensitive, QDict::deleteFunc) {}
virtual ~QDict() { impl.clear(del_item); }
- // member functions --------------------------------------------------------
-
virtual void clear() { impl.clear(del_item); }
virtual uint count() const { return impl.count(); }
void insert(const QString &key, const T *value) { impl.insert(key,(void *)value);}
bool remove(const QString &key) { return impl.remove(key,del_item); }
T *find(const QString &key) const { return (T *)impl.find(key); }
- // operators ---------------------------------------------------------------
-
- QDict<T> &operator=(const QDict<T> &d) { impl.assign(d.impl,del_item); QPtrCollection::operator=(d); return *this;}
+ QDict &operator=(const QDict &d) { impl.assign(d.impl, del_item); QPtrCollection::operator=(d); return *this;}
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
KWQDictImpl impl;
friend class QDictIterator<T>;
-}; // class QDict ==============================================================
+};
-// class QDictIterator =========================================================
-
template<class T> class QDictIterator {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDictIterator() {}
-#endif
-
QDictIterator(const QDict<T> &d) : impl(d.impl) {}
- ~QDictIterator() {}
-
- // member functions --------------------------------------------------------
uint count() const { return impl.count(); }
- T *current() const { return (T *) impl.current(); }
+ T *current() const { return (T *)impl.current(); }
QString currentKey() const { return impl.currentStringKey(); }
T *toFirst() { return (T *)impl.toFirst(); }
- // operators ---------------------------------------------------------------
-
- T *operator++() { return (T *)(++impl); }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ T *operator++() { return (T *)++impl; }
private:
KWQDictIteratorImpl impl;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDictIterator(const QDictIterator &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDictIterator &operator=(const QDictIterator &);
-#endif
-
-}; // class QDictIterator ======================================================
-
-#endif // USING_BORROWED_QDICT
+};
#endif
diff --git a/WebCore/kwq/qt/qhbox.h b/WebCore/kwq/qt/qhbox.h
index 02ec2d0..59d1cd3 100644
--- a/WebCore/kwq/qt/qhbox.h
+++ b/WebCore/kwq/qt/qhbox.h
@@ -26,56 +26,15 @@
#ifndef QHBOX_H_
#define QHBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qwidget.h"
-#include <KWQFrame.h>
-
-// class QHBox =================================================================
+#include <qwidget.h>
+#include <qframe.h>
class QHBox : public QFrame {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QHBox();
QHBox(QWidget *);
- ~QHBox();
-
- // member functions --------------------------------------------------------
-
- bool setStretchFactor(QWidget*, int stretch);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-#ifdef _KWQ_
- void setFocusProxy( QWidget *lineEdit);
-#endif
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QHBox(const QHBox &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QHBox &operator=(const QHBox &);
-#endif
-
-}; // class QHBox ==============================================================
+ void setStretchFactor(QWidget*, int stretch);
+ void setFocusProxy(QWidget *lineEdit);
+};
#endif
diff --git a/WebCore/kwq/qt/qlabel.h b/WebCore/kwq/qt/qlabel.h
index 418aadd..9ca179a 100644
--- a/WebCore/kwq/qt/qlabel.h
+++ b/WebCore/kwq/qt/qlabel.h
@@ -26,51 +26,16 @@
#ifndef QLABEL_H_
#define QLABEL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQFrame.h>
-#include "qwidget.h"
-#include "qstring.h"
-
-// class QLabel ================================================================
+#include <qframe.h>
+#include <qwidget.h>
+#include <qstring.h>
class QLabel : public QFrame {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QLabel() {}
-#endif
-
- QLabel(QWidget *parent);
QLabel(const QString &, QWidget *);
- ~QLabel();
-
- // member functions --------------------------------------------------------
-
- virtual void setText(const QString &);
- virtual void setAlignment(int);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QLabel(const QLabel &);
- QLabel &operator=(const QLabel &);
-}; // class QLabel =============================================================
+ void setText(const QString &);
+ void setAlignment(int);
+};
#endif
diff --git a/WebCore/kwq/qt/qlist.h b/WebCore/kwq/qt/qlist.h
index cc6502a..33b9369 100644
--- a/WebCore/kwq/qt/qlist.h
+++ b/WebCore/kwq/qt/qlist.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,37 +26,20 @@
#ifndef QLIST_H_
#define QLIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QLIST ========================================================
-
-#ifdef USING_BORROWED_QLIST
-#include <_qlist.h>
-#else
-
-#include <iostream>
-
#include <KWQDef.h>
#include <qcollection.h>
-
#include <KWQListImpl.h>
-// class QPtrList =================================================================
+#ifdef _KWQ_IOSTREAM_
+#include <iostream>
+#endif
template <class T> class QPtrListIterator;
template <class T> class QPtrList : public QPtrCollection {
public:
-
- // constructors, copy constructors, and destructors ------------------------
-
QPtrList() : impl(deleteFunc) {}
- QPtrList(const QPtrList<T> &l) : QPtrCollection(l), impl(l.impl) {}
~QPtrList() { if (del_item) { impl.clear(del_item); } }
-
- // member functions --------------------------------------------------------
bool isEmpty() const { return impl.isEmpty(); }
uint count() const { return impl.count(); }
@@ -90,15 +73,8 @@ public:
virtual int compareItems(void *a, void *b) { return a != b; }
- // operators ---------------------------------------------------------------
-
- QPtrList<T> &operator=(const QPtrList<T> &l)
- { impl.assign(l.impl,del_item); QPtrCollection::operator=(l); return *this; }
-
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
static int compareFunc(void *a, void *b, void *data)
{
@@ -109,22 +85,12 @@ public:
friend class QPtrListIterator<T>;
KWQListImpl impl;
-}; // class QPtrList ==============================================================
-
-
-// class QPtrListIterator =========================================================
+};
template <class T> class QPtrListIterator {
public:
-
- // constructors, copy constructors, and destructors ------------------------
-
- QPtrListIterator() {}
- QPtrListIterator(const QPtrListIterator &li) : impl(li.impl) {}
- QPtrListIterator(const QPtrList<T> &l) : impl(l.impl) {}
- ~QPtrListIterator() {}
-
- // member functions --------------------------------------------------------
+ QPtrListIterator() { }
+ QPtrListIterator(const QPtrList<T> &l) : impl(l.impl) { }
uint count() const { return impl.count(); }
T *toFirst() { return (T *)impl.toFirst(); }
@@ -136,12 +102,12 @@ public:
operator T *() const { return (T *)impl.current(); }
T *operator--() { return (T *)(--impl); }
T *operator++() { return (T *)(++impl); }
- QPtrListIterator &operator=(const QPtrListIterator &li) { impl = li.impl; return *this; }
private:
KWQListIteratorImpl impl;
-}; // class QPtrListIterator ======================================================
+};
+#ifdef _KWQ_IOSTREAM_
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
@@ -168,6 +134,6 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
return stream << "]";
}
-#endif // USING_BORROWED_QLIST
+#endif
#endif
diff --git a/WebCore/kwq/qt/qmap.h b/WebCore/kwq/qt/qmap.h
index 7d0eb37..ed4720c 100644
--- a/WebCore/kwq/qt/qmap.h
+++ b/WebCore/kwq/qt/qmap.h
@@ -26,29 +26,18 @@
#ifndef QMAP_H_
#define QMAP_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QMAP =========================================================
+#include <KWQDef.h>
-#ifdef USING_BORROWED_QMAP
-#include <_qmap.h>
-#else
+#include <KWQMapImpl.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <KWQDef.h>
-
-#include <KWQMapImpl.h>
-
template <class K, class V> class QMap;
template <class K, class V> class QMapIterator;
template <class K, class V> class QMapConstIterator;
-
template <class K, class V> class QMapNode : private KWQMapNodeImpl
{
private:
@@ -59,12 +48,13 @@ template <class K, class V> class QMapNode : private KWQMapNodeImpl
}
// intentionally not defined
- QMapNode(const QMapNode<K,V>&node);
+ QMapNode(const QMapNode&node);
+ QMapNode& operator=(const QMapNode&);
~QMapNode()
{
- delete (QMapNode<K,V> *)left();
- delete (QMapNode<K,V> *)right();
+ delete (QMapNode *)left();
+ delete (QMapNode *)right();
}
K key;
@@ -75,22 +65,10 @@ template <class K, class V> class QMapNode : private KWQMapNodeImpl
friend class QMapConstIterator<K,V>;
};
-// class QMapIterator ==========================================================
-
template<class K, class V> class QMapIterator : private KWQMapIteratorImpl {
public:
- QMapIterator()
- {
- }
-
- QMapIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter)
- {
- }
-
- ~QMapIterator()
- {
- }
-
+ QMapIterator() { }
+
const K& key() const
{
return ((QMapNode<K,V> *)node)->key;
@@ -101,18 +79,12 @@ public:
return ((QMapNode<K,V> *)node)->value;
}
- QMapIterator<K,V> &operator=(const QMapIterator<K,V> &iter)
- {
- node = iter.node;
- return *this;
- }
-
- bool operator==(const QMapIterator<K,V>&iter) const
+ bool operator==(const QMapIterator<K,V> &iter) const
{
return node == iter.node;
}
- bool operator!=(const QMapIterator<K,V>&iter) const
+ bool operator!=(const QMapIterator<K,V> &iter) const
{
return node != iter.node;
}
@@ -136,33 +108,17 @@ public:
private:
QMapIterator(QMapNode<K,V> *n)
{
- node = n;
+ node = n;
}
friend class QMap<K,V>;
friend class QMapConstIterator<K,V>;
-}; // class QMapIterator =======================================================
-
-
-// class QMapConstIterator =====================================================
+};
template<class K, class V> class QMapConstIterator : private KWQMapIteratorImpl {
public:
- QMapConstIterator() : KWQMapIteratorImpl()
- {
- }
-
- QMapConstIterator(const QMapConstIterator<K,V> &citer) : KWQMapIteratorImpl(citer)
- {
- }
-
- QMapConstIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter)
- {
- }
-
- ~QMapConstIterator()
- {
- }
+ QMapConstIterator() { }
+ QMapConstIterator(const QMapIterator<K,V> &iter) : KWQMapIteratorImpl(iter) { }
const K& key() const
{
@@ -174,12 +130,6 @@ public:
return ((QMapNode<K,V> *)node)->value;
}
- QMapConstIterator<K,V> &operator=(const QMapConstIterator<K,V> &citer)
- {
- node = citer.node;
- return *this;
- }
-
bool operator==(const QMapConstIterator<K,V> &citer) const
{
return node == citer.node;
@@ -208,26 +158,13 @@ private:
}
friend class QMap<K,V>;
-}; // class QMapConstIterator ==================================================
-
-
-
-// class QMap ==================================================================
+};
template <class K, class V> class QMap : public KWQMapImpl {
public:
-
- // typedefs ----------------------------------------------------------------
-
typedef QMapIterator<K,V> Iterator;
typedef QMapConstIterator<K,V> ConstIterator;
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-
QMap() :
KWQMapImpl(new QMapNode<K,V>(K(),V()), deleteNode)
{
@@ -238,46 +175,18 @@ public:
{
}
- virtual ~QMap()
- {
- }
-
- // member functions --------------------------------------------------------
-
- void clear()
- {
- clearInternal();
- }
-
- uint count() const
- {
- return countInternal();
- }
-
- Iterator begin()
- {
- return Iterator((QMapNode<K,V> *)beginInternal());
- }
-
- Iterator end()
- {
- return Iterator((QMapNode<K,V> *)endInternal());
- }
+ void clear() { clearInternal(); }
- ConstIterator begin() const
- {
- return ConstIterator((QMapNode<K,V> *)beginInternal());
- }
+ uint count() const { return countInternal(); }
- ConstIterator end() const
- {
- return ConstIterator((QMapNode<K,V> *)endInternal());
- }
+ Iterator begin() { return (QMapNode<K,V> *)beginInternal(); }
+ Iterator end() { return (QMapNode<K,V> *)endInternal(); }
+ ConstIterator begin() const { return (QMapNode<K,V> *)beginInternal(); }
+ ConstIterator end() const { return ConstIterator((QMapNode<K,V> *)endInternal()); }
Iterator insert(const K& key, const V& value)
{
QMapNode<K,V> tmp(key,value);
-
return Iterator((QMapNode<K,V> *)insertInternal(&tmp, true));
}
@@ -316,8 +225,6 @@ public:
}
}
- // operators ---------------------------------------------------------------
-
QMap<K,V>& operator=(const QMap<K,V>&map)
{
QMap<K,V> tmp(map);
@@ -328,11 +235,9 @@ public:
V& operator[](const K& key)
{
QMapNode<K,V> tmp(key, V());
-
return ((QMapNode<K,V> *)insertInternal(&tmp, false))->value;
}
-
protected:
virtual void copyNode(const KWQMapNodeImpl *isrc, KWQMapNodeImpl *idst) const
{
@@ -380,10 +285,10 @@ protected:
delete (QMapNode<K,V> *)inode;
}
-}; // class QMap ===============================================================
-
+};
#ifdef _KWQ_IOSTREAM_
+
template<class K, class V>
inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
{
@@ -402,8 +307,7 @@ inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
return stream << "]";
}
-#endif
-#endif // USING_BORROWED_QMAP
+#endif
#endif
diff --git a/WebCore/kwq/qt/qmovie.h b/WebCore/kwq/qt/qmovie.h
index 697fdc7..b383667 100644
--- a/WebCore/kwq/qt/qmovie.h
+++ b/WebCore/kwq/qt/qmovie.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,73 +26,23 @@
#ifndef QMOVIE_H_
#define QMOVIE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-#include "qasyncio.h"
-#include "qpixmap.h"
-#include "qimage.h"
-#include "qrect.h"
-
-#ifdef _KWQ_
-class QMoviePrivate;
-#endif
-
-// class QMovie ================================================================
+#include <qobject.h>
+#include <qasyncio.h>
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qrect.h>
class QMovie {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- enum Status { EndOfFrame, EndOfLoop, EndOfMovie };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QMovie();
- QMovie(QDataSource*, int bufsize=1024);
- QMovie(const QMovie &);
- ~QMovie();
-
- // member functions --------------------------------------------------------
-
- void unpause();
- void pause();
- void restart();
- bool finished();
- bool running();
+ void unpause() { }
+ void pause() { }
+ void restart() { }
+ bool finished() { return true; }
+ bool running() { return false; }
int frameNumber() const;
const QRect& getValidRect() const;
const QPixmap& framePixmap() const;
- const QImage& frameImage() const;
-
- void connectResize(QObject* receiver, const char *member);
- void connectUpdate(QObject* receiver, const char *member);
- void connectStatus(QObject* receiver, const char *member);
-
- void disconnectResize(QObject* receiver, const char *member=0);
- void disconnectUpdate(QObject* receiver, const char *member=0);
- void disconnectStatus(QObject* receiver, const char *member=0);
-
- // operators ---------------------------------------------------------------
-
- QMovie &operator=(const QMovie &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-private:
-#ifdef _KWQ_
- QMoviePrivate *d;
-#endif
-
-}; // class QMovie =============================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qobject.h b/WebCore/kwq/qt/qobject.h
index d7ea4c4..ec1270b 100644
--- a/WebCore/kwq/qt/qobject.h
+++ b/WebCore/kwq/qt/qobject.h
@@ -36,9 +36,9 @@
// FIXME: should these macros be in "kwq.h" or other header file?
#define slots
-#define SLOT(x) """## x ##"""
+#define SLOT(x) #x
#define signals protected
-#define SIGNAL(x) """## x ##"""
+#define SIGNAL(x) #x
#define emit
#define Q_OBJECT
#define Q_PROPERTY(text)
@@ -106,7 +106,7 @@ public:
int startTimer(int);
void killTimer(int);
void killTimers();
- virtual void timerEvent( QTimerEvent * );
+ virtual void timerEvent( QTimerEvent * );
void installEventFilter(const QObject *);
void removeEventFilter(const QObject *);
@@ -116,7 +116,9 @@ public:
virtual void performAction(QObject::Actions action);
void emitAction(QObject::Actions action);
- void setTarget (QObject *obj);
+ void setTarget(QObject *obj);
+
+ virtual bool event(QEvent *);
private:
// no copying or assignment
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/kwq/qt/qobjectlist.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/kwq/qt/qobjectlist.h
diff --git a/WebCore/kwq/qt/qpaintdevicemetrics.h b/WebCore/kwq/qt/qpaintdevicemetrics.h
index 377ec57..01f7ef8 100644
--- a/WebCore/kwq/qt/qpaintdevicemetrics.h
+++ b/WebCore/kwq/qt/qpaintdevicemetrics.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,61 +26,16 @@
#ifndef QPAINTDEVICEMETRICS_H_
#define QPAINTDEVICEMETRICS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QPaintDevice;
-// class QPaintDeviceMetrics ===================================================
-
class QPaintDeviceMetrics {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
-#endif
-
QPaintDeviceMetrics(const QPaintDevice *);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QPaintDeviceMetrics() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int logicalDpiY() const;
int depth() const;
int width() const;
int height() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QPaintDeviceMetrics(const QPaintDeviceMetrics &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QPaintDeviceMetrics &operator=(const QPaintDeviceMetrics &);
-#endif
-
-}; // class QPaintDeviceMetrics ================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qpainter.h b/WebCore/kwq/qt/qpainter.h
index 1b6fb8d..5d37ed4 100644
--- a/WebCore/kwq/qt/qpainter.h
+++ b/WebCore/kwq/qt/qpainter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,10 +26,6 @@
#ifndef QPAINTER_H_
#define QPAINTER_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qnamespace.h>
#include <qpaintdevice.h>
#include <qcolor.h>
@@ -46,79 +42,29 @@ class QPixmap;
class QWidget;
class QPainterPrivate;
-// class QWMatrix ==============================================================
-
class QWMatrix {
friend class QPainter;
friend class QPixmap;
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QWMatrix();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QWMatrix() {}
-#endif
-
- // member functions --------------------------------------------------------
-
QWMatrix &scale(double, double);
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QWMatrix(const QWMatrix &);
-#endif
-
-#ifdef _KWQ_
bool empty;
double sx;
double sy;
-#endif
-
-}; // class QWMatrix ===========================================================
-
-
-// class QPainter ==============================================================
+};
class QPainter : public Qt {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
typedef enum { RTL, LTR } TextDirection;
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QPainter();
-
// We may be able to remove this constructor and remove QPaintDevice.
QPainter(const QPaintDevice *);
-
-#ifdef _KWQ_
QPainter(QWidget *);
-#endif
-
~QPainter();
- // member functions --------------------------------------------------------
-
const QFont &font() const;
void setFont(const QFont &);
QFontMetrics fontMetrics() const;
@@ -173,15 +119,7 @@ public:
QPaintDevice *device() const;
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-#ifdef _KWQ_
void drawUnderlineForText(int x, int y, const QString &, int len=-1);
-#endif
private:
// no copying or assignment
@@ -189,7 +127,6 @@ private:
QPainter(const QPainter &);
QPainter &operator=(const QPainter &);
-#ifdef _KWQ_
void _lockFocus();
void _unlockFocus();
@@ -200,10 +137,6 @@ private:
void _drawPoints (const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
QPainterPrivate *data;
-
-#endif
-}; // end class QPainter
-
-// =============================================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qpoint.h b/WebCore/kwq/qt/qpoint.h
index 5125be6..6864a8d 100644
--- a/WebCore/kwq/qt/qpoint.h
+++ b/WebCore/kwq/qt/qpoint.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,14 +26,12 @@
#ifndef QPOINT_H_
#define QPOINT_H_
-#include <config.h>
+#include <KWQDef.h>
#ifdef _KWQ_IOSTREAM_
#include <iostream>
#endif
-#include <KWQDef.h>
-
#include "qarray.h"
class QPoint {
@@ -42,8 +40,8 @@ public:
QPoint();
QPoint(int, int);
- int x() const;
- int y() const;
+ int x() const { return xCoord; }
+ int y() const { return yCoord; }
int manhattanLength() const;
@@ -52,8 +50,8 @@ public:
private:
- QCOORD xCoord;
- QCOORD yCoord;
+ int xCoord;
+ int yCoord;
};
@@ -63,7 +61,7 @@ public:
QPointArray() {}
QPointArray(int size) : QMemArray<QPoint>(size) {}
- QPointArray(int, const QCOORD *);
+ QPointArray(int, const int *);
void setPoint(uint, int, int);
#if 0
@@ -72,7 +70,7 @@ public:
#else
bool setPoints(int, int, int, int, int, int, int, int, int);
#endif
- bool setPoints( int nPoints, const QCOORD *points );
+ bool setPoints( int nPoints, const int *points );
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QPoint &);
diff --git a/WebCore/kwq/qt/qradiobutton.h b/WebCore/kwq/qt/qradiobutton.h
index f0ed6cb..2ac9e86 100644
--- a/WebCore/kwq/qt/qradiobutton.h
+++ b/WebCore/kwq/qt/qradiobutton.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,49 +26,15 @@
#ifndef QRADIOBUTTON_H_
#define QRADIOBUTTON_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qbutton.h>
-#include "qwidget.h"
-
-// class QRadioButton ==========================================================
-
class QRadioButton : public QButton {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QRadioButton(QWidget *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QRadioButton() {}
-#endif
-
- // member functions --------------------------------------------------------
void setChecked(bool);
- bool isChecked();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QRadioButton(const QRadioButton &);
- QRadioButton &operator=(const QRadioButton &);
-
-}; // class QRadioButton =======================================================
+ bool isChecked() const;
+};
#endif
diff --git a/WebCore/kwq/qt/qrect.h b/WebCore/kwq/qt/qrect.h
index 89375b9..8ef3256 100644
--- a/WebCore/kwq/qt/qrect.h
+++ b/WebCore/kwq/qt/qrect.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,102 +26,50 @@
#ifndef QRECT_H_
#define QRECT_H_
-#ifdef USING_BORROWED_QRECT
-
-#include <_qrect.h>
-
-#else
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef _KWQ_IOSTREAM_
-#include <iostream>
-#endif
-
-#include <KWQDef.h>
-
-#include "qsize.h"
-#include "qpoint.h"
-
-// class QRect =================================================================
+#include <qsize.h>
+#include <qpoint.h>
class QRect {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QRect();
QRect(QPoint p, QSize s);
QRect(int, int, int, int);
- // QRect(const QRect &);
- // default copy constructor is fine
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QRect() {}
-#endif
-
- // member functions --------------------------------------------------------
bool isNull() const;
bool isValid() const;
bool isEmpty() const;
- int x() const;
- int y() const;
- int left() const;
- int top() const;
+ int x() const { return xp; }
+ int y() const { return yp; }
+ int left() const { return xp; }
+ int top() const { return yp; }
int right() const;
int bottom() const;
- int width() const;
- int height() const;
+ int width() const { return w; }
+ int height() const { return h; }
QPoint topLeft() const;
QSize size() const;
- void setWidth(int);
- void setHeight(int);
+ void setWidth(int width) { w = width; }
+ void setHeight(int height) { h = height; }
QRect intersect(const QRect &) const;
bool intersects(const QRect &) const;
QRect unite(const QRect &) const;
-
- // operators ---------------------------------------------------------------
-
- /* Note: Trolltech seems to want operator= to be a bitwise copy
- * QRect &operator=(const QRect &);
- */
-
- QRect operator&(const QRect &) const;
+
+ inline QRect operator&(const QRect &r) const { return intersect(r); }
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QRect &);
#endif
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
private:
- QCOORD xp;
- QCOORD yp;
- QCOORD w;
- QCOORD h;
+ int xp;
+ int yp;
+ int w;
+ int h;
friend bool operator==(const QRect &, const QRect &);
friend bool operator!=(const QRect &, const QRect &);
-}; // class QRect ==============================================================
-
-// operators associated with QRect =============================================
-
-bool operator==(const QRect &, const QRect &);
-bool operator!=(const QRect &, const QRect &);
-
-#endif
+};
#endif
diff --git a/WebCore/kwq/qt/qregion.h b/WebCore/kwq/qt/qregion.h
index 90d6c1f..1f35fd5 100644
--- a/WebCore/kwq/qt/qregion.h
+++ b/WebCore/kwq/qt/qregion.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,83 +26,37 @@
#ifndef QREGION_H_
#define QREGION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QREGION ======================================================
-
-#ifdef USING_BORROWED_QREGION
-#include <_qregion.h>
-#include "qpoint.h"
-#include "qimage.h"
-#include "qrect.h"
-#else
-
-#include "qpoint.h"
-#include "qimage.h"
-#include "qrect.h"
+#include <qpoint.h>
+#include <qimage.h>
+#include <qrect.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSBezierPath;
+#else
+class NSBezierPath;
#endif
-// class QRegion ===============================================================
-
class QRegion {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // NOTE: alphabetical order
enum RegionType { Ellipse, Rectangle };
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- static const QRegion null;
-
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QRegion();
QRegion(const QRect &);
- QRegion(int, int, int, int, RegionType t=Rectangle);
+ QRegion(int, int, int, int, RegionType=Rectangle);
QRegion(const QPointArray &);
QRegion(const QRegion &);
~QRegion();
- // member functions --------------------------------------------------------
-
QRegion intersect(const QRegion &) const;
bool contains(const QPoint &) const;
bool isNull() const;
void translate(int deltaX, int deltaY);
QRect boundingRect() const;
- // operators ---------------------------------------------------------------
-
QRegion &operator=(const QRegion &);
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
- struct KWQRegionData {
- RegionType type;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSBezierPath *path;
-#else
- void *path;
-#endif
- } *data;
-
-#ifdef _KWQ_
- void _initialize();
-#endif
-
-}; // class QRegion ============================================================
-
-#endif // USING_BORROWED_QREGION
+ NSBezierPath *path;
+};
#endif
diff --git a/WebCore/kwq/qt/qscrollview.h b/WebCore/kwq/qt/qscrollview.h
index e6f9c09..1391020 100644
--- a/WebCore/kwq/qt/qscrollview.h
+++ b/WebCore/kwq/qt/qscrollview.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,35 +26,13 @@
#ifndef QSCROLLVIEW_H_
#define QSCROLLVIEW_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQScrollBar.h>
-#include <KWQFrame.h>
-#include "qwidget.h"
-
-// class QScrollView ===========================================================
+#include <qframe.h>
class QScrollView : public QFrame {
public:
-
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
- // NOTE: alphabetical order
enum ScrollBarMode { AlwaysOff, AlwaysOn, Auto };
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QScrollView(QWidget *parent=0, const char *name=0, WFlags f=0);
- ~QScrollView();
-
- // member functions --------------------------------------------------------
+ QScrollView(QWidget *parent=0, const char *name=0, int f=0);
QWidget* viewport() const;
int visibleWidth() const;
@@ -94,18 +72,6 @@ public:
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QScrollView(const QScrollView &);
- QScrollView &operator=(const QScrollView &);
-
-}; // class QScrollView ========================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qsize.h b/WebCore/kwq/qt/qsize.h
index 31000ac..6d6ae53 100644
--- a/WebCore/kwq/qt/qsize.h
+++ b/WebCore/kwq/qt/qsize.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,74 +26,35 @@
#ifndef QSIZE_H_
#define QSIZE_H_
-#ifdef USING_BORROWED_QSIZE
-
-#include <_qsize.h>
-
-#else
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <iostream>
-
#include <KWQDef.h>
-// class QSize =================================================================
+#ifdef _KWQ_IOSTREAM_
+#include <iostream>
+#endif
class QSize {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QSize();
QSize(int,int);
- // QSize(const QSize &);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QSize() {}
-#endif
-
- // member functions --------------------------------------------------------
bool isValid() const;
- int width() const;
- int height() const;
- void setWidth(int);
- void setHeight(int);
+ int width() const { return w; }
+ int height() const { return h; }
+ void setWidth(int width) { w = width; }
+ void setHeight(int height) { h = height; }
QSize expandedTo(const QSize &) const;
- // operators ---------------------------------------------------------------
-
- /* Note: Trolltech seems to want operator= to be a bitwise copy
- * QSize &operator=(const QSize &);
- */
-
friend QSize operator+(const QSize &, const QSize &);
friend bool operator==(const QSize &, const QSize &);
friend bool operator!=(const QSize &, const QSize &);
-
#ifdef _KWQ_IOSTREAM_
friend std::ostream &operator<<(std::ostream &, const QSize &);
#endif
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
- QCOORD w;
- QCOORD h;
-
-}; // class QSize ==============================================================
-
-#endif
+private:
+ int w;
+ int h;
+};
#endif
diff --git a/WebCore/kwq/qt/qstack.h b/WebCore/kwq/qt/qstack.h
index 64b883f..730a85e 100644
--- a/WebCore/kwq/qt/qstack.h
+++ b/WebCore/kwq/qt/qstack.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,52 +26,24 @@
#ifndef QSTACK_H_
#define QSTACK_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTACK =======================================================
-
-#ifdef USING_BORROWED_QSTACK
-#include <_qstack.h>
-#else
-
#include <qlist.h>
-// class QPtrStack ================================================================
-
template<class T> class QPtrStack {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QPtrStack() : list() {}
- QPtrStack(const QPtrStack<T> &s) : list(s.list) {}
- ~QPtrStack() {}
-
- // member functions --------------------------------------------------------
+ QPtrStack() { }
bool isEmpty() const { return list.isEmpty(); }
void push(const T *item) { list.append (item); }
T *pop() { T *tmp = list.getLast(); list.removeLast(); return tmp; }
uint count() const { return list.count(); }
- // operators ---------------------------------------------------------------
-
- QPtrStack<T> &operator=(const QPtrStack<T> &s) { list = s.list; return *this; }
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QPtrList<T> list;
-}; // class QPtrStack =============================================================
+};
#ifdef _KWQ_IOSTREAM_
+
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
{
@@ -91,9 +63,6 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
return stream;
}
-
#endif
-#endif // USING_BORROWED_QSTACK
-
#endif
diff --git a/WebCore/kwq/qt/qstringlist.h b/WebCore/kwq/qt/qstringlist.h
index f6f0c6c..f0901a8 100644
--- a/WebCore/kwq/qt/qstringlist.h
+++ b/WebCore/kwq/qt/qstringlist.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,55 +26,15 @@
#ifndef QSTRINGLIST_H_
#define QSTRINGLIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QSTRINGLIST ==================================================
-
-#ifdef USING_BORROWED_QSTRINGLIST
-#include <_qstringlist.h>
-#else
-
-#include "qstring.h"
-#include "qvaluelist.h"
-
-// class QStringList ===========================================================
+#include <qstring.h>
+#include <qvaluelist.h>
class QStringList : public QValueList<QString> {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static QStringList split(const QString &, const QString &,
- bool allowEmptyEntries = FALSE );
- static QStringList split(const QChar &, const QString &,
- bool allowEmptyEntries = FALSE );
-
- // constructors, copy constructors, and destructors ------------------------
-
- QStringList();
- QStringList(const QStringList &);
-
- ~QStringList();
-
- // member functions --------------------------------------------------------
+ static QStringList split(const QString &, const QString &, bool allowEmptyEntries = false);
+ static QStringList split(const QChar &, const QString &, bool allowEmptyEntries = false);
QString join(const QString &) const;
-
- // operators ---------------------------------------------------------------
-
- QStringList &operator=(const QStringList &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QStringList ========================================================
-
-#endif // USING_BORROWED_QSTRINGLIST
+};
#endif
diff --git a/WebCore/kwq/qt/qtextedit.h b/WebCore/kwq/qt/qtextedit.h
index 1501f3f..04ebc8a 100644
--- a/WebCore/kwq/qt/qtextedit.h
+++ b/WebCore/kwq/qt/qtextedit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,10 +61,8 @@ class QTextEdit : public QScrollView
void selectAll();
-#ifdef APPLE_CHANGES
int verticalScrollBarWidth() const;
int horizontalScrollBarHeight() const;
-#endif
};
#endif /* QTEXTEDIT_H_ */
diff --git a/WebCore/kwq/qt/qvaluelist.h b/WebCore/kwq/qt/qvaluelist.h
index 17c53ae..c38c130 100644
--- a/WebCore/kwq/qt/qvaluelist.h
+++ b/WebCore/kwq/qt/qvaluelist.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,102 +26,71 @@
#ifndef QVALUELIST_H_
#define QVALUELIST_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QVALUELIST ===================================================
-
-#ifdef USING_BORROWED_QVALUELIST
-#include <_qvaluelist.h>
-#else
-
#include <KWQDef.h>
#include <KWQValueListImpl.h>
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
template <class T> class QValueList;
template <class T> class QValueListConstIterator;
template<class T> class QValueListNode : private KWQValueListNodeImpl {
public:
- QValueListNode(const T &val) : KWQValueListNodeImpl(), value(val) {}
- ~QValueListNode() {}
-
+ QValueListNode(const T &val) : value(val) { }
T value;
friend class QValueList<T>;
};
-
-// class QValueListIterator ====================================================
template<class T> class QValueListIterator {
public:
- QValueListIterator() : impl() {}
- QValueListIterator(const QValueListIterator<T> &other) : impl(other.impl) {}
-
- ~QValueListIterator() {}
-
- QValueListIterator &operator=(const QValueListIterator &other) { impl = other.impl; return *this; }
+ QValueListIterator() { }
- bool operator==(const QValueListIterator<T> &other) { return impl == other.impl; }
- bool operator!=(const QValueListIterator<T> &other) { return impl != other.impl; }
+ bool operator==(const QValueListIterator &other) { return impl == other.impl; }
+ bool operator!=(const QValueListIterator &other) { return impl != other.impl; }
const T& operator*() const { return ((const QValueListNode<T> *)impl.node())->value; }
QValueListIterator operator++() { ++impl; return *this; }
T& operator*() { return ((QValueListNode<T> *)impl.node())->value; }
- QValueListIterator<T>& operator--() { --impl; return *this; }
- QValueListIterator operator++(int) { return QValueListIterator<T>(impl++); }
+ QValueListIterator& operator--() { --impl; return *this; }
+ QValueListIterator operator++(int) { return impl++; }
private:
- QValueListIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) {}
+ QValueListIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) { }
KWQValueListIteratorImpl impl;
friend class QValueList<T>;
friend class QValueListConstIterator<T>;
-}; // class QValueListIterator =================================================
-
+};
-// class QValueListConstIterator ===============================================
template<class T> class QValueListConstIterator {
public:
- QValueListConstIterator() : impl() {}
- QValueListConstIterator(const QValueListConstIterator<T> &other) : impl(other.impl) {}
- QValueListConstIterator(const QValueListIterator<T> &other) : impl(other.impl) {}
-
- ~QValueListConstIterator() {}
-
- QValueListConstIterator &operator=(const QValueListConstIterator &other) { impl = other.impl; return *this; }
- bool operator==(const QValueListConstIterator<T> &other) { return impl == other.impl; }
- bool operator!=(const QValueListConstIterator<T> &other) { return impl != other.impl; }
+ QValueListConstIterator() { }
+ QValueListConstIterator(const QValueListIterator<T> &other) : impl(other.impl) { }
+
+ bool operator==(const QValueListConstIterator &other) { return impl == other.impl; }
+ bool operator!=(const QValueListConstIterator &other) { return impl != other.impl; }
const T& operator*() const { return ((const QValueListNode<T> *)impl.node())->value; }
QValueListConstIterator operator++() { ++impl; return *this; }
- QValueListConstIterator operator++(int) { return QValueListConstIterator<T>(impl++); }
+ QValueListConstIterator operator++(int) { return impl++; }
private:
- QValueListConstIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) {}
+ QValueListConstIterator(const KWQValueListIteratorImpl &pImp) : impl(pImp) { }
KWQValueListIteratorImpl impl;
friend class QValueList<T>;
-}; // class QValueListConstIterator ============================================
-
+};
-// class QValueList ============================================================
template <class T> class QValueList {
public:
-
typedef QValueListIterator<T> Iterator;
typedef QValueListConstIterator<T> ConstIterator;
- // constructors, copy constructors, and destructors ------------------------
-
- QValueList() : impl(deleteNode, copyNode) {}
- QValueList(const QValueList<T>&other) : impl(other.impl) {}
-
- ~QValueList() {}
+ QValueList() : impl(deleteNode, copyNode) { }
// member functions --------------------------------------------------------
@@ -134,35 +103,34 @@ public:
void remove(const T &val) { QValueListNode<T> node(val); impl.removeEqualNodes(&node, nodesEqual); }
uint contains(const T &val) const { QValueListNode<T> node(val); return impl.containsEqualNodes(&node, nodesEqual); }
- Iterator remove(Iterator iter) { return QValueListIterator<T>(impl.removeIterator(iter.impl)); }
- Iterator fromLast() { return QValueListIterator<T>(impl.fromLast()); }
+ Iterator remove(Iterator iter) { return impl.removeIterator(iter.impl); }
+ Iterator fromLast() { return impl.fromLast(); }
const T& first() const { return ((QValueListNode<T> *)impl.firstNode())->value; }
const T& last() const { return ((QValueListNode<T> *)impl.lastNode())->value; }
- Iterator begin() { return QValueListIterator<T>(impl.begin()); }
- Iterator end() { return QValueListIterator<T>(impl.end()); }
+ Iterator begin() { return impl.begin(); }
+ Iterator end() { return impl.end(); }
- ConstIterator begin() const { return QValueListConstIterator<T>(impl.begin()); }
- ConstIterator end() const { return QValueListConstIterator<T>(impl.end()); }
+ ConstIterator begin() const { return impl.begin(); }
+ ConstIterator end() const { return impl.end(); }
- // operators ---------------------------------------------------------------
-
- QValueList<T>& operator=(const QValueList<T>&other) { impl = other.impl; return *this; }
T& operator[] (uint index) { return ((QValueListNode<T> *)impl.nodeAt(index))->value; }
const T& operator[] (uint index) const { return ((const QValueListNode<T> *)impl.nodeAt(index))->value; }
QValueList<T> &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
-
QValueList<T> &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
private:
KWQValueListImpl impl;
static void deleteNode(KWQValueListNodeImpl *node) { delete (QValueListNode<T> *)node; }
- static bool nodesEqual(const KWQValueListNodeImpl *a, const KWQValueListNodeImpl *b) { return ((QValueListNode<T> *)a)->value == ((QValueListNode<T> *)b)->value; }
- static KWQValueListNodeImpl *copyNode(KWQValueListNodeImpl *node) { return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
-}; // class QValueList =========================================================
+ static bool nodesEqual(const KWQValueListNodeImpl *a, const KWQValueListNodeImpl *b)
+ { return ((QValueListNode<T> *)a)->value == ((QValueListNode<T> *)b)->value; }
+ static KWQValueListNodeImpl *copyNode(KWQValueListNodeImpl *node)
+ { return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
+};
+#ifdef _KWQ_IOSTREAM_
template<class T>
inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
@@ -182,7 +150,6 @@ inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
return o;
}
-
-#endif // USING_BORROWED_QVALUELIST
+#endif
#endif
diff --git a/WebCore/kwq/qt/qvector.h b/WebCore/kwq/qt/qvector.h
index 415e87d..5d713de 100644
--- a/WebCore/kwq/qt/qvector.h
+++ b/WebCore/kwq/qt/qvector.h
@@ -26,16 +26,6 @@
#ifndef QVECTOR_H_
#define QVECTOR_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QVECTOR ======================================================
-
-#ifdef USING_BORROWED_QVECTOR
-#include <_qvector.h>
-#else
-
#include <iostream>
#include <KWQDef.h>
@@ -43,19 +33,19 @@
#include <KWQVectorImpl.h>
-// class QPtrVector ===============================================================
-template<class T> class QPtrVector : public QPtrCollection {
+class QGVector : public QPtrCollection
+{
public:
+ virtual int compareItems(void *a, void *b) = 0;
+};
- // constructors, copy constructors, and destructors ------------------------
-
+// class QPtrVector ===============================================================
+template<class T> class QPtrVector : public QGVector {
+public:
QPtrVector() : impl(deleteFunc) {}
QPtrVector(uint size) : impl(size, deleteFunc) {}
- QPtrVector(const QPtrVector<T> &v) : QPtrCollection(v), impl(v.impl) {}
~QPtrVector() { if (del_item) { impl.clear(del_item); } }
- // member functions --------------------------------------------------------
-
void clear() { impl.clear(del_item); }
bool isEmpty() const { return impl.isEmpty(); }
uint count() const { return impl.count(); }
@@ -68,20 +58,15 @@ public:
virtual int compareItems(void *a, void *b) { return a != b; }
- // operators ---------------------------------------------------------------
-
T *operator[](int n) const {return (T *)impl.at(n); }
QPtrVector &operator=(const QPtrVector &v)
{ impl.assign(v.impl,del_item); QPtrCollection::operator=(v); return *this; }
+
private:
- static void deleteFunc(void *item) {
- delete (T *)item;
- }
+ static void deleteFunc(void *item) { delete (T *)item; }
KWQVectorImpl impl;
-}; // class QPtrVector ============================================================
-
-
+};
template<class T>
inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
@@ -99,6 +84,4 @@ inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
return stream << "]";
}
-#endif // USING_BORROWED_QVECTOR
-
#endif
diff --git a/WebCore/kwq/qt/qwidget.h b/WebCore/kwq/qt/qwidget.h
index a55e702..ed5130f 100644
--- a/WebCore/kwq/qt/qwidget.h
+++ b/WebCore/kwq/qt/qwidget.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,38 +26,28 @@
#ifndef QWIDGET_H_
#define QWIDGET_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qobject.h"
-#include "qpaintdevice.h"
-#include "qpainter.h"
-#include "qpoint.h"
-#include "qsize.h"
-#include "qpalette.h"
-#include "qfont.h"
-#include "qcursor.h"
-#include "qevent.h"
+#include <qobject.h>
+#include <qpaintdevice.h>
+#include <qpainter.h>
+#include <qpoint.h>
+#include <qsize.h>
+#include <qpalette.h>
+#include <qfont.h>
+#include <qcursor.h>
+#include <qevent.h>
#include <KWQStyle.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSView;
+#else
+class NSView;
#endif
class QWidgetPrivate;
-// class QWidget ===============================================================
-
-// FIX ME! RJW - need to check if inheritance from QPaintDevice is really necessary.
-
class QWidget : public QObject, public QPaintDevice {
public:
- // typedefs ----------------------------------------------------------------
-
- // enums -------------------------------------------------------------------
-
enum WidgetFlags {
WResizeNoErase = 1,
WRepaintNoErase = 1 << 1,
@@ -72,17 +62,9 @@ public:
WheelFocus = 0x7
};
- enum BackgroundMode { NoBackground, };
-
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QWidget(QWidget *parent=0, const char *name=0, WFlags f=0);
+ QWidget(QWidget *parent = 0, const char *name = 0, int f = 0);
~QWidget();
- // member functions --------------------------------------------------------
-
virtual QSize sizeHint() const;
virtual void resize(int,int);
virtual void setActiveWindow();
@@ -144,54 +126,24 @@ public:
virtual void keyReleaseEvent(QKeyEvent *);
virtual void focusOutEvent(QFocusEvent *);
- virtual void setBackgroundMode(BackgroundMode);
-
- virtual void setAcceptDrops(bool);
-
- void erase();
+ enum BackgroundMode { NoBackground };
+ void setBackgroundMode(BackgroundMode) { }
- QWidget *focusWidget() const;
-
- // Required for KWQ
-#ifdef _KWQ_
-
- virtual void paint (void *);
-
- bool _lockFocus();
- void _unlockFocus();
- void _displayRect(QRect rect);
- void _flushWindow();
-
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSView *getView() const;
- void setView(NSView *aView);
- void endEditing();
-#else
- void *getView() const;
- void setView(void *aView);
- void endEditing();
-#endif
-
-#endif _KWQ_
+ void setAcceptDrops(bool) { }
- // operators ---------------------------------------------------------------
+ virtual void paint(void *);
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
+ void _displayRect(QRect rect);
+
+ NSView *getView() const;
+ void setView(NSView *aView);
+
+ void endEditing();
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QWidget(const QWidget &);
- QWidget &operator=(const QWidget &);
-
- void setCRect( const QRect &r );
void internalSetGeometry( int x, int y, int w, int h );
- void _initialize();
-
QWidgetPrivate *data;
-
-}; // class QWidget ============================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qxml.h b/WebCore/kwq/qt/qxml.h
index cedc14c..51f2d92 100644
--- a/WebCore/kwq/qt/qxml.h
+++ b/WebCore/kwq/qt/qxml.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,451 +26,52 @@
#ifndef QXML_H_
#define QXML_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
class QString;
-// class QXmlAttributes ========================================================
-
class QXmlAttributes {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlAttributes();
- QXmlAttributes(const QXmlAttributes &);
- virtual ~QXmlAttributes();
-
- // member functions --------------------------------------------------------
-
QString value(const QString &) const;
int length() const;
QString localName(int index) const;
QString value(int index) const;
QString uri(int index) const;
-
- // operators ---------------------------------------------------------------
-
- QXmlAttributes &operator=(const QXmlAttributes &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QXmlAttributes =====================================================
-
-
-// class QXmlInputSource ========================================================
+};
class QXmlInputSource {
public:
+ void setData(const QString &);
+};
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlInputSource();
- virtual ~QXmlInputSource();
-
- // member functions --------------------------------------------------------
-
- virtual void setData(const QString& data);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlInputSource(const QXmlInputSource &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlInputSource &operator=(const QXmlInputSource &);
-#endif
-
-}; // class QXmlInputSource ====================================================
-
-
-// class QXmlDTDHandler ========================================================
-
-class QXmlDTDHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlDTDHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler(const QXmlDTDHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDTDHandler &operator=(const QXmlDTDHandler &);
-#endif
-
-}; // class QXmlDTDHandler =====================================================
-
-
-// class QXmlDeclHandler ========================================================
-
-class QXmlDeclHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlDeclHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler(const QXmlDeclHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDeclHandler &operator=(const QXmlDeclHandler &);
-#endif
-
-}; // class QXmlDeclHandler =====================================================
-
-
-// class QXmlErrorHandler ========================================================
-
-class QXmlErrorHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlErrorHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler(const QXmlErrorHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlErrorHandler &operator=(const QXmlErrorHandler &);
-#endif
-
-}; // class QXmlErrorHandler =====================================================
-
-
-// class QXmlLexicalHandler ========================================================
-
-class QXmlLexicalHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlLexicalHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler(const QXmlLexicalHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlLexicalHandler &operator=(const QXmlLexicalHandler &);
-#endif
-
-}; // class QXmlLexicalHandler =====================================================
-
-
-// class QXmlContentHandler ========================================================
-
-class QXmlContentHandler {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlContentHandler() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler(const QXmlContentHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlContentHandler &operator=(const QXmlContentHandler &);
-#endif
-
-}; // class QXmlContentHandler =====================================================
-
-
-// class QXmlDefaultHandler ====================================================
+class QXmlDTDHandler { };
+class QXmlDeclHandler { };
+class QXmlErrorHandler { };
+class QXmlLexicalHandler { };
+class QXmlContentHandler { };
class QXmlDefaultHandler :
public QXmlContentHandler,
public QXmlLexicalHandler,
public QXmlErrorHandler,
public QXmlDeclHandler,
- public QXmlDTDHandler {
-
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlDefaultHandler() {}
- virtual ~QXmlDefaultHandler();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlDefaultHandler(const QXmlDefaultHandler &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlDefaultHandler &operator=(const QXmlDefaultHandler &);
-#endif
-
-}; // class QXmlDefaultHandler =====================================================
-
-
-// class QXmlSimpleReader ======================================================
+ public QXmlDTDHandler
+{
+};
class QXmlSimpleReader {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlSimpleReader();
- virtual ~QXmlSimpleReader();
-
- // member functions --------------------------------------------------------
-
void setContentHandler(QXmlContentHandler *handler);
bool parse(const QXmlInputSource &input);
void setLexicalHandler(QXmlLexicalHandler *handler);
void setDTDHandler(QXmlDTDHandler *handler);
void setDeclHandler(QXmlDeclHandler *handler);
void setErrorHandler(QXmlErrorHandler *handler);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlSimpleReader(const QXmlSimpleReader &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlSimpleReader &operator=(const QXmlSimpleReader &);
-#endif
-
-}; // class QXmlSimpleReader ===================================================
-
-
-// class QXmlParseException ====================================================
+};
class QXmlParseException {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QXmlParseException();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QXmlParseException() {}
-#endif
-
- // member functions --------------------------------------------------------
-
QString message() const;
int columnNumber() const;
int lineNumber() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QXmlParseException(const QXmlParseException &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QXmlParseException &operator=(const QXmlParseException &);
-#endif
-
-}; // class QXmlParseException =================================================
+};
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list