Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

This commit is contained in:
hjk
2009-01-06 16:05:05 +01:00
7 changed files with 105 additions and 34 deletions

View File

@@ -3,7 +3,28 @@
\title Qt Creator \title Qt Creator
Qt Creator is Qt Software's crossplatform IDE. The core of Qt Creator is Qt Creator is Qt Software's crossplatform IDE. The core of Qt Creator is
basically only a \l{Plugin Loader Framework}{plugin loader}. basically only a \l{ExtensionSystem}{plugin loader}.
\section1 Core Libraries
There are a few core libraries used by many parts of Qt Creator.
\table
\header
\o Library Name
\o Description
\row
\o \l{Aggregation}{Aggregation}
\o Adds functionality for "glueing" QObjects of different
types together, so you can "cast" between them.
\row
\o \l{ExtensionSystem}{ExtensionSystem}
\o Implements the plugin loader framework. Provides a base class for plugins and
basic mechanisms for plugin interaction like an object pool.
\endtable
\section1 Plugins \section1 Plugins
@@ -18,46 +39,42 @@
\o Description \o Description
\row \row
\o \l{Core Plugin} {Core} \o \l{Core} {Core}
\o The core plugin. Provides the main window and managers for editors, \o The core plugin. Provides the main window and managers for editors,
actions, mode windows and files, just to mention the most important ones. actions, mode windows and files, just to mention the most important ones.
\endtable \endtable
*/ */
/*! /*!
\page classes.html \page classes.html
\title Qt Creator Classes and Namespaces \title Qt Creator Classes
\section1 Classes
\generatelist classes \generatelist classes
\section1 Namespaces
\generatelist{namespaces}
*/ */
/*! /*!
\page interfaces.html \page namespaces.html
\title Interfaces \title Qt Creator Namespaces
\generatelist namespaces
*/
/*!
\page mainclasses.html
\title Qt Creator Main Classes
\generatelist mainclasses \generatelist mainclasses
*/ */
/*! /*!
\page functions.html \page functions.html
\title Member Function Index \title Qt Creator Functions
\generatelist functionindex \generatelist functionindex
*/ */
/*!
\group pluginloader
\title Plugin Loader Framework
*/
/*! /*!
\group qtc \group qtc

View File

@@ -4,11 +4,13 @@ description = Qt Creator API Documentation
language = Cpp language = Cpp
headerdirs = . \ headerdirs = . \
../../src/libs/aggregation \
../../src/libs/extensionsystem \ ../../src/libs/extensionsystem \
../../src/plugins/core \ ../../src/plugins/core \
../../src/plugins/core/actionmanager ../../src/plugins/core/actionmanager
sourcedirs = . \ sourcedirs = . \
../../src/libs/aggregation \
../../src/libs/extensionsystem \ ../../src/libs/extensionsystem \
../../src/plugins/core \ ../../src/plugins/core \
../../src/plugins/core/actionmanager ../../src/plugins/core/actionmanager
@@ -20,8 +22,8 @@ imagedirs = .
indexes = $QTDIR/doc/html/qt.index indexes = $QTDIR/doc/html/qt.index
outputdir = ./html-api outputdir = ./html
base = file:./html-api base = file:./html
versionsym = 0.9.2 versionsym = 0.9.2
codeindent = 1 codeindent = 1

View File

@@ -37,12 +37,12 @@
/*! /*!
\namespace Aggregation \namespace Aggregation
\brief Contains support for bundling related components, such that \brief The Aggregation namespace contains support for bundling related components,
each component exposes the properties and behavior of the such that each component exposes the properties and behavior of the
other components to the outside. other components to the outside.
Components that are bundled to an Aggregate can be "cast" to each other Components that are bundled to an Aggregate can be "cast" to each other
and have a coupled life cycle. See the documentation of Aggregate for and have a coupled life cycle. See the documentation of Aggregation::Aggregate for
details and examples. details and examples.
*/ */

View File

