Commit 0d2b1aed authored by Christian Kandeler's avatar Christian Kandeler Committed by Eike Ziller

Remove "icheck build" test.

Does not build, is not being maintained, purpose is unclear.

Change-Id: I00f3bbc9580b57e3945882a411af502a78f4864f
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 6e09fa8c
......@@ -231,12 +231,6 @@ bool Function::isEqualTo(const Type *other) const
return false;
else if (isVolatile() != o->isVolatile())
return false;
#ifdef ICHECK_BUILD
else if (isInvokable() != o->isInvokable())
return false;
else if (isSignal() != o->isSignal())
return false;
#endif
const Name *l = unqualifiedName();
const Name *r = o->unqualifiedName();
......@@ -256,37 +250,6 @@ bool Function::isEqualTo(const Type *other) const
return false;
}
#ifdef ICHECK_BUILD
bool Function::isEqualTo(const Function* fct, bool ignoreName/* = false*/) const
{
if (!ignoreName)
return isEqualTo((Type*)fct);
if (! fct)
return false;
else if (isConst() != fct->isConst())
return false;
else if (isVolatile() != fct->isVolatile())
return false;
else if (isInvokable() != fct->isInvokable())
return false;
else if (isSignal() != fct->isSignal())
return false;
if (_arguments->symbolCount() != fct->_arguments->symbolCount())
return false;
else if (! _returnType.isEqualTo(fct->_returnType))
return false;
for (unsigned i = 0; i < _arguments->symbolCount(); ++i) {
Symbol *l = _arguments->symbolAt(i);
Symbol *r = fct->_arguments->symbolAt(i);
if (! l->type().isEqualTo(r->type()))
return false;
}
return true;
}
#endif
void Function::accept0(TypeVisitor *visitor)
{ visitor->visit(this); }
......
......@@ -341,10 +341,6 @@ public:
bool isPureVirtual() const;
void setPureVirtual(bool isPureVirtual);
#ifdef ICHECK_BUILD
bool isEqualTo(const Function* fct, bool ignoreName = false) const;
#endif
// Symbol's interface
virtual FullySpecifiedType type() const;
......
......@@ -36,31 +36,25 @@
#include "cpphighlightingsupport.h"
#include "cpphighlightingsupportinternal.h"
#include "abstracteditorsupport.h"
#ifndef ICHECK_BUILD
# include "cpptoolsconstants.h"
# include "cpptoolseditorsupport.h"
# include "cppfindreferences.h"
#endif
#include "cpptoolsconstants.h"
#include "cpptoolseditorsupport.h"
#include "cppfindreferences.h"
#include <functional>
#include <QtConcurrentRun>
#ifndef ICHECK_BUILD
# include <QFutureSynchronizer>
# include <utils/runextensions.h>
# include <texteditor/itexteditor.h>
# include <texteditor/basetexteditor.h>
# include <projectexplorer/project.h>
# include <projectexplorer/projectexplorer.h>
# include <projectexplorer/projectexplorerconstants.h>
# include <projectexplorer/session.h>
# include <coreplugin/icore.h>
# include <coreplugin/mimedatabase.h>
# include <coreplugin/editormanager/editormanager.h>
# include <coreplugin/progressmanager/progressmanager.h>
# include <extensionsystem/pluginmanager.h>
#else
# include <QDir>
#endif
#include <QFutureSynchronizer>
#include <utils/runextensions.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......@@ -199,7 +193,6 @@ static const char pp_configuration[] =
"#define __inline inline\n"
"#define __forceinline inline\n";
#ifndef ICHECK_BUILD
CppPreprocessor::CppPreprocessor(QPointer<CppModelManager> modelManager, bool dumpFileNameWhileParsing)
: snapshot(modelManager->snapshot()),
m_modelManager(modelManager),
......@@ -210,16 +203,6 @@ CppPreprocessor::CppPreprocessor(QPointer<CppModelManager> modelManager, bool du
preprocess.setKeepComments(true);
}
#else
CppPreprocessor::CppPreprocessor(QPointer<CPlusPlus::ParseManager> modelManager)
: preprocess(this, &env),
m_dumpFileNameWhileParsing(false),
m_revision(0)
{
}
#endif
CppPreprocessor::~CppPreprocessor()
{ }
......@@ -299,7 +282,6 @@ void CppPreprocessor::setProjectFiles(const QStringList &files)
void CppPreprocessor::setTodo(const QStringList &files)
{ m_todo = QSet<QString>::fromList(files); }
#ifndef ICHECK_BUILD
namespace {
class Process: public std::unary_function<Document::Ptr, void>
{
......@@ -334,7 +316,6 @@ public:
}
};
} // end of anonymous namespace
#endif
void CppPreprocessor::run(const QString &fileName)
{
......@@ -639,21 +620,11 @@ void CppPreprocessor::sourceNeeded(unsigned line, QString &fileName, IncludeType
snapshot.insert(doc);
m_todo.remove(fileName);
#ifndef ICHECK_BUILD
Process process(m_modelManager, doc, snapshot, m_workingCopy);
process();
(void) switchDocument(previousDoc);
#else
doc->releaseSource();
Document::CheckMode mode = Document::FastCheck;
mode = Document::FullCheck;
doc->parse();
doc->check(mode);
(void) switchDocument(previousDoc);
#endif
}
Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
......@@ -663,7 +634,6 @@ Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
return previousDoc;
}
#ifndef ICHECK_BUILD
void CppModelManager::updateModifiedSourceFiles()
{
const Snapshot snapshot = this->snapshot();
......@@ -1437,6 +1407,3 @@ QList<Document::DiagnosticMessage> CppModelManager::extraDiagnostics(const QStri
}
return m_extraDiagnostics.value(fileName).value(kind);
}
#endif
......@@ -34,26 +34,19 @@
#include "cpptools_global.h"
#include "cpptoolsconstants.h"
#include "ModelManagerInterface.h"
#ifndef ICHECK_BUILD
# include <projectexplorer/project.h>
#endif
#include <projectexplorer/project.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/PreprocessorClient.h>
#ifndef ICHECK_BUILD
# include <texteditor/basetexteditor.h>
#endif
#include <texteditor/basetexteditor.h>
#include <cplusplus/PreprocessorEnvironment.h>
#include <cplusplus/pp-engine.h>
#ifdef ICHECK_BUILD
# include "parsemanager.h"
#else
# include <QHash>
# include <QFutureInterface>
# include <QFutureSynchronizer>
# include <QMutex>
# include <QTimer>
# include <QTextEdit> // for QTextEdit::ExtraSelection
#endif
#include <QHash>
#include <QFutureInterface>
#include <QFutureSynchronizer>
#include <QMutex>
#include <QTimer>
#include <QTextEdit> // for QTextEdit::ExtraSelection
namespace Core {
class IEditor;
......@@ -83,7 +76,6 @@ class CppEditorSupport;
class CppPreprocessor;
class CppFindReferences;
#ifndef ICHECK_BUILD
class CPPTOOLS_EXPORT CppModelManager : public CPlusPlus::CppModelManagerInterface
{
Q_OBJECT
......@@ -255,16 +247,11 @@ private:
CppHighlightingSupportFactory *m_highlightingFactory;
CppHighlightingSupportFactory *m_highlightingFallback;
};
#endif
class CPPTOOLS_EXPORT CppPreprocessor: public CPlusPlus::Client
{
public:
#ifndef ICHECK_BUILD
CppPreprocessor(QPointer<CppModelManager> modelManager, bool dumpFileNameWhileParsing = false);
#else
CppPreprocessor(QPointer<CPlusPlus::ParseManager> modelManager);
#endif
virtual ~CppPreprocessor();
void setRevision(unsigned revision);
......@@ -313,9 +300,7 @@ protected:
virtual void sourceNeeded(unsigned line, QString &fileName, IncludeType type);
private:
#ifndef ICHECK_BUILD
QPointer<CppModelManager> m_modelManager;
#endif
bool m_dumpFileNameWhileParsing;
CPlusPlus::Environment env;
CPlusPlus::Preprocessor preprocess;
......
......@@ -9,7 +9,6 @@ SUBDIRS += \
environment \
fakevim \
generichighlighter \
# icheckbuild \
profilewriter \
ioutils \
qtcprocess \
......
CONFIG += qtestlib testcase
include(../../../qtcreator.pri)
include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus.pri)
include($$IDE_SOURCE_TREE/src/plugins/cpptools/cpptools.pri)
QT += testlib
DEFINES += ICHECK_BUILD ICHECK_APP_BUILD
INCLUDEPATH += $$IDE_SOURCE_TREE/src/libs/cplusplus
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins
LIBS += $$IDE_SOURCE_TREE/lib/qtcreator/plugins
HEADERS += ichecklib.h \
ichecklib_global.h \
parsemanager.h
SOURCES += ichecklib.cpp \
parsemanager.cpp \
tst_icheckbuild.cpp
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#include "ichecklib.h"
#include "parsemanager.h"
#include <QCoreApplication>
#include <QString>
#include <QStringList>
#include <iostream>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QProcess>
QStringList getQTIncludePath()
{
QStringList ret;
QStringList processevironment = QProcess::systemEnvironment();
foreach(QString item, processevironment){
if(item.indexOf("QTDIR=") == 0){
QString qtpath = item.remove("QTDIR=");
ret << qtpath + "/include";
ret << qtpath + "/include/ActiveQt";
ret << qtpath + "/include/phonon";
ret << qtpath + "/include/phonon_compat";
ret << qtpath + "/include/Qt";
ret << qtpath + "/include/Qt3Support";
ret << qtpath + "/include/QtAssistant";
ret << qtpath + "/include/QtCore";
ret << qtpath + "/include/QtDBus";
ret << qtpath + "/include/QtDeclarative";
ret << qtpath + "/include/QtDesigner";
ret << qtpath + "/include/QtGui";
ret << qtpath + "/include/QtHelp";
ret << qtpath + "/include/QtMultimedia";
ret << qtpath + "/include/QtNetwork";
ret << qtpath + "/include/QtOpenGL";
ret << qtpath + "/include/QtOpenVG";
ret << qtpath + "/include/QtScript";
ret << qtpath + "/include/QtScriptTools";
ret << qtpath + "/include/QtSql";
ret << qtpath + "/include/QtSvg";
ret << qtpath + "/include/QtTest";
ret << qtpath + "/include/QtUiTools";
ret << qtpath + "/include/QtWebKit";
ret << qtpath + "/include/QtXml";
ret << qtpath + "/include/QtXmlPatterns";
break;
}
}
return ret;
}
ICheckLib::ICheckLib()
: pParseManager(0)
{
}
void ICheckLib::ParseHeader(const QStringList& includePath, const QStringList& filelist)
{
if(pParseManager)
delete pParseManager;
pParseManager = 0;
pParseManager = new CPlusPlus::ParseManager();
pParseManager->setIncludePath(includePath);
pParseManager->parse(filelist);
}
bool ICheckLib::check(const ICheckLib& ichecklib /*ICheckLib from interface header*/, QString outputfile)
{
if(pParseManager){
CPlusPlus::ParseManager* cpparsemanager = ichecklib.pParseManager;
return pParseManager->checkAllMetadatas(cpparsemanager, outputfile);
}
return false;
}
QStringList ICheckLib::getErrorMsg()
{
QStringList ret;
if(pParseManager){
ret.append(pParseManager->getErrorMsg());
}
else
ret << "no file was parsed.";
return ret;
}
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#ifndef ICHECKLIB_H
#define ICHECKLIB_H
#include <QStringList>
#include "ichecklib_global.h"
namespace CPlusPlus{
class ParseManager;
}
class ICHECKLIBSHARED_EXPORT ICheckLib {
public:
ICheckLib();
void ParseHeader(const QStringList& includePath, const QStringList& filelist);
bool check(const ICheckLib& ichecklib /*ICheckLib from interface header*/, QString outputfile);
QStringList getErrorMsg();
private:
CPlusPlus::ParseManager* pParseManager;
};
#endif // ICHECKLIB_H
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#ifndef ICHECKLIB_GLOBAL_H
#define ICHECKLIB_GLOBAL_H
#include <qglobal.h>
#ifdef ICHECK_APP_BUILD
# define ICHECKLIBSHARED_EXPORT
#else
# if defined(ICHECKLIB_LIBRARY)
# define ICHECKLIBSHARED_EXPORT Q_DECL_EXPORT
# else
# define ICHECKLIBSHARED_EXPORT Q_DECL_IMPORT
# endif
#endif
#endif // ICHECKLIB_GLOBAL_H
This diff is collapsed.
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#include <QtTest>
#include "ichecklib.h"
#include <QDebug>
class tst_icheckbuild : public QObject
{
Q_OBJECT
private slots:
void doTests();
};
void tst_icheckbuild::doTests()
{
qDebug() << "icheck build was successful";
}
QTEST_MAIN(tst_icheckbuild)
#include "tst_icheckbuild.moc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment