[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] /: Fix compilation with libc++. Workaround for QTBUG-25960.
From:       Mark Kretschmann <kretschmann () kde ! org>
Date:       2013-10-27 7:47:18
Message-ID: E1VaL4A-0003uo-VC () scm ! kde ! org
[Download RAW message or body]

Git commit b8d165def889d9fc70d39999f4f8b41608d96c91 by Mark Kretschmann.
Committed on 27/10/2013 at 07:30.
Pushed by markey into branch 'master'.

Fix compilation with libc++. Workaround for QTBUG-25960.

Due to QTBUG-25960, compilation would fail with libc++ when STL algorithms
are used with Qt iterators. This patch works around the issue.

This should also fix compilation on OSX and FreeBSD, where Clang and libc++
is used by default.

BUG: 324075
FIXED-IN: 2.8.1
BACKPORT

M  +1    -0    ChangeLog
M  +5    -0    src/playlist/PlaylistController.cpp
M  +5    -0    src/playlist/navigators/RandomAlbumNavigator.cpp
M  +5    -0    src/playlistgenerator/ConstraintSolver.cpp

http://commits.kde.org/amarok/b8d165def889d9fc70d39999f4f8b41608d96c91

diff --git a/ChangeLog b/ChangeLog
index c8a528a..2934df7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@ VERSION 2.9-Beta 1
      compilers currently supported by KDE.
 =

   BUGFIXES:
+   * Fixed compilation with libc++ (used on OSX and FreeBSD). (BR 324075)
    * Fixed crashes with Intel drivers due to Analyzer applet. (BR 323635)
    * Fixed performance problem with large podcast feeds.
      Patch by Frank Meerkoetter <frank@meerkoetter.org>. (BR 283022)
diff --git a/src/playlist/PlaylistController.cpp b/src/playlist/PlaylistCon=
troller.cpp
index fcad8e0..6db6a44 100644
--- a/src/playlist/PlaylistController.cpp
+++ b/src/playlist/PlaylistController.cpp
@@ -23,6 +23,11 @@
 =

 #define DEBUG_PREFIX "Playlist::Controller"
 =

+// WORKAROUND for QTBUG-25960. Required for Qt versions < 4.8.5 in combina=
tion with libc++.
+#define QT_NO_STL 1
+    #include <qiterator.h>
+#undef QT_NO_STL
+
 #include "PlaylistController.h"
 =

 #include "EngineController.h"
diff --git a/src/playlist/navigators/RandomAlbumNavigator.cpp b/src/playlis=
t/navigators/RandomAlbumNavigator.cpp
index 6f0fe37..2b42427 100644
--- a/src/playlist/navigators/RandomAlbumNavigator.cpp
+++ b/src/playlist/navigators/RandomAlbumNavigator.cpp
@@ -21,6 +21,11 @@
 =

 #define DEBUG_PREFIX "Playlist::RandomAlbumNavigator"
 =

+// WORKAROUND for QTBUG-25960. Required for Qt versions < 4.8.5 in combina=
tion with libc++.
+#define QT_NO_STL 1
+    #include <qiterator.h>
+#undef QT_NO_STL
+
 #include "RandomAlbumNavigator.h"
 =

 #include "core/support/Debug.h"
diff --git a/src/playlistgenerator/ConstraintSolver.cpp b/src/playlistgener=
ator/ConstraintSolver.cpp
index 2fa7e0e..b3e4ce4 100644
--- a/src/playlistgenerator/ConstraintSolver.cpp
+++ b/src/playlistgenerator/ConstraintSolver.cpp
@@ -16,6 +16,11 @@
 =

 #define DEBUG_PREFIX "APG::ConstraintSolver"
 =

+// WORKAROUND for QTBUG-25960. Required for Qt versions < 4.8.5 in combina=
tion with libc++.
+#define QT_NO_STL 1
+    #include <qiterator.h>
+#undef QT_NO_STL
+
 #include "ConstraintSolver.h"
 =

 #include "Constraint.h"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic