Commit a6ca3486 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

remove trailing whitespace

doing it in 1.3 as well to avoid possible later conflicts
parent 07da7ccf
...@@ -215,8 +215,8 @@ ...@@ -215,8 +215,8 @@
\snippet examples/addressbook-sdk/part1/main.cpp main function \snippet examples/addressbook-sdk/part1/main.cpp main function
The code constructs a new \c AddressBook widget on the stack and The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it. invokes its \l{QWidget::}{show()} function to display it.
However, the widget will not be shown until the application's event However, the widget will not be shown until the application's event
loop is started. This is done by calling the application's loop is started. This is done by calling the application's
\l{QApplication::}{exec()} function. Finally, the result returned by \l{QApplication::}{exec()} function. Finally, the result returned by
......
...@@ -32,8 +32,8 @@ that you: ...@@ -32,8 +32,8 @@ that you:
the case that you have better ideas, discuss them with other developers the case that you have better ideas, discuss them with other developers
before writing the code. before writing the code.
\o Take advantage of Qt. Don't re-invent the wheel. Think about what parts \o Take advantage of Qt. Don't re-invent the wheel. Think about what parts
of your code are generic enough that they might be incorporated into of your code are generic enough that they might be incorporated into
Qt proper. Qt proper.
\o Document interfaces. Right now we use qdoc, but changing to doxygen \o Document interfaces. Right now we use qdoc, but changing to doxygen
is being considered. is being considered.
\endlist \endlist
...@@ -108,7 +108,7 @@ in C++. ...@@ -108,7 +108,7 @@ in C++.
\endcode \endcode
\o Using Qt's foreach is ok in non-time critical code when using a QTL \o Using Qt's foreach is ok in non-time critical code when using a QTL
container. It is a nice way to keep line noise down and to give the container. It is a nice way to keep line noise down and to give the
loop variable a proper name: loop variable a proper name:
...@@ -122,14 +122,14 @@ in C++. ...@@ -122,14 +122,14 @@ in C++.
for (Container::iterator it = container.begin(); it != end; ++it) for (Container::iterator it = container.begin(); it != end; ++it)
doSomething(*it); doSomething(*it);
\endcode \endcode
If the loop variable can be made const, do so. This can prevent If the loop variable can be made const, do so. This can prevent
unnecessary detaching of shared data in some cases. So: unnecessary detaching of shared data in some cases. So:
\code \code
foreach (const QString &name, someListOfNames) foreach (const QString &name, someListOfNames)
doSomething(name); doSomething(name);
- NOT - - NOT -
foreach (QString name, someListOfNames) foreach (QString name, someListOfNames)
...@@ -157,7 +157,7 @@ Only one declaration on each line. ...@@ -157,7 +157,7 @@ Only one declaration on each line.
-NOT- -NOT-
QString a = "Joe", b = "Foo"; // not used in Qt Creator QString a = "Joe", b = "Foo"; // not used in Qt Creator
\endcode \endcode
[Note that 'QString a = "Joe"' is formally calling a copy constructor [Note that 'QString a = "Joe"' is formally calling a copy constructor
on a temporary constructed from a string literal and therefore has the on a temporary constructed from a string literal and therefore has the
potential of being more expensive then direct construction by potential of being more expensive then direct construction by
'QString a("joe")'. However the compiler is allowed to elide the copy 'QString a("joe")'. However the compiler is allowed to elide the copy
...@@ -166,7 +166,7 @@ Only one declaration on each line. ...@@ -166,7 +166,7 @@ Only one declaration on each line.
line with the traditional C-style initialization, _and_ cannot be line with the traditional C-style initialization, _and_ cannot be
mistaken as function declaration, _and_ reduces the level of nested mistaken as function declaration, _and_ reduces the level of nested
parantheses in more initializations.] parantheses in more initializations.]
\section2 Pointers and references \section2 Pointers and references
...@@ -439,7 +439,7 @@ Line breaks ...@@ -439,7 +439,7 @@ Line breaks
\section2 File headers \section2 File headers
If you create a new file, the top of the file should include a If you create a new file, the top of the file should include a
header comment equal to the one found in other source files of Qt Creator. header comment equal to the one found in other source files of Qt Creator.
\section2 Include order \section2 Include order
...@@ -474,7 +474,7 @@ Line breaks ...@@ -474,7 +474,7 @@ Line breaks
You document for the other developers, not for yourself. You document for the other developers, not for yourself.
In the header you should document interfaces, i.e. what the function does, In the header you should document interfaces, i.e. what the function does,
not the implementation. not the implementation.
In the .cpp files you document the implementation if the implementation In the .cpp files you document the implementation if the implementation
in non-obvious. in non-obvious.
......
...@@ -83,5 +83,5 @@ exit 0 ...@@ -83,5 +83,5 @@ exit 0
## Properly close subshell ## Properly close subshell
) )
exit $? exit $?
...@@ -54,5 +54,5 @@ exit 0 ...@@ -54,5 +54,5 @@ exit 0
## Properly close subshell ## Properly close subshell
) )
exit $? exit $?
...@@ -1075,7 +1075,7 @@ static void qDumpQAbstractItem(QDumper &d) ...@@ -1075,7 +1075,7 @@ static void qDumpQAbstractItem(QDumper &d)
{ {
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi); ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
mm->r = mm->c = 0; mm->r = mm->c = 0;
mm->p = mm->m = 0; mm->p = mm->m = 0;
static const char *printFormat = sizeof(void *) == sizeof(long) ? static const char *printFormat = sizeof(void *) == sizeof(long) ?
"%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx"; "%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx";
sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m); sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m);
...@@ -2147,7 +2147,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value, ...@@ -2147,7 +2147,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
case QVariant::KeySequence: case QVariant::KeySequence:
#ifndef QT_NO_SHORTCUT #ifndef QT_NO_SHORTCUT
*value = qvariant_cast<QKeySequence>(*v).toString(); *value = qvariant_cast<QKeySequence>(*v).toString();
#else #else
*value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT"); *value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT");
#endif #endif
break; break;
...@@ -2800,7 +2800,7 @@ static void qDumpQSharedPointer(QDumper &d) ...@@ -2800,7 +2800,7 @@ static void qDumpQSharedPointer(QDumper &d)
const QSharedPointer<int> &ptr = const QSharedPointer<int> &ptr =
*reinterpret_cast<const QSharedPointer<int> *>(d.data); *reinterpret_cast<const QSharedPointer<int> *>(d.data);
if (ptr.isNull()) { if (ptr.isNull()) {
d.putItem("value", "<null>"); d.putItem("value", "<null>");
d.putItem("valueeditable", "false"); d.putItem("valueeditable", "false");
d.putItem("numchild", 0); d.putItem("numchild", 0);
...@@ -3743,9 +3743,9 @@ static inline void dumpSizes(QDumper &d) ...@@ -3743,9 +3743,9 @@ static inline void dumpSizes(QDumper &d)
const SizeMap::const_iterator cend = sizeMap.constEnd(); const SizeMap::const_iterator cend = sizeMap.constEnd();
for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) { for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) {
// new size list // new size list
if (it.key() != lastSize) { if (it.key() != lastSize) {
if (lastSize) if (lastSize)
d.put("],"); d.put("],");
d.put("[\""); d.put("[\"");
d.put(it.key()); d.put(it.key());
lastSize = it.key(); lastSize = it.key();
...@@ -3755,7 +3755,7 @@ static inline void dumpSizes(QDumper &d) ...@@ -3755,7 +3755,7 @@ static inline void dumpSizes(QDumper &d)
d.put(it.value()); d.put(it.value());
d.put('"'); d.put('"');
} }
d.put("]]"); d.put("]]");
} }
extern "C" Q_DECL_EXPORT extern "C" Q_DECL_EXPORT
......
TEMPLATE = lib TEMPLATE = lib
CONFIG += shared CONFIG += shared
linux-* { linux-* {
CONFIG -= release CONFIG -= release
CONFIG += debug CONFIG += debug
} }
SOURCES = gdbmacros.cpp SOURCES = gdbmacros.cpp
false { false {
DEFINES += USE_QT_GUI=0 DEFINES += USE_QT_GUI=0
QT = core QT = core
} }
else { else {
DEFINES += USE_QT_GUI=1 DEFINES += USE_QT_GUI=1
QT = core \ QT = core \
gui gui
......
...@@ -245,7 +245,7 @@ static int dumpQMapQStringString() ...@@ -245,7 +245,7 @@ static int dumpQMapQStringString()
test.insert(QLatin1String("42s"), QLatin1String("fortytwo")); test.insert(QLatin1String("42s"), QLatin1String("fortytwo"));
test.insert(QLatin1String("423"), QLatin1String("fortytree")); test.insert(QLatin1String("423"), QLatin1String("fortytree"));
} }
prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString"); prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString");
qDumpObjectData440(2, 42, testAddress(&test), 1, sizeof(QString), sizeof(QString), sizeof(mapNode), valueOffset); qDumpObjectData440(2, 42, testAddress(&test), 1, sizeof(QString), sizeof(QString), sizeof(mapNode), valueOffset);
fputs(qDumpOutBuffer, stdout); fputs(qDumpOutBuffer, stdout);
fputc('\n', stdout); fputc('\n', stdout);
...@@ -451,7 +451,7 @@ static int dumpStdQStringSet() ...@@ -451,7 +451,7 @@ static int dumpStdQStringSet()
static int dumpStdMapIntString() static int dumpStdMapIntString()
{ {
std::map<int,std::string> test; std::map<int,std::string> test;
std::map<int,std::string>::value_type entry(42, std::string("fortytwo")); std::map<int,std::string>::value_type entry(42, std::string("fortytwo"));
if (!optEmptyContainers) { if (!optEmptyContainers) {
test.insert(entry); test.insert(entry);
......
...@@ -62,10 +62,10 @@ using namespace CPlusPlus; ...@@ -62,10 +62,10 @@ using namespace CPlusPlus;
/*! /*!
\fn void Client::startExpandingMacro(unsigned offset, const Macro &macro, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>()) \fn void Client::startExpandingMacro(unsigned offset, const Macro &macro, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>())
Called when starting to expand a macro. The parameter \a inCondition indicates whether the Called when starting to expand a macro. The parameter \a inCondition indicates whether the
expansion is happening inside a preprocessor conditional. expansion is happening inside a preprocessor conditional.
\sa stopExpandingMacro() \sa stopExpandingMacro()
*/ */
......
...@@ -477,7 +477,7 @@ bool ResolveExpression::visit(CallAST *ast) ...@@ -477,7 +477,7 @@ bool ResolveExpression::visit(CallAST *ast)
} }
} }
} else if (Function *funTy = ty->asFunctionType()) { } else if (Function *funTy = ty->asFunctionType()) {
if (maybeValidPrototype(funTy, actualArgumentCount)) if (maybeValidPrototype(funTy, actualArgumentCount))
addResult(funTy->returnType().simplified(), lastVisibleSymbol); addResult(funTy->returnType().simplified(), lastVisibleSymbol);
...@@ -601,7 +601,7 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a ...@@ -601,7 +601,7 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp); Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp);
const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context); const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context);
foreach (Symbol *classObject, candidates) { foreach (Symbol *classObject, candidates) {
const QList<Result> overloads = resolveMember(arrowAccessOp, classObject->asClass(), const QList<Result> overloads = resolveMember(arrowAccessOp, classObject->asClass(),
namedTy->name()); namedTy->name());
...@@ -715,16 +715,16 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass, ...@@ -715,16 +715,16 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
foreach (Symbol *candidate, candidates) { foreach (Symbol *candidate, candidates) {
FullySpecifiedType ty = candidate->type(); FullySpecifiedType ty = candidate->type();
Name *unqualifiedNameId = className; Name *unqualifiedNameId = className;
if (QualifiedNameId *q = className->asQualifiedNameId()) if (QualifiedNameId *q = className->asQualifiedNameId())
unqualifiedNameId = q->unqualifiedNameId(); unqualifiedNameId = q->unqualifiedNameId();
if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) { if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
GenTemplateInstance::Substitution subst; GenTemplateInstance::Substitution subst;
for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) { for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
FullySpecifiedType templArgTy = templId->templateArgumentAt(i); FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
if (i < klass->templateParameterCount()) { if (i < klass->templateParameterCount()) {
Name *templArgName = klass->templateParameterAt(i)->name(); Name *templArgName = klass->templateParameterAt(i)->name();
if (templArgName && templArgName->identifier()) { if (templArgName && templArgName->identifier()) {
...@@ -733,11 +733,11 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass, ...@@ -733,11 +733,11 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
} }
} }
} }
GenTemplateInstance inst(_context, subst); GenTemplateInstance inst(_context, subst);
ty = inst(candidate); ty = inst(candidate);
} }
results.append(Result(ty, candidate)); results.append(Result(ty, candidate));
} }
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
QMap<QString, QString> *foundAppOptions, QMap<QString, QString> *foundAppOptions,
QString *errorString, QString *errorString,
PluginManagerPrivate *pmPrivate); PluginManagerPrivate *pmPrivate);
bool parse(); bool parse();
static const char *NO_LOAD_OPTION; static const char *NO_LOAD_OPTION;
...@@ -63,13 +63,13 @@ private: ...@@ -63,13 +63,13 @@ private:
enum TokenType { OptionalToken, RequiredToken }; enum TokenType { OptionalToken, RequiredToken };
bool nextToken(TokenType type = OptionalToken); bool nextToken(TokenType type = OptionalToken);
const QStringList &m_args; const QStringList &m_args;
const QMap<QString, bool> &m_appOptions; const QMap<QString, bool> &m_appOptions;
QMap<QString, QString> *m_foundAppOptions; QMap<QString, QString> *m_foundAppOptions;
QString *m_errorString; QString *m_errorString;
PluginManagerPrivate *m_pmPrivate; PluginManagerPrivate *m_pmPrivate;
// state // state
QString m_currentArg; QString m_currentArg;
QStringList::const_iterator m_it; QStringList::const_iterator m_it;
......
...@@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget ...@@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget
public: public:
PluginDetailsView(QWidget *parent = 0); PluginDetailsView(QWidget *parent = 0);
~PluginDetailsView(); ~PluginDetailsView();
void update(PluginSpec *spec); void update(PluginSpec *spec);
private: private:
......
...@@ -328,12 +328,12 @@ QList<PluginSpec *> PluginManager::plugins() const ...@@ -328,12 +328,12 @@ QList<PluginSpec *> PluginManager::plugins() const
The caller (the application) may register itself for options via the \a appOptions list, containing pairs The caller (the application) may register itself for options via the \a appOptions list, containing pairs
of "option string" and a bool that indicates if the option requires an argument. of "option string" and a bool that indicates if the option requires an argument.
Application options always override any plugin's options. Application options always override any plugin's options.
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found. \a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
The command line options that were not processed can be retrieved via the arguments() method. The command line options that were not processed can be retrieved via the arguments() method.
If an error occurred (like missing argument for an option that requires one), \a errorString contains If an error occurred (like missing argument for an option that requires one), \a errorString contains
a descriptive message of the error. a descriptive message of the error.
Returns if there was an error. Returns if there was an error.
*/ */
bool PluginManager::parseOptions(const QStringList &args, bool PluginManager::parseOptions(const QStringList &args,
......
...@@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*); ...@@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*);
given plugin \a manager with a given \a parent widget. given plugin \a manager with a given \a parent widget.
*/ */
PluginView::PluginView(PluginManager *manager, QWidget *parent) PluginView::PluginView(PluginManager *manager, QWidget *parent)
: QWidget(parent), : QWidget(parent),
m_ui(new Internal::Ui::PluginView), m_ui(new Internal::Ui::PluginView),
p(new Internal::PluginViewPrivate) p(new Internal::PluginViewPrivate)
{ {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <windows.h> #include <windows.h>
namespace Utils { namespace Utils {
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env) QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
{ {
......
...@@ -55,7 +55,7 @@ using namespace Utils; ...@@ -55,7 +55,7 @@ using namespace Utils;
/*! /*!
\class Utils::SavedAction \class Utils::SavedAction
\brief The SavedAction class is a helper class for actions with persistent \brief The SavedAction class is a helper class for actions with persistent
state. state.
...@@ -233,7 +233,7 @@ QAction *SavedAction::updatedAction(const QString &text0) ...@@ -233,7 +233,7 @@ QAction *SavedAction::updatedAction(const QString &text0)
} }
/* /*
Uses \c settingsGroup() and \c settingsKey() to restore the Uses \c settingsGroup() and \c settingsKey() to restore the
item from \a settings, item from \a settings,
\sa settingsKey(), settingsGroup(), writeSettings() \sa settingsKey(), settingsGroup(), writeSettings()
...@@ -254,7 +254,7 @@ void SavedAction::readSettings(QSettings *settings) ...@@ -254,7 +254,7 @@ void SavedAction::readSettings(QSettings *settings)
} }
/* /*
Uses \c settingsGroup() and \c settingsKey() to write the Uses \c settingsGroup() and \c settingsKey() to write the
item to \a settings, item to \a settings,
\sa settingsKey(), settingsGroup(), readSettings() \sa settingsKey(), settingsGroup(), readSettings()
...@@ -268,12 +268,12 @@ void SavedAction::writeSettings(QSettings *settings) ...@@ -268,12 +268,12 @@ void SavedAction::writeSettings(QSettings *settings)
//qDebug() << "WRITING: " << m_settingsKey << " -> " << toString(); //qDebug() << "WRITING: " << m_settingsKey << " -> " << toString();
settings->endGroup();