Permalink
Browse files

replace boost::bind() with plain-old-Qt

acked by Volker
we are now Boostless
  • Loading branch information...
1 parent 31c4ac5 commit 3853d90443d850bca77fb2eb2cb7bdeebb7dc1c7 @winterz winterz committed Sep 30, 2011
Showing with 5 additions and 9 deletions.
  1. +0 −2 CMakeLists.txt
  2. +0 −1 Install.txt
  3. +5 −6 tools/sceneinspector/scenemodel.cpp
View
@@ -51,15 +51,13 @@ include(CheckCXXCompilerFlag)
set(QT_MIN_VERSION "4.7.0")
find_package(Qt4 REQUIRED)
-find_package(Boost REQUIRED)
if(CMAKE_BUILD_TYPE MATCHES "^[Rr]elease$")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
endif()
include_directories(
${QT_INCLUDES}
- ${Boost_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/3rdparty
View
@@ -14,7 +14,6 @@ To build a debug version pass -DCMAKE_BUILD_TYPE=Debug to cmake.
To build GammaRay you will need:
- CMake 2.8
- Qt 4.7 or higher
- - Boost (any version should do)
Building on Unix with gcc or clang:
% mkdir build
@@ -27,9 +27,6 @@
#include <qgraphicsscene.h>
#include <qdebug.h>
-#include <boost/bind.hpp>
-#include <algorithm>
-
using namespace GammaRay;
SceneModel::SceneModel(QObject *parent)
@@ -128,9 +125,11 @@ QList<QGraphicsItem*> SceneModel::topLevelItems() const
if (!m_scene) {
return topLevel;
}
- const QList<QGraphicsItem*> allItems = m_scene->items();
- std::remove_copy_if(allItems.begin(), allItems.end(), std::back_inserter(topLevel),
- boost::bind(&QGraphicsItem::parentItem, _1) != (QGraphicsItem*)(0));
+ Q_FOREACH(QGraphicsItem *item, m_scene->items()) {
+ if(!item->parentItem()) {
+ topLevel.push_back(item);
+ }
+ }
return topLevel;
}

0 comments on commit 3853d90

Please sign in to comment.