[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:07:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8a88b31976be928d512c9cfca2f237b65887d0e2
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Apr 18 22:38:47 2002 +0000
* Makefile.am: Pass the -f flag to ln so it doesn't fail when
there's already a link there.
* configure.in: Use gcc3 and g++3 so we always get gcc 3.0, no
matter how the system is configured. Besides the fact that gcc
3.0 includes more in -Wall, turned on the following additional
warnings that were not on before:
-W
-Wbad-function-cast
-Wformat-security
-Wmissing-format-attribute
-Wstrict-prototypes
-Wwrite-strings
Also removed the -fno-coalesce-static-vtables flag for C++
and removed explicit mention of C++ warnings that are part of
-Wall in gcc 3.0 at least.
* Tests/harness.c: (main): Const string fix.
* Tests/kde/kurl-test.cpp: (testURL): Std namespace and const string fix.
* Tests/libiftest/IFTestDirectory.c: (IFSetUpTestDirectory): Const string fix.
* Tests/libiftest/IFTestDirectory.h: Const string fix.
* Tests/qt/qarray-test.cpp:
* Tests/qt/qbuffer-test.cpp:
* Tests/qt/qchar-test.cpp:
* Tests/qt/qcstring-test.cpp:
* Tests/qt/qdate-test.cpp:
* Tests/qt/qdatetime-test.cpp:
* Tests/qt/qdict-test.cpp:
* Tests/qt/qdir-test.cpp:
* Tests/qt/qfile-test.cpp:
* Tests/qt/qlist-test.cpp:
* Tests/qt/qmap-test.cpp:
* Tests/qt/qpoint-test.cpp:
* Tests/qt/qptrdict-test.cpp:
* Tests/qt/qrect-test.cpp:
* Tests/qt/qregexp-test.cpp:
* Tests/qt/qsize-test.cpp:
* Tests/qt/qsortedlist-test.cpp:
* Tests/qt/qstack-test.cpp:
* Tests/qt/qstring-test.cpp:
* Tests/qt/qstringlist-test.cpp:
* Tests/qt/qtime-test.cpp:
* Tests/qt/qvaluelist-test.cpp:
* Tests/qt/qvector-test.cpp:
Add "using namespace std" to each test as a simple std namespace fix.
WebFoundation:
Reviewed by Maciej
Fixes for compiling with gcc3 and more warnings.
* WebFoundation.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
as in the rest of Labyrinth (see top level ChangeLog for details).
* CacheLoader.subproj/IFURLHandle.m: (-[IFURLHandle percentComplete]):
Rearrange code to avoid a cast to (float) that gcc3 didn't like.
* Database.subproj/IFNDBMDatabase.m: (-[IFNDBMDatabase objectForKey:]):
Mark some variables volatile to make gcc3 happy about their values and the
use of longjmp. Good catch on the compiler's part.
* Database.subproj/IFURLFileDatabase.m: Work around bug 2905545 so we can
have -W on for all the rest of WebFoundation.
(URLFileReaderInit): Mark this as (void) so it's not a non-prototyped function.
(-[IFURLFileReader initWithPath:]): Don't assign to self so gcc3 is not unhappy
about the use of it with longjmp.
(-[IFURLFileDatabase objectForKey:]): Mark some variables volatile to make gcc3
happy about their values and the use of longjmp.
* Misc.subproj/IFNSObjectExtensions.m: (-[NSObject performBooleanSelector:]),
(-[NSObject performBooleanSelector:withObject:]): Do a new implementation that
does't make the compiler unhappy about type casts.
* Misc.subproj/IFNSThreadExtensions.m: Work around bug 2905545 so we can
have -W on for all the rest of WebFoundation.
(InitJoinableThreads): Mark this as (void) so it's not a non-prototyped function.
JavaScriptCore:
Reviewed by Maciej
* JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
as in the rest of Labyrinth (see top level ChangeLog for details).
WebCore:
Fixes for compiling with gcc3 and more warnings.
* khtml/html/.cvsignore: Add kentities.c; I could have sworn I did this
already.
* khtml/html/Makefile.am: Remove erroneous duplicate definition of
CLEAN_FILES.
* libwebcore.exp:
* libwebcoretests.exp:
Rebuilt these lists from scratch. Almost everything in here is different
since the C++ name mangling rules changed.
* khtml/css/cssparser.cpp:
* khtml/misc/htmlhashes.cpp:
Disable inlining in part of this file as a workaround for Radar 2905890.
* kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry):
Add casts to int needed to make gcc3 happy.
* kwq/KWQArrayImpl.mm: Add missing #include of <string.h>.
* kwq/KWQBitmap.mm:
* kwq/KWQFrame.mm:
* kwq/KWQLineEdit.mm:
Removed some unused copy constructors and assignment operators to avoid
warnings in them.
* kwq/KWQButton.mm: (QButton::setText):
* kwq/KWQListBox.mm: (QListBox::~QListBox), (QListBox::clear),
(QListBox::setSelectionMode), (QListBox::currentItem), (QListBox::insertItem),
(QListBox::setSelected), (QListBox::isSelected), (QListBoxItem::width),
(QListBoxItem::height):
* kwq/KWQScrollView.mm: (QScrollView::setContentsPos), (QScrollView::addChild),
(QScrollView::resizeContents), (QScrollView::viewportToContents),
Use local variables to work around Radar 2905835.
* kwq/KWQCString.mm: (operator<<):
* kwq/KWQPoint.mm: (operator<<):
* kwq/KWQRect.mm: (operator<<):
* kwq/KWQSize.mm: (operator<<):
* kwq/qt/qarray.h:
* kwq/qt/qcstring.h:
* kwq/qt/qdatetime.h:
* kwq/qt/qdict.h:
* kwq/qt/qlist.h:
* kwq/qt/qmap.h:
* kwq/qt/qpainter.h:
* kwq/qt/qpoint.h:
* kwq/qt/qptrdict.h:
* kwq/qt/qrect.h:
* kwq/qt/qsize.h:
* kwq/qt/qstack.h:
* kwq/qt/qvaluelist.h:
* kwq/qt/qvector.h:
Say std::ostream instead of just ostream.
* kwq/KWQCharsets.mm: Fix a const problem.
* kwq/KWQDateTime.mm: (QTime::elapsed), (QTime::restart): Use int instead
of uint, since these functions try to handle values that are less than 0.
(operator<<): Say std::ostream instead of just ostream.
* kwq/KWQTextArea.mm: (RangeOfParagraph): Fix an int/uint issue.
* kwq/KWQFile.mm: (QFile::KWQFilePrivate::KWQFilePrivate),
(QFile::KWQFilePrivate::~KWQFilePrivate): Use new/delete instead of
malloc/free so we don't get void * warnings.
* kwq/KWQFontMetrics.mm: (__IFFillStyleWithAttributes),
(-[KWQLayoutInfo drawString:atPoint:withFont:color:]),
(-[KWQLayoutInfo _initializeCaches]),
(_rectForString):
* kwq/KWQKURL.mm: (KURL::KWQKURLPrivate::KWQKURLPrivate),
(RelativeURLKeyRetainCallBack), (RelativeURLKeyReleaseCallBack),
(RelativeURLKeyEqualCallBack), (RelativeURLKeyHashCallBack),
(KURL::normalizeURLString), (KURL::normalizeRelativeURLString):
* kwq/KWQPainter.mm: (QPainter::save):
* kwq/KWQKloader.mm:
(-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]),
(-[URLLoadClient IFURLHandle:didRedirectToURL:]):
Add type casts where necessary to make the stricter gcc3 happy.
* kwq/KWQPixmap.mm: (QPixmap::QPixmap): Explicitly initialize the underlying
QPaintDevice.
(QPixmap::size), (QPixmap::rect): Add type casts where necessary to make
the stricter gcc3 happy.
* kwq/KWQPtrDictImpl.mm: (KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate):
Say std::bad_alloc instead of just bad_alloc.
(invokeDeleteFuncOnValue), (KWQPtrDictImpl::clear): Pass a pointer to a function
pointer rather than a function pointer to avoid a warning about turning function
pointers into void *.
* kwq/KWQRegion.mm: (QRegion::_initialize), (QRegion::~QRegion): Use new/delete
rather than calloc/free so we don't get void * warnings.
(QRegion::boundingRect): Add type casts.
* kwq/KWQString.mm: (QString::fromStringWithEncoding): Add cast.
(QString::setNum): use %ld and %lu rather than %D and %U.
(QString::fill), (QString::convertToQCString): Add casts.
* kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
Add a cast to make gcc3 happy.
* kwq/KWQVariant.mm: Say "friend class" instead of "friend".
* kwq/KWQVectorImpl.mm: (KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate):
Say std::bad_alloc instead of just bad_alloc.
(KWQVectorImpl::data): Replace the old autorelease trick with a new one that
doesn't require mixing malloc with NSData.
* kwq/KWQView.mm: (-[KWQHTMLView mouseUp:]), (-[KWQHTMLView mouseDown:]):
Add casts to make gcc3 happy.
* kwq/KWQWidget.mm: (QWidget::frameGeometry), (QWidget::mapToGlobal),
(QWidget::minimumSizeHint): Add casts to make gcc3 happy. Also another
workaround for Radar 2905835.
* kwq/WCPlugin.mm: (-[WCPlugin load]): Add tons of type casts so we don't have
to mix void * with function pointer types.
* kwq/WCPluginWidget.h:
* kwq/WCPluginWidget.mm: (WCIFPluginMakeFunction), (WCIFNullPluginMakeFunction):
Change types so we don't have to mix void * with function pointer types.
This caught a mistake where WCIFNullPluginMakeFunction was returning the wrong
function pointer.
* kwq/external.h: Add some missing interfaces that the pickier gcc3 needed to see.
* kwq/kwqdebug.mm: Don't compile the file if xNDEBUG is set. Otherwise we get
a warning in here.
* kwq/npapi.h: Use function pointer types for function pointers and transition
vectors so we don't have to mix void * with function pointer types.
* kwq/npapi.mm: (NPN_GetURLNotify), (NPN_GetURL),
(NPN_PostURLNotify), (NPN_PostURL), (NPN_NewStream), (NPN_Write),
(NPN_DestroyStream), (NPN_Status), (NPN_GetValue), (NPN_SetValue),
(NPN_InvalidateRect), (NPN_InvalidateRegion), (NPN_ForceRedraw):
Use local variables to work around Radar 2905835.
(functionPointerForTVector), (tVectorForFunctionPointer):
Change types around so we don't have to mix void * with function pointer types.
WebKit:
Fixes for compiling with gcc3 and more warnings.
* WebKit.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
as in the rest of Labyrinth (see top level ChangeLog for details).
* Plugins.subproj/IFPluginView.mm:
Avoid warnings about malloc by not using it.
(-[IFPluginView initWithFrame:plugin:url:mime:arguments:mode:]): Keep the arguments
dictionary around instead of keeping the C format version of it around. Also don't
bother keeping the C string form of the MIME type around, and simplify some other
stuff in here.
(-[IFPluginView dealloc]): Corresponding changes since we keep a different set of things.
(-[IFPluginView newStream:mimeType:notifyData:]): Use [mimeType cString].
(-[IFPluginView start]): Build the lists of attributes and values in here. Do it using
[NSString cString] for simplicity and don't keep the lists around after we're done with
them.
(-[IFPluginView IFURLHandleResourceDidFinishLoading:data:]): Use [filenameClassic cString].
* WebView.subproj/IFMainURLHandleClient.mm:
(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]),
(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]),
(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]),
(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate dealloc]),
(-[IFWebDataSource _setLoading:]), (-[IFWebDataSource _setController:]),
(-[IFWebDataSource _setLocationChangeHandler:]):
* WebView.subproj/IFWebView.mm: (-[IFWebView provisionalDataSourceChanged:]),
(-[IFWebView mouseUp:]), (-[IFWebView mouseDown:]):
Add type casts required by pickier gcc3.
* WebView.subproj/IFWebViewPrivate.mm: (-[IFWebViewPrivate dealloc]):
Add type cast required by pickier gcc3.
(-[IFWebView _stopPlugins]): Use local variable to work around Radar 2905835.
WebBrowser:
Fixes for compiling with gcc3 and more warnings.
* WebBrowser.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
as in the rest of Labyrinth (see top level ChangeLog for details).
* InternetConfigUtilities.m: (stringValueForICKey), (setStringValue):
Some const string fixes.
* Preferences.subproj/TextPreferences.m: (-[TextPreferences changeFont:]):
Remove a cast that makes gcc3 unhappy.
* ___CFA2UC.c: (NSGiantRaise): Const string fix.
(gcompg): Old-style function prototype fix.
(initialguess): Remove a cast that makes gcc3 unhappy.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 31224ce..f603a65 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej
+
+ * JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
+ as in the rest of Labyrinth (see top level ChangeLog for details).
+
2002-04-17 Maciej Stachowiak <mjs at apple.com>
Reviewed by: Darin Adler <darin at apple.com>
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index 31224ce..f603a65 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej
+
+ * JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
+ as in the rest of Labyrinth (see top level ChangeLog for details).
+
2002-04-17 Maciej Stachowiak <mjs at apple.com>
Reviewed by: Darin Adler <darin at apple.com>
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 31224ce..f603a65 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej
+
+ * JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
+ as in the rest of Labyrinth (see top level ChangeLog for details).
+
2002-04-17 Maciej Stachowiak <mjs at apple.com>
Reviewed by: Darin Adler <darin at apple.com>
diff --git a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
index 0a4082b..c4fb23e 100644
--- a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
@@ -126,7 +126,8 @@
OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DAPPLE_CHANGES -DHAVE_CONFIG_H";
PRODUCT_NAME = JavaScriptCore;
SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Werror -Wall -Wno-format-y2k -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wreorder -Wsign-compare";
+ USE_GCC3 = YES;
+ WARNING_CFLAGS = "-Werror -Wall -W -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter";
WRAPPER_EXTENSION = framework;
};
dependencies = (
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e9c70b0..7ef9eef 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,162 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Fixes for compiling with gcc3 and more warnings.
+
+ * khtml/html/.cvsignore: Add kentities.c; I could have sworn I did this
+ already.
+ * khtml/html/Makefile.am: Remove erroneous duplicate definition of
+ CLEAN_FILES.
+
+ * libwebcore.exp:
+ * libwebcoretests.exp:
+ Rebuilt these lists from scratch. Almost everything in here is different
+ since the C++ name mangling rules changed.
+
+ * khtml/css/cssparser.cpp:
+ * khtml/misc/htmlhashes.cpp:
+ Disable inlining in part of this file as a workaround for Radar 2905890.
+
+ * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry):
+ Add casts to int needed to make gcc3 happy.
+ * kwq/KWQArrayImpl.mm: Add missing #include of <string.h>.
+
+ * kwq/KWQBitmap.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQLineEdit.mm:
+ Removed some unused copy constructors and assignment operators to avoid
+ warnings in them.
+
+ * kwq/KWQButton.mm: (QButton::setText):
+ * kwq/KWQListBox.mm: (QListBox::~QListBox), (QListBox::clear),
+ (QListBox::setSelectionMode), (QListBox::currentItem), (QListBox::insertItem),
+ (QListBox::setSelected), (QListBox::isSelected), (QListBoxItem::width),
+ (QListBoxItem::height):
+ * kwq/KWQScrollView.mm: (QScrollView::setContentsPos), (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::viewportToContents),
+ Use local variables to work around Radar 2905835.
+
+ * kwq/KWQCString.mm: (operator<<):
+ * kwq/KWQPoint.mm: (operator<<):
+ * kwq/KWQRect.mm: (operator<<):
+ * kwq/KWQSize.mm: (operator<<):
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qdatetime.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qptrdict.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ Say std::ostream instead of just ostream.
+
+ * kwq/KWQCharsets.mm: Fix a const problem.
+
+ * kwq/KWQDateTime.mm: (QTime::elapsed), (QTime::restart): Use int instead
+ of uint, since these functions try to handle values that are less than 0.
+ (operator<<): Say std::ostream instead of just ostream.
+ * kwq/KWQTextArea.mm: (RangeOfParagraph): Fix an int/uint issue.
+
+ * kwq/KWQFile.mm: (QFile::KWQFilePrivate::KWQFilePrivate),
+ (QFile::KWQFilePrivate::~KWQFilePrivate): Use new/delete instead of
+ malloc/free so we don't get void * warnings.
+
+ * kwq/KWQFontMetrics.mm: (__IFFillStyleWithAttributes),
+ (-[KWQLayoutInfo drawString:atPoint:withFont:color:]),
+ (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * kwq/KWQKURL.mm: (KURL::KWQKURLPrivate::KWQKURLPrivate),
+ (RelativeURLKeyRetainCallBack), (RelativeURLKeyReleaseCallBack),
+ (RelativeURLKeyEqualCallBack), (RelativeURLKeyHashCallBack),
+ (KURL::normalizeURLString), (KURL::normalizeRelativeURLString):
+ * kwq/KWQPainter.mm: (QPainter::save):
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]),
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ Add type casts where necessary to make the stricter gcc3 happy.
+
+ * kwq/KWQPixmap.mm: (QPixmap::QPixmap): Explicitly initialize the underlying
+ QPaintDevice.
+ (QPixmap::size), (QPixmap::rect): Add type casts where necessary to make
+ the stricter gcc3 happy.
+
+ * kwq/KWQPtrDictImpl.mm: (KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (invokeDeleteFuncOnValue), (KWQPtrDictImpl::clear): Pass a pointer to a function
+ pointer rather than a function pointer to avoid a warning about turning function
+ pointers into void *.
+
+ * kwq/KWQRegion.mm: (QRegion::_initialize), (QRegion::~QRegion): Use new/delete
+ rather than calloc/free so we don't get void * warnings.
+ (QRegion::boundingRect): Add type casts.
+
+ * kwq/KWQString.mm: (QString::fromStringWithEncoding): Add cast.
+ (QString::setNum): use %ld and %lu rather than %D and %U.
+ (QString::fill), (QString::convertToQCString): Add casts.
+
+ * kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ Add a cast to make gcc3 happy.
+
+ * kwq/KWQVariant.mm: Say "friend class" instead of "friend".
+
+ * kwq/KWQVectorImpl.mm: (KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (KWQVectorImpl::data): Replace the old autorelease trick with a new one that
+ doesn't require mixing malloc with NSData.
+
+ * kwq/KWQView.mm: (-[KWQHTMLView mouseUp:]), (-[KWQHTMLView mouseDown:]):
+ Add casts to make gcc3 happy.
+
+ * kwq/KWQWidget.mm: (QWidget::frameGeometry), (QWidget::mapToGlobal),
+ (QWidget::minimumSizeHint): Add casts to make gcc3 happy. Also another
+ workaround for Radar 2905835.
+
+ * kwq/WCPlugin.mm: (-[WCPlugin load]): Add tons of type casts so we don't have
+ to mix void * with function pointer types.
+
+ * kwq/WCPluginWidget.h:
+ * kwq/WCPluginWidget.mm: (WCIFPluginMakeFunction), (WCIFNullPluginMakeFunction):
+ Change types so we don't have to mix void * with function pointer types.
+ This caught a mistake where WCIFNullPluginMakeFunction was returning the wrong
+ function pointer.
+
+ * kwq/external.h: Add some missing interfaces that the pickier gcc3 needed to see.
+
+ * kwq/kwqdebug.mm: Don't compile the file if xNDEBUG is set. Otherwise we get
+ a warning in here.
+
+ * kwq/npapi.h: Use function pointer types for function pointers and transition
+ vectors so we don't have to mix void * with function pointer types.
+
+ * kwq/npapi.mm: (NPN_GetURLNotify), (NPN_GetURL),
+ (NPN_PostURLNotify), (NPN_PostURL), (NPN_NewStream), (NPN_Write),
+ (NPN_DestroyStream), (NPN_Status), (NPN_GetValue), (NPN_SetValue),
+ (NPN_InvalidateRect), (NPN_InvalidateRegion), (NPN_ForceRedraw):
+ Use local variables to work around Radar 2905835.
+ (functionPointerForTVector), (tVectorForFunctionPointer):
+ Change types around so we don't have to mix void * with function pointer types.
+
+2002-04-17 Darin Adler <darin at apple.com>
+
+ Fix some std:: things as a first step in compiling with gcc 3.
+ These fixes are all needed to compile WebBrowser with gcc 3.
+
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qvaluelist.h:
+ Call it std::ostream instead of ostream.
+
2002-04-17 Darin Adler <darin at apple.com>
Fix build problem.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e9c70b0..7ef9eef 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,162 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Fixes for compiling with gcc3 and more warnings.
+
+ * khtml/html/.cvsignore: Add kentities.c; I could have sworn I did this
+ already.
+ * khtml/html/Makefile.am: Remove erroneous duplicate definition of
+ CLEAN_FILES.
+
+ * libwebcore.exp:
+ * libwebcoretests.exp:
+ Rebuilt these lists from scratch. Almost everything in here is different
+ since the C++ name mangling rules changed.
+
+ * khtml/css/cssparser.cpp:
+ * khtml/misc/htmlhashes.cpp:
+ Disable inlining in part of this file as a workaround for Radar 2905890.
+
+ * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry):
+ Add casts to int needed to make gcc3 happy.
+ * kwq/KWQArrayImpl.mm: Add missing #include of <string.h>.
+
+ * kwq/KWQBitmap.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQLineEdit.mm:
+ Removed some unused copy constructors and assignment operators to avoid
+ warnings in them.
+
+ * kwq/KWQButton.mm: (QButton::setText):
+ * kwq/KWQListBox.mm: (QListBox::~QListBox), (QListBox::clear),
+ (QListBox::setSelectionMode), (QListBox::currentItem), (QListBox::insertItem),
+ (QListBox::setSelected), (QListBox::isSelected), (QListBoxItem::width),
+ (QListBoxItem::height):
+ * kwq/KWQScrollView.mm: (QScrollView::setContentsPos), (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::viewportToContents),
+ Use local variables to work around Radar 2905835.
+
+ * kwq/KWQCString.mm: (operator<<):
+ * kwq/KWQPoint.mm: (operator<<):
+ * kwq/KWQRect.mm: (operator<<):
+ * kwq/KWQSize.mm: (operator<<):
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qdatetime.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qptrdict.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ Say std::ostream instead of just ostream.
+
+ * kwq/KWQCharsets.mm: Fix a const problem.
+
+ * kwq/KWQDateTime.mm: (QTime::elapsed), (QTime::restart): Use int instead
+ of uint, since these functions try to handle values that are less than 0.
+ (operator<<): Say std::ostream instead of just ostream.
+ * kwq/KWQTextArea.mm: (RangeOfParagraph): Fix an int/uint issue.
+
+ * kwq/KWQFile.mm: (QFile::KWQFilePrivate::KWQFilePrivate),
+ (QFile::KWQFilePrivate::~KWQFilePrivate): Use new/delete instead of
+ malloc/free so we don't get void * warnings.
+
+ * kwq/KWQFontMetrics.mm: (__IFFillStyleWithAttributes),
+ (-[KWQLayoutInfo drawString:atPoint:withFont:color:]),
+ (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * kwq/KWQKURL.mm: (KURL::KWQKURLPrivate::KWQKURLPrivate),
+ (RelativeURLKeyRetainCallBack), (RelativeURLKeyReleaseCallBack),
+ (RelativeURLKeyEqualCallBack), (RelativeURLKeyHashCallBack),
+ (KURL::normalizeURLString), (KURL::normalizeRelativeURLString):
+ * kwq/KWQPainter.mm: (QPainter::save):
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]),
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ Add type casts where necessary to make the stricter gcc3 happy.
+
+ * kwq/KWQPixmap.mm: (QPixmap::QPixmap): Explicitly initialize the underlying
+ QPaintDevice.
+ (QPixmap::size), (QPixmap::rect): Add type casts where necessary to make
+ the stricter gcc3 happy.
+
+ * kwq/KWQPtrDictImpl.mm: (KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (invokeDeleteFuncOnValue), (KWQPtrDictImpl::clear): Pass a pointer to a function
+ pointer rather than a function pointer to avoid a warning about turning function
+ pointers into void *.
+
+ * kwq/KWQRegion.mm: (QRegion::_initialize), (QRegion::~QRegion): Use new/delete
+ rather than calloc/free so we don't get void * warnings.
+ (QRegion::boundingRect): Add type casts.
+
+ * kwq/KWQString.mm: (QString::fromStringWithEncoding): Add cast.
+ (QString::setNum): use %ld and %lu rather than %D and %U.
+ (QString::fill), (QString::convertToQCString): Add casts.
+
+ * kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ Add a cast to make gcc3 happy.
+
+ * kwq/KWQVariant.mm: Say "friend class" instead of "friend".
+
+ * kwq/KWQVectorImpl.mm: (KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (KWQVectorImpl::data): Replace the old autorelease trick with a new one that
+ doesn't require mixing malloc with NSData.
+
+ * kwq/KWQView.mm: (-[KWQHTMLView mouseUp:]), (-[KWQHTMLView mouseDown:]):
+ Add casts to make gcc3 happy.
+
+ * kwq/KWQWidget.mm: (QWidget::frameGeometry), (QWidget::mapToGlobal),
+ (QWidget::minimumSizeHint): Add casts to make gcc3 happy. Also another
+ workaround for Radar 2905835.
+
+ * kwq/WCPlugin.mm: (-[WCPlugin load]): Add tons of type casts so we don't have
+ to mix void * with function pointer types.
+
+ * kwq/WCPluginWidget.h:
+ * kwq/WCPluginWidget.mm: (WCIFPluginMakeFunction), (WCIFNullPluginMakeFunction):
+ Change types so we don't have to mix void * with function pointer types.
+ This caught a mistake where WCIFNullPluginMakeFunction was returning the wrong
+ function pointer.
+
+ * kwq/external.h: Add some missing interfaces that the pickier gcc3 needed to see.
+
+ * kwq/kwqdebug.mm: Don't compile the file if xNDEBUG is set. Otherwise we get
+ a warning in here.
+
+ * kwq/npapi.h: Use function pointer types for function pointers and transition
+ vectors so we don't have to mix void * with function pointer types.
+
+ * kwq/npapi.mm: (NPN_GetURLNotify), (NPN_GetURL),
+ (NPN_PostURLNotify), (NPN_PostURL), (NPN_NewStream), (NPN_Write),
+ (NPN_DestroyStream), (NPN_Status), (NPN_GetValue), (NPN_SetValue),
+ (NPN_InvalidateRect), (NPN_InvalidateRegion), (NPN_ForceRedraw):
+ Use local variables to work around Radar 2905835.
+ (functionPointerForTVector), (tVectorForFunctionPointer):
+ Change types around so we don't have to mix void * with function pointer types.
+
+2002-04-17 Darin Adler <darin at apple.com>
+
+ Fix some std:: things as a first step in compiling with gcc 3.
+ These fixes are all needed to compile WebBrowser with gcc 3.
+
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qvaluelist.h:
+ Call it std::ostream instead of ostream.
+
2002-04-17 Darin Adler <darin at apple.com>
Fix build problem.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e9c70b0..7ef9eef 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,162 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Fixes for compiling with gcc3 and more warnings.
+
+ * khtml/html/.cvsignore: Add kentities.c; I could have sworn I did this
+ already.
+ * khtml/html/Makefile.am: Remove erroneous duplicate definition of
+ CLEAN_FILES.
+
+ * libwebcore.exp:
+ * libwebcoretests.exp:
+ Rebuilt these lists from scratch. Almost everything in here is different
+ since the C++ name mangling rules changed.
+
+ * khtml/css/cssparser.cpp:
+ * khtml/misc/htmlhashes.cpp:
+ Disable inlining in part of this file as a workaround for Radar 2905890.
+
+ * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry):
+ Add casts to int needed to make gcc3 happy.
+ * kwq/KWQArrayImpl.mm: Add missing #include of <string.h>.
+
+ * kwq/KWQBitmap.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQLineEdit.mm:
+ Removed some unused copy constructors and assignment operators to avoid
+ warnings in them.
+
+ * kwq/KWQButton.mm: (QButton::setText):
+ * kwq/KWQListBox.mm: (QListBox::~QListBox), (QListBox::clear),
+ (QListBox::setSelectionMode), (QListBox::currentItem), (QListBox::insertItem),
+ (QListBox::setSelected), (QListBox::isSelected), (QListBoxItem::width),
+ (QListBoxItem::height):
+ * kwq/KWQScrollView.mm: (QScrollView::setContentsPos), (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::viewportToContents),
+ Use local variables to work around Radar 2905835.
+
+ * kwq/KWQCString.mm: (operator<<):
+ * kwq/KWQPoint.mm: (operator<<):
+ * kwq/KWQRect.mm: (operator<<):
+ * kwq/KWQSize.mm: (operator<<):
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qdatetime.h:
+ * kwq/qt/qdict.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qptrdict.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qstack.h:
+ * kwq/qt/qvaluelist.h:
+ * kwq/qt/qvector.h:
+ Say std::ostream instead of just ostream.
+
+ * kwq/KWQCharsets.mm: Fix a const problem.
+
+ * kwq/KWQDateTime.mm: (QTime::elapsed), (QTime::restart): Use int instead
+ of uint, since these functions try to handle values that are less than 0.
+ (operator<<): Say std::ostream instead of just ostream.
+ * kwq/KWQTextArea.mm: (RangeOfParagraph): Fix an int/uint issue.
+
+ * kwq/KWQFile.mm: (QFile::KWQFilePrivate::KWQFilePrivate),
+ (QFile::KWQFilePrivate::~KWQFilePrivate): Use new/delete instead of
+ malloc/free so we don't get void * warnings.
+
+ * kwq/KWQFontMetrics.mm: (__IFFillStyleWithAttributes),
+ (-[KWQLayoutInfo drawString:atPoint:withFont:color:]),
+ (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * kwq/KWQKURL.mm: (KURL::KWQKURLPrivate::KWQKURLPrivate),
+ (RelativeURLKeyRetainCallBack), (RelativeURLKeyReleaseCallBack),
+ (RelativeURLKeyEqualCallBack), (RelativeURLKeyHashCallBack),
+ (KURL::normalizeURLString), (KURL::normalizeRelativeURLString):
+ * kwq/KWQPainter.mm: (QPainter::save):
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]),
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ Add type casts where necessary to make the stricter gcc3 happy.
+
+ * kwq/KWQPixmap.mm: (QPixmap::QPixmap): Explicitly initialize the underlying
+ QPaintDevice.
+ (QPixmap::size), (QPixmap::rect): Add type casts where necessary to make
+ the stricter gcc3 happy.
+
+ * kwq/KWQPtrDictImpl.mm: (KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (invokeDeleteFuncOnValue), (KWQPtrDictImpl::clear): Pass a pointer to a function
+ pointer rather than a function pointer to avoid a warning about turning function
+ pointers into void *.
+
+ * kwq/KWQRegion.mm: (QRegion::_initialize), (QRegion::~QRegion): Use new/delete
+ rather than calloc/free so we don't get void * warnings.
+ (QRegion::boundingRect): Add type casts.
+
+ * kwq/KWQString.mm: (QString::fromStringWithEncoding): Add cast.
+ (QString::setNum): use %ld and %lu rather than %D and %U.
+ (QString::fill), (QString::convertToQCString): Add casts.
+
+ * kwq/KWQTextStorage.mm: (-[KWQTextStorage _buildFragmentForString:]):
+ Add a cast to make gcc3 happy.
+
+ * kwq/KWQVariant.mm: Say "friend class" instead of "friend".
+
+ * kwq/KWQVectorImpl.mm: (KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate):
+ Say std::bad_alloc instead of just bad_alloc.
+ (KWQVectorImpl::data): Replace the old autorelease trick with a new one that
+ doesn't require mixing malloc with NSData.
+
+ * kwq/KWQView.mm: (-[KWQHTMLView mouseUp:]), (-[KWQHTMLView mouseDown:]):
+ Add casts to make gcc3 happy.
+
+ * kwq/KWQWidget.mm: (QWidget::frameGeometry), (QWidget::mapToGlobal),
+ (QWidget::minimumSizeHint): Add casts to make gcc3 happy. Also another
+ workaround for Radar 2905835.
+
+ * kwq/WCPlugin.mm: (-[WCPlugin load]): Add tons of type casts so we don't have
+ to mix void * with function pointer types.
+
+ * kwq/WCPluginWidget.h:
+ * kwq/WCPluginWidget.mm: (WCIFPluginMakeFunction), (WCIFNullPluginMakeFunction):
+ Change types so we don't have to mix void * with function pointer types.
+ This caught a mistake where WCIFNullPluginMakeFunction was returning the wrong
+ function pointer.
+
+ * kwq/external.h: Add some missing interfaces that the pickier gcc3 needed to see.
+
+ * kwq/kwqdebug.mm: Don't compile the file if xNDEBUG is set. Otherwise we get
+ a warning in here.
+
+ * kwq/npapi.h: Use function pointer types for function pointers and transition
+ vectors so we don't have to mix void * with function pointer types.
+
+ * kwq/npapi.mm: (NPN_GetURLNotify), (NPN_GetURL),
+ (NPN_PostURLNotify), (NPN_PostURL), (NPN_NewStream), (NPN_Write),
+ (NPN_DestroyStream), (NPN_Status), (NPN_GetValue), (NPN_SetValue),
+ (NPN_InvalidateRect), (NPN_InvalidateRegion), (NPN_ForceRedraw):
+ Use local variables to work around Radar 2905835.
+ (functionPointerForTVector), (tVectorForFunctionPointer):
+ Change types around so we don't have to mix void * with function pointer types.
+
+2002-04-17 Darin Adler <darin at apple.com>
+
+ Fix some std:: things as a first step in compiling with gcc 3.
+ These fixes are all needed to compile WebBrowser with gcc 3.
+
+ * kwq/qt/qarray.h:
+ * kwq/qt/qcstring.h:
+ * kwq/qt/qlist.h:
+ * kwq/qt/qmap.h:
+ * kwq/qt/qpainter.h:
+ * kwq/qt/qpoint.h:
+ * kwq/qt/qrect.h:
+ * kwq/qt/qsize.h:
+ * kwq/qt/qvaluelist.h:
+ Call it std::ostream instead of ostream.
+
2002-04-17 Darin Adler <darin at apple.com>
Fix build problem.
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 43c8bb1..8dab36b 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -59,6 +59,11 @@ using namespace DOM;
//
// with 'props->id' a CSS property in the range from CSS_PROP_MIN to
// (and including) CSS_PROP_TOTAL-1
+#ifdef APPLE_CHANGES
+// work around Radar 2905890
+#undef __inline
+#define __inline
+#endif
#include "cssproperties.c"
#include "cssvalues.c"
diff --git a/WebCore/khtml/html/.cvsignore b/WebCore/khtml/html/.cvsignore
index 253780f..2290cd7 100644
--- a/WebCore/khtml/html/.cvsignore
+++ b/WebCore/khtml/html/.cvsignore
@@ -1,3 +1,4 @@
Makefile
Makefile.in
*.moc
+kentities.c
diff --git a/WebCore/khtml/html/Makefile.am b/WebCore/khtml/html/Makefile.am
index 0e199aa..4548964 100644
--- a/WebCore/khtml/html/Makefile.am
+++ b/WebCore/khtml/html/Makefile.am
@@ -55,8 +55,6 @@ noinst_HEADERS = kentities.c
kentities.c: kentities.gperf
$(GPERF) -a -L "ANSI-C" -C -G -c -o -t -k '*' -NfindEntity -D -s 2 $< > $@
-CLEANFILES = $(BUILT_SOURCES)
-
BUILT_SOURCES = $(noinst_HEADERS) htmltokenizer.moc html_documentimpl.moc
CLEANFILES = $(BUILT_SOURCES)
diff --git a/WebCore/khtml/misc/htmlhashes.cpp b/WebCore/khtml/misc/htmlhashes.cpp
index 7a871c5..dfc05f7 100644
--- a/WebCore/khtml/misc/htmlhashes.cpp
+++ b/WebCore/khtml/misc/htmlhashes.cpp
@@ -19,6 +19,12 @@
Boston, MA 02111-1307, USA.
*/
#include "htmlhashes.h"
+
+#ifdef APPLE_CHANGES
+// work around Radar 2905890
+#undef __inline
+#define __inline
+#endif
#include "htmltags.c"
#include "htmlattrs.c"
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index 9397166..c77c0f0 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -53,7 +53,7 @@ int QDesktopWidget::screenNumber(QWidget *) const
QRect QDesktopWidget::screenGeometry(int screenNumber)
{
NSRect rect = [[NSScreen mainScreen] frame];
- return QRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
+ return QRect((int)rect.origin.x, (int)rect.origin.y, (int)rect.size.width, (int)rect.size.height);
}
QDesktopWidget *QApplication::desktop()
diff --git a/WebCore/kwq/KWQArrayImpl.mm b/WebCore/kwq/KWQArrayImpl.mm
index 8d364a0..3dacfed 100644
--- a/WebCore/kwq/KWQArrayImpl.mm
+++ b/WebCore/kwq/KWQArrayImpl.mm
@@ -25,9 +25,8 @@
#include <KWQArrayImpl.h>
-#ifndef USING_BORROWED_QARRAY
-
#include <new>
+#include <string.h>
#define MIN(a,b) (((a)<(b))?(a):(b))
@@ -164,5 +163,3 @@ bool KWQArrayImpl::operator==(const KWQArrayImpl &a) const
{
return d->numItems == a.d->numItems && d->itemSize == d->itemSize && (d->data == a.d->data || memcmp(d->data, a.d->data, d->itemSize*d->numItems) == 0);
}
-
-#endif
diff --git a/WebCore/kwq/KWQBitmap.mm b/WebCore/kwq/KWQBitmap.mm
index 65c2ea2..8e2f989 100644
--- a/WebCore/kwq/KWQBitmap.mm
+++ b/WebCore/kwq/KWQBitmap.mm
@@ -36,30 +36,3 @@ QBitmap::QBitmap(int,int)
{
_logNotYetImplemented();
}
-
-
-QBitmap::QBitmap(const QBitmap &)
-{
- _logNotYetImplemented();
-}
-
-
-QBitmap &QBitmap::operator=(const QBitmap &)
-{
- _logNotYetImplemented();
- return *this;
-}
-
-
-QBitmap &QBitmap::operator=(const QPixmap &)
-{
- _logNotYetImplemented();
- return *this;
-}
-
-
-QBitmap &QBitmap::operator=(const QImage &)
-{
- _logNotYetImplemented();
- return *this;
-}
diff --git a/WebCore/kwq/KWQButton.mm b/WebCore/kwq/KWQButton.mm
index 81bee25..f7478e7 100644
--- a/WebCore/kwq/KWQButton.mm
+++ b/WebCore/kwq/KWQButton.mm
@@ -41,7 +41,8 @@ QButton::~QButton()
void QButton::setText(const QString &s)
{
- [(KWQNSButton *)getView() setTitle: QSTRING_TO_NSSTRING (s)];
+ KWQNSButton *button = (KWQNSButton *)getView();
+ [button setTitle: QSTRING_TO_NSSTRING (s)];
}
diff --git a/WebCore/kwq/KWQCString.h b/WebCore/kwq/KWQCString.h
index b014e0e..e568190 100644
--- a/WebCore/kwq/KWQCString.h
+++ b/WebCore/kwq/KWQCString.h
@@ -41,7 +41,10 @@
#include "qarray.h"
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
+
#include <string.h>
typedef QMemArray<char> QByteArray;
@@ -89,7 +92,7 @@ public:
QCString &operator+=(char);
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QCString &);
+ friend std::ostream &operator<<(std::ostream &, const QCString &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/KWQCString.mm b/WebCore/kwq/KWQCString.mm
index 792dbd7..83c0d9f 100644
--- a/WebCore/kwq/KWQCString.mm
+++ b/WebCore/kwq/KWQCString.mm
@@ -368,7 +368,7 @@ bool operator!=(const QCString &s1, const char *s2)
}
#ifdef _KWQ_IOSTREAM_
-ostream &operator<<(ostream &o, const QCString &s)
+std::ostream &operator<<(std::ostream &o, const QCString &s)
{
return o << (const char *)s.data();
}
diff --git a/WebCore/kwq/KWQCharsets.mm b/WebCore/kwq/KWQCharsets.mm
index 689ae3a..e79d352 100644
--- a/WebCore/kwq/KWQCharsets.mm
+++ b/WebCore/kwq/KWQCharsets.mm
@@ -27,7 +27,7 @@
#include <CoreFoundation/CoreFoundation.h>
typedef struct CharsetEntry {
- char *name;
+ const char *name;
int mib;
CFStringEncoding encoding;;
} CharsetEntry;
diff --git a/WebCore/kwq/KWQDateTime.h b/WebCore/kwq/KWQDateTime.h
index 819e192..e3917a7 100644
--- a/WebCore/kwq/KWQDateTime.h
+++ b/WebCore/kwq/KWQDateTime.h
@@ -83,7 +83,7 @@ private:
uint timeMS; // time is stored in milliseconds
friend class QDateTime;
- friend ostream &operator<<( ostream &, const QTime & );
+ friend std::ostream &operator<<( std::ostream &, const QTime & );
// add copy constructor
// this private declaration prevents copying
@@ -140,7 +140,7 @@ private:
void setCurrentDate();
friend class QDateTime;
- friend ostream &operator<<( ostream &, const QDate & );
+ friend std::ostream &operator<<( std::ostream &, const QDate & );
// add copy constructor
// this private declaration prevents copying
@@ -194,7 +194,7 @@ private:
QDate dateDT;
- friend ostream &operator<<( ostream &, const QDateTime & );
+ friend std::ostream &operator<<( std::ostream &, const QDateTime & );
}; // class QDateTime ==========================================================
#endif // USING_BORROWED_QDATETIME
diff --git a/WebCore/kwq/KWQDateTime.mm b/WebCore/kwq/KWQDateTime.mm
index 2e849aa..e624e9c 100644
--- a/WebCore/kwq/KWQDateTime.mm
+++ b/WebCore/kwq/KWQDateTime.mm
@@ -87,11 +87,13 @@ int QTime::msec() const
int QTime::elapsed()
{
- uint currentTime, elapsedTime;
+ int currentTime, elapsedTime;
currentTime = getCurrentTime();
elapsedTime = currentTime - timeMS;
- if(elapsedTime < 0) elapsedTime = elapsedTime + 86400000; // watch out for the next day
+ while (elapsedTime < 0) {
+ elapsedTime = elapsedTime + 86400000; // watch out for the next day
+ }
return elapsedTime;
}
@@ -99,11 +101,11 @@ int QTime::elapsed()
int QTime::restart()
{
- uint currentTime, elapsedTime;
+ int currentTime, elapsedTime;
currentTime = getCurrentTime();
elapsedTime = currentTime - timeMS;
- if(elapsedTime < 0){
+ while (elapsedTime < 0) {
elapsedTime = elapsedTime + 86400000; // watch out for the next day
}
timeMS = currentTime;
@@ -317,7 +319,7 @@ void QDateTime::setTime_t( uint secsSince1Jan1970UTC )
}
-ostream &operator<<(ostream &o, const QDate &date)
+std::ostream &operator<<(std::ostream &o, const QDate &date)
{
return o <<
"QDate: [yy/mm/dd: " <<
@@ -329,7 +331,7 @@ ostream &operator<<(ostream &o, const QDate &date)
']';
}
-ostream &operator<<(ostream &o, const QTime &time)
+std::ostream &operator<<(std::ostream &o, const QTime &time)
{
return o <<
"QTime: [hh:mm:ss:ms = " <<
@@ -343,7 +345,7 @@ ostream &operator<<(ostream &o, const QTime &time)
']';
}
-ostream &operator<<(ostream &o, const QDateTime &dateTime)
+std::ostream &operator<<(std::ostream &o, const QDateTime &dateTime)
{
return o <<
"QDateTime: [yy/mm/dd hh:mm:ss:ms = " <<
diff --git a/WebCore/kwq/KWQDict.h b/WebCore/kwq/KWQDict.h
index 720aa5c..dc1a822 100644
--- a/WebCore/kwq/KWQDict.h
+++ b/WebCore/kwq/KWQDict.h
@@ -59,7 +59,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QDict(int size=17, bool caseSensitive=TRUE) : impl(size, caseSensitive, QDict::deleteFunc) {}
- QDict(const QDict<T> &d) : impl(d.impl) {}
+ QDict(const QDict<T> &d) : QPtrCollection(d), impl(d.impl) {}
virtual ~QDict() { impl.clear(del_item); }
// member functions --------------------------------------------------------
diff --git a/WebCore/kwq/KWQFile.mm b/WebCore/kwq/KWQFile.mm
index 3d33669..4c4b1d7 100644
--- a/WebCore/kwq/KWQFile.mm
+++ b/WebCore/kwq/KWQFile.mm
@@ -49,7 +49,7 @@ public:
};
-QFile::KWQFilePrivate::KWQFilePrivate(const QString &qname) : name(malloc(sizeof(char) * MAXPATHLEN)), fd(-1)
+QFile::KWQFilePrivate::KWQFilePrivate(const QString &qname) : name(new char[MAXPATHLEN + 1]), fd(-1)
{
NSString *nsname = (NSString *)qname.getCFMutableString();
@@ -58,7 +58,7 @@ QFile::KWQFilePrivate::KWQFilePrivate(const QString &qname) : name(malloc(sizeof
QFile::KWQFilePrivate::~KWQFilePrivate()
{
- free(name);
+ delete [] name;
}
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index 663c849..a02f4eb 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -197,7 +197,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
ATSUFontID *valueArray[1] = {&fontId};
if (fontId) {
- if (ATSUSetAttributes(style, 1, &tag, &size, (const ATSUAttributeValuePtr)valueArray) != noErr)
+ if (ATSUSetAttributes(style, 1, &tag, &size, (void **)valueArray) != noErr)
[NSException raise:NSInternalInconsistencyException format:@"Failed to set font (%@) ATSUStyle 0x%X", theFont, style];
#if 1
@@ -244,7 +244,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
int i, numGlyphs = _glyphVector.numGlyphs;
char localGlyphBuf[LOCAL_GLYPH_BUFFER_SIZE];
char *usedGlyphBuf, *glyphBufPtr, *glyphBuf = 0;
- ATSLayoutRecord *glyphRecords = _glyphVector.firstRecord;
+ ATSLayoutRecord *glyphRecords = (ATSLayoutRecord *)_glyphVector.firstRecord;
if (numGlyphs > LOCAL_GLYPH_BUFFER_SIZE/2)
usedGlyphBuf = glyphBufPtr = glyphBuf = (char *)malloc (numGlyphs * 2);
@@ -509,7 +509,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
unsigned int numGlyphs = latinGlyphVector.numGlyphs;
characterToGlyph = (ATSGlyphRef *)calloc (1, latinGlyphVector.numGlyphs * sizeof(ATSGlyphRef));
- glyphRecords = latinGlyphVector.firstRecord;
+ glyphRecords = (ATSLayoutRecord *)latinGlyphVector.firstRecord;
for (i = 0; i < numGlyphs; i++){
characterToGlyph[i] = glyphRecords[i].glyphID;
}
@@ -580,7 +580,7 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
KWQDEBUGLEVEL(KWQ_LOG_FONTCACHECHARMISS, "character-to-glyph cache miss for character 0x%04x in %s, %.0f\n", internalBuffer[i], [[font displayName] lossyCString], [font pointSize]);
__IFInitATSGlyphVector(&self->_glyphVector, stringLength);
(void)ATSUConvertCharToGlyphs(self->_styleGroup, internalBuffer, 0, stringLength, 0, &self->_glyphVector);
- glyphRecords = self->_glyphVector.firstRecord;
+ glyphRecords = (ATSLayoutRecord *)self->_glyphVector.firstRecord;
numGlyphs = self->_glyphVector.numGlyphs;
if (numGlyphs > LOCAL_GLYPH_BUFFER_SIZE)
diff --git a/WebCore/kwq/KWQFrame.mm b/WebCore/kwq/KWQFrame.mm
index 292156a..71123f4 100644
--- a/WebCore/kwq/KWQFrame.mm
+++ b/WebCore/kwq/KWQFrame.mm
@@ -49,17 +49,3 @@ int QFrame::frameWidth() const
_logNeverImplemented();
return 0;
}
-
-
-QFrame::QFrame(const QFrame &)
-{
- _logNeverImplemented();
-}
-
-
-QFrame &QFrame::operator=(const QFrame &)
-{
- _logNeverImplemented();
- return *this;
-}
-
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 2b6255e..a23a996 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -70,7 +70,7 @@ KURL::KWQKURLPrivate::KWQKURLPrivate(const QString &url) :
}
KURL::KWQKURLPrivate::KWQKURLPrivate(const KWQKURLPrivate &other) :
- urlRef(other.urlRef != NULL ? CFRetain(other.urlRef) : NULL),
+ urlRef(other.urlRef != NULL ? (CFURLRef)CFRetain(other.urlRef) : NULL),
sURL(other.sURL),
sProtocol(other.sProtocol),
sHost(other.sHost),
@@ -294,7 +294,7 @@ struct RelativeURLKey {
static const void *RelativeURLKeyRetainCallBack(CFAllocatorRef allocator, const void *value)
{
- RelativeURLKey *key = value;
+ RelativeURLKey *key = (RelativeURLKey *)value;
CFRetain(key->base);
CFRetain(key->relative);
return key;
@@ -302,7 +302,7 @@ static const void *RelativeURLKeyRetainCallBack(CFAllocatorRef allocator, const
static void RelativeURLKeyReleaseCallBack(CFAllocatorRef allocator, const void *value)
{
- RelativeURLKey *key = value;
+ RelativeURLKey *key = (RelativeURLKey *)value;
CFRelease(key->base);
CFRelease(key->relative);
delete key;
@@ -315,15 +315,15 @@ static CFStringRef RelativeURLKeyCopyDescriptionCallBack(const void *value)
static unsigned char RelativeURLKeyEqualCallBack(const void *value1, const void *value2)
{
- RelativeURLKey *key1 = value1;
- RelativeURLKey *key2 = value2;
+ RelativeURLKey *key1 = (RelativeURLKey *)value1;
+ RelativeURLKey *key2 = (RelativeURLKey *)value2;
return CFEqual(key1->base, key2->base) && CFEqual(key1->relative, key2->relative);
}
static CFHashCode RelativeURLKeyHashCallBack(const void *value)
{
- RelativeURLKey *key = value;
+ RelativeURLKey *key = (RelativeURLKey *)value;
return CFHash(key->base) ^ CFHash(key->relative);
}
@@ -358,7 +358,7 @@ QString KURL::normalizeURLString(const QString &s)
NormalizedURLCache = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
- result = CFDictionaryGetValue(NormalizedURLCache, s.getCFMutableString());
+ result = (CFMutableStringRef)CFDictionaryGetValue(NormalizedURLCache, s.getCFMutableString());
if (result != NULL) {
return QString::fromCFMutableString(result);
@@ -436,7 +436,7 @@ QString KURL::normalizeRelativeURLString(const KURL &base, const QString &relati
NormalizedRelativeURLCache = CFDictionaryCreateMutable(NULL, 0, &RelativeURLKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
- result = CFDictionaryGetValue(NormalizedRelativeURLCache, &key);
+ result = (CFMutableStringRef)CFDictionaryGetValue(NormalizedRelativeURLCache, &key);
if (result != NULL) {
return QString::fromCFMutableString(result);
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index be29751..91e0a1e 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1122,7 +1122,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
job->setError(1);
m_loader->slotFinished(job);
- [controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
delete job;
}
@@ -1134,7 +1134,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _setFinalURL: url];
- [[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
}
@end
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 53d144b..d6df05a 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -130,18 +130,6 @@ void QLineEdit::selectAll()
}
-QLineEdit::QLineEdit(const QLineEdit &)
-{
- _logNeverImplemented();
-}
-
-QLineEdit &QLineEdit::operator=(const QLineEdit &)
-{
- _logNeverImplemented();
- return *this;
-}
-
-
bool QLineEdit::edited() const
{
KWQNSTextField *field = (KWQNSTextField *)getView();
diff --git a/WebCore/kwq/KWQListBox.mm b/WebCore/kwq/KWQListBox.mm
index 9af003e..192aeb0 100644
--- a/WebCore/kwq/KWQListBox.mm
+++ b/WebCore/kwq/KWQListBox.mm
@@ -49,7 +49,8 @@
// ==========================================================
// Use lazy initialization, since we don't want to touch the file system too much.
-- (int)browser:(NSBrowser *)sender numberOfRowsInColumn:(int)column {
+- (int)browser:(NSBrowser *)sender numberOfRowsInColumn:(int)column
+{
return box->count();
}
@@ -77,12 +78,15 @@
// Browser Target / Action Methods.
// ==========================================================
-- (IBAction)browserSingleClick:(id)browser {
+- (IBAction)browserSingleClick:(id)browser
+{
box->emitAction(QObject::ACTION_LISTBOX_CLICKED);
}
-- (IBAction)browserDoubleClick:(id)browser {
+- (IBAction)browserDoubleClick:(id)browser
+{
}
+
@end
@@ -108,9 +112,9 @@ QListBox::QListBox()
QListBox::~QListBox()
{
- KWQBrowserDelegate *delegate = [(NSBrowser *)getView() delegate];
-
- [(NSBrowser *)getView() setDelegate: nil];
+ NSBrowser *browser = (NSBrowser *)getView();
+ KWQBrowserDelegate *delegate = [browser delegate];
+ [browser setDelegate: nil];
[delegate release];
}
@@ -136,20 +140,24 @@ int QListBox::scrollBarWidth() const
void QListBox::clear()
{
+ NSBrowser *browser = (NSBrowser *)getView();
+
// Do we need to delete previous head?
head = 0;
- [(NSBrowser *)getView() loadColumnZero];
+ [browser loadColumnZero];
}
void QListBox::setSelectionMode(SelectionMode mode)
{
+ NSBrowser *browser = (NSBrowser *)getView();
+
if (mode == QListBox::Extended){
- [(NSBrowser *)getView() setAllowsMultipleSelection: YES];
+ [browser setAllowsMultipleSelection: YES];
}
else {
- [(NSBrowser *)getView() setAllowsMultipleSelection: NO];
+ [browser setAllowsMultipleSelection: NO];
}
}
@@ -162,7 +170,8 @@ QListBoxItem *QListBox::firstItem() const
int QListBox::currentItem() const
{
- return [(NSBrowser *)getView() selectedRowInColumn:0];
+ NSBrowser *browser = (NSBrowser *)getView();
+ return [browser selectedRowInColumn:0];
}
@@ -208,20 +217,24 @@ void QListBox::insertItem(const QListBoxItem *newItem, int _index)
}
}
- [(NSBrowser *)getView() loadColumnZero];
- [(NSBrowser *)getView() tile];
+ NSBrowser *browser = (NSBrowser *)getView();
+ [browser loadColumnZero];
+ [browser tile];
}
void QListBox::setSelected(int index, bool selectIt)
{
- if (selectIt)
- [(NSBrowser *)getView() selectRow: index inColumn: 0];
+ if (selectIt) {
+ NSBrowser *browser = (NSBrowser *)getView();
+ [browser selectRow: index inColumn: 0];
+ }
}
bool QListBox::isSelected(int index)
{
- return [[(NSBrowser *)getView() loadedCellAtRow: index column:0] state] == NSOnState;
+ NSBrowser *browser = (NSBrowser *)getView();
+ return [[browser loadedCellAtRow: index column:0] state] == NSOnState;
}
@@ -252,7 +265,8 @@ QListBox *QListBoxItem::listBox() const
int QListBoxItem::width(const QListBox *) const
{
// Is this right?
- NSSize cellSize = [[(NSBrowser *)box->getView() loadedCellAtRow: 0 column: 0] cellSizeForBounds: NSMakeRect (0,0,10000,10000)];
+ NSBrowser *browser = (NSBrowser *)box->getView();
+ NSSize cellSize = [[browser loadedCellAtRow: 0 column: 0] cellSizeForBounds: NSMakeRect (0,0,10000,10000)];
NSSize frameSize = [NSScrollView frameSizeForContentSize:cellSize hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSLineBorder];
return (int)frameSize.width;
}
@@ -261,7 +275,8 @@ int QListBoxItem::width(const QListBox *) const
int QListBoxItem::height(const QListBox *) const
{
// Is this right?
- NSSize size = [[(NSBrowser *)box->getView() loadedCellAtRow: 0 column: 0] cellSizeForBounds: NSMakeRect (0,0,10000,10000)];
+ NSBrowser *browser = (NSBrowser *)box->getView();
+ NSSize size = [[browser loadedCellAtRow: 0 column: 0] cellSizeForBounds: NSMakeRect (0,0,10000,10000)];
return (int)size.height;
}
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index be29751..91e0a1e 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1122,7 +1122,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
job->setError(1);
m_loader->slotFinished(job);
- [controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
delete job;
}
@@ -1134,7 +1134,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _setFinalURL: url];
- [[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
}
@end
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index be29751..91e0a1e 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1122,7 +1122,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
job->setError(1);
m_loader->slotFinished(job);
- [controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
delete job;
}
@@ -1134,7 +1134,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _setFinalURL: url];
- [[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
}
@end
diff --git a/WebCore/kwq/KWQMap.h b/WebCore/kwq/KWQMap.h
index 5bc3bb0..7d0eb37 100644
--- a/WebCore/kwq/KWQMap.h
+++ b/WebCore/kwq/KWQMap.h
@@ -36,7 +36,10 @@
#include <_qmap.h>
#else
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
+
#include <KWQDef.h>
#include <KWQMapImpl.h>
@@ -382,7 +385,7 @@ protected:
#ifdef _KWQ_IOSTREAM_
template<class K, class V>
-inline ostream &operator<<(ostream &stream, const QMap<K,V> &m)
+inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
{
uint count = m.count();
stream << "QMap: [size: " << count << "; items: ";
diff --git a/WebCore/kwq/KWQMemArray.h b/WebCore/kwq/KWQMemArray.h
index 2b8d849..cc9c61d 100644
--- a/WebCore/kwq/KWQMemArray.h
+++ b/WebCore/kwq/KWQMemArray.h
@@ -38,7 +38,6 @@
#include <KWQDef.h>
#include <KWQArrayImpl.h>
-#include <iostream>
// class QMemArray ================================================================
@@ -87,8 +86,11 @@ public:
}; // class QMemArray =============================================================
#ifdef _KWQ_IOSTREAM_
+
+#include <iostream>
+
template<class T>
-inline ostream &operator<<(ostream &stream, const QMemArray<T>&a)
+inline std::ostream &operator<<(std::ostream &stream, const QMemArray<T>&a)
{
stream << "QMemArray: [size: " << a.size() << "; items: ";
for (unsigned i = 0; i < a.size(); i++) {
@@ -101,6 +103,7 @@ inline ostream &operator<<(ostream &stream, const QMemArray<T>&a)
return stream;
}
+
#endif
#endif // USING_BORROWED_QARRAY
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index 6ae3d7c..1b6fb8d 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -49,8 +49,8 @@ class QPainterPrivate;
// class QWMatrix ==============================================================
class QWMatrix {
-friend QPainter;
-friend QPixmap;
+friend class QPainter;
+friend class QPixmap;
public:
// typedefs ----------------------------------------------------------------
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 364ee4a..230f782 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -168,7 +168,7 @@ QRect QPainter::xForm(const QRect &) const
void QPainter::save()
{
- QPStateStack *pss = data->ps_stack;
+ QPStateStack *pss = (QPStateStack *)data->ps_stack;
if ( pss == 0 ) {
pss = new QPStateStack;
data->ps_stack = pss;
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index e0a1a9d..88698da 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -100,6 +100,7 @@ QPixmap::QPixmap(int w, int h)
QPixmap::QPixmap(const QPixmap ©From)
+ : QPaintDevice()
{
if (copyFrom.nsimage != nil){
// Do a deep copy of the image. This is required because the image
@@ -149,14 +150,14 @@ bool QPixmap::isNull() const
QSize QPixmap::size() const
{
NSSize sz = [nsimage size];
- return QSize (sz.width, sz.height);
+ return QSize((int)sz.width, (int)sz.height);
}
QRect QPixmap::rect() const
{
NSSize sz = [nsimage size];
- return QRect (0,0,sz.width, sz.height);
+ return QRect(0, 0, (int)sz.width, (int)sz.height);
}
@@ -178,8 +179,9 @@ void QPixmap::resize(const QSize &sz)
}
-void QPixmap::resize(int w, int h) {
- [nsimage setSize: NSMakeSize ((float)(w), (float)(h))];
+void QPixmap::resize(int w, int h)
+{
+ [nsimage setSize: NSMakeSize((float)w, (float)h)];
}
diff --git a/WebCore/kwq/KWQPoint.mm b/WebCore/kwq/KWQPoint.mm
index 83bc60b..0f1aa9e 100644
--- a/WebCore/kwq/KWQPoint.mm
+++ b/WebCore/kwq/KWQPoint.mm
@@ -63,7 +63,7 @@ QPoint operator-(const QPoint &a, const QPoint &b)
}
#ifdef _KWQ_IOSTREAM_
-ostream &operator<<(ostream &o, const QPoint &p)
+std::ostream &operator<<(std::ostream &o, const QPoint &p)
{
return o << "QPoint: [x: " << p.x() << "; h: " << p.y() << "]";
}
diff --git a/WebCore/kwq/KWQPointArray.h b/WebCore/kwq/KWQPointArray.h
index 0e17f51..861337f 100644
--- a/WebCore/kwq/KWQPointArray.h
+++ b/WebCore/kwq/KWQPointArray.h
@@ -36,7 +36,9 @@
#else /* !USING_BORROWED_QPOINT */
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
#include <KWQDef.h>
@@ -123,7 +125,7 @@ public:
{ return (QPointArray&)assign( a ); }
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QPoint &);
+ friend std::ostream &operator<<(std::ostream &, const QPoint &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/KWQPtrDict.h b/WebCore/kwq/KWQPtrDict.h
index 1c4c240..cc3a9d6 100644
--- a/WebCore/kwq/KWQPtrDict.h
+++ b/WebCore/kwq/KWQPtrDict.h
@@ -56,7 +56,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPtrDict(int size=17) : impl(size, deleteFunc) {}
- QPtrDict(const QPtrDict<T> &pd) : impl(pd.impl) {}
+ QPtrDict(const QPtrDict<T> &pd) : QPtrCollection(pd), impl(pd.impl) {}
virtual ~QPtrDict() { impl.clear(del_item); }
// member functions --------------------------------------------------------
diff --git a/WebCore/kwq/KWQPtrDictImpl.mm b/WebCore/kwq/KWQPtrDictImpl.mm
index 8995e52..df706a4 100644
--- a/WebCore/kwq/KWQPtrDictImpl.mm
+++ b/WebCore/kwq/KWQPtrDictImpl.mm
@@ -29,23 +29,25 @@
#include <new>
+typedef void (* DeleteFunction) (void *);
+
class KWQPtrDictImpl::KWQPtrDictPrivate
{
public:
- KWQPtrDictPrivate(int size, void (*deleteFunc)(void *), const CFDictionaryKeyCallBacks *cfdkcb);
+ KWQPtrDictPrivate(int size, DeleteFunction, const CFDictionaryKeyCallBacks *cfdkcb);
KWQPtrDictPrivate(KWQPtrDictPrivate &dp);
~KWQPtrDictPrivate();
CFMutableDictionaryRef cfdict;
- void (*del)(void *);
+ DeleteFunction del;
};
-KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate(int size, void (*deleteFunc)(void *), const CFDictionaryKeyCallBacks *cfdkcb) :
+KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate(int size, DeleteFunction deleteFunc, const CFDictionaryKeyCallBacks *cfdkcb) :
cfdict(CFDictionaryCreateMutable(NULL, 0, cfdkcb, NULL)),
del(deleteFunc)
{
if (cfdict == NULL) {
- throw bad_alloc();
+ throw std::bad_alloc();
}
}
@@ -54,7 +56,7 @@ KWQPtrDictImpl::KWQPtrDictPrivate::KWQPtrDictPrivate(KWQPtrDictPrivate &dp) :
del(dp.del)
{
if (cfdict == NULL) {
- throw bad_alloc();
+ throw std::bad_alloc();
}
}
@@ -63,7 +65,7 @@ KWQPtrDictImpl::KWQPtrDictPrivate::~KWQPtrDictPrivate()
CFRelease(cfdict);
}
-KWQPtrDictImpl::KWQPtrDictImpl(int size, void (*deleteFunc)(void *), const CFDictionaryKeyCallBacks *cfdkcb) :
+KWQPtrDictImpl::KWQPtrDictImpl(int size, DeleteFunction deleteFunc, const CFDictionaryKeyCallBacks *cfdkcb) :
d(new KWQPtrDictPrivate(size, deleteFunc, cfdkcb))
{
}
@@ -79,17 +81,17 @@ KWQPtrDictImpl::~KWQPtrDictImpl()
delete d;
}
-static void invokeDeleteFuncOnValue (const void *key, const void *value, void *deleteFunc)
+static void invokeDeleteFuncOnValue (const void *key, const void *value, void *context)
{
- void (*del)(void *) = (void (*)(void *))deleteFunc;
-
- del((void *)value);
+ DeleteFunction *deleteFunc = (DeleteFunction *)context;
+ (*deleteFunc)((void *)value);
}
void KWQPtrDictImpl::clear(bool deleteItems)
{
if (deleteItems) {
- CFDictionaryApplyFunction(d->cfdict, invokeDeleteFuncOnValue, d->del);
+ DeleteFunction deleteFunc = d->del;
+ CFDictionaryApplyFunction(d->cfdict, invokeDeleteFuncOnValue, &deleteFunc);
}
CFDictionaryRemoveAllValues(d->cfdict);
@@ -102,19 +104,19 @@ uint KWQPtrDictImpl::count() const
void KWQPtrDictImpl::insert(void *key, const void *value)
{
- CFDictionarySetValue(d->cfdict, key /* DIFF: key.getCFMutableString() */, value);
+ CFDictionarySetValue(d->cfdict, key, value);
}
bool KWQPtrDictImpl::remove(void *key, bool deleteItem)
{
- void *value = (void *)CFDictionaryGetValue(d->cfdict, key /* DIFF: key.getCFMutableString() */);
+ void *value = (void *)CFDictionaryGetValue(d->cfdict, key);
if (value == nil) {
return false;
}
- CFDictionaryRemoveValue(d->cfdict, key /* DIFF: key.getCFMutableString() */);
+ CFDictionaryRemoveValue(d->cfdict, key);
if (deleteItem) {
d->del(value);
@@ -125,7 +127,7 @@ bool KWQPtrDictImpl::remove(void *key, bool deleteItem)
void *KWQPtrDictImpl::find(void *key) const
{
- return (void *)CFDictionaryGetValue(d->cfdict, key /* key.getCFMutableString() */);
+ return (void *)CFDictionaryGetValue(d->cfdict, key);
}
void KWQPtrDictImpl::swap(KWQPtrDictImpl &di)
@@ -213,12 +215,12 @@ void *KWQPtrDictIteratorImpl::current() const
return d->values[d->pos];
}
-void * /* DIFF: QString */ KWQPtrDictIteratorImpl::currentKey() const
+void * KWQPtrDictIteratorImpl::currentKey() const
{
if (d->pos >= d->count) {
- return NULL; /* DIFF: QString(); */
+ return NULL;
}
- return d->keys[d->pos]; /* DIFF: QString::fromCFString((CFStringRef)d->keys[d->pos]); */
+ return d->keys[d->pos];
}
void *KWQPtrDictIteratorImpl::toFirst()
diff --git a/WebCore/kwq/KWQPtrList.h b/WebCore/kwq/KWQPtrList.h
index ac5c7c2..d50ee00 100644
--- a/WebCore/kwq/KWQPtrList.h
+++ b/WebCore/kwq/KWQPtrList.h
@@ -53,7 +53,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPtrList() : impl(deleteFunc) {}
- QPtrList(const QPtrList<T> &l) : impl(l.impl) {}
+ QPtrList(const QPtrList<T> &l) : QPtrCollection(l), impl(l.impl) {}
~QPtrList() { if (del_item) { impl.clear(del_item); } }
// member functions --------------------------------------------------------
@@ -145,7 +145,7 @@ private:
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrList<T> &l)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
{
QPtrListIterator<T> iter(l);
unsigned count = l.count();
diff --git a/WebCore/kwq/KWQPtrStack.h b/WebCore/kwq/KWQPtrStack.h
index f683818..64b883f 100644
--- a/WebCore/kwq/KWQPtrStack.h
+++ b/WebCore/kwq/KWQPtrStack.h
@@ -73,7 +73,7 @@ public:
#ifdef _KWQ_IOSTREAM_
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrStack<T>&s)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
{
stream << "QPtrStack: [size: " << s.count() << "; items: ";
diff --git a/WebCore/kwq/KWQPtrVector.h b/WebCore/kwq/KWQPtrVector.h
index 0c16940..415e87d 100644
--- a/WebCore/kwq/KWQPtrVector.h
+++ b/WebCore/kwq/KWQPtrVector.h
@@ -51,7 +51,7 @@ public:
QPtrVector() : impl(deleteFunc) {}
QPtrVector(uint size) : impl(size, deleteFunc) {}
- QPtrVector(const QPtrVector<T> &v) : impl(v.impl) {}
+ QPtrVector(const QPtrVector<T> &v) : QPtrCollection(v), impl(v.impl) {}
~QPtrVector() { if (del_item) { impl.clear(del_item); } }
// member functions --------------------------------------------------------
@@ -84,7 +84,7 @@ public:
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrVector<T> &v)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
{
uint i = 0;
uint count = v.count();
diff --git a/WebCore/kwq/KWQRect.h b/WebCore/kwq/KWQRect.h
index 415c29d..89375b9 100644
--- a/WebCore/kwq/KWQRect.h
+++ b/WebCore/kwq/KWQRect.h
@@ -36,7 +36,9 @@
#include <config.h>
#endif
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
#include <KWQDef.h>
@@ -98,7 +100,7 @@ public:
QRect operator&(const QRect &) const;
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QRect &);
+ friend std::ostream &operator<<(std::ostream &, const QRect &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/KWQRect.mm b/WebCore/kwq/KWQRect.mm
index a548b6d..c23af19 100644
--- a/WebCore/kwq/KWQRect.mm
+++ b/WebCore/kwq/KWQRect.mm
@@ -183,7 +183,7 @@ bool operator!=(const QRect &a, const QRect &b)
}
#ifdef _KWQ_IOSTREAM_
-ostream &operator<<(ostream &o, const QRect &r)
+std::ostream &operator<<(std::ostream &o, const QRect &r)
{
return o << "QRect: [left: " << r.left () << "; top: " << r.top() << "; right: " << r.right() << "; bottom: " << r.bottom() << "]";
}
diff --git a/WebCore/kwq/KWQRegion.mm b/WebCore/kwq/KWQRegion.mm
index 5b16c69..04bfd0b 100644
--- a/WebCore/kwq/KWQRegion.mm
+++ b/WebCore/kwq/KWQRegion.mm
@@ -29,9 +29,11 @@
const QRegion QRegion::null;
-void QRegion::_initialize() {
- data = calloc(1, sizeof(struct KWQRegionData));
+void QRegion::_initialize()
+{
+ data = new KWQRegionData;
data->type = Rectangle;
+ data->path = nil;
}
QRegion::QRegion()
@@ -85,9 +87,8 @@ QRegion::QRegion(const QRegion &other)
QRegion::~QRegion()
{
- if (data->path)
- [data->path release];
- free(data);
+ [data->path release];
+ delete data;
}
QRegion QRegion::intersect(const QRegion ®ion) const
@@ -147,5 +148,5 @@ QRect QRegion::boundingRect() const
NSRect bounds = [data->path bounds];
- return QRect(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
+ return QRect((int)bounds.origin.x, (int)bounds.origin.y, (int)bounds.size.width, (int)bounds.size.height);
}
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 6ba6f59..fd3efc4 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -127,8 +127,10 @@ void QScrollView::scrollBy(int dx, int dy)
void QScrollView::setContentsPos(int x, int y)
{
NSView *view = getView();
- if ([view isKindOfClass: [NSScrollView class]])
- view = [(NSScrollView *)view documentView];
+ if ([view isKindOfClass: [NSScrollView class]]) {
+ NSScrollView *scrollView = (NSScrollView *)view;
+ view = [scrollView documentView];
+ }
if (x < 0)
x = 0;
@@ -157,17 +159,16 @@ void QScrollView::addChild(QWidget* child, int x, int y)
if (child->x() != x || child->y() != y)
child->move (x, y);
- if ([getView() isKindOfClass: NSClassFromString(@"NSScrollView")]){
- thisView = [(NSScrollView *)getView() documentView];
- }
- else {
- thisView = getView();
+ thisView = getView();
+ if ([thisView isKindOfClass: NSClassFromString(@"NSScrollView")]) {
+ NSScrollView *scrollView = thisView;
+ thisView = [scrollView documentView];
}
subView = child->getView();
NSRect wFrame = [subView frame];
- if ([subView superview] == thisView){
+ if ([subView superview] == thisView) {
return;
}
@@ -196,7 +197,8 @@ 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")]){
- IFWebView *wview = [(NSScrollView *)getView() documentView];
+ NSScrollView *scrollView = (NSScrollView *)getView();
+ IFWebView *wview = [scrollView documentView];
KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
//w -= (int)[NSScroller scrollerWidth];
@@ -242,8 +244,10 @@ QPoint QScrollView::contentsToViewport(const QPoint &)
void QScrollView::viewportToContents(int vx, int vy, int& x, int& y)
{
NSView *view = getView();
- if ([view isKindOfClass: [NSScrollView class]])
- view = [(NSScrollView *)view documentView];
+ if ([view isKindOfClass: [NSScrollView class]]) {
+ NSScrollView *scrollView = (NSScrollView *)view;
+ view = [scrollView documentView];
+ }
NSPoint np = [view convertPoint: NSMakePoint (vx, vy) fromView: nil];
@@ -294,17 +298,3 @@ void QScrollView::ensureVisible(int,int,int,int)
{
_logNeverImplemented();
}
-
-
-QScrollView::QScrollView(const QScrollView &)
-{
- _logNeverImplemented();
-}
-
-
-QScrollView &QScrollView::operator=(const QScrollView &)
-{
- _logNeverImplemented();
- return *this;
-}
-
diff --git a/WebCore/kwq/KWQSize.h b/WebCore/kwq/KWQSize.h
index 16fd017..31000ac 100644
--- a/WebCore/kwq/KWQSize.h
+++ b/WebCore/kwq/KWQSize.h
@@ -82,7 +82,7 @@ public:
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QSize &);
+ friend std::ostream &operator<<(std::ostream &, const QSize &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/KWQSize.mm b/WebCore/kwq/KWQSize.mm
index 1d24be8..fcd3b25 100644
--- a/WebCore/kwq/KWQSize.mm
+++ b/WebCore/kwq/KWQSize.mm
@@ -79,7 +79,7 @@ bool operator!=(const QSize &a, const QSize &b)
}
#ifdef _KWQ_IOSTREAM_
-ostream &operator<<(ostream &o, const QSize &s)
+std::ostream &operator<<(std::ostream &o, const QSize &s)
{
return o << "QSize: [w: " << s.width() << "; h: " << s.height() << "]";
}
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 6f2e055..85e2a96 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -119,7 +119,7 @@ QString QString::fromStringWithEncoding(const char *chs, int len,
} else {
// append length-specified string
// FIXME: can we find some way of not using this temporary?
- char *buf = CFAllocatorAllocate(kCFAllocatorDefault, len + 1, 0);
+ char *buf = (char *)CFAllocatorAllocate(kCFAllocatorDefault, len + 1, 0);
strncpy(buf, chs, len);
*(buf + len) = '\0';
CFStringAppendCString(qs.s, buf, encoding);
@@ -884,7 +884,7 @@ QString &QString::setNum(long n)
{
const int capacity = 64;
char buf[capacity];
- buf[snprintf(buf, capacity - 1, "%D", n)] = '\0';
+ buf[snprintf(buf, capacity - 1, "%ld", n)] = '\0';
return setLatin1(buf);
}
@@ -892,7 +892,7 @@ QString &QString::setNum(ulong n)
{
const int capacity = 64;
char buf[capacity];
- buf[snprintf(buf, capacity - 1, "%U", n)] = '\0';
+ buf[snprintf(buf, capacity - 1, "%lu", n)] = '\0';
return setLatin1(buf);
}
@@ -1044,7 +1044,7 @@ void QString::fill(QChar qc, int len)
if (len <= 0)
s = getNullCFString();
else {
- UniChar *ucs = CFAllocatorAllocate(kCFAllocatorDefault, len * sizeof (UniChar), 0);
+ UniChar *ucs = (UniChar *)CFAllocatorAllocate(kCFAllocatorDefault, len * sizeof (UniChar), 0);
for (int i = 0; i < len; i++)
ucs[i] = qc.c;
s = CFStringCreateMutable(kCFAllocatorDefault, 0);
@@ -1097,7 +1097,7 @@ QCString QString::convertToQCString(CFStringEncoding enc) const
{
uint len = length();
if (len) {
- char *chs = CFAllocatorAllocate(kCFAllocatorDefault, len + 1, 0);
+ char *chs = (char *)CFAllocatorAllocate(kCFAllocatorDefault, len + 1, 0);
if (chs) {
if (!CFStringGetCString(s, chs, len + 1, enc)) {
*reinterpret_cast<char *>(chs) = '\0';
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index aeb0740..ead3374 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -267,8 +267,9 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
int paragraphSoFar = 0;
NSRange searchRange = NSMakeRange(0, [text length]);
NSRange newlineRange;
+ int advance;
- do {
+ while (true) {
newlineRange = [text rangeOfString:@"\n" options:NSLiteralSearch range:searchRange];
if (newlineRange.location == NSNotFound) {
break;
@@ -280,14 +281,16 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
paragraphSoFar++;
- searchRange.length -= (newlineRange.location + 1 - searchRange.location);
- searchRange.location = newlineRange.location + 1;
- if (searchRange.length < 0) {
+ advance = newlineRange.location + 1 - searchRange.location;
+ if ((int)searchRange.length <= advance) {
searchRange.location = NSNotFound;
searchRange.length = 0;
break;
}
- } while (true);
+
+ searchRange.length -= advance;
+ searchRange.location += advance;
+ }
if (paragraphSoFar < paragraph) {
return NSMakeRange(NSNotFound, 0);
diff --git a/WebCore/kwq/KWQTextStorage.mm b/WebCore/kwq/KWQTextStorage.mm
index 7ec7bab..04be555 100644
--- a/WebCore/kwq/KWQTextStorage.mm
+++ b/WebCore/kwq/KWQTextStorage.mm
@@ -79,7 +79,7 @@
[fragment setBoundingRect: boundingRect];
[fragmentCache setObject: fragment forKey: [self string]];
- [fragment release];
+ [(NSObject *)fragment release];
return fragment;
}
diff --git a/WebCore/kwq/KWQValueList.h b/WebCore/kwq/KWQValueList.h
index dae77d4..17c53ae 100644
--- a/WebCore/kwq/KWQValueList.h
+++ b/WebCore/kwq/KWQValueList.h
@@ -165,7 +165,7 @@ private:
template<class T>
-inline ostream &operator<<(ostream &o, const QValueList<T>&p)
+inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
{
o <<
"QValueList: [size: " <<
diff --git a/WebCore/kwq/KWQVariant.mm b/WebCore/kwq/KWQVariant.mm
index 24a0a2b..37bd0f5 100644
--- a/WebCore/kwq/KWQVariant.mm
+++ b/WebCore/kwq/KWQVariant.mm
@@ -63,7 +63,7 @@ public:
int refCount;
- friend KWQRefPtr<QVariantPrivate>;
+ friend class KWQRefPtr<QVariantPrivate>;
};
QVariant::QVariant() : d(new QVariantPrivate())
diff --git a/WebCore/kwq/KWQVectorImpl.mm b/WebCore/kwq/KWQVectorImpl.mm
index 1bbaed6..d646996 100644
--- a/WebCore/kwq/KWQVectorImpl.mm
+++ b/WebCore/kwq/KWQVectorImpl.mm
@@ -62,7 +62,7 @@ KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate(int sz, void (*deleteFunc)(voi
deleteItem(deleteFunc)
{
if (cfarray == NULL) {
- throw bad_alloc();
+ throw std::bad_alloc();
}
}
@@ -74,7 +74,7 @@ KWQVectorImpl::KWQVectorPrivate::KWQVectorPrivate(KWQVectorPrivate &vp) :
deleteItem(vp.deleteItem)
{
if (cfarray == NULL) {
- throw bad_alloc();
+ throw std::bad_alloc();
}
}
@@ -216,14 +216,12 @@ void *KWQVectorImpl::at(int n) const
void **KWQVectorImpl::data()
{
- void **values;
- unsigned length = CFArrayGetCount(d->cfarray);
+ int length = CFArrayGetCount(d->cfarray);
- // allocate some memory and set it up to be autoreleased. this is pure evil.
- values = malloc(length * sizeof(void *));
- [[[NSData alloc] initWithBytesNoCopy:values length:length] autorelease];
+ // Use an autoreleased NSMutableData object. This is pure evil.
+ void ** values = (void **) [[[[NSMutableData alloc] initWithLength:length] autorelease] mutableBytes];
- CFArrayGetValues(d->cfarray, CFRangeMake(0, CFArrayGetCount(d->cfarray)), (const void **)values);
+ CFArrayGetValues(d->cfarray, CFRangeMake(0, length), (const void **)values);
return values;
}
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index cef4d6b..5df249c 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -271,7 +271,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
((KHTMLView *)widget)->viewportMouseReleaseEvent(kEvent);
}
@@ -295,7 +295,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
((KHTMLView *)widget)->viewportMousePressEvent(kEvent);
}
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 5a144ec..1b1b9f0 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -199,7 +199,7 @@ void QWidget::move(const QPoint &p)
QRect QWidget::frameGeometry() const
{
NSRect vFrame = [getView() frame];
- return QRect (vFrame.origin.x, vFrame.origin.y, vFrame.size.width, vFrame.size.height);
+ return QRect((int)vFrame.origin.x, (int)vFrame.origin.y, (int)vFrame.size.width, (int)vFrame.size.height);
}
@@ -221,8 +221,8 @@ 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]];
- return QPoint (sp.x, sp.y);
+ sp = [[data->view window] convertBaseToScreen: [data->view convertPoint: NSMakePoint((float)p.x(), (float)p.y()) toView: nil]];
+ return QPoint((int)sp.x, (int)sp.y);
}
@@ -317,13 +317,14 @@ QSize QWidget::minimumSizeHint() const
{
NSView *view = getView();
- if ([view isKindOfClass: [NSControl class]]){
- [(NSControl *)getView() sizeToFit];
- NSRect frame = [getView() frame];
- return QSize ((int)frame.size.width, (int)frame.size.height);
+ if ([view isKindOfClass: [NSControl class]]) {
+ NSControl *control = (NSControl *)view;
+ [control sizeToFit];
+ NSRect frame = [view frame];
+ return QSize((int)frame.size.width, (int)frame.size.height);
}
- return QSize (0,0);
+ return QSize(0,0);
}
diff --git a/WebCore/kwq/WCPlugin.mm b/WebCore/kwq/WCPlugin.mm
index 5beedbe..0863e12 100644
--- a/WebCore/kwq/WCPlugin.mm
+++ b/WebCore/kwq/WCPlugin.mm
@@ -165,11 +165,11 @@
return;
}
if(isCFM){
- pluginMainFunc = (void*)CFBundleGetFunctionPointerForName(bundle, CFSTR("main") );
+ pluginMainFunc = (mainFuncPtr)CFBundleGetFunctionPointerForName(bundle, CFSTR("main") );
}else{
- NPP_Initialize = (void*)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_Initialize") );
- NPP_GetEntryPoints = (void*)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_GetEntryPoints") );
- NPP_Shutdown = (void*)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_Shutdown") );
+ NPP_Initialize = (initializeFuncPtr)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_Initialize") );
+ NPP_GetEntryPoints = (getEntryPointsFuncPtr)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_GetEntryPoints") );
+ NPP_Shutdown = (NPP_ShutdownProcPtr)CFBundleGetFunctionPointerForName(bundle, CFSTR("NPP_Shutdown") );
}
}else{ // single CFM file
err = FSPathMakeRef((UInt8 *)[path cString], &fref, NULL);
@@ -187,34 +187,33 @@
KWQDEBUG("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
return;
}
- pluginMainFunc = functionPointerForTVector(pluginMainFunc);
+ pluginMainFunc = (mainFuncPtr)functionPointerForTVector((TransitionVector)pluginMainFunc);
isCFM = TRUE;
}
if(isCFM){
browserFuncs.version = 11;
browserFuncs.size = sizeof(NPNetscapeFuncs);
- browserFuncs.geturl = tVectorForFunctionPointer(NPN_GetURL);
- browserFuncs.posturl = tVectorForFunctionPointer(NPN_PostURL);
- browserFuncs.requestread = tVectorForFunctionPointer(NPN_RequestRead);
- browserFuncs.newstream = tVectorForFunctionPointer(NPN_NewStream);
- browserFuncs.write = tVectorForFunctionPointer(NPN_Write);
- browserFuncs.destroystream = tVectorForFunctionPointer(NPN_DestroyStream);
- browserFuncs.status = tVectorForFunctionPointer(NPN_Status);
- browserFuncs.uagent = tVectorForFunctionPointer(NPN_UserAgent);
- browserFuncs.memalloc = tVectorForFunctionPointer(NPN_MemAlloc);
- browserFuncs.memfree = tVectorForFunctionPointer(NPN_MemFree);
- browserFuncs.memflush = tVectorForFunctionPointer(NPN_MemFlush);
- browserFuncs.reloadplugins = tVectorForFunctionPointer(NPN_ReloadPlugins);
- browserFuncs.geturlnotify = tVectorForFunctionPointer(NPN_GetURLNotify);
- browserFuncs.posturlnotify = tVectorForFunctionPointer(NPN_PostURLNotify);
- browserFuncs.getvalue = tVectorForFunctionPointer(NPN_GetValue);
- browserFuncs.setvalue = tVectorForFunctionPointer(NPN_SetValue);
- browserFuncs.invalidaterect = tVectorForFunctionPointer(NPN_InvalidateRect);
- browserFuncs.invalidateregion = tVectorForFunctionPointer(NPN_InvalidateRegion);
- browserFuncs.forceredraw = tVectorForFunctionPointer(NPN_ForceRedraw);
- browserFuncs.getJavaEnv = tVectorForFunctionPointer(NPN_GetJavaEnv);
- browserFuncs.getJavaPeer = tVectorForFunctionPointer(NPN_GetJavaPeer);
-
+ browserFuncs.geturl = (NPN_GetURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetURL);
+ browserFuncs.posturl = (NPN_PostURLProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PostURL);
+ browserFuncs.requestread = (NPN_RequestReadProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_RequestRead);
+ browserFuncs.newstream = (NPN_NewStreamProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_NewStream);
+ browserFuncs.write = (NPN_WriteProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_Write);
+ browserFuncs.destroystream = (NPN_DestroyStreamProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_DestroyStream);
+ browserFuncs.status = (NPN_StatusProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_Status);
+ browserFuncs.uagent = (NPN_UserAgentProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_UserAgent);
+ browserFuncs.memalloc = (NPN_MemAllocProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_MemAlloc);
+ browserFuncs.memfree = (NPN_MemFreeProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_MemFree);
+ browserFuncs.memflush = (NPN_MemFlushProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_MemFlush);
+ browserFuncs.reloadplugins = (NPN_ReloadPluginsProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_ReloadPlugins);
+ browserFuncs.geturlnotify = (NPN_GetURLNotifyProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetURLNotify);
+ browserFuncs.posturlnotify = (NPN_PostURLNotifyProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_PostURLNotify);
+ browserFuncs.getvalue = (NPN_GetValueProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetValue);
+ browserFuncs.setvalue = (NPN_SetValueProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_SetValue);
+ browserFuncs.invalidaterect = (NPN_InvalidateRectProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_InvalidateRect);
+ browserFuncs.invalidateregion = (NPN_InvalidateRegionProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_InvalidateRegion);
+ browserFuncs.forceredraw = (NPN_ForceRedrawProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_ForceRedraw);
+ browserFuncs.getJavaEnv = (NPN_GetJavaEnvProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetJavaEnv);
+ browserFuncs.getJavaPeer = (NPN_GetJavaPeerProcPtr)tVectorForFunctionPointer((FunctionPointer)NPN_GetJavaPeer);
npErr = pluginMainFunc(&browserFuncs, &pluginFuncs, &NPP_Shutdown);
@@ -222,19 +221,19 @@
pluginVersion = pluginFuncs.version;
KWQDEBUG("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
- NPP_New = functionPointerForTVector(pluginFuncs.newp);
- NPP_Destroy = functionPointerForTVector(pluginFuncs.destroy);
- NPP_SetWindow = functionPointerForTVector(pluginFuncs.setwindow);
- NPP_NewStream = functionPointerForTVector(pluginFuncs.newstream);
- NPP_DestroyStream = functionPointerForTVector(pluginFuncs.destroystream);
- NPP_StreamAsFile = functionPointerForTVector(pluginFuncs.asfile);
- NPP_WriteReady = functionPointerForTVector(pluginFuncs.writeready);
- NPP_Write = functionPointerForTVector(pluginFuncs.write);
- NPP_Print = functionPointerForTVector(pluginFuncs.print);
- NPP_HandleEvent = functionPointerForTVector(pluginFuncs.event);
- NPP_URLNotify = functionPointerForTVector(pluginFuncs.urlnotify);
- NPP_GetValue = functionPointerForTVector(pluginFuncs.getvalue);
- NPP_SetValue = functionPointerForTVector(pluginFuncs.setvalue);
+ NPP_New = (NPP_NewProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.newp);
+ NPP_Destroy = (NPP_DestroyProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.destroy);
+ NPP_SetWindow = (NPP_SetWindowProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.setwindow);
+ NPP_NewStream = (NPP_NewStreamProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.newstream);
+ NPP_DestroyStream = (NPP_DestroyStreamProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.destroystream);
+ NPP_StreamAsFile = (NPP_StreamAsFileProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.asfile);
+ NPP_WriteReady = (NPP_WriteReadyProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.writeready);
+ NPP_Write = (NPP_WriteProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.write);
+ NPP_Print = (NPP_PrintProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.print);
+ NPP_HandleEvent = (NPP_HandleEventProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.event);
+ NPP_URLNotify = (NPP_URLNotifyProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.urlnotify);
+ NPP_GetValue = (NPP_GetValueProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.getvalue);
+ NPP_SetValue = (NPP_SetValueProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.setvalue);
}else{ // no function pointer conversion necessary for mach-o
browserFuncs.version = 11;
browserFuncs.size = sizeof(NPNetscapeFuncs);
diff --git a/WebCore/kwq/WCPluginWidget.h b/WebCore/kwq/WCPluginWidget.h
index 43b2e79..4354bdc 100644
--- a/WebCore/kwq/WCPluginWidget.h
+++ b/WebCore/kwq/WCPluginWidget.h
@@ -70,7 +70,7 @@ private:
}; // class WCPluginWidget ============================================================
-void * WCIFPluginMakeFunction();
-void * WCIFNullPluginMakeFunction();
+WCIFPluginMakeFunc WCIFPluginMakeFunction();
+WCIFNullPluginMakeFunc WCIFNullPluginMakeFunction();
#endif
diff --git a/WebCore/kwq/WCPluginWidget.mm b/WebCore/kwq/WCPluginWidget.mm
index b1edd89..a539be4 100644
--- a/WebCore/kwq/WCPluginWidget.mm
+++ b/WebCore/kwq/WCPluginWidget.mm
@@ -98,15 +98,12 @@ WCPluginWidget::~WCPluginWidget()
}
-void * WCIFPluginMakeFunction()
+WCIFPluginMakeFunc WCIFPluginMakeFunction()
{
return WCIFPluginMake;
}
-void * WCIFNullPluginMakeFunction()
+WCIFNullPluginMakeFunc WCIFNullPluginMakeFunction()
{
- return WCIFPluginMake;
+ return WCIFNullPluginMake;
}
-
-
-
diff --git a/WebCore/kwq/external.h b/WebCore/kwq/external.h
index 57f7557..34b1305 100644
--- a/WebCore/kwq/external.h
+++ b/WebCore/kwq/external.h
@@ -38,9 +38,14 @@
@protocol IFWebController
- (IFWebFrame *)createFrameNamed: (NSString *)name for: (IFWebDataSource *)dataSource inParent: (IFWebDataSource *)dataSource inScrollView: (BOOL)inScrollView;
+- (IFWebFrame *)frameNamed: (NSString *)name;
+ at end
+
+ at interface IFBaseWebController
- (void)_receivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
-- (IFWebFrame *)mainFrame;
+- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
@end
@protocol IFLocationChangeHandler
@@ -62,6 +67,7 @@
- (KHTMLPart *)_part;
- (void)_setTitle: (NSString *)title;
- (void)_setFinalURL: (NSURL *)url;
+- (id <IFLocationChangeHandler>)_locationChangeHandler;
@end
// This should not be allowed here. data source should not reference view
diff --git a/WebCore/kwq/kwqdebug.h b/WebCore/kwq/kwqdebug.h
index 02d7a5e..359344f 100644
--- a/WebCore/kwq/kwqdebug.h
+++ b/WebCore/kwq/kwqdebug.h
@@ -42,7 +42,7 @@
#define KWQ_ASSERT_VALID_ARG(arg,expr) ((void)0)
#define KWQ_ASSERT_NOT_NIL(arg) ((void)0)
-#else /* xNDEBUG */
+#else /* NDEBUG */
/*
*/
diff --git a/WebCore/kwq/kwqdebug.mm b/WebCore/kwq/kwqdebug.mm
index da34b7d..219efc5 100644
--- a/WebCore/kwq/kwqdebug.mm
+++ b/WebCore/kwq/kwqdebug.mm
@@ -25,6 +25,8 @@
#include <kwqdebug.h>
+#ifndef xNDEBUG
+
unsigned int KWQ_LOG_LEVEL = 0;
void KWQSetLogLevel(int mask) {
@@ -72,3 +74,4 @@ void KWQLog(unsigned int level, const char *file, int line, const char *function
}
}
+#endif
diff --git a/WebCore/kwq/npapi.h b/WebCore/kwq/npapi.h
index 513b3a5..9a1eed4 100644
--- a/WebCore/kwq/npapi.h
+++ b/WebCore/kwq/npapi.h
@@ -341,8 +341,10 @@ typedef NPError (* mainFuncPtr)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownPr
typedef NPError (* initializeFuncPtr)(NPNetscapeFuncs*);
typedef NPError (* getEntryPointsFuncPtr)(NPPluginFuncs*);
-void *functionPointerForTVector(void *);
-void *tVectorForFunctionPointer(void *);
+typedef void (* FunctionPointer) (void);
+typedef void (* TransitionVector) (void);
+FunctionPointer functionPointerForTVector(TransitionVector);
+TransitionVector tVectorForFunctionPointer(FunctionPointer);
/*
* NPN_* functions are provided by the navigator and called by the plugin.
diff --git a/WebCore/kwq/npapi.mm b/WebCore/kwq/npapi.mm
index dd87bae..0fa47ac 100644
--- a/WebCore/kwq/npapi.mm
+++ b/WebCore/kwq/npapi.mm
@@ -45,128 +45,120 @@
// general plug-in to browser functions
-const char* NPN_UserAgent(NPP instance){
+const char* NPN_UserAgent(NPP instance)
+{
KWQDEBUG("NPN_UserAgent\n");
return "IE";
}
-void* NPN_MemAlloc(UInt32 size){
+void* NPN_MemAlloc(UInt32 size)
+{
//KWQDEBUG("NPN_MemAlloc\n");
return malloc(size);
}
-void NPN_MemFree(void* ptr){
+void NPN_MemFree(void* ptr)
+{
//KWQDEBUG("NPN_MemFree\n");
free(ptr);
}
-UInt32 NPN_MemFlush(UInt32 size){
+UInt32 NPN_MemFlush(UInt32 size)
+{
KWQDEBUG("NPN_MemFlush\n");
return 0;
}
-void NPN_ReloadPlugins(NPBool reloadPages){
+void NPN_ReloadPlugins(NPBool reloadPages)
+{
KWQDEBUG("NPN_ReloadPlugins\n");
}
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList){
+NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
+{
return NPERR_GENERIC_ERROR;
}
// instance-specific functions
-NPError NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin getURLNotify:url target:target notifyData:notifyData];
}
-NPError NPN_GetURL(NPP instance, const char* url, const char* target){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_GetURL(NPP instance, const char* url, const char* target)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin getURL:url target:target];
}
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file, void* notifyData){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file, void* notifyData)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin postURLNotify:url target:target len:len buf:buf file:file notifyData:notifyData];
}
-NPError NPN_PostURL(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_PostURL(NPP instance, const char* url, const char* target, UInt32 len, const char* buf, NPBool file)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin postURL:url target:target len:len buf:buf file:file];
}
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin newStream:type target:target stream:stream];
}
-SInt32 NPN_Write(NPP instance, NPStream* stream, SInt32 len, void* buffer){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+SInt32 NPN_Write(NPP instance, NPStream* stream, SInt32 len, void* buffer)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin write:stream len:len buffer:buffer];
}
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin destroyStream:stream reason:reason];
}
-void NPN_Status(NPP instance, const char* message){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+void NPN_Status(NPP instance, const char* message)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
[plugin status:message];
}
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin getValue:variable value:value];
}
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
return [plugin setValue:variable value:value];
}
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
[plugin invalidateRect:invalidRect];
}
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
[plugin invalidateRegion:invalidRegion];
-
}
-void NPN_ForceRedraw(NPP instance){
- IFPluginView *plugin;
- plugin = instance->ndata;
-
+void NPN_ForceRedraw(NPP instance)
+{
+ IFPluginView *plugin = (IFPluginView *)instance->ndata;
[plugin forceRedraw];
}
@@ -182,12 +174,13 @@ void* NPN_GetJavaPeer(NPP instance)
// function pointer converters
-void *functionPointerForTVector(void *tvp) {
+FunctionPointer functionPointerForTVector(TransitionVector tvp)
+{
uint32 temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};
uint32 *newGlue = NULL;
if (tvp != NULL) {
- newGlue = malloc(sizeof(temp));
+ newGlue = (uint32 *)malloc(sizeof(temp));
if (newGlue != NULL) {
unsigned i;
for (i = 0; i < 6; i++) newGlue[i] = temp[i];
@@ -196,18 +189,19 @@ void *functionPointerForTVector(void *tvp) {
MakeDataExecutable(newGlue, sizeof(temp));
}
}
- return newGlue;
+
+ return (FunctionPointer)newGlue;
}
-void *tVectorForFunctionPointer(void *fp) {
- void **newGlue = NULL;
+TransitionVector tVectorForFunctionPointer(FunctionPointer fp)
+{
+ FunctionPointer *newGlue = NULL;
if (fp != NULL) {
- newGlue = malloc(2 * sizeof(void *));
+ newGlue = (FunctionPointer *)malloc(2 * sizeof(FunctionPointer));
if (newGlue != NULL) {
newGlue[0] = fp;
newGlue[1] = NULL;
}
}
- return newGlue;
+ return (TransitionVector)newGlue;
}
-
diff --git a/WebCore/kwq/qt/qarray.h b/WebCore/kwq/qt/qarray.h
index 2b8d849..cc9c61d 100644
--- a/WebCore/kwq/qt/qarray.h
+++ b/WebCore/kwq/qt/qarray.h
@@ -38,7 +38,6 @@
#include <KWQDef.h>
#include <KWQArrayImpl.h>
-#include <iostream>
// class QMemArray ================================================================
@@ -87,8 +86,11 @@ public:
}; // class QMemArray =============================================================
#ifdef _KWQ_IOSTREAM_
+
+#include <iostream>
+
template<class T>
-inline ostream &operator<<(ostream &stream, const QMemArray<T>&a)
+inline std::ostream &operator<<(std::ostream &stream, const QMemArray<T>&a)
{
stream << "QMemArray: [size: " << a.size() << "; items: ";
for (unsigned i = 0; i < a.size(); i++) {
@@ -101,6 +103,7 @@ inline ostream &operator<<(ostream &stream, const QMemArray<T>&a)
return stream;
}
+
#endif
#endif // USING_BORROWED_QARRAY
diff --git a/WebCore/kwq/qt/qcstring.h b/WebCore/kwq/qt/qcstring.h
index b014e0e..e568190 100644
--- a/WebCore/kwq/qt/qcstring.h
+++ b/WebCore/kwq/qt/qcstring.h
@@ -41,7 +41,10 @@
#include "qarray.h"
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
+
#include <string.h>
typedef QMemArray<char> QByteArray;
@@ -89,7 +92,7 @@ public:
QCString &operator+=(char);
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QCString &);
+ friend std::ostream &operator<<(std::ostream &, const QCString &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qdatetime.h b/WebCore/kwq/qt/qdatetime.h
index 819e192..e3917a7 100644
--- a/WebCore/kwq/qt/qdatetime.h
+++ b/WebCore/kwq/qt/qdatetime.h
@@ -83,7 +83,7 @@ private:
uint timeMS; // time is stored in milliseconds
friend class QDateTime;
- friend ostream &operator<<( ostream &, const QTime & );
+ friend std::ostream &operator<<( std::ostream &, const QTime & );
// add copy constructor
// this private declaration prevents copying
@@ -140,7 +140,7 @@ private:
void setCurrentDate();
friend class QDateTime;
- friend ostream &operator<<( ostream &, const QDate & );
+ friend std::ostream &operator<<( std::ostream &, const QDate & );
// add copy constructor
// this private declaration prevents copying
@@ -194,7 +194,7 @@ private:
QDate dateDT;
- friend ostream &operator<<( ostream &, const QDateTime & );
+ friend std::ostream &operator<<( std::ostream &, const QDateTime & );
}; // class QDateTime ==========================================================
#endif // USING_BORROWED_QDATETIME
diff --git a/WebCore/kwq/qt/qdict.h b/WebCore/kwq/qt/qdict.h
index 720aa5c..dc1a822 100644
--- a/WebCore/kwq/qt/qdict.h
+++ b/WebCore/kwq/qt/qdict.h
@@ -59,7 +59,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QDict(int size=17, bool caseSensitive=TRUE) : impl(size, caseSensitive, QDict::deleteFunc) {}
- QDict(const QDict<T> &d) : impl(d.impl) {}
+ QDict(const QDict<T> &d) : QPtrCollection(d), impl(d.impl) {}
virtual ~QDict() { impl.clear(del_item); }
// member functions --------------------------------------------------------
diff --git a/WebCore/kwq/qt/qlist.h b/WebCore/kwq/qt/qlist.h
index ac5c7c2..d50ee00 100644
--- a/WebCore/kwq/qt/qlist.h
+++ b/WebCore/kwq/qt/qlist.h
@@ -53,7 +53,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPtrList() : impl(deleteFunc) {}
- QPtrList(const QPtrList<T> &l) : impl(l.impl) {}
+ QPtrList(const QPtrList<T> &l) : QPtrCollection(l), impl(l.impl) {}
~QPtrList() { if (del_item) { impl.clear(del_item); } }
// member functions --------------------------------------------------------
@@ -145,7 +145,7 @@ private:
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrList<T> &l)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrList<T> &l)
{
QPtrListIterator<T> iter(l);
unsigned count = l.count();
diff --git a/WebCore/kwq/qt/qmap.h b/WebCore/kwq/qt/qmap.h
index 5bc3bb0..7d0eb37 100644
--- a/WebCore/kwq/qt/qmap.h
+++ b/WebCore/kwq/qt/qmap.h
@@ -36,7 +36,10 @@
#include <_qmap.h>
#else
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
+
#include <KWQDef.h>
#include <KWQMapImpl.h>
@@ -382,7 +385,7 @@ protected:
#ifdef _KWQ_IOSTREAM_
template<class K, class V>
-inline ostream &operator<<(ostream &stream, const QMap<K,V> &m)
+inline std::ostream &operator<<(std::ostream &stream, const QMap<K,V> &m)
{
uint count = m.count();
stream << "QMap: [size: " << count << "; items: ";
diff --git a/WebCore/kwq/qt/qpainter.h b/WebCore/kwq/qt/qpainter.h
index 6ae3d7c..1b6fb8d 100644
--- a/WebCore/kwq/qt/qpainter.h
+++ b/WebCore/kwq/qt/qpainter.h
@@ -49,8 +49,8 @@ class QPainterPrivate;
// class QWMatrix ==============================================================
class QWMatrix {
-friend QPainter;
-friend QPixmap;
+friend class QPainter;
+friend class QPixmap;
public:
// typedefs ----------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qpoint.h b/WebCore/kwq/qt/qpoint.h
index 0e17f51..861337f 100644
--- a/WebCore/kwq/qt/qpoint.h
+++ b/WebCore/kwq/qt/qpoint.h
@@ -36,7 +36,9 @@
#else /* !USING_BORROWED_QPOINT */
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
#include <KWQDef.h>
@@ -123,7 +125,7 @@ public:
{ return (QPointArray&)assign( a ); }
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QPoint &);
+ friend std::ostream &operator<<(std::ostream &, const QPoint &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qptrdict.h b/WebCore/kwq/qt/qptrdict.h
index 1c4c240..cc3a9d6 100644
--- a/WebCore/kwq/qt/qptrdict.h
+++ b/WebCore/kwq/qt/qptrdict.h
@@ -56,7 +56,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPtrDict(int size=17) : impl(size, deleteFunc) {}
- QPtrDict(const QPtrDict<T> &pd) : impl(pd.impl) {}
+ QPtrDict(const QPtrDict<T> &pd) : QPtrCollection(pd), impl(pd.impl) {}
virtual ~QPtrDict() { impl.clear(del_item); }
// member functions --------------------------------------------------------
diff --git a/WebCore/kwq/qt/qrect.h b/WebCore/kwq/qt/qrect.h
index 415c29d..89375b9 100644
--- a/WebCore/kwq/qt/qrect.h
+++ b/WebCore/kwq/qt/qrect.h
@@ -36,7 +36,9 @@
#include <config.h>
#endif
+#ifdef _KWQ_IOSTREAM_
#include <iostream>
+#endif
#include <KWQDef.h>
@@ -98,7 +100,7 @@ public:
QRect operator&(const QRect &) const;
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QRect &);
+ friend std::ostream &operator<<(std::ostream &, const QRect &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qsize.h b/WebCore/kwq/qt/qsize.h
index 16fd017..31000ac 100644
--- a/WebCore/kwq/qt/qsize.h
+++ b/WebCore/kwq/qt/qsize.h
@@ -82,7 +82,7 @@ public:
#ifdef _KWQ_IOSTREAM_
- friend ostream &operator<<(ostream &, const QSize &);
+ friend std::ostream &operator<<(std::ostream &, const QSize &);
#endif
// protected -------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qstack.h b/WebCore/kwq/qt/qstack.h
index f683818..64b883f 100644
--- a/WebCore/kwq/qt/qstack.h
+++ b/WebCore/kwq/qt/qstack.h
@@ -73,7 +73,7 @@ public:
#ifdef _KWQ_IOSTREAM_
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrStack<T>&s)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrStack<T>&s)
{
stream << "QPtrStack: [size: " << s.count() << "; items: ";
diff --git a/WebCore/kwq/qt/qvaluelist.h b/WebCore/kwq/qt/qvaluelist.h
index dae77d4..17c53ae 100644
--- a/WebCore/kwq/qt/qvaluelist.h
+++ b/WebCore/kwq/qt/qvaluelist.h
@@ -165,7 +165,7 @@ private:
template<class T>
-inline ostream &operator<<(ostream &o, const QValueList<T>&p)
+inline std::ostream &operator<<(std::ostream &o, const QValueList<T>&p)
{
o <<
"QValueList: [size: " <<
diff --git a/WebCore/kwq/qt/qvector.h b/WebCore/kwq/qt/qvector.h
index 0c16940..415e87d 100644
--- a/WebCore/kwq/qt/qvector.h
+++ b/WebCore/kwq/qt/qvector.h
@@ -51,7 +51,7 @@ public:
QPtrVector() : impl(deleteFunc) {}
QPtrVector(uint size) : impl(size, deleteFunc) {}
- QPtrVector(const QPtrVector<T> &v) : impl(v.impl) {}
+ QPtrVector(const QPtrVector<T> &v) : QPtrCollection(v), impl(v.impl) {}
~QPtrVector() { if (del_item) { impl.clear(del_item); } }
// member functions --------------------------------------------------------
@@ -84,7 +84,7 @@ public:
template<class T>
-inline ostream &operator<<(ostream &stream, const QPtrVector<T> &v)
+inline std::ostream &operator<<(std::ostream &stream, const QPtrVector<T> &v)
{
uint i = 0;
uint count = v.count();
diff --git a/WebCore/libwebcore.exp b/WebCore/libwebcore.exp
index 05b4d0f..b8dbfb4 100644
--- a/WebCore/libwebcore.exp
+++ b/WebCore/libwebcore.exp
@@ -1,41 +1,35 @@
-_WCSetIFLoadProgressMakeFunc__FPFv_P11objc_object
-_WCSetIFPluginMakeFunc__FPFG7_NSRectP8WCPluginP8NSStringn1P12NSDictionaryUs_PB2
-_WCSetIFWebDataSourceMakeFunc__FPFPv_P11objc_object
-__._4KURL
-__._7QString
-__._8QPainter
-__._Q23DOM9DOMString
-___11QMouseEventQ26QEvent4TypeRC6QPointii
-___4KURLPCci
-___6QPointii
-___8QPainterP7QWidget
-___9KHTMLPartP7QWidgetPCcP7QObjectPCcQ29KHTMLPart10GUIProfile
-___9KHTMLViewP9KHTMLPartP7QWidgetPCc
-_deref__9KHTMLPart
-_deref__Q23DOM9DomShared
-_documentSource__C9KHTMLPart
-_flushAll__Q25khtml5Cache
-_getStatistics__Q25khtml5Cache
-_getView__C7QWidget
-_gotoBaseAnchor__9KHTMLPart
-_latin1__C7QString
-_layout__9KHTMLView
-_nextSibling__CQ23DOM8NodeImpl
-_nextSibling__CQ25khtml12RenderObject
-_part__C9KHTMLView
-_recursive_toHTML__CQ23DOM8NodeImplb
-_ref__9KHTMLPart
-_ref__Q23DOM9DomShared
-_renderer__CQ23DOM8NodeImpl
-_setBaseURL__9KHTMLPartRC4KURL
-_setCacheDisabled__Q25khtml5Cacheb
-_setDataSource__9KHTMLPartP15IFWebDataSource
-_setView__7QWidgetP6NSView
-_setView__9KHTMLPartP9KHTMLView
-_slotData__9KHTMLPartP11IFURLHandlePCci
-_string__CQ23DOM9DOMString
-_updateStyleSelector__Q23DOM12DocumentImpl
-_widget__CQ25khtml12RenderWidget
-_xmlDocImpl__C9KHTMLPart
-_WCSetIFNullPluginMakeFunc__FPFG7_NSRectP8NSStringP12NSDictionary_PB2
.objc_class_name_WCPluginDatabase
+__Z21WCSetIFPluginMakeFuncPFP11objc_object7_NSRectS0_S0_S0_S0_tE
+__Z25WCSetIFNullPluginMakeFuncPFP11objc_object7_NSRectS0_S0_E
+__Z27WCSetIFLoadProgressMakeFuncPFP11objc_objectvE
+__Z28WCSetIFWebDataSourceMakeFuncPFP11objc_objectPvE
+__ZN11QMouseEventC1EN6QEvent4TypeERK6QPointii
+__ZN3DOM12DocumentImpl19updateStyleSelectorEv
+__ZN3DOM9DOMStringD1Ev
+__ZN3DOM9DomShared3refEv
+__ZN3DOM9DomShared5derefEv
+__ZN4KURLC1EPKci
+__ZN4KURLD1Ev
+__ZN5khtml5Cache13getStatisticsEv
+__ZN5khtml5Cache16setCacheDisabledEb
+__ZN5khtml5Cache8flushAllEv
+__ZN6QPointC1Eii
+__ZN7QStringD1Ev
+__ZN7QWidget7setViewEP6NSView
+__ZN8QPainterC1EP7QWidget
+__ZN8QPainterD1Ev
+__ZN9KHTMLPart10setBaseURLERK4KURL
+__ZN9KHTMLPart13setDataSourceEP15IFWebDataSource
+__ZN9KHTMLPart14gotoBaseAnchorEv
+__ZN9KHTMLPart7setViewEP9KHTMLView
+__ZN9KHTMLPart8slotDataEP11IFURLHandlePKci
+__ZN9KHTMLPartC1EP7QWidgetPKcP7QObjectS3_NS_10GUIProfileE
+__ZN9KHTMLView6layoutEv
+__ZN9KHTMLViewC1EP9KHTMLPartP7QWidgetPKc
+__ZNK3DOM8NodeImpl16recursive_toHTMLEb
+__ZNK3DOM8NodeImpl8rendererEv
+__ZNK3DOM9DOMString6stringEv
+__ZNK7QString6latin1Ev
+__ZNK7QWidget7getViewEv
+__ZNK9KHTMLPart10xmlDocImplEv
+__ZNK9KHTMLPart14documentSourceEv
diff --git a/WebCore/libwebcoretests.exp b/WebCore/libwebcoretests.exp
index 4a3a32a..e1c8fdf 100644
--- a/WebCore/libwebcoretests.exp
+++ b/WebCore/libwebcoretests.exp
@@ -1,342 +1,341 @@
-__._10KWQMapImpl
-__._11KWQListImpl
-__._11QStringList
-__._12KWQArrayImpl
-__._13KWQVectorImpl
-__._14KWQPtrDictImpl
-__._14QPtrCollection
-__._16KWQValueListImpl
-__._19KWQListIteratorImpl
-__._20KWQValueListNodeImpl
-__._22KWQPtrDictIteratorImpl
-__._24KWQValueListIteratorImpl
-__._4QDir
-__._5QFile
-__._7QBuffer
-__._7QRegExp
-___10KWQMapImplP14KWQMapNodeImplPFPB1_v
-___10KWQMapImplRCB0
-___11KWQDictImplRCB0
-___11KWQDictImplibPFPv_v
-___11KWQListImplPFPv_v
-___11KWQListImplRCB0
-___11QStringList
-___12KWQArrayImplUl
-___12KWQArrayImplUlUl
-___13KWQVectorImplPFPv_v
-___13KWQVectorImplRCB0
-___13KWQVectorImplUiPFPv_v
-___14KWQMapNodeImpl
-___14KWQPtrDictImplRCB0
-___14KWQPtrDictImpliPFPv_vPC24CFDictionaryKeyCallBacks
-___14QPtrCollection
-___16KWQValueListImplPFP20KWQValueListNodeImpl_vPFPB2_PB2
-___16KWQValueListImplRCB0
-___18KWQMapIteratorImpl
-___18KWQMapIteratorImplRCB0
-___19KWQDictIteratorImplRC11KWQDictImpl
-___19KWQListIteratorImplRC11KWQListImpl
-___20KWQValueListNodeImpl
-___22KWQPtrDictIteratorImplRC14KWQPtrDictImpl
-___24KWQValueListIteratorImpl
-___24KWQValueListIteratorImplRCB0
-___4KURL
-___4KURLRC7QStringi
-___4KURLRCB0
-___4KURLRCB0RC7QString
-___4QDir
-___4QDirRC7QString
-___4QDirRCB0
-___5QDate
-___5QDatein2
-___5QFileRC7QString
-___5QRect
-___5QRectin3
-___5QSize
-___5QSizeii
-___5QTime
-___5QTimeii
-___6QPoint
-___7QBuffer
-___7QRegExpPCc
-___7QRegExpRC7QStringbb
-___7QString
-___7QStringG5QChar
-___7QStringPC5QCharUi
-___7QStringPCc
-___7QStringRCB0
-___7QStringRCt9QMemArray1Zc
-___8QCString
-___8QCStringPCc
-___8QCStringPCcUi
-___8QCStringRCB0
-___8QCStringi
-___9QDateTime
-___9QDateTimeRC5QDateRC5QTime
-___9QDateTimeRCB0
-___ad__C5QRectRCB0
-___apl__7QStringG5QChar
-___apl__7QStringRCB0
-___apl__7QStringc
-___apl__8QCStringPCc
-___apl__8QCStringc
-___as__12KWQArrayImplRCB0
-___as__14QPtrCollectionRCB0
-___as__16KWQValueListImplRCB0
-___as__19KWQListIteratorImplRCB0
-___as__24KWQValueListIteratorImplRCB0
-___as__4QDirRCB0
-___eq__24KWQValueListIteratorImplRCB0
-___eq__C12KWQArrayImplRCB0
-___eq__FRC5QRectn1
-___eq__FRC5QSizen1
-___eq__FRC7QStringPCc
-___eq__FRC7QStringn1
-___ls__FR7ostreamRC5QDate
-___ls__FR7ostreamRC5QRect
-___ls__FR7ostreamRC5QSize
-___ls__FR7ostreamRC5QTime
-___ls__FR7ostreamRC6QPoint
-___ls__FR7ostreamRC8QCString
-___ls__FR7ostreamRC9QDateTime
-___mi__FRC6QPointn1
-___mm__19KWQListIteratorImpl
-___mm__24KWQValueListIteratorImpl
-___ne__24KWQValueListIteratorImplRCB0
-___ne__FRC5QRectn1
-___ne__FRC5QSizen1
-___pl__FG5QCharRC7QString
-___pl__FPCcRC7QString
-___pl__FRC5QSizen1
-___pl__FRC6QPointn1
-___pl__FcRC7QString
-___pp__19KWQListIteratorImpl
-___pp__22KWQPtrDictIteratorImpl
-___pp__24KWQValueListIteratorImpl
-___pp__24KWQValueListIteratorImpli
-___tf10KWQMapImpl
-___tf14QPtrCollection
-___ti10KWQMapImpl
-___ti14QPtrCollection
-_absFilePath__C4QDirRC7QString
-_absPath__C4QDir
-_appendNode__16KWQValueListImplP20KWQValueListNodeImpl
-_append__11KWQListImplPCv
-_append__7QStringRCB0
-_arg__C7QStringRCB0i
-_arg__C7QStringUii
-_arg__C7QStringUli
-_arg__C7QStringUsi
-_arg__C7QStringdi
-_arg__C7QStringii
-_arg__C7QStringli
-_arg__C7QStringsi
-_assign__11KWQListImplRCB0b
-_assign__14KWQPtrDictImplRCB0b
-_at__11KWQListImplUi
-_at__C12KWQArrayImplUl
-_at__C13KWQVectorImpli
-_autoDelete__14QPtrCollection
-_beginInternal__10KWQMapImpl
-_beginInternal__C10KWQMapImpl
-_begin__16KWQValueListImpl
-_begin__C16KWQValueListImpl
-_bottom__C5QRect
-_buffer__C7QBuffer
-_cdUp__4QDir
-_clearInternal__10KWQMapImpl
-_clear__11KWQListImplb
-_clear__13KWQVectorImplb
-_clear__14KWQPtrDictImplb
-_clear__16KWQValueListImpl
-_close__5QFile
-_close__7QBuffer
-_containsEqualNodes__C16KWQValueListImplP20KWQValueListNodeImplPFPCB1n1_b
-_containsRef__C11KWQListImplPCv
-_contains__C7QStringPCcb
-_contains__C7QStringc
-_contains__C8QCStringcb
-_countInternal__C10KWQMapImpl
-_count__C11KWQListImpl
-_count__C13KWQVectorImpl
-_count__C14KWQPtrDictImpl
-_count__C16KWQValueListImpl
-_count__C19KWQListIteratorImpl
-_count__C22KWQPtrDictIteratorImpl
-_currentKey__C22KWQPtrDictIteratorImpl
-_currentStringKey__C19KWQDictIteratorImpl
-_current__C11KWQListImpl
-_current__C19KWQListIteratorImpl
-_current__C22KWQPtrDictIteratorImpl
-_data__C12KWQArrayImpl
-_day__C5QDate
-_daysTo__C5QDateRCB0
-_decode_string__4KURLRC7QString
-_duplicate__12KWQArrayImplPCvUl
-_elapsed__5QTime
-_endInternal__10KWQMapImpl
-_endInternal__C10KWQMapImpl
-_end__16KWQValueListImpl
-_end__C16KWQValueListImpl
-_entryList__4QDirRC7QString
-_exists__5QFileRC7QString
-_exists__C4QDirRC7QString
-_exists__C5QFile
-_expandedTo__C5QSizeRCB0
-_fill__12KWQArrayImplPCvi
-_fill__7QStringG5QChari
-_findInternal__C10KWQMapImplP14KWQMapNodeImpl
-_findRev__C7QStringPCci
-_findRev__C7QStringci
-_find__C11KWQDictImplRC7QString
-_find__C14KWQPtrDictImplPv
-_find__C7QStringPCcib
-_find__C7QStringRC7QRegExpi
-_find__C8QCStringPCcib
-_firstNode__C16KWQValueListImpl
-_first__11KWQListImpl
-_fromLast__16KWQValueListImpl
-_getLast__C11KWQListImpl
-_hasPath__C4KURL
-_height__C5QRect
-_height__C5QSize
-_host__C4KURL
-_hour__C5QTime
-_incrementInternal__18KWQMapIteratorImpl
-_insertInternal__10KWQMapImplP14KWQMapNodeImplb
-_insert__11KWQDictImplRC7QStringPCv
-_insert__11KWQListImplUiPCv
-_insert__13KWQVectorImplUiPCvb
-_insert__14KWQPtrDictImplPvPCv
-_insert__7QStringUiG5QChar
-_insert__7QStringUiRCB0
-_insert__7QStringUic
-_isDigit__C5QChar
-_isEmpty__C11KWQListImpl
-_isEmpty__C13KWQVectorImpl
-_isEmpty__C16KWQValueListImpl
-_isEmpty__C4KURL
-_isEmpty__C8QCString
-_isLetterOrNumber__C5QChar
-_isMalformed__C4KURL
-_isNull__C5QRect
-_isNull__C5QTime
-_isNull__C7QString
-_isNull__C8QCString
-_isOpen__7QBuffer
-_isPunct__C5QChar
-_isSpace__C5QChar
-_isValid__C5QRect
-_isValid__C5QSize
-_join__C11QStringListRC7QString
-_lastNode__C16KWQValueListImpl
-_last__11KWQListImpl
-_left__14KWQMapNodeImpl
-_left__C5QRect
-_left__C7QStringUi
-_length__C8QCString
-_lower__C5QChar
-_lower__C7QString
-_lower__C8QCString
-_manhattanLength__C6QPoint
-_match__C7QRegExpRC7QStringiPib
-_mid__C7QStringUiUi
-_mid__C8QCStringUiUi
-_minute__C5QTime
-_month__C5QDate
-_msec__C5QTime
-_next__11KWQListImpl
-_nodeAt__16KWQValueListImplUi
-_nodeAt__C16KWQValueListImplUi
-_node__24KWQValueListIteratorImpl
-_node__C24KWQValueListIteratorImpl
-_open__5QFilei
-_open__7QBufferi
-_pass__C4KURL
-_path__C4KURL
-_pattern__C7QRegExp
-_port__C4KURL
-_prependNode__16KWQValueListImplP20KWQValueListNodeImpl
-_prepend__11KWQListImplPCv
-_prepend__7QStringRCB0
-_prettyURL__C4KURLi
-_prev__11KWQListImpl
-_protocol__C4KURL
-_query__C4KURL
-_readBlock__5QFilePcUi
-_ref__C4KURL
-_removeEqualInternal__10KWQMapImplP14KWQMapNodeImplb
-_removeEqualNodes__16KWQValueListImplP20KWQValueListNodeImplPFPCB1n1_b
-_removeFirst__11KWQListImplb
-_removeIterator__16KWQValueListImplR24KWQValueListIteratorImpl
-_removeLast__11KWQListImplb
-_removeRef__11KWQListImplPCvb
-_remove__11KWQDictImplRC7QStringb
-_remove__11KWQListImplPCvbPFPvn2_iPv
-_remove__11KWQListImplUib
-_remove__11KWQListImplb
-_remove__13KWQVectorImplUib
-_remove__14KWQPtrDictImplPvb
-_remove__7QStringUiUi
-_replace__7QStringRC7QRegExpRCB0
-_resize__12KWQArrayImplUl
-_resize__13KWQVectorImplUib
-_restart__5QTime
-_right__14KWQMapNodeImpl
-_right__C5QRect
-_right__C7QStringUi
-_second__C5QTime
-_secsTo__C5QTimeRCB0
-_secsTo__C9QDateTimeRCB0
-_setAutoDelete__14QPtrCollectionb
-_setHeight__5QSizei
-_setHost__4KURLRC7QString
-_setNum__7QStringUi
-_setNum__7QStringUl
-_setNum__7QStringUs
-_setNum__7QStringd
-_setNum__7QStringi
-_setNum__7QStringl
-_setNum__7QStrings
-_setPath__4KURLRC7QString
-_setPort__4KURLUs
-_setProtocol__4KURLRC7QString
-_setQuery__4KURLRC7QStringi
-_setRef__4KURLRC7QString
-_setWidth__5QSizei
-_simplifyWhiteSpace__C7QString
-_size__C12KWQArrayImpl
-_size__C13KWQVectorImpl
-_size__C5QFile
-_size__C5QRect
-_size__C7QBuffer
-_sort__11KWQListImplPFPvn2_iPv
-_split__11QStringListRC5QCharRC7QStringb
-_split__11QStringListRC7QStringn1b
-_sprintf__7QStringPCce
-_start__5QTime
-_stripWhiteSpace__C7QString
-_swap__10KWQMapImplRB0
-_take__11KWQListImplUi
-_take__14KWQPtrDictImplPv
-_time__C9QDateTime
-_toDouble__C7QStringPb
-_toFirst__19KWQListIteratorImpl
-_toFirst__22KWQPtrDictIteratorImpl
-_toInt__C7QStringPbi
-_toLast__19KWQListIteratorImpl
-_toLong__C7QStringPbi
-_toUInt__C7QStringPbi
-_toUShort__C7QStringPbi
-_top__C5QRect
-_truncate__7QStringUi
-_truncate__8QCStringUi
-_upper__C5QChar
-_url__C4KURL
-_user__C4KURL
-_width__C5QRect
-_width__C5QSize
-_writeBlock__7QBufferPCcUi
-_x__C6QPoint
-_y__C6QPoint
-_year__C5QDate
+__ZN10KWQMapImpl11endInternalEv
+__ZN10KWQMapImpl13beginInternalEv
+__ZN10KWQMapImpl13clearInternalEv
+__ZN10KWQMapImpl14insertInternalEP14KWQMapNodeImplb
+__ZN10KWQMapImpl19removeEqualInternalEP14KWQMapNodeImplb
+__ZN10KWQMapImpl4swapERS_
+__ZN10KWQMapImplC2EP14KWQMapNodeImplPFvS1_E
+__ZN10KWQMapImplC2ERKS_
+__ZN10KWQMapImplD2Ev
+__ZN11KWQDictImpl6insertERK7QStringPKv
+__ZN11KWQDictImpl6removeERK7QStringb
+__ZN11KWQDictImplC1ERKS_
+__ZN11KWQDictImplC1EibPFvPvE
+__ZN11KWQListImpl10removeLastEb
+__ZN11KWQListImpl11removeFirstEb
+__ZN11KWQListImpl2atEj
+__ZN11KWQListImpl4lastEv
+__ZN11KWQListImpl4nextEv
+__ZN11KWQListImpl4prevEv
+__ZN11KWQListImpl4sortEPFiPvS0_S0_ES0_
+__ZN11KWQListImpl4takeEj
+__ZN11KWQListImpl5clearEb
+__ZN11KWQListImpl5firstEv
+__ZN11KWQListImpl6appendEPKv
+__ZN11KWQListImpl6assignERKS_b
+__ZN11KWQListImpl6insertEjPKv
+__ZN11KWQListImpl6removeEPKvbPFiPvS2_S2_ES2_
+__ZN11KWQListImpl6removeEb
+__ZN11KWQListImpl6removeEjb
+__ZN11KWQListImpl7prependEPKv
+__ZN11KWQListImpl9removeRefEPKvb
+__ZN11KWQListImplC1EPFvPvE
+__ZN11KWQListImplC1ERKS_
+__ZN11KWQListImplD1Ev
+__ZN11QStringList5splitERK5QCharRK7QStringb
+__ZN11QStringList5splitERK7QStringS2_b
+__ZN11QStringListC1Ev
+__ZN11QStringListD1Ev
+__ZN12KWQArrayImpl4fillEPKvi
+__ZN12KWQArrayImpl6resizeEm
+__ZN12KWQArrayImpl9duplicateEPKvm
+__ZN12KWQArrayImplC1Em
+__ZN12KWQArrayImplC1Emm
+__ZN12KWQArrayImplD1Ev
+__ZN12KWQArrayImplaSERKS_
+__ZN13KWQVectorImpl5clearEb
+__ZN13KWQVectorImpl6insertEjPKvb
+__ZN13KWQVectorImpl6removeEjb
+__ZN13KWQVectorImpl6resizeEjb
+__ZN13KWQVectorImplC1EPFvPvE
+__ZN13KWQVectorImplC1ERKS_
+__ZN13KWQVectorImplC1EjPFvPvE
+__ZN13KWQVectorImplD1Ev
+__ZN14KWQMapNodeImpl4leftEv
+__ZN14KWQMapNodeImpl5rightEv
+__ZN14KWQMapNodeImplC2Ev
+__ZN14KWQPtrDictImpl4takeEPv
+__ZN14KWQPtrDictImpl5clearEb
+__ZN14KWQPtrDictImpl6assignERKS_b
+__ZN14KWQPtrDictImpl6insertEPvPKv
+__ZN14KWQPtrDictImpl6removeEPvb
+__ZN14KWQPtrDictImplC1ERKS_
+__ZN14KWQPtrDictImplC1EiPFvPvEPK24CFDictionaryKeyCallBacks
+__ZN14KWQPtrDictImplD1Ev
+__ZN14KWQPtrDictImplD2Ev
+__ZN14QPtrCollection10autoDeleteEv
+__ZN14QPtrCollection13setAutoDeleteEb
+__ZN14QPtrCollectionC2ERKS_
+__ZN14QPtrCollectionC2Ev
+__ZN14QPtrCollectionD2Ev
+__ZN14QPtrCollectionaSERKS_
+__ZN16KWQValueListImpl10appendNodeEP20KWQValueListNodeImpl
+__ZN16KWQValueListImpl11prependNodeEP20KWQValueListNodeImpl
+__ZN16KWQValueListImpl14removeIteratorER24KWQValueListIteratorImpl
+__ZN16KWQValueListImpl16removeEqualNodesEP20KWQValueListNodeImplPFbPKS0_S3_E
+__ZN16KWQValueListImpl3endEv
+__ZN16KWQValueListImpl5beginEv
+__ZN16KWQValueListImpl5clearEv
+__ZN16KWQValueListImpl6nodeAtEj
+__ZN16KWQValueListImpl8fromLastEv
+__ZN16KWQValueListImplC1EPFvP20KWQValueListNodeImplEPFS1_S1_E
+__ZN16KWQValueListImplC1ERKS_
+__ZN16KWQValueListImplD1Ev
+__ZN16KWQValueListImplaSERKS_
+__ZN18KWQMapIteratorImpl17incrementInternalEv
+__ZN18KWQMapIteratorImplC2ERKS_
+__ZN18KWQMapIteratorImplC2Ev
+__ZN19KWQDictIteratorImplC1ERK11KWQDictImpl
+__ZN19KWQListIteratorImpl6toLastEv
+__ZN19KWQListIteratorImpl7toFirstEv
+__ZN19KWQListIteratorImplC1ERK11KWQListImpl
+__ZN19KWQListIteratorImplD1Ev
+__ZN19KWQListIteratorImplaSERKS_
+__ZN19KWQListIteratorImplmmEv
+__ZN19KWQListIteratorImplppEv
+__ZN20KWQValueListNodeImplC2Ev
+__ZN20KWQValueListNodeImplD2Ev
+__ZN22KWQPtrDictIteratorImpl7toFirstEv
+__ZN22KWQPtrDictIteratorImplC1ERK14KWQPtrDictImpl
+__ZN22KWQPtrDictIteratorImplD1Ev
+__ZN22KWQPtrDictIteratorImplD2Ev
+__ZN22KWQPtrDictIteratorImplppEv
+__ZN24KWQValueListIteratorImpl4nodeEv
+__ZN24KWQValueListIteratorImplC1ERKS_
+__ZN24KWQValueListIteratorImplC1Ev
+__ZN24KWQValueListIteratorImplD1Ev
+__ZN24KWQValueListIteratorImplaSERKS_
+__ZN24KWQValueListIteratorImpleqERKS_
+__ZN24KWQValueListIteratorImplmmEv
+__ZN24KWQValueListIteratorImplneERKS_
+__ZN24KWQValueListIteratorImplppEi
+__ZN24KWQValueListIteratorImplppEv
+__ZN4KURL11setProtocolERK7QString
+__ZN4KURL13decode_stringERK7QString
+__ZN4KURL6setRefERK7QString
+__ZN4KURL7setHostERK7QString
+__ZN4KURL7setPathERK7QString
+__ZN4KURL7setPortEt
+__ZN4KURL8setQueryERK7QStringi
+__ZN4KURLC1ERK7QStringi
+__ZN4KURLC1ERKS_
+__ZN4KURLC1ERKS_RK7QString
+__ZN4KURLC1Ev
+__ZN4QDir4cdUpEv
+__ZN4QDir9entryListERK7QString
+__ZN4QDirC1ERK7QString
+__ZN4QDirC1ERKS_
+__ZN4QDirC1Ev
+__ZN4QDirD1Ev
+__ZN4QDiraSERKS_
+__ZN5QDateC1Eiii
+__ZN5QDateC1Ev
+__ZN5QFile4openEi
+__ZN5QFile5closeEv
+__ZN5QFile6existsERK7QString
+__ZN5QFile9readBlockEPcj
+__ZN5QFileC1ERK7QString
+__ZN5QFileD1Ev
+__ZN5QRectC1Eiiii
+__ZN5QRectC1Ev
+__ZN5QSize8setWidthEi
+__ZN5QSize9setHeightEi
+__ZN5QSizeC1Eii
+__ZN5QSizeC1Ev
+__ZN5QTime5startEv
+__ZN5QTime7elapsedEv
+__ZN5QTime7restartEv
+__ZN5QTimeC1Eii
+__ZN5QTimeC1Ev
+__ZN6QPointC1Ev
+__ZN7QBuffer10writeBlockEPKcj
+__ZN7QBuffer4openEi
+__ZN7QBuffer5closeEv
+__ZN7QBuffer6isOpenEv
+__ZN7QBufferC1Ev
+__ZN7QBufferD1Ev
+__ZN7QRegExpC1EPKc
+__ZN7QRegExpC1ERK7QStringbb
+__ZN7QRegExpD1Ev
+__ZN7QString4fillE5QChari
+__ZN7QString6appendERKS_
+__ZN7QString6insertEj5QChar
+__ZN7QString6insertEjRKS_
+__ZN7QString6insertEjc
+__ZN7QString6removeEjj
+__ZN7QString6setNumEd
+__ZN7QString6setNumEi
+__ZN7QString6setNumEj
+__ZN7QString6setNumEl
+__ZN7QString6setNumEm
+__ZN7QString6setNumEs
+__ZN7QString6setNumEt
+__ZN7QString7prependERKS_
+__ZN7QString7replaceERK7QRegExpRKS_
+__ZN7QString7sprintfEPKcz
+__ZN7QString8truncateEj
+__ZN7QStringC1E5QChar
+__ZN7QStringC1EPK5QCharj
+__ZN7QStringC1EPKc
+__ZN7QStringC1ERK9QMemArrayIcE
+__ZN7QStringC1ERKS_
+__ZN7QStringC1Ev
+__ZN7QStringpLE5QChar
+__ZN7QStringpLERKS_
+__ZN7QStringpLEc
+__ZN8QCString8truncateEj
+__ZN8QCStringC1EPKc
+__ZN8QCStringC1EPKcj
+__ZN8QCStringC1ERKS_
+__ZN8QCStringC1Ei
+__ZN8QCStringC1Ev
+__ZN8QCStringpLEPKc
+__ZN8QCStringpLEc
+__ZN9QDateTimeC1ERK5QDateRK5QTime
+__ZN9QDateTimeC1ERKS_
+__ZN9QDateTimeC1Ev
+__ZNK10KWQMapImpl11endInternalEv
+__ZNK10KWQMapImpl12findInternalEP14KWQMapNodeImpl
+__ZNK10KWQMapImpl13beginInternalEv
+__ZNK10KWQMapImpl13countInternalEv
+__ZNK11KWQDictImpl4findERK7QString
+__ZNK11KWQListImpl11containsRefEPKv
+__ZNK11KWQListImpl5countEv
+__ZNK11KWQListImpl7currentEv
+__ZNK11KWQListImpl7getLastEv
+__ZNK11KWQListImpl7isEmptyEv
+__ZNK11QStringList4joinERK7QString
+__ZNK12KWQArrayImpl2atEm
+__ZNK12KWQArrayImpl4dataEv
+__ZNK12KWQArrayImpl4sizeEv
+__ZNK12KWQArrayImpleqERKS_
+__ZNK13KWQVectorImpl2atEi
+__ZNK13KWQVectorImpl4sizeEv
+__ZNK13KWQVectorImpl5countEv
+__ZNK13KWQVectorImpl7isEmptyEv
+__ZNK14KWQPtrDictImpl4findEPv
+__ZNK14KWQPtrDictImpl5countEv
+__ZNK16KWQValueListImpl18containsEqualNodesEP20KWQValueListNodeImplPFbPKS0_S3_E
+__ZNK16KWQValueListImpl3endEv
+__ZNK16KWQValueListImpl5beginEv
+__ZNK16KWQValueListImpl5countEv
+__ZNK16KWQValueListImpl6nodeAtEj
+__ZNK16KWQValueListImpl7isEmptyEv
+__ZNK16KWQValueListImpl8lastNodeEv
+__ZNK16KWQValueListImpl9firstNodeEv
+__ZNK19KWQDictIteratorImpl16currentStringKeyEv
+__ZNK19KWQListIteratorImpl5countEv
+__ZNK19KWQListIteratorImpl7currentEv
+__ZNK22KWQPtrDictIteratorImpl10currentKeyEv
+__ZNK22KWQPtrDictIteratorImpl5countEv
+__ZNK22KWQPtrDictIteratorImpl7currentEv
+__ZNK24KWQValueListIteratorImpl4nodeEv
+__ZNK4KURL11isMalformedEv
+__ZNK4KURL3refEv
+__ZNK4KURL3urlEv
+__ZNK4KURL4hostEv
+__ZNK4KURL4passEv
+__ZNK4KURL4pathEv
+__ZNK4KURL4portEv
+__ZNK4KURL4userEv
+__ZNK4KURL5queryEv
+__ZNK4KURL7hasPathEv
+__ZNK4KURL7isEmptyEv
+__ZNK4KURL8protocolEv
+__ZNK4KURL9prettyURLEi
+__ZNK4QDir11absFilePathERK7QString
+__ZNK4QDir6existsERK7QString
+__ZNK4QDir7absPathEv
+__ZNK5QChar16isLetterOrNumberEv
+__ZNK5QChar5lowerEv
+__ZNK5QChar5upperEv
+__ZNK5QChar7isDigitEv
+__ZNK5QChar7isPunctEv
+__ZNK5QChar7isSpaceEv
+__ZNK5QDate3dayEv
+__ZNK5QDate4yearEv
+__ZNK5QDate5monthEv
+__ZNK5QDate6daysToERKS_
+__ZNK5QFile4sizeEv
+__ZNK5QFile6existsEv
+__ZNK5QRect3topEv
+__ZNK5QRect4leftEv
+__ZNK5QRect4sizeEv
+__ZNK5QRect5rightEv
+__ZNK5QRect5widthEv
+__ZNK5QRect6bottomEv
+__ZNK5QRect6heightEv
+__ZNK5QRect6isNullEv
+__ZNK5QRect7isValidEv
+__ZNK5QRectanERKS_
+__ZNK5QSize10expandedToERKS_
+__ZNK5QSize5widthEv
+__ZNK5QSize6heightEv
+__ZNK5QSize7isValidEv
+__ZNK5QTime4hourEv
+__ZNK5QTime4msecEv
+__ZNK5QTime6isNullEv
+__ZNK5QTime6minuteEv
+__ZNK5QTime6secondEv
+__ZNK5QTime6secsToERKS_
+__ZNK6QPoint15manhattanLengthEv
+__ZNK6QPoint1xEv
+__ZNK6QPoint1yEv
+__ZNK7QBuffer4sizeEv
+__ZNK7QBuffer6bufferEv
+__ZNK7QRegExp5matchERK7QStringiPib
+__ZNK7QRegExp7patternEv
+__ZNK7QString15stripWhiteSpaceEv
+__ZNK7QString18simplifyWhiteSpaceEv
+__ZNK7QString3argERKS_i
+__ZNK7QString3argEdi
+__ZNK7QString3argEii
+__ZNK7QString3argEji
+__ZNK7QString3argEli
+__ZNK7QString3argEmi
+__ZNK7QString3argEsi
+__ZNK7QString3argEti
+__ZNK7QString3midEjj
+__ZNK7QString4findEPKcib
+__ZNK7QString4findERK7QRegExpi
+__ZNK7QString4leftEj
+__ZNK7QString5lowerEv
+__ZNK7QString5rightEj
+__ZNK7QString5toIntEPbi
+__ZNK7QString6isNullEv
+__ZNK7QString6toLongEPbi
+__ZNK7QString6toUIntEPbi
+__ZNK7QString7findRevEPKci
+__ZNK7QString7findRevEci
+__ZNK7QString8containsEPKcb
+__ZNK7QString8containsEc
+__ZNK7QString8toDoubleEPb
+__ZNK7QString8toUShortEPbi
+__ZNK8QCString3midEjj
+__ZNK8QCString4findEPKcib
+__ZNK8QCString5lowerEv
+__ZNK8QCString6isNullEv
+__ZNK8QCString6lengthEv
+__ZNK8QCString7isEmptyEv
+__ZNK8QCString8containsEcb
+__ZNK9QDateTime4timeEv
+__ZNK9QDateTime6secsToERKS_
+__ZeqRK5QRectS1_
+__ZeqRK5QSizeS1_
+__ZeqRK7QStringPKc
+__ZeqRK7QStringS1_
+__ZlsRSoRK5QDate
+__ZlsRSoRK5QRect
+__ZlsRSoRK5QSize
+__ZlsRSoRK5QTime
+__ZlsRSoRK6QPoint
+__ZlsRSoRK8QCString
+__ZlsRSoRK9QDateTime
+__ZmiRK6QPointS1_
+__ZneRK5QRectS1_
+__ZneRK5QSizeS1_
+__Zpl5QCharRK7QString
+__ZplPKcRK7QString
+__ZplRK5QSizeS1_
+__ZplRK6QPointS1_
+__ZplcRK7QString
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 14af602..6ac2dca 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,39 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Fixes for compiling with gcc3 and more warnings.
+
+ * WebKit.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
+ as in the rest of Labyrinth (see top level ChangeLog for details).
+
+ * Plugins.subproj/IFPluginView.mm:
+ Avoid warnings about malloc by not using it.
+ (-[IFPluginView initWithFrame:plugin:url:mime:arguments:mode:]): Keep the arguments
+ dictionary around instead of keeping the C format version of it around. Also don't
+ bother keeping the C string form of the MIME type around, and simplify some other
+ stuff in here.
+ (-[IFPluginView dealloc]): Corresponding changes since we keep a different set of things.
+ (-[IFPluginView newStream:mimeType:notifyData:]): Use [mimeType cString].
+ (-[IFPluginView start]): Build the lists of attributes and values in here. Do it using
+ [NSString cString] for simplicity and don't keep the lists around after we're done with
+ them.
+ (-[IFPluginView IFURLHandleResourceDidFinishLoading:data:]): Use [filenameClassic cString].
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]),
+ (-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]),
+ (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]),
+ (-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate dealloc]),
+ (-[IFWebDataSource _setLoading:]), (-[IFWebDataSource _setController:]),
+ (-[IFWebDataSource _setLocationChangeHandler:]):
+ * WebView.subproj/IFWebView.mm: (-[IFWebView provisionalDataSourceChanged:]),
+ (-[IFWebView mouseUp:]), (-[IFWebView mouseDown:]):
+ Add type casts required by pickier gcc3.
+
+ * WebView.subproj/IFWebViewPrivate.mm: (-[IFWebViewPrivate dealloc]):
+ Add type cast required by pickier gcc3.
+ (-[IFWebView _stopPlugins]): Use local variable to work around Radar 2905835.
+
2002-04-18 Chris Blumenberg <cblu at apple.com>
Moved plugin instance creation to the start method in IFPluginView.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 14af602..6ac2dca 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,39 @@
+2002-04-18 Darin Adler <darin at apple.com>
+
+ Fixes for compiling with gcc3 and more warnings.
+
+ * WebKit.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
+ as in the rest of Labyrinth (see top level ChangeLog for details).
+
+ * Plugins.subproj/IFPluginView.mm:
+ Avoid warnings about malloc by not using it.
+ (-[IFPluginView initWithFrame:plugin:url:mime:arguments:mode:]): Keep the arguments
+ dictionary around instead of keeping the C format version of it around. Also don't
+ bother keeping the C string form of the MIME type around, and simplify some other
+ stuff in here.
+ (-[IFPluginView dealloc]): Corresponding changes since we keep a different set of things.
+ (-[IFPluginView newStream:mimeType:notifyData:]): Use [mimeType cString].
+ (-[IFPluginView start]): Build the lists of attributes and values in here. Do it using
+ [NSString cString] for simplicity and don't keep the lists around after we're done with
+ them.
+ (-[IFPluginView IFURLHandleResourceDidFinishLoading:data:]): Use [filenameClassic cString].
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]),
+ (-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]),
+ (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]),
+ (-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSourcePrivate dealloc]),
+ (-[IFWebDataSource _setLoading:]), (-[IFWebDataSource _setController:]),
+ (-[IFWebDataSource _setLocationChangeHandler:]):
+ * WebView.subproj/IFWebView.mm: (-[IFWebView provisionalDataSourceChanged:]),
+ (-[IFWebView mouseUp:]), (-[IFWebView mouseDown:]):
+ Add type casts required by pickier gcc3.
+
+ * WebView.subproj/IFWebViewPrivate.mm: (-[IFWebViewPrivate dealloc]):
+ Add type cast required by pickier gcc3.
+ (-[IFWebView _stopPlugins]): Use local variable to work around Radar 2905835.
+
2002-04-18 Chris Blumenberg <cblu at apple.com>
Moved plugin instance creation to the start method in IFPluginView.
diff --git a/WebKit/Misc.subproj/WebFileDatabase.m b/WebKit/Misc.subproj/WebFileDatabase.m
index baca962..1f5bb72 100644
--- a/WebKit/Misc.subproj/WebFileDatabase.m
+++ b/WebKit/Misc.subproj/WebFileDatabase.m
@@ -55,9 +55,11 @@ enum
static NSMutableSet *notMappableFileNameSet = nil;
static NSLock *mutex;
-static pthread_once_t cacheFileReaderControl = PTHREAD_ONCE_INIT;
-static void URLFileReaderInit()
+// The next line is a workaround for Radar 2905545. Once that's fixed, it can use PTHREAD_ONCE_INIT.
+static pthread_once_t cacheFileReaderControl = {_PTHREAD_ONCE_SIG_init, {}};
+
+static void URLFileReaderInit(void)
{
mutex = [[NSLock alloc] init];
notMappableFileNameSet = [[NSMutableSet alloc] init];
@@ -74,7 +76,7 @@ static void URLFileReaderInit()
pthread_once(&cacheFileReaderControl, URLFileReaderInit);
- self = [super init];
+ [super init];
data = nil;
mappedBytes = NULL;
@@ -372,15 +374,14 @@ static void URLFileReaderInit()
-(id)objectForKey:(id)key
{
- id result;
+ volatile id result;
id fileKey;
id object;
NSString *filePath;
- IFURLFileReader *fileReader;
+ IFURLFileReader * volatile fileReader;
NSData *data;
- NSUnarchiver *unarchiver;
+ NSUnarchiver * volatile unarchiver;
- result = nil;
fileKey = nil;
fileReader = nil;
data = nil;
diff --git a/WebKit/Plugins.subproj/IFPluginView.h b/WebKit/Plugins.subproj/IFPluginView.h
index b82e2f7..81112c9 100644
--- a/WebKit/Plugins.subproj/IFPluginView.h
+++ b/WebKit/Plugins.subproj/IFPluginView.h
@@ -11,12 +11,11 @@
@class WCPlugin;
@protocol IFWebController;
- at interface IFPluginView : NSView {
+ at interface IFPluginView : NSView
+{
WCPlugin *plugin;
IFPluginNullEventSender *eventSender;
-
- char *cMime, **cAttributes, **cValues;
- uint argsCount;
+ NSDictionary *arguments;
id <IFWebController> webController;
IFWebDataSource *webDataSource;
@@ -26,7 +25,7 @@
NP_Port nPort;
NPP_t instanceStruct;
- BOOL isFlipped, transferred, isHidden, stopped, WKFullMode;
+ BOOL isFlipped, transferred, isHidden, stopped;
NSString *URL, *mime;
NSURL *baseURL;
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index 246f1b2..b9ea1a0 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -36,12 +36,9 @@ extern "C" {
#pragma mark IFPLUGINVIEW
-- initWithFrame:(NSRect)r plugin:(WCPlugin *)plug url:(NSString *)location mime:(NSString *)mimeType arguments:(NSDictionary *)arguments mode:(uint16)mode
+- initWithFrame:(NSRect)r plugin:(WCPlugin *)plug url:(NSString *)location mime:(NSString *)mimeType arguments:(NSDictionary *)args mode:(uint16)mode
{
- NSString *baseURLString, *attributeString;
- NSArray *attributes, *values;
- char *s;
- uint i;
+ NSString *baseURLString;
[super initWithFrame: r];
@@ -53,6 +50,7 @@ extern "C" {
mime = [mimeType retain];
URL = [location retain];
plugin = [plug retain];
+ arguments = [args copy];
// load the plug-in if it is not already loaded
[plugin load];
@@ -75,49 +73,16 @@ extern "C" {
// get base URL which was added in the args in the part
baseURLString = [arguments objectForKey:@"WebKitBaseURL"];
- if(baseURLString)
+ if (baseURLString)
baseURL = [[NSURL URLWithString:baseURLString] retain];
- cMime = malloc([mime length]+1);
- [mime getCString:cMime];
-
- attributes = [arguments allKeys];
- values = [arguments allValues];
-
- if([attributes containsObject:@"hidden"])
- isHidden = YES;
- else
- isHidden = NO;
-
- if(![attributes containsObject:@"wkfullmode"]){
- // convert arugments dictionary to 2 string arrays
-
- WKFullMode = YES;
-
- cAttributes = malloc(sizeof(char *) * [arguments count]);
- cValues = malloc(sizeof(char *) * [arguments count]);
-
- for(i=0; i<[arguments count]; i++){
- attributeString = [attributes objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cAttributes[i] = s;
-
- attributeString = [values objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cValues[i] = s;
- }
- argsCount = [arguments count];
- }else{
- WKFullMode = NO;
- }
+ isHidden = [arguments objectForKey:@"hidden"] != nil;
// Initialize globals
transferred = NO;
stopped = NO;
- filesToErase = [[NSMutableArray arrayWithCapacity:2] retain];
- activeURLHandles = [[NSMutableArray arrayWithCapacity:1] retain];
+ filesToErase = [[NSMutableArray alloc] init];
+ activeURLHandles = [[NSMutableArray alloc] init];
return self;
}
@@ -140,9 +105,7 @@ extern "C" {
[mime release];
[URL release];
[plugin release];
- free(cMime);
- free(cAttributes);
- free(cValues);
+ [arguments release];
[super dealloc];
}
@@ -187,17 +150,12 @@ extern "C" {
uint16 transferMode;
IFURLHandle *urlHandle;
NSDictionary *attributes;
- char *mType;
stream = [[IFPluginStream alloc] initWithURL:streamURL mimeType:mimeType notifyData:notifyData];
npStream = [stream npStream];
- mType = malloc([mimeType length]+1);
- [mimeType getCString:mType];
-
- npErr = NPP_NewStream(instance, mType, npStream, NO, &transferMode);
- WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s\n", npErr, cMime);
- free(mType);
+ npErr = NPP_NewStream(instance, (char *)[mimeType cString], npStream, NO, &transferMode);
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s\n", npErr, [mimeType cString]);
if(npErr != NPERR_NO_ERROR){
[stream release];
@@ -232,10 +190,29 @@ extern "C" {
NPSavedData saved;
NPError npErr;
- if(WKFullMode){
- npErr = NPP_New(cMime, instance, NP_EMBED, argsCount, cAttributes, cValues, &saved);
- }else{
- npErr = NPP_New(cMime, instance, NP_FULL, 0, NULL, NULL, &saved);
+ if ([arguments objectForKey:@"wkfullmode"]) {
+ // convert arguments dictionary to 2 string arrays
+
+ int argsCount = [arguments count];
+
+ char **cAttributes = new char * [argsCount];
+ char **cValues = new char * [argsCount];
+
+ NSEnumerator *e = [arguments keyEnumerator];
+ NSString *key;
+ int i = 0;
+ while ((key = [e nextObject])) {
+ cAttributes[i] = (char *)[key cString];
+ cValues[i] = (char *)[[arguments objectForKey:key] cString];
+ i++;
+ }
+
+ npErr = NPP_New((char *)[mime cString], instance, NP_EMBED, argsCount, cAttributes, cValues, &saved);
+
+ delete [] cAttributes;
+ delete [] cValues;
+ } else {
+ npErr = NPP_New((char *)[mime cString], instance, NP_FULL, 0, NULL, NULL, &saved);
}
WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_New: %d\n", npErr);
@@ -528,7 +505,6 @@ extern "C" {
- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)sender data: (NSData *)data
{
NPError npErr;
- char *cFilename;
NSMutableString *filenameClassic, *path;
IFPluginStream *stream;
NSFileManager *fileManager;
@@ -541,7 +517,7 @@ extern "C" {
npStream = [stream npStream];
filename = [stream filename];
- if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
+ if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY) {
path = [NSString stringWithFormat:@"%@%@", @"/tmp/", filename];
[filesToErase addObject:path];
@@ -550,11 +526,8 @@ extern "C" {
[fileManager createFileAtPath:path contents:[stream data] attributes:nil];
filenameClassic = [NSString stringWithFormat:@"%@%@%@", startupVolumeName(), @":private:tmp:", filename];
- cFilename = malloc([filenameClassic length]+1);
- [filenameClassic getCString:cFilename];
-
- NPP_StreamAsFile(instance, npStream, cFilename);
- WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s\n", cFilename);
+ NPP_StreamAsFile(instance, npStream, [filenameClassic cString]);
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s\n", [filenameClassic cString]);
}
npErr = NPP_DestroyStream(instance, npStream, NPRES_DONE);
WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d\n", npErr);
diff --git a/WebKit/Plugins.subproj/WebPluginView.h b/WebKit/Plugins.subproj/WebPluginView.h
index b82e2f7..81112c9 100644
--- a/WebKit/Plugins.subproj/WebPluginView.h
+++ b/WebKit/Plugins.subproj/WebPluginView.h
@@ -11,12 +11,11 @@
@class WCPlugin;
@protocol IFWebController;
- at interface IFPluginView : NSView {
+ at interface IFPluginView : NSView
+{
WCPlugin *plugin;
IFPluginNullEventSender *eventSender;
-
- char *cMime, **cAttributes, **cValues;
- uint argsCount;
+ NSDictionary *arguments;
id <IFWebController> webController;
IFWebDataSource *webDataSource;
@@ -26,7 +25,7 @@
NP_Port nPort;
NPP_t instanceStruct;
- BOOL isFlipped, transferred, isHidden, stopped, WKFullMode;
+ BOOL isFlipped, transferred, isHidden, stopped;
NSString *URL, *mime;
NSURL *baseURL;
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 246f1b2..b9ea1a0 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -36,12 +36,9 @@ extern "C" {
#pragma mark IFPLUGINVIEW
-- initWithFrame:(NSRect)r plugin:(WCPlugin *)plug url:(NSString *)location mime:(NSString *)mimeType arguments:(NSDictionary *)arguments mode:(uint16)mode
+- initWithFrame:(NSRect)r plugin:(WCPlugin *)plug url:(NSString *)location mime:(NSString *)mimeType arguments:(NSDictionary *)args mode:(uint16)mode
{
- NSString *baseURLString, *attributeString;
- NSArray *attributes, *values;
- char *s;
- uint i;
+ NSString *baseURLString;
[super initWithFrame: r];
@@ -53,6 +50,7 @@ extern "C" {
mime = [mimeType retain];
URL = [location retain];
plugin = [plug retain];
+ arguments = [args copy];
// load the plug-in if it is not already loaded
[plugin load];
@@ -75,49 +73,16 @@ extern "C" {
// get base URL which was added in the args in the part
baseURLString = [arguments objectForKey:@"WebKitBaseURL"];
- if(baseURLString)
+ if (baseURLString)
baseURL = [[NSURL URLWithString:baseURLString] retain];
- cMime = malloc([mime length]+1);
- [mime getCString:cMime];
-
- attributes = [arguments allKeys];
- values = [arguments allValues];
-
- if([attributes containsObject:@"hidden"])
- isHidden = YES;
- else
- isHidden = NO;
-
- if(![attributes containsObject:@"wkfullmode"]){
- // convert arugments dictionary to 2 string arrays
-
- WKFullMode = YES;
-
- cAttributes = malloc(sizeof(char *) * [arguments count]);
- cValues = malloc(sizeof(char *) * [arguments count]);
-
- for(i=0; i<[arguments count]; i++){
- attributeString = [attributes objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cAttributes[i] = s;
-
- attributeString = [values objectAtIndex:i];
- s = malloc([attributeString length]+1);
- [attributeString getCString:s];
- cValues[i] = s;
- }
- argsCount = [arguments count];
- }else{
- WKFullMode = NO;
- }
+ isHidden = [arguments objectForKey:@"hidden"] != nil;
// Initialize globals
transferred = NO;
stopped = NO;
- filesToErase = [[NSMutableArray arrayWithCapacity:2] retain];
- activeURLHandles = [[NSMutableArray arrayWithCapacity:1] retain];
+ filesToErase = [[NSMutableArray alloc] init];
+ activeURLHandles = [[NSMutableArray alloc] init];
return self;
}
@@ -140,9 +105,7 @@ extern "C" {
[mime release];
[URL release];
[plugin release];
- free(cMime);
- free(cAttributes);
- free(cValues);
+ [arguments release];
[super dealloc];
}
@@ -187,17 +150,12 @@ extern "C" {
uint16 transferMode;
IFURLHandle *urlHandle;
NSDictionary *attributes;
- char *mType;
stream = [[IFPluginStream alloc] initWithURL:streamURL mimeType:mimeType notifyData:notifyData];
npStream = [stream npStream];
- mType = malloc([mimeType length]+1);
- [mimeType getCString:mType];
-
- npErr = NPP_NewStream(instance, mType, npStream, NO, &transferMode);
- WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s\n", npErr, cMime);
- free(mType);
+ npErr = NPP_NewStream(instance, (char *)[mimeType cString], npStream, NO, &transferMode);
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s\n", npErr, [mimeType cString]);
if(npErr != NPERR_NO_ERROR){
[stream release];
@@ -232,10 +190,29 @@ extern "C" {
NPSavedData saved;
NPError npErr;
- if(WKFullMode){
- npErr = NPP_New(cMime, instance, NP_EMBED, argsCount, cAttributes, cValues, &saved);
- }else{
- npErr = NPP_New(cMime, instance, NP_FULL, 0, NULL, NULL, &saved);
+ if ([arguments objectForKey:@"wkfullmode"]) {
+ // convert arguments dictionary to 2 string arrays
+
+ int argsCount = [arguments count];
+
+ char **cAttributes = new char * [argsCount];
+ char **cValues = new char * [argsCount];
+
+ NSEnumerator *e = [arguments keyEnumerator];
+ NSString *key;
+ int i = 0;
+ while ((key = [e nextObject])) {
+ cAttributes[i] = (char *)[key cString];
+ cValues[i] = (char *)[[arguments objectForKey:key] cString];
+ i++;
+ }
+
+ npErr = NPP_New((char *)[mime cString], instance, NP_EMBED, argsCount, cAttributes, cValues, &saved);
+
+ delete [] cAttributes;
+ delete [] cValues;
+ } else {
+ npErr = NPP_New((char *)[mime cString], instance, NP_FULL, 0, NULL, NULL, &saved);
}
WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_New: %d\n", npErr);
@@ -528,7 +505,6 @@ extern "C" {
- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)sender data: (NSData *)data
{
NPError npErr;
- char *cFilename;
NSMutableString *filenameClassic, *path;
IFPluginStream *stream;
NSFileManager *fileManager;
@@ -541,7 +517,7 @@ extern "C" {
npStream = [stream npStream];
filename = [stream filename];
- if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
+ if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY) {
path = [NSString stringWithFormat:@"%@%@", @"/tmp/", filename];
[filesToErase addObject:path];
@@ -550,11 +526,8 @@ extern "C" {
[fileManager createFileAtPath:path contents:[stream data] attributes:nil];
filenameClassic = [NSString stringWithFormat:@"%@%@%@", startupVolumeName(), @":private:tmp:", filename];
- cFilename = malloc([filenameClassic length]+1);
- [filenameClassic getCString:cFilename];
-
- NPP_StreamAsFile(instance, npStream, cFilename);
- WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s\n", cFilename);
+ NPP_StreamAsFile(instance, npStream, [filenameClassic cString]);
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s\n", [filenameClassic cString]);
}
npErr = NPP_DestroyStream(instance, npStream, NPRES_DONE);
WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d\n", npErr);
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 13431c8..e53b680 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -141,7 +141,8 @@
OTHER_LDFLAGS = "-lwebcore -framework JavaScriptCore -framework WebFoundation -seg1addr 0x4000000";
PRODUCT_NAME = WebKit;
SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Werror -Wall -Wno-format-y2k -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wreorder -Wsign-compare";
+ USE_GCC3 = YES;
+ WARNING_CFLAGS = "-Werror -Wall -W -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter";
WRAPPER_EXTENSION = framework;
};
dependencies = (
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 57d71ce..68dee92 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -65,7 +65,7 @@
if(handlerType == IFMIMEHANDLERTYPE_APPLICATION){
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -94,7 +94,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
[downloadHandler _finishedDownload];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -162,7 +162,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Download progress: %d of %d", loadProgress->bytesSoFar, loadProgress->totalToLoad);
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -180,7 +180,7 @@
[[dataSource controller] receivedError: result forDownloadHandler:downloadHandler
partialProgress: loadProgress];
}else{
- [[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
partialProgress: loadProgress fromDataSource: dataSource];
}
}
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index c999091..cd8fed1 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -52,7 +52,7 @@
[mainHandle release];
[mainURLHandleClient release];
[pageTitle autorelease];
- [locationChangeHandler release];
+ [(NSObject *)locationChangeHandler release];
part->deref();
@@ -73,9 +73,9 @@
if (loading) {
[self retain];
- [_private->controller retain];
+ [(NSObject *)_private->controller retain];
} else {
- [_private->controller release];
+ [(NSObject *)_private->controller release];
[self release];
}
}
@@ -90,8 +90,8 @@
WEBKIT_ASSERT(_private->part != nil);
if (_private->loading) {
- [controller retain];
- [_private->controller release];
+ [(NSObject *)controller retain];
+ [(NSObject *)_private->controller release];
}
_private->controller = controller;
_private->part->setDataSource(self);
@@ -263,8 +263,8 @@
- (void)_setLocationChangeHandler: (id <IFLocationChangeHandler>)l
{
- [l retain];
- [_private->locationChangeHandler release];
+ [(NSObject *)l retain];
+ [(NSObject *)_private->locationChangeHandler release];
_private->locationChangeHandler = l;
}
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index f1be4c6..8b7b146 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -85,7 +85,7 @@
_private->provisionalWidget->setView (provisionalView);
[provisionalView release];
- _private->provisionalWidget->resize (r.size.width,r.size.height);
+ _private->provisionalWidget->resize ((int)r.size.width, (int)r.size.height);
}
- (void)dataSourceChanged: (IFWebDataSource *)dataSource
@@ -395,7 +395,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
KHTMLView *widget = _private->widget;
if (widget != 0l) {
widget->viewportMouseReleaseEvent(kEvent);
@@ -424,7 +424,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
KHTMLView *widget = _private->widget;
if (widget != 0l) {
widget->viewportMousePressEvent(kEvent);
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.mm b/WebKit/WebView.subproj/IFWebViewPrivate.mm
index 311fd6a..04e1879 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.mm
@@ -18,7 +18,7 @@
- (void)dealloc
{
- [controller release];
+ [(NSObject *)controller release];
[frameScrollView release];
//if (widget)
@@ -43,8 +43,10 @@
int count = [views count];
while (count--) {
id view = [views objectAtIndex: count];
- if ([view isKindOfClass: NSClassFromString (@"IFPluginView")])
- [(IFPluginView *)view stop];
+ if ([view isKindOfClass: NSClassFromString (@"IFPluginView")]) {
+ IFPluginView *pluginView = (IFPluginView *)view;
+ [pluginView stop];
+ }
}
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index c999091..cd8fed1 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -52,7 +52,7 @@
[mainHandle release];
[mainURLHandleClient release];
[pageTitle autorelease];
- [locationChangeHandler release];
+ [(NSObject *)locationChangeHandler release];
part->deref();
@@ -73,9 +73,9 @@
if (loading) {
[self retain];
- [_private->controller retain];
+ [(NSObject *)_private->controller retain];
} else {
- [_private->controller release];
+ [(NSObject *)_private->controller release];
[self release];
}
}
@@ -90,8 +90,8 @@
WEBKIT_ASSERT(_private->part != nil);
if (_private->loading) {
- [controller retain];
- [_private->controller release];
+ [(NSObject *)controller retain];
+ [(NSObject *)_private->controller release];
}
_private->controller = controller;
_private->part->setDataSource(self);
@@ -263,8 +263,8 @@
- (void)_setLocationChangeHandler: (id <IFLocationChangeHandler>)l
{
- [l retain];
- [_private->locationChangeHandler release];
+ [(NSObject *)l retain];
+ [(NSObject *)_private->locationChangeHandler release];
_private->locationChangeHandler = l;
}
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index f1be4c6..8b7b146 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -85,7 +85,7 @@
_private->provisionalWidget->setView (provisionalView);
[provisionalView release];
- _private->provisionalWidget->resize (r.size.width,r.size.height);
+ _private->provisionalWidget->resize ((int)r.size.width, (int)r.size.height);
}
- (void)dataSourceChanged: (IFWebDataSource *)dataSource
@@ -395,7 +395,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
KHTMLView *widget = _private->widget;
if (widget != 0l) {
widget->viewportMouseReleaseEvent(kEvent);
@@ -424,7 +424,7 @@
}
NSPoint p = [event locationInWindow];
- QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint(p.x, p.y), button, state);
+ QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
KHTMLView *widget = _private->widget;
if (widget != 0l) {
widget->viewportMousePressEvent(kEvent);
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 311fd6a..04e1879 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -18,7 +18,7 @@
- (void)dealloc
{
- [controller release];
+ [(NSObject *)controller release];
[frameScrollView release];
//if (widget)
@@ -43,8 +43,10 @@
int count = [views count];
while (count--) {
id view = [views objectAtIndex: count];
- if ([view isKindOfClass: NSClassFromString (@"IFPluginView")])
- [(IFPluginView *)view stop];
+ if ([view isKindOfClass: NSClassFromString (@"IFPluginView")]) {
+ IFPluginView *pluginView = (IFPluginView *)view;
+ [pluginView stop];
+ }
}
}
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 57d71ce..68dee92 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -65,7 +65,7 @@
if(handlerType == IFMIMEHANDLERTYPE_APPLICATION){
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -94,7 +94,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
[downloadHandler _finishedDownload];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -162,7 +162,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Download progress: %d of %d", loadProgress->bytesSoFar, loadProgress->totalToLoad);
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -180,7 +180,7 @@
[[dataSource controller] receivedError: result forDownloadHandler:downloadHandler
partialProgress: loadProgress];
}else{
- [[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
partialProgress: loadProgress fromDataSource: dataSource];
}
}
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 57d71ce..68dee92 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -65,7 +65,7 @@
if(handlerType == IFMIMEHANDLERTYPE_APPLICATION){
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -94,7 +94,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
[downloadHandler _finishedDownload];
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -162,7 +162,7 @@
[[dataSource controller] receivedProgress:loadProgress forDownloadHandler:downloadHandler];
WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Download progress: %d of %d", loadProgress->bytesSoFar, loadProgress->totalToLoad);
}else{
- [[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
}
[loadProgress release];
@@ -180,7 +180,7 @@
[[dataSource controller] receivedError: result forDownloadHandler:downloadHandler
partialProgress: loadProgress];
}else{
- [[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
+ [(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString]
partialProgress: loadProgress fromDataSource: dataSource];
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list