summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-01-30 11:19:00 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-02-02 13:58:11 +0000
commited9c0c7630a7b4b5d4c866b83835edd6a6cee48c (patch)
tree7c232adf9bb9aeb0ee495e4851a8371af0f69d31 /tools
parentb2c2c27ffa0cac8f5fa8d76574155c9298694b8b (diff)
downloadqtactiveqt-ed9c0c7630a7b4b5d4c866b83835edd6a6cee48c.tar.gz
dumpcpp: Remove unused code.
Remove function generateClass() and unused variable castType. Change-Id: Iefbb5405e64491b9a9580128c2fa46161c074188 Task-number: QTBUG-41130 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/dumpcpp/main.cpp100
1 files changed, 0 insertions, 100 deletions
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index ff2ca64..6c74cd5 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -276,7 +276,6 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
}
QByteArray propertyType(property.typeName());
- QByteArray castType(propertyType);
QByteArray simplePropType = propertyType;
simplePropType.replace('*', "");
@@ -880,105 +879,6 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
out << '}' << endl;
}
-bool generateClass(QAxObject *object, const QByteArray &className, const QByteArray &nameSpace, const QByteArray &outname, ObjectCategory category)
-{
- IOleControl *control = 0;
- object->queryInterface(IID_IOleControl, (void**)&control);
- if (control) {
- category = ActiveX;
- control->Release();
- }
-
- const QMetaObject *mo = object->metaObject();
-
- if (!nameSpace.isEmpty() && !(category & NoDeclaration)) {
- QFile outfile(QString::fromLatin1(nameSpace.toLower().constData()) + QLatin1String(".h"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "/****************************************************************************" << endl;
- out << "**" << endl;
- out << "** Namespace " << nameSpace << " generated by dumpcpp" << endl;
- out << "**" << endl;
- out << "****************************************************************************/" << endl;
- out << endl;
-
- writeHeader(out, nameSpace, outfile.fileName());
- generateNameSpace(out, mo, nameSpace);
-
- // close namespace file
- out << "};" << endl;
- out << endl;
-
- out << "#endif" << endl;
- out << endl;
- }
-
- if (!(category & NoDeclaration)) {
- QFile outfile(QString::fromLatin1(outname.constData()) + QLatin1String(".h"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "/****************************************************************************" << endl;
- out << "**" << endl;
- out << "** Class declaration generated by dumpcpp" << endl;
- out << "**" << endl;
- out << "****************************************************************************/" << endl;
- out << endl;
-
- out << "#include <qdatetime.h>" << endl;
- if (category & ActiveX)
- out << "#include <qaxwidget.h>" << endl;
- else
- out << "#include <qaxobject.h>" << endl;
- out << endl;
-
- out << "struct IDispatch;" << endl,
- out << endl;
-
- if (!nameSpace.isEmpty()) {
- out << "#include \"" << nameSpace.toLower() << ".h\"" << endl;
- out << endl;
- out << "namespace " << nameSpace << " {" << endl;
- }
-
- generateClassDecl(out, object->control(), mo, className, nameSpace, category);
-
- if (!nameSpace.isEmpty()) {
- out << endl;
- out << "};" << endl;
- }
- }
-
- if (!(category & (NoMetaObject|NoImplementation))) {
- QFile outfile(QString::fromLatin1(outname.constData()) + QLatin1String(".cpp"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "#include <qmetaobject.h>" << endl;
- out << "#include \"" << outname << ".h\"" << endl;
- out << endl;
-
- if (!nameSpace.isEmpty()) {
- out << "using namespace " << nameSpace << ';' << endl;
- out << endl;
- }
-
- generateClassImpl(out, mo, className, nameSpace, category);
- }
-
- return true;
-}
-
bool generateTypeLibrary(QString typeLibFile, QString outname,
const QString &nameSpace, ObjectCategory category)
{