Version: unspecified (using KDE 4.5.90) OS: OS X In file included from /opt/local/var/macports/build/_Users_aeetes_kde_kdegames4/work/kdegames-4.5.90/libkdegames/kgamerenderedobjectitem.cpp:20: /opt/local/var/macports/build/_Users_aeetes_kde_kdegames4/work/kdegames-4.5.90/libkdegames/kgamerenderer.h:211: error: expected ',' or '...' before '>' token /opt/local/var/macports/build/_Users_aeetes_kde_kdegames4/work/kdegames-4.5.90/libkdegames/kgamerenderer.h:211: error: wrong number of template arguments (1, should be 2) /opt/local/include/QtCore/qdatastream.h:66: error: provided for 'template<class Key, class T> class QHash' /opt/local/var/macports/build/_Users_aeetes_kde_kdegames4/work/kdegames-4.5.90/libkdegames/kgamerenderer.h:211: error: default argument missing for parameter 5 of 'QPixmap KGameRenderer::spritePixmap(const QString&, const QSize&, int, const QHash<QColor, QColor>&, QColor) const' The relevant line: QPixmap spritePixmap(const QString& key, const QSize& size, int frame = -1, const QHash<QColor, QColor>& customColors = QHash<QColor, QColor>()) const; Reproducible: Always Steps to Reproduce: Build in MacPorts Actual Results: Build fails Expected Results: Build succeeds QT is qt4-mac @4.7.1
Looks like it's only missing the <QtGui/QColor> include. Could you check this?
Adding #include <QtGui/QColor> to kgamerenderedobjectitem.cpp/.h and kgamerenderer.h had no effect. Did you mean another file?
I can just guess because I'm on Linux. Perhaps <QtCore/QHash> is not included for some reason? If that's not it, then I doubt that I can help.
This continues to be an issue in the 4.6.0 release.
Eh, could you try to typedef QHash<QColor, QColor> to something without comma? Looking at the exact error message, it might be that the compiler misreads the comma in the default argument as a comma in the argument list. If so, I add the typedef upstream (although you should still file a bug against the compiler).
Haven't tried your suggestion yet; Here is an update from what else I've tried. Switching from gcc4.2 to gcc4.0 let building continue to a visibility issue in ksudoku. There definitely appears to be an issue in the code with respect to Apple's gcc4.2 (default on OS >10.6). gcc4.0 is the default for OS 10.4 and 10.5. I can tell MacPorts to always use gcc4.0 for the project. That leaves this bug needing fixed for now (or I can simply skip building ksudoku): /opt/local/var/macports/build/_Users_aeetes_dports_kde_kdegames4/work/kdegames-4.5.5/ksudoku/engine/constrainthelperstorage.cpp: In member function 'void ConstraintHelperStorage::Entry::setup(Ruleset*)': /opt/local/var/macports/build/_Users_aeetes_dports_kde_kdegames4/work/kdegames-4.5.5/ksudoku/engine/constrainthelperstorage.cpp:31: error: 'QVector<ConstraintHelper*> ConstraintHelperStoragePrivate::helpers' is private /opt/local/var/macports/build/_Users_aeetes_dports_kde_kdegames4/work/kdegames-4.5.5/ksudoku/engine/constrainthelperstorage.cpp:102: error: within this context /opt/local/var/macports/build/_Users_aeetes_dports_kde_kdegames4/work/kdegames-4.5.5/ksudoku/engine/constrainthelperstorage.cpp:31: error: 'QVector<ConstraintHelper*> ConstraintHelperStoragePrivate::helpers' is private /opt/local/var/macports/build/_Users_aeetes_dports_kde_kdegames4/work/kdegames-4.5.5/ksudoku/engine/constrainthelperstorage.cpp:103: error: within this context make[2]: *** [ksudoku/engine/CMakeFiles/logine.dir/constrainthelperstorage.o] Error 1
My apologies on the latest post, it got built with 4.5.5 again.
I'm building this on Gentoo from the kde overlay and encountered this. It does seem to be GCC related as using gcc-config to set my native compiler to GCC 4.4.4 from 4.3.4 fixed the issue.
Also strike this on NetBSD (gcc is 4.1) The work around (thanks to Adam Ciarciński for finding it) is to put "QHash<QColor, QColor>()" statement in extra parentheses, so the definition should look like this: QPixmap spritePixmap(const QString& key, const QSize& size, int frame = -1, const QHash<QColor, QColor>& customColors = (QHash<QColor, QColor>())) const;
Fixed in trunk by Ian Wadham, revision 1243973.