forked from qt-creator/qt-creator
Utils: Remove function wrapper
This was an intentional, time-limited workaround that has served its purpose now that we require C++11. Change-Id: I96ece9c21bd405d281fd381bd9b87edc00c5ee84 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include "qmljsqrcparser.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/function.h>
|
||||
|
||||
#include <QCryptographicHash>
|
||||
|
||||
@@ -616,7 +615,7 @@ CoreImport ImportDependencies::coreImport(const QString &importId) const
|
||||
|
||||
void ImportDependencies::iterateOnCandidateImports(
|
||||
const ImportKey &key, const ViewerContext &vContext,
|
||||
Utils::function<bool (const ImportMatchStrength &,const Export &,const CoreImport &)>
|
||||
std::function<bool (const ImportMatchStrength &,const Export &,const CoreImport &)>
|
||||
const &iterF) const
|
||||
{
|
||||
switch (key.type) {
|
||||
@@ -817,7 +816,7 @@ void ImportDependencies::removeExport(const QString &importId, const ImportKey &
|
||||
|
||||
void ImportDependencies::iterateOnCoreImports(
|
||||
const ViewerContext &vContext,
|
||||
Utils::function<bool (const CoreImport &)> const &iterF) const
|
||||
std::function<bool (const CoreImport &)> const &iterF) const
|
||||
{
|
||||
QMapIterator<QString, CoreImport> i(m_coreImports);
|
||||
while (i.hasNext()) {
|
||||
@@ -829,9 +828,9 @@ void ImportDependencies::iterateOnCoreImports(
|
||||
|
||||
void ImportDependencies::iterateOnLibraryImports(
|
||||
const ViewerContext &vContext,
|
||||
Utils::function<bool (const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const
|
||||
std::function<bool (const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const
|
||||
{
|
||||
typedef QMap<ImportKey, QStringList>::const_iterator iter_t;
|
||||
ImportKey firstLib;
|
||||
@@ -865,9 +864,9 @@ void ImportDependencies::iterateOnLibraryImports(
|
||||
void ImportDependencies::iterateOnSubImports(
|
||||
const ImportKey &baseKey,
|
||||
const ViewerContext &vContext,
|
||||
Utils::function<bool (const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const
|
||||
std::function<bool (const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const
|
||||
{
|
||||
typedef QMap<ImportKey, QStringList>::const_iterator iter_t;
|
||||
iter_t i = m_importCache.lowerBound(baseKey);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include <languageutils/componentversion.h>
|
||||
#include <utils/qtcoverride.h>
|
||||
#include <utils/function.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
@@ -44,6 +43,8 @@
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include <functional>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCryptographicHash;
|
||||
QT_END_NAMESPACE
|
||||
@@ -192,7 +193,7 @@ public:
|
||||
|
||||
CoreImport coreImport(const QString &importId) const;
|
||||
void iterateOnCandidateImports(const ImportKey &key, const ViewerContext &vContext,
|
||||
Utils::function<bool(const ImportMatchStrength &,
|
||||
std::function<bool(const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const;
|
||||
ImportElements candidateImports(const ImportKey &key, const ViewerContext &vContext) const;
|
||||
@@ -209,13 +210,13 @@ public:
|
||||
const QString &requiredPath);
|
||||
|
||||
void iterateOnCoreImports(const ViewerContext &vContext,
|
||||
Utils::function<bool(const CoreImport &)> const &iterF) const;
|
||||
std::function<bool(const CoreImport &)> const &iterF) const;
|
||||
void iterateOnLibraryImports(const ViewerContext &vContext,
|
||||
Utils::function<bool(const ImportMatchStrength &,
|
||||
std::function<bool(const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const;
|
||||
void iterateOnSubImports(const ImportKey &baseKey, const ViewerContext &vContext,
|
||||
Utils::function<bool(const ImportMatchStrength &,
|
||||
std::function<bool(const ImportMatchStrength &,
|
||||
const Export &,
|
||||
const CoreImport &)> const &iterF) const;
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "qmljstypedescriptionreader.h"
|
||||
|
||||
#include <cplusplus/cppmodelmanagerbase.h>
|
||||
#include <utils/function.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
@@ -815,7 +814,7 @@ void ModelManagerInterface::parseLoop(QSet<QString> &scannedPaths,
|
||||
ModelManagerInterface *modelManager,
|
||||
Language::Enum mainLanguage,
|
||||
bool emitDocChangedOnDisk,
|
||||
Utils::function<bool(qreal)> reportProgress)
|
||||
std::function<bool(qreal)> reportProgress)
|
||||
{
|
||||
for (int i = 0; i < files.size(); ++i) {
|
||||
if (!reportProgress(qreal(i) / files.size()))
|
||||
|
||||
@@ -229,7 +229,7 @@ protected:
|
||||
static void parseLoop(QSet<QString> &scannedPaths, QSet<QString> &newLibraries,
|
||||
WorkingCopy workingCopyInternal, QStringList files, ModelManagerInterface *modelManager,
|
||||
QmlJS::Language::Enum mainLanguage, bool emitDocChangedOnDisk,
|
||||
Utils::function<bool (qreal)> reportProgress);
|
||||
std::function<bool (qreal)> reportProgress);
|
||||
static void parse(QFutureInterface<void> &future,
|
||||
WorkingCopy workingCopyInternal,
|
||||
QStringList files,
|
||||
|
||||
Reference in New Issue
Block a user