From 020b637a96aae16bc9dc644fd8a4a05e75f6ed05 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Apr 2010 21:13:42 +0200 Subject: Fix compilation: no semi-colon after Q_ENUM or Q_PROPERTY --- examples/declarative/extending/attached/person.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/extending/attached/person.h index 0f86d8b..08caebf 100644 --- a/examples/declarative/extending/attached/person.h +++ b/examples/declarative/extending/attached/person.h @@ -76,7 +76,7 @@ QML_DECLARE_TYPE(ShoeDescription); class Person : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) -Q_PROPERTY(ShoeDescription *shoe READ shoe); +Q_PROPERTY(ShoeDescription *shoe READ shoe) public: Person(QObject *parent = 0); -- cgit v0.12 From 5aa63ec6aafcec26deab9f9fa3e1fc2f7ad80ba9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Apr 2010 21:27:00 +0200 Subject: Fix compilation on solaris-g++: ctype functions are sometimes macros At least with g++ 3.4 on Solaris, they are. So you can't write ::isalpha because that expands to something invalid. Reviewed-by: Trust Me --- tools/linguist/linguist/mainwindow.cpp | 2 +- tools/linguist/shared/po.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 7d73596..1611699 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -2392,7 +2392,7 @@ static bool haveMnemonic(const QString &str) // because we get a lot of false positives. if (c != '&' && c != ' ' && QChar(c).isPrint()) { const ushort *pp = p; - for (; *p < 256 && ::isalpha(*p); p++) ; + for (; *p < 256 && isalpha(*p); p++) ; if (pp == p || *p != ';') return true; // This looks like a HTML &entity;, so ignore it. As a HTML string diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 097b4bf..99a8751 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -235,7 +235,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, const QByteArray &line = lines.at(l); if (line.isEmpty() || !line.startsWith(prefix)) break; - while (::isspace(line[offset])) // No length check, as string has no trailing spaces. + while (isspace(line[offset])) // No length check, as string has no trailing spaces. offset++; if (line[offset] != '"') break; @@ -247,7 +247,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, if (c == '"') { if (offset == line.length()) break; - while (::isspace(line[offset])) + while (isspace(line[offset])) offset++; if (line[offset++] != '"') { cd.appendError(QString::fromLatin1( @@ -305,7 +305,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, break; case 'x': stoff = offset; - while (::isxdigit(line[offset])) + while (isxdigit(line[offset])) if (++offset == line.length()) goto premature_eol; msg += line.mid(stoff, offset - stoff).toUInt(0, 16); -- cgit v0.12 From fe6057617a87ecb205680d262a02f70eea425045 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Apr 2010 21:34:01 +0200 Subject: Fix build on WinCE and Symbian: .pro file must match dir name. --- examples/declarative/widgets/mywidgets.pro | 19 ------------------- examples/declarative/widgets/widgets.pro | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 examples/declarative/widgets/mywidgets.pro create mode 100644 examples/declarative/widgets/widgets.pro diff --git a/examples/declarative/widgets/mywidgets.pro b/examples/declarative/widgets/mywidgets.pro deleted file mode 100644 index 258edb1..0000000 --- a/examples/declarative/widgets/mywidgets.pro +++ /dev/null @@ -1,19 +0,0 @@ -TEMPLATE = lib -DESTDIR = MyWidgets -TARGET = mywidgetsplugin -CONFIG += qt plugin -QT += declarative -VERSION = 1.0.0 - -SOURCES += mywidgets.cpp - -sources.files += mywidgets.pro mywidgets.cpp mywidgets.qml - -sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins - -target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins - -INSTALLS += sources target - -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - diff --git a/examples/declarative/widgets/widgets.pro b/examples/declarative/widgets/widgets.pro new file mode 100644 index 0000000..258edb1 --- /dev/null +++ b/examples/declarative/widgets/widgets.pro @@ -0,0 +1,19 @@ +TEMPLATE = lib +DESTDIR = MyWidgets +TARGET = mywidgetsplugin +CONFIG += qt plugin +QT += declarative +VERSION = 1.0.0 + +SOURCES += mywidgets.cpp + +sources.files += mywidgets.pro mywidgets.cpp mywidgets.qml + +sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins + +target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins + +INSTALLS += sources target + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + -- cgit v0.12 From 1f327a1de8db245d0b28e7dfdc5bca1af0b56782 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Apr 2010 22:04:29 +0200 Subject: Fix Phonon compilation with a namespaced Qt. I'll upstream this patch myself. --- src/3rdparty/phonon/gstreamer/audiodataoutput.cpp | 6 ++++++ src/3rdparty/phonon/gstreamer/audiodataoutput.h | 6 ++++++ src/3rdparty/phonon/phonon/audiodataoutput.cpp | 6 ++++++ src/3rdparty/phonon/phonon/audiodataoutput.h | 6 ++++++ src/3rdparty/phonon/phonon/audiodataoutput_p.h | 6 ++++++ src/3rdparty/phonon/phonon/audiodataoutputinterface.h | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/src/3rdparty/phonon/gstreamer/audiodataoutput.cpp b/src/3rdparty/phonon/gstreamer/audiodataoutput.cpp index 30dabdf..802cb18 100644 --- a/src/3rdparty/phonon/gstreamer/audiodataoutput.cpp +++ b/src/3rdparty/phonon/gstreamer/audiodataoutput.cpp @@ -29,6 +29,9 @@ #include #include +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + namespace Phonon { namespace Gstreamer @@ -138,6 +141,9 @@ void AudioDataOutput::mediaNodeEvent(const MediaNodeEvent *event) }} //namespace Phonon::Gstreamer +QT_END_NAMESPACE +QT_END_HEADER + #include "moc_audiodataoutput.cpp" // vim: sw=4 ts=4 diff --git a/src/3rdparty/phonon/gstreamer/audiodataoutput.h b/src/3rdparty/phonon/gstreamer/audiodataoutput.h index 5e30a1d..cd5ef49 100644 --- a/src/3rdparty/phonon/gstreamer/audiodataoutput.h +++ b/src/3rdparty/phonon/gstreamer/audiodataoutput.h @@ -29,6 +29,9 @@ #include #include +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + namespace Phonon { namespace Gstreamer @@ -80,5 +83,8 @@ namespace Gstreamer }; }} //namespace Phonon::Gstreamer +QT_END_NAMESPACE +QT_END_HEADER + // vim: sw=4 ts=4 tw=80 #endif // Phonon_FAKE_AUDIODATAOUTPUT_H diff --git a/src/3rdparty/phonon/phonon/audiodataoutput.cpp b/src/3rdparty/phonon/phonon/audiodataoutput.cpp index 3a7d3a1..fa8ec0d 100644 --- a/src/3rdparty/phonon/phonon/audiodataoutput.cpp +++ b/src/3rdparty/phonon/phonon/audiodataoutput.cpp @@ -26,6 +26,9 @@ #define PHONON_CLASSNAME AudioDataOutput +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + namespace Phonon { @@ -62,5 +65,8 @@ void AudioDataOutputPrivate::setupBackendObject() } // namespace Phonon +QT_END_NAMESPACE +QT_END_HEADER + #undef PHONON_CLASSNAME // vim: sw=4 ts=4 tw=80 diff --git a/src/3rdparty/phonon/phonon/audiodataoutput.h b/src/3rdparty/phonon/phonon/audiodataoutput.h index 8e8f8e0..7a559b3 100644 --- a/src/3rdparty/phonon/phonon/audiodataoutput.h +++ b/src/3rdparty/phonon/phonon/audiodataoutput.h @@ -26,6 +26,9 @@ #include "abstractaudiooutput.h" #include "phonondefs.h" +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + #ifndef DOXYGEN_SHOULD_SKIP_THIS template class QVector; template class QMap; @@ -125,5 +128,8 @@ namespace Phonon }; } // namespace Phonon +QT_END_NAMESPACE +QT_END_HEADER + // vim: sw=4 ts=4 tw=80 #endif // Phonon_AUDIODATAOUTPUT_H diff --git a/src/3rdparty/phonon/phonon/audiodataoutput_p.h b/src/3rdparty/phonon/phonon/audiodataoutput_p.h index 91103a9..5fd4f80 100644 --- a/src/3rdparty/phonon/phonon/audiodataoutput_p.h +++ b/src/3rdparty/phonon/phonon/audiodataoutput_p.h @@ -26,6 +26,9 @@ #include "audiodataoutput.h" #include "abstractaudiooutput_p.h" +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + namespace Phonon { @@ -44,5 +47,8 @@ class AudioDataOutputPrivate : public AbstractAudioOutputPrivate } // namespace Phonon +QT_END_NAMESPACE +QT_END_HEADER + #endif // AUDIODATAOUTPUT_P_H // vim: sw=4 ts=4 tw=80 diff --git a/src/3rdparty/phonon/phonon/audiodataoutputinterface.h b/src/3rdparty/phonon/phonon/audiodataoutputinterface.h index bc1aad0..08bc7fc 100644 --- a/src/3rdparty/phonon/phonon/audiodataoutputinterface.h +++ b/src/3rdparty/phonon/phonon/audiodataoutputinterface.h @@ -23,6 +23,9 @@ #ifndef PHONON_AUDIODATAOUTPUTINTERFACE_H #define PHONON_AUDIODATAOUTPUTINTERFACE_H +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + namespace Phonon { @@ -41,4 +44,7 @@ class AudioDataOutputInterface Q_DECLARE_INTERFACE(Phonon::AudioDataOutputInterface, "0AudioDataOutputInterface.phonon.kde.org") +QT_END_NAMESPACE +QT_END_HEADER + #endif // PHONON_AUDIODATAOUTPUTINTERFACE_H -- cgit v0.12