[amarok] /: Make Amarok compile with Clang
Kevin Funk
krf at electrostorm.net
Wed Jun 29 20:20:40 CEST 2011
Git commit 59fde52e32ac5a47374c13de266bc28bbf59c573 by Kevin Funk.
Committed on 29/06/2011 at 18:25.
Pushed by kfunk into branch 'master'.
Make Amarok compile with Clang
It's now possible to build Amarok using the Clang LLVM-frontend. Mostly
trivial fixes were required to achieve this.
Note that Clang > v2.8 (most probably the current trunk version) is
required to build Amarok. On Ubuntu 11.04 you'll still have to fix the
compiler itself to make it work. Have fun.
TODO: Fix compilation of tests/ using Clang.
CCMAIL: amarok-devel at kde.org
M +1 -0 ChangeLog
M +4 -4 src/context/applets/labels/LabelsApplet.cpp
M +2 -2 src/context/applets/lyrics/LyricsApplet.cpp
M +2 -2 src/core-impl/collections/db/sql/mysqlecollection/CMakeLists.txt
M +2 -2 src/core-impl/collections/db/sql/mysqlservercollection/CMakeLists.txt
M +1 -1 src/core/support/SmartPointerList.h
http://commits.kde.org/amarok/59fde52e32ac5a47374c13de266bc28bbf59c573
diff --git a/ChangeLog b/ChangeLog
index da0210d..d44305b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ Amarok ChangeLog
VERSION 2.4.2-Beta 1
FEATURES:
+ * Made Amarok compile with the Clang LLVM frontend.
* Enable drag and drop on collections to copy/move within Local Music and
directly from the playlist. (BR 223400)
* Added KNotify scripting interface. (BR 260750)
diff --git a/src/context/applets/labels/LabelsApplet.cpp b/src/context/applets/labels/LabelsApplet.cpp
index 1522109..070fab6 100644
--- a/src/context/applets/labels/LabelsApplet.cpp
+++ b/src/context/applets/labels/LabelsApplet.cpp
@@ -154,10 +154,10 @@ LabelsApplet::init()
QString label = parts.at(0);
label = label.replace( "%s", "|" );
label = label.replace( "%p", "%" );
- QString replacement = parts.at(1);
- replacement = replacement.replace( "%s", "|" );
- replacement = replacement.replace( "%p", "%" );
- m_replacementMap.insert( label, replacement );
+ QString replacementValue = parts.at(1);
+ replacementValue = replacementValue.replace( "%s", "|" );
+ replacementValue = replacementValue.replace( "%p", "%" );
+ m_replacementMap.insert( label, replacementValue );
}
setStoppedState( true );
diff --git a/src/context/applets/lyrics/LyricsApplet.cpp b/src/context/applets/lyrics/LyricsApplet.cpp
index 14178c4..d26de10 100644
--- a/src/context/applets/lyrics/LyricsApplet.cpp
+++ b/src/context/applets/lyrics/LyricsApplet.cpp
@@ -165,8 +165,8 @@ LyricsAppletPrivate::showSuggested( const QVariantList &suggestions )
QString title( s.at(0) );
QString artist( s.at(1) );
KUrl url( s.at(2) );
- LyricsSuggestion suggestion = { url, title, artist };
- suggestView->add( suggestion );
+ LyricsSuggestion lyricsSuggestion = { url, title, artist };
+ suggestView->add( lyricsSuggestion );
}
showSuggestions = true;
}
diff --git a/src/core-impl/collections/db/sql/mysqlecollection/CMakeLists.txt b/src/core-impl/collections/db/sql/mysqlecollection/CMakeLists.txt
index aa3588c..5de0e97 100644
--- a/src/core-impl/collections/db/sql/mysqlecollection/CMakeLists.txt
+++ b/src/core-impl/collections/db/sql/mysqlecollection/CMakeLists.txt
@@ -21,10 +21,10 @@ set(amarok_collection-mysqlecollection_PART_SRCS
kde4_add_plugin(amarok_collection-mysqlecollection ${amarok_collection-mysqlecollection_PART_SRCS})
-STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN ${CMAKE_SHARED_LINKER_FLAGS})
+STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN "${CMAKE_SHARED_LINKER_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN} )
-STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN ${CMAKE_MODULE_LINKER_FLAGS})
+STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN "${CMAKE_MODULE_LINKER_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN} )
target_link_libraries(amarok_collection-mysqlecollection
diff --git a/src/core-impl/collections/db/sql/mysqlservercollection/CMakeLists.txt b/src/core-impl/collections/db/sql/mysqlservercollection/CMakeLists.txt
index 0a5d722..aba4a8d 100644
--- a/src/core-impl/collections/db/sql/mysqlservercollection/CMakeLists.txt
+++ b/src/core-impl/collections/db/sql/mysqlservercollection/CMakeLists.txt
@@ -21,10 +21,10 @@ set(amarok_collection-mysqlservercollection_PART_SRCS
kde4_add_plugin(amarok_collection-mysqlservercollection ${amarok_collection-mysqlservercollection_PART_SRCS})
-STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN ${CMAKE_SHARED_LINKER_FLAGS})
+STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN "${CMAKE_SHARED_LINKER_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_NOFATALWARN} )
-STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN ${CMAKE_MODULE_LINKER_FLAGS})
+STRING(REPLACE "-Wl,--fatal-warnings" "" CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN "${CMAKE_MODULE_LINKER_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_NOFATALWARN} )
target_link_libraries(amarok_collection-mysqlservercollection
diff --git a/src/core/support/SmartPointerList.h b/src/core/support/SmartPointerList.h
index d3016f0..d61d03e 100644
--- a/src/core/support/SmartPointerList.h
+++ b/src/core/support/SmartPointerList.h
@@ -168,7 +168,7 @@ public:
using QList<T*>::back;
using QList<T*>::constBegin;
using QList<T*>::constEnd;
- using QList<T*>::const_iterator;
+ using typename QList<T*>::const_iterator;
using QList<T*>::contains;
using QList<T*>::count;
using QList<T*>::empty;
More information about the Amarok-devel
mailing list