@@ -38,6 +38,7 @@
/*! /*!
\class ExtensionSystem::IPlugin \class ExtensionSystem::IPlugin
\mainclass
\brief Base class for all plugins. \brief Base class for all plugins.
The IPlugin class is an abstract class that must be implemented The IPlugin class is an abstract class that must be implemented

View File

@@ -147,9 +147,11 @@ void CurrentDocumentFind::updateCurrentFindFilter(QWidget *old, QWidget *now)
if (!impl) if (!impl)
candidate = candidate->parentWidget(); candidate = candidate->parentWidget();
} }
if (!impl) if (!impl || impl == m_currentFind)
return; return;
removeFindSupportConnections(); removeFindSupportConnections();
if (m_currentFind)
m_currentFind->highlightAll(QString(), 0);
m_currentWidget = candidate; m_currentWidget = candidate;
m_currentFind = impl; m_currentFind = impl;
if (m_currentFind) { if (m_currentFind) {

View File

@@ -566,7 +566,6 @@ QStringList Qt4Project::files(FilesMode fileMode) const
if (fileMode == AllFiles) if (fileMode == AllFiles)
files += m_projectFiles->generatedFiles[i]; files += m_projectFiles->generatedFiles[i];
} }
files += m_projectFiles->proFiles;
return files; return files;
} }

View File

@@ -37,13 +37,19 @@
#include <Scope.h> #include <Scope.h>
#include <Semantic.h> #include <Semantic.h>
#include <TranslationUnit.h> #include <TranslationUnit.h>
#include <PrettyPrinter.h>
#include <QtCore/QFile> #include <QFile>
#include <QtCore/QList> #include <QList>
#include <QCoreApplication>
#include <QStringList>
#include <QFileInfo>
#include <QtDebug> #include <QtDebug>
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <iostream>
#include <sstream>
class Rewrite class Rewrite
{ {
@@ -189,10 +195,50 @@ protected:
return false; return false;
} }
virtual bool visit(CppCastExpressionAST *ast) {
// Replace the C++ cast expression (e.g. static_cast<foo>(a)) with
// the one generated by the pretty printer.
std::ostringstream o;
PrettyPrinter pp(control(), o);
pp(ast);
remove(ast->firstToken(), ast->lastToken());
const std::string str = o.str();
insertTextBefore(ast->firstToken(), str.c_str());
insertTextBefore(ast->firstToken(), "/* #REF# beautiful cast */ ");
return false;
}
}; };
int main(int, char *[]) int main(int argc, char *argv[])
{ {
QCoreApplication app(argc, argv);
QStringList args = app.arguments();
const QString appName = args.first();
args.removeFirst();
bool test_rewriter = false;
bool test_pretty_printer = false;
foreach (QString arg, args) {
if (arg == QLatin1String("--test-rewriter"))
test_rewriter = true;
else if (arg == QLatin1String("--test-pretty-printer"))
test_pretty_printer = true;
else if (arg == QLatin1String("--help")) {
const QFileInfo appInfo(appName);
const QByteArray appFileName = QFile::encodeName(appInfo.fileName());
printf("Usage: %s [options]\n"
" --help Display ths information\n"
" --test-rewriter Test the tree rewriter\n"
" --test-pretty-printer Test the pretty printer\n",
appFileName.constData());
return EXIT_SUCCESS;
}
}
QFile in; QFile in;
if (! in.open(stdin, QFile::ReadOnly)) if (! in.open(stdin, QFile::ReadOnly))
return EXIT_FAILURE; return EXIT_FAILURE;
@@ -217,10 +263,14 @@ int main(int, char *[])
} }
// test the rewriter // test the rewriter
QByteArray out; if (test_rewriter) {
SimpleRefactor refactor(&control); QByteArray out;
refactor(&unit, source, &out); SimpleRefactor refactor(&control);
printf("%s\n", out.constData()); refactor(&unit, source, &out);
printf("%s\n", out.constData());
} else if (test_pretty_printer) {
PrettyPrinter pp(&control, std::cout);
pp(unit.ast());
}
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }