Compare commits

...

5 Commits

Author SHA1 Message Date
John Maguire
327181ef18 Try building on OS X with libc++ 2014-01-27 16:32:02 +01:00
John Maguire
60ae140aab Revert "Try c++11 without unique_ptr"
This reverts commit ee70819f2b69d4bd0c9909d89c6b633f5065a1db.
2014-01-27 16:31:13 +01:00
John Maguire
767965a2f4 Merge branch 'master' into c++11 2014-01-27 16:30:57 +01:00
John Maguire
ee70819f2b Try c++11 without unique_ptr 2014-01-08 11:55:22 +01:00
John Maguire
1ef3c53629 Canary commit for various c++11 features.
* range-based for loops
* auto
* unique_ptr
2014-01-07 17:28:46 +01:00
3 changed files with 10 additions and 4 deletions

View File

@ -16,6 +16,10 @@ if (CMAKE_CXX_COMPILER MATCHES ".*clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
endif ()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --stdlib=libc++")
endif ()
set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
check_cxx_source_compiles(
"#include <unordered_map>

View File

@ -3,6 +3,8 @@
#include "internetservice.h"
#include <memory>
#include <QMenu>
#include "core/tagreaderclient.h"
@ -61,8 +63,8 @@ class CloudFileService : public InternetService {
LibraryModel* library_model_;
QSortFilterProxyModel* library_sort_model_;
boost::scoped_ptr<QMenu> context_menu_;
boost::scoped_ptr<AlbumCoverManager> cover_manager_;
std::unique_ptr<QMenu> context_menu_;
std::unique_ptr<AlbumCoverManager> cover_manager_;
PlaylistManager* playlist_manager_;
TaskManager* task_manager_;

View File

@ -99,12 +99,12 @@ void SpotifyServer::SetPlaybackSettings(pb::spotify::Bitrate bitrate, bool volum
void SpotifyServer::MessageArrived(const pb::spotify::Message& message) {
if (message.has_login_response()) {
const pb::spotify::LoginResponse& response = message.login_response();
const auto& response = message.login_response();
logged_in_ = response.success();
if (response.success()) {
// Send any messages that were queued before the client logged in
foreach (const pb::spotify::Message& message, queued_messages_) {
for (const pb::spotify::Message& message : queued_messages_) {
SendOrQueueMessage(message);
}
queued_messages_.clear();