diff options
author | Johan Hauan <johan@hauan.name> | 2010-04-06 09:34:57 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-04-06 09:45:56 (GMT) |
commit | a354e98838e67e9bbd9473d4cd42b89f45d0e3fe (patch) | |
tree | ebae89ee1ee9e6fcf2187260352c216957093242 | |
parent | 1a4ee517638e1ba3cdc622af70b3d53561d23392 (diff) | |
download | Qt-a354e98838e67e9bbd9473d4cd42b89f45d0e3fe.zip Qt-a354e98838e67e9bbd9473d4cd42b89f45d0e3fe.tar.gz Qt-a354e98838e67e9bbd9473d4cd42b89f45d0e3fe.tar.bz2 |
Sunstudio12.1(5.10): Fix compile errors GTK style and other minor compile errors
GTK Style
A QHashableLatin1Literal was a bit too clever for sunstudio.
Added and alternate constructor for sunstudio(ifdef)
Should not affect other compilers.
Other: Minor compile fixes, extra semicolon after macros etc.
Merge-request: 547
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
-rw-r--r-- | examples/qtconcurrent/map/main.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qgtkstyle_p.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp index 6068d30..6afefca 100644 --- a/examples/qtconcurrent/map/main.cpp +++ b/examples/qtconcurrent/map/main.cpp @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) // Use QtConcurrentBlocking::mapped to apply the scale function to all the // images in the list. - QList<QImage> thumbnails = QtConcurrent::blockingMapped(images, scale); + QList<QImage> thumbnails = QtConcurrent::blockingMapped<QList<QImage> >(images, scale); return 0; } diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index 5bb7550..f0aee46 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -85,9 +85,14 @@ public: int size() const { return m_size; } const char *data() const { return m_data; } +#ifdef __SUNPRO_CC + QHashableLatin1Literal(const char* str) + : m_size(strlen(str)), m_data(str) {} +#else template <int N> QHashableLatin1Literal(const char (&str)[N]) : m_size(N - 1), m_data(str) {} +#endif QHashableLatin1Literal(const QHashableLatin1Literal &other) : m_size(other.m_size), m_data(other.m_data) |