Commit 6a8c2577 authored by Eike Ziller's avatar Eike Ziller Committed by Daniel Molkentin

Remove dead plugins

Change-Id: Id298e9d6af8f5cbc35f0f57e612690d9a43cea2f
Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent cfc1ad80
......@@ -22,9 +22,7 @@ SUBDIRS = plugin_coreplugin \
plugin_qt4projectmanager \
plugin_locator \
plugin_debugger \
# plugin_qtestlib \ # this seems to be dead
plugin_help \
# plugin_regexp \ # don't know what to do with this
plugin_cpaster \
plugin_cmakeprojectmanager \
plugin_fakevim \
......
<!DOCTYPE QtCreatorManifest>
<qwp>
<pluginName>QTestLibPlugin</pluginName>
<author>Trolltech</author>
<requiredPluginList>
<requiredPlugin>
<name>ProjectExplorer</name>
<provider></provider>
</requiredPlugin>
</requiredPluginList>
<extendsInterfaceList>
<extendsInterface>
<name>Core::OutputPaneInterface</name>
</extendsInterface>
</extendsInterfaceList>
</qwp>
TEMPLATE = lib
TARGET = QTestLibPlugin
QT += xml
include(../../qtcreatorplugin.pri)
include(../../plugins/coreplugin/coreplugin.pri)
SOURCES += qtestlibplugin.cpp
HEADERS += qtestlibplugin.h
RESOURCES += qtestlib.qrc
LIBS += -lProjectExplorer \
-lQuickOpen \
-lUtils
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/Trolltech/QTestLibPlugin">
<file>images/pass.png</file>
</qresource>
</RCC>
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef QTESTLIBPLUGIN_H
#define QTESTLIBPLUGIN_H
#include <coreplugin/ioutputpane.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <QtGui/QPixmap>
#include <QtGui/QSortFilterProxyModel>
#include <QtGui/QStandardItem>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class QComboBox;
class QStandardItemModel;
class QTextEdit;
class QTreeView;
QT_END_NAMESPACE
namespace QTestLib {
namespace Internal {
class QTestLibPlugin;
class QTestOutputWidget;
struct QTestLocation
{
QString file;
QString line;
};
class QTestFunction : public QStandardItem
{
public:
enum IncidentType {
Pass,
XFail,
Fail,
XPass
};
enum MessageType {
Warning,
QWarning,
QDebug,
QSystem,
QFatal,
Skip,
Info
};
inline QTestFunction(const QString &name)
: QStandardItem(name) {
setColumnCount(2);
// ### hardcoding colors sucks...
setForeground(Qt::darkBlue);
}
void addIncident(IncidentType type,
const QString &file = QString(),
const QString &line = QString(),
const QString &details = QString());
void addMessage(MessageType type, const QString &text);
static bool indexHasIncidents(const QModelIndex &function, IncidentType type);
};
class QTestOutputPane : public Core::IOutputPane
{
Q_OBJECT
public:
QTestOutputPane(QTestLibPlugin *plugin);
void addFunction(QTestFunction *function);
virtual QWidget *outputWidget(QWidget *parent);
QList<QWidget*> toolBarWidgets(void) const { return QList<QWidget *>(); }
virtual QString name() const;
virtual void clearContents();
virtual void visibilityChanged(bool visible);
void show();
// FIXME:
virtual int priorityInStatusBar() const { return 0;}
virtual void setFocus() {}
virtual bool hasFocus() { return false;}
virtual bool canFocus() { return false;}
signals:
void showPage();
private:
QTestLibPlugin *m_plugin;
QTestOutputWidget *m_widget;
QStandardItemModel *m_model;
};
class QTestOutputFilter : public QSortFilterProxyModel
{
public:
inline QTestOutputFilter(QObject *parent)
: QSortFilterProxyModel(parent), m_filter(QTestFunction::Fail)
{}
inline void setIncidentFilter(QTestFunction::IncidentType incident) {
m_filter = incident;
filterChanged();
}
protected:
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
private:
QTestFunction::IncidentType m_filter;
};
class QTestOutputWidget : public QWidget
{
Q_OBJECT
public:
QTestOutputWidget(QStandardItemModel *model, QWidget *parent);
void expand();
private Q_SLOTS:
void activateComboFilter(int index);
void gotoLocation(QModelIndex index);
private:
QStandardItemModel *m_model;
QTreeView *m_resultsView;
QComboBox *m_filterCombo;
QTestOutputFilter *m_filterModel;
};
class QTestLibPlugin : public QObject
{
Q_OBJECT
public:
QTestLibPlugin();
virtual ~QTestLibPlugin();
bool init(const QStringList &args, QString *errorMessage);
void extensionsInitialized();
// IApplicationOutput
virtual void clear();
virtual void appendOutput(const QString &out);
virtual void processExited(int exitCode);
private slots:
void projectRunHook(ProjectExplorer::Project *project);
private:
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
QString m_outputFile;
QString m_projectDirectory;
QTestOutputPane *m_outputPane;
};
} // namespace Internal
} // namespace QTestLibPlugin
Q_DECLARE_METATYPE(QTestLib::Internal::QTestLocation)
Q_DECLARE_METATYPE(QTestLib::Internal::QTestFunction::IncidentType)
Q_DECLARE_METATYPE(QTestLib::Internal::QTestFunction::MessageType)
#endif // QTESTLIBPLUGIN_H
<plugin name=\"RegExp\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright>
<license>
Commercial Usage
Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
GNU Lesser General Public License Usage
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
</license>
<description>Regular Expression test widget.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
</plugin>
TEMPLATE = lib
TARGET = RegExp
include(../../qtcreatorplugin.pri)
include(../../plugins/coreplugin/coreplugin.pri)
QT += xml
HEADERS += regexpwindow.h regexpplugin.h settings.h
SOURCES += regexpwindow.cpp regexpplugin.cpp settings.cpp
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#include "regexpplugin.h"
#include "regexpwindow.h"
#include "settings.h"
#include <coreplugin/baseview.h>
#include <coreplugin/icore.h>
#include <QtCore/QtPlugin>
using namespace RegExp::Internal;
RegExpPlugin::RegExpPlugin()
{
}
RegExpPlugin::~RegExpPlugin()
{
if (m_regexpWindow)
m_regexpWindow->settings().toQSettings(Core::ICore::instance()->settings());
}
void RegExpPlugin::extensionsInitialized()
{
}
bool RegExpPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
Core::ICore *core = Core::ICore::instance();
m_regexpWindow = new RegExpWindow;
Settings settings;
settings.fromQSettings(core->settings());
m_regexpWindow->setSettings(settings);
addAutoReleasedObject(new Core::BaseView("TextEditor.RegExpWindow",
m_regexpWindow,
Core::Contect("RegExpPlugin"),
plugId,
Qt::RightDockWidgetArea));
return true;
}
Q_EXPORT_PLUGIN(RegExpPlugin)
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef REGEXPPLUGIN_H
#define REGEXPPLUGIN_H
#include <extensionsystem/iplugin.h>
#include <QtCore/QObject>
#include <QtCore/QPointer>
namespace RegExp {
namespace Internal {
class RegExpWindow;
class RegExpPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
public:
RegExpPlugin();
virtual ~RegExpPlugin();
bool initialize(const QStringList &arguments, QString *errorMessage);
void extensionsInitialized();
private:
QPointer<RegExpWindow> m_regexpWindow;
};
} // namespace Internal
} // namespace RegExp
#endif // REGEXPPLUGIN_H
This diff is collapsed.
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef REGEXPWINDOW_H
#define REGEXPWINDOW_H
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class QLabel;
class QComboBox;
class QCheckBox;
class QLineEdit;
QT_END_NAMESPACE
namespace RegExp {
namespace Internal {
struct Settings;
class RegExpWindow : public QWidget
{
Q_OBJECT
public:
RegExpWindow(QWidget *parent = 0);
Settings settings() const;
void setSettings(const Settings &s);
protected:
void contextMenuEvent(QContextMenuEvent *);
private slots:
void refresh();
void enterEscaped();
private:
QLabel *patternLabel;
QLabel *escapedPatternLabel;
QLabel *syntaxLabel;
QLabel *textLabel;
QComboBox *patternComboBox;
QLineEdit *escapedPatternLineEdit;
QComboBox *textComboBox;
QCheckBox *caseSensitiveCheckBox;
QCheckBox *minimalCheckBox;
QComboBox *syntaxComboBox;
QLabel *indexLabel;
QLabel *matchedLengthLabel;
QLineEdit *indexEdit;
QLineEdit *matchedLengthEdit;
enum { MaxCaptures = 6 };
QLabel *captureLabels[MaxCaptures];
QLineEdit *captureEdits[MaxCaptures];
};
} // namespace Internal
} // namespace RegExp
#endif // REGEXPWINDOW_H
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#include "settings.h"
#include <QtCore/QSettings>
static const char syntaxKey[] = "Syntax";
static const char minimalKey[] = "Minimal";
static const char caseSensitiveKey[] = "CaseSensitive";
static const char patternKey[] = "Patterns";
static const char currentPatternKey[] = "CurrentPattern";
static const char matchKey[] = "Matches";
static const char currentMatchKey[] = "CurrentMatch";
static const char patternDefault[] = "[A-Za-z_]+([A-Za-z_0-9]*)";
static const char matchDefault[] = "(10 + delta4) * 32";
static const char settingsGroup[] = "RegExp";
namespace RegExp {
namespace Internal {
Settings::Settings() :
m_patternSyntax(QRegExp::RegExp),
m_minimal(false),
m_caseSensitive(true),
m_patterns(QLatin1String(patternDefault)),
m_currentPattern(m_patterns.front()),
m_matches(QLatin1String(matchDefault)),
m_currentMatch(m_matches.front())
{
}
void Settings::clear()
{
*this = Settings();
}
void Settings::fromQSettings(QSettings *s)
{
clear();
s->beginGroup(QLatin1String(settingsGroup));
m_patternSyntax = static_cast<QRegExp::PatternSyntax>(s->value(QLatin1String(syntaxKey), m_patternSyntax).toInt());
m_minimal = s->value(QLatin1String(minimalKey), m_minimal).toBool();
m_caseSensitive = s->value(QLatin1String(caseSensitiveKey), m_caseSensitive).toBool();
m_patterns = s->value(QLatin1String(patternKey), m_patterns).toStringList();
m_currentPattern = s->value(QLatin1String(currentPatternKey), m_currentPattern).toString();
m_matches = s->value(QLatin1String(matchKey), m_matches).toStringList();
m_currentMatch = s->value(QLatin1String(currentMatchKey), m_currentMatch).toString();
s->endGroup();
}
void Settings::toQSettings(QSettings *s) const
{
s->beginGroup(QLatin1String(settingsGroup));
s->setValue(QLatin1String(syntaxKey), m_patternSyntax);
s->setValue(QLatin1String(minimalKey), m_minimal);
s->setValue(QLatin1String(caseSensitiveKey), m_caseSensitive);
s->setValue(QLatin1String(patternKey), m_patterns);
s->setValue(QLatin1String(currentPatternKey), m_currentPattern);
s->setValue(QLatin1String(matchKey), m_matches);
s->setValue(QLatin1String(currentMatchKey), m_currentMatch);
s->endGroup();
}
} // namespace Internal
} // namespace Settings;
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** 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