summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-08-06 14:45:23 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-08-06 14:45:49 (GMT)
commit7d605af42a72f35481e5dad9f279f6b5d5cda2f2 (patch)
tree0351f98c16e210f6e16dfb2b3aaf28c8f7da50d1 /tools/linguist
parenta3ee22515135a29b17f4b1a9ac56b12ebcf92fcb (diff)
downloadQt-7d605af42a72f35481e5dad9f279f6b5d5cda2f2.zip
Qt-7d605af42a72f35481e5dad9f279f6b5d5cda2f2.tar.gz
Qt-7d605af42a72f35481e5dad9f279f6b5d5cda2f2.tar.bz2
nicer way to deal with missing support for template class friends
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/shared/profileevaluator.cpp2
-rw-r--r--tools/linguist/shared/profileevaluator.h15
2 files changed, 13 insertions, 4 deletions
diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp
index 5a9095a..fe22067 100644
--- a/tools/linguist/shared/profileevaluator.cpp
+++ b/tools/linguist/shared/profileevaluator.cpp
@@ -256,10 +256,8 @@ public:
ProFile *m_prevProFile; // See m_prevLineNo
};
-#if (!defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)) && !defined(__SUNPRO_CC)
Q_DECLARE_TYPEINFO(ProFileEvaluator::Private::State, Q_PRIMITIVE_TYPE);
Q_DECLARE_TYPEINFO(ProFileEvaluator::Private::ProLoop, Q_MOVABLE_TYPE);
-#endif
ProFileEvaluator::Private::Private(ProFileEvaluator *q_)
: q(q_)
diff --git a/tools/linguist/shared/profileevaluator.h b/tools/linguist/shared/profileevaluator.h
index f3498c1..ba525b2 100644
--- a/tools/linguist/shared/profileevaluator.h
+++ b/tools/linguist/shared/profileevaluator.h
@@ -50,10 +50,21 @@
#include <QtCore/QStringList>
#include <QtCore/QStack>
+#if (!defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)) && !defined(__SUNPRO_CC)
+# define HAVE_TEMPLATE_CLASS_FRIENDS
+#endif
+
QT_BEGIN_NAMESPACE
class ProFileEvaluator
{
+#ifdef HAVE_TEMPLATE_CLASS_FRIENDS
+private:
+#else
+public:
+#endif
+ class Private;
+
public:
enum TemplateType {
TT_Unknown = 0,
@@ -93,11 +104,11 @@ public:
virtual void fileMessage(const QString &msg); // error() and message() from .pro file
private:
- class Private;
Private *d;
- // This doesn't help gcc 3.3 and sunpro ...
+#ifdef HAVE_TEMPLATE_CLASS_FRIENDS
template<typename T> friend class QTypeInfo;
+#endif
};
QT_END_NAMESPACE