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 @@
\snippet examples/addressbook-sdk/part1/main.cpp main function
The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it.
The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it.
However, the widget will not be shown until the application's event
loop is started. This is done by calling the application's
\l{QApplication::}{exec()} function. Finally, the result returned by
......
......@@ -32,8 +32,8 @@ that you:
the case that you have better ideas, discuss them with other developers
before writing the code.
\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
Qt proper.
of your code are generic enough that they might be incorporated into
Qt proper.
\o Document interfaces. Right now we use qdoc, but changing to doxygen
is being considered.
\endlist
......@@ -108,7 +108,7 @@ in C++.
\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
loop variable a proper name:
......@@ -122,14 +122,14 @@ in C++.
for (Container::iterator it = container.begin(); it != end; ++it)
doSomething(*it);
\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:
\code
foreach (const QString &name, someListOfNames)
doSomething(name);
- NOT -
foreach (QString name, someListOfNames)
......@@ -157,7 +157,7 @@ Only one declaration on each line.
-NOT-
QString a = "Joe", b = "Foo"; // not used in Qt Creator
\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
potential of being more expensive then direct construction by
'QString a("joe")'. However the compiler is allowed to elide the copy
......@@ -166,7 +166,7 @@ Only one declaration on each line.
line with the traditional C-style initialization, _and_ cannot be
mistaken as function declaration, _and_ reduces the level of nested
parantheses in more initializations.]
\section2 Pointers and references
......@@ -439,7 +439,7 @@ Line breaks
\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.
\section2 Include order
......@@ -474,7 +474,7 @@ Line breaks
You document for the other developers, not for yourself.
In the header you should document interfaces, i.e. what the function does,
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.
......
......@@ -83,5 +83,5 @@ exit 0
## Properly close subshell
)
)
exit $?
......@@ -54,5 +54,5 @@ exit 0
## Properly close subshell
)
)
exit $?
......@@ -1075,7 +1075,7 @@ static void qDumpQAbstractItem(QDumper &d)
{
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
mm->r = mm->c = 0;
mm->p = mm->m = 0;
mm->p = mm->m = 0;
static const char *printFormat = sizeof(void *) == sizeof(long) ?
"%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);
......@@ -2147,7 +2147,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
case QVariant::KeySequence:
#ifndef QT_NO_SHORTCUT
*value = qvariant_cast<QKeySequence>(*v).toString();
#else
#else
*value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT");
#endif
break;
......@@ -2800,7 +2800,7 @@ static void qDumpQSharedPointer(QDumper &d)
const QSharedPointer<int> &ptr =
*reinterpret_cast<const QSharedPointer<int> *>(d.data);
if (ptr.isNull()) {
if (ptr.isNull()) {
d.putItem("value", "<null>");
d.putItem("valueeditable", "false");
d.putItem("numchild", 0);
......@@ -3743,9 +3743,9 @@ static inline void dumpSizes(QDumper &d)
const SizeMap::const_iterator cend = sizeMap.constEnd();
for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) {
// new size list
if (it.key() != lastSize) {
if (it.key() != lastSize) {
if (lastSize)
d.put("],");
d.put("],");
d.put("[\"");
d.put(it.key());
lastSize = it.key();
......@@ -3755,7 +3755,7 @@ static inline void dumpSizes(QDumper &d)
d.put(it.value());
d.put('"');
}
d.put("]]");
d.put("]]");
}
extern "C" Q_DECL_EXPORT
......
TEMPLATE = lib
CONFIG += shared
linux-* {
linux-* {
CONFIG -= release
CONFIG += debug
}
SOURCES = gdbmacros.cpp
false {
false {
DEFINES += USE_QT_GUI=0
QT = core
}
else {
else {
DEFINES += USE_QT_GUI=1
QT = core \
gui
......
......@@ -245,7 +245,7 @@ static int dumpQMapQStringString()
test.insert(QLatin1String("42s"), QLatin1String("fortytwo"));
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);
fputs(qDumpOutBuffer, stdout);
fputc('\n', stdout);
......@@ -451,7 +451,7 @@ static int dumpStdQStringSet()
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"));
if (!optEmptyContainers) {
test.insert(entry);
......
......@@ -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>())
Called when starting to expand a macro. The parameter \a inCondition indicates whether the
expansion is happening inside a preprocessor conditional.
\sa stopExpandingMacro()
*/
......
......@@ -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))
addResult(funTy->returnType().simplified(), lastVisibleSymbol);
......@@ -601,7 +601,7 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp);
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(),
namedTy->name());
......@@ -715,16 +715,16 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
foreach (Symbol *candidate, candidates) {
FullySpecifiedType ty = candidate->type();
Name *unqualifiedNameId = className;
if (QualifiedNameId *q = className->asQualifiedNameId())
unqualifiedNameId = q->unqualifiedNameId();
if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
GenTemplateInstance::Substitution subst;
for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
if (i < klass->templateParameterCount()) {
Name *templArgName = klass->templateParameterAt(i)->name();
if (templArgName && templArgName->identifier()) {
......@@ -733,11 +733,11 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
}
}
}
GenTemplateInstance inst(_context, subst);
ty = inst(candidate);
}
results.append(Result(ty, candidate));
}
......
......@@ -46,7 +46,7 @@ public:
QMap<QString, QString> *foundAppOptions,
QString *errorString,
PluginManagerPrivate *pmPrivate);
bool parse();
static const char *NO_LOAD_OPTION;
......@@ -63,13 +63,13 @@ private:
enum TokenType { OptionalToken, RequiredToken };
bool nextToken(TokenType type = OptionalToken);
const QStringList &m_args;
const QMap<QString, bool> &m_appOptions;
QMap<QString, QString> *m_foundAppOptions;
QString *m_errorString;
PluginManagerPrivate *m_pmPrivate;
// state
QString m_currentArg;
QStringList::const_iterator m_it;
......
......@@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget
public:
PluginDetailsView(QWidget *parent = 0);
~PluginDetailsView();
void update(PluginSpec *spec);
private:
......
......@@ -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
of "option string" and a bool that indicates if the option requires an argument.
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.
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
a descriptive message of the error.
Returns if there was an error.
*/
bool PluginManager::parseOptions(const QStringList &args,
......
......@@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*);
given plugin \a manager with a given \a parent widget.
*/
PluginView::PluginView(PluginManager *manager, QWidget *parent)
: QWidget(parent),
: QWidget(parent),
m_ui(new Internal::Ui::PluginView),
p(new Internal::PluginViewPrivate)
{
......
......@@ -31,7 +31,7 @@
#include <windows.h>
namespace Utils {
namespace Utils {
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
{
......
......@@ -55,7 +55,7 @@ using namespace Utils;
/*!
\class Utils::SavedAction
\brief The SavedAction class is a helper class for actions with persistent
state.
......@@ -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,
\sa settingsKey(), settingsGroup(), writeSettings()
......@@ -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,
\sa settingsKey(), settingsGroup(), readSettings()
......@@ -268,12 +268,12 @@ void SavedAction::writeSettings(QSettings *settings)
//qDebug() << "WRITING: " << m_settingsKey << " -> " << toString();
settings->endGroup();
}
/*
A \c SavedAction can be connected to a widget, typically a
checkbox, radiobutton, or a lineedit in some configuration dialog.
The widget will retrieve its contents from the SavedAction's
The widget will retrieve its contents from the SavedAction's
value, and - depending on the \a ApplyMode - either write
changes back immediately, or when \s SavedAction::apply()
is called explicitly.
......@@ -286,7 +286,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
qDebug() << "ALREADY CONNECTED: " << widget << m_widget << toString(); return);
m_widget = widget;
m_applyMode = applyMode;
if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget)) {
if (button->isCheckable()) {
button->setChecked(m_value.toBool());
......@@ -298,14 +298,14 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
}
} else if (QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget)) {
spinBox->setValue(m_value.toInt());
//qDebug() << "SETTING VALUE" << spinBox->value();
//qDebug() << "SETTING VALUE" << spinBox->value();
connect(spinBox, SIGNAL(valueChanged(int)),
this, SLOT(spinBoxValueChanged(int)));
connect(spinBox, SIGNAL(valueChanged(QString)),
this, SLOT(spinBoxValueChanged(QString)));
} else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) {
lineEdit->setText(m_value.toString());
//qDebug() << "SETTING TEXT" << lineEdit->text();
//qDebug() << "SETTING TEXT" << lineEdit->text();
connect(lineEdit, SIGNAL(editingFinished()),
this, SLOT(lineEditEditingFinished()));
} else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(widget)) {
......
......@@ -72,7 +72,7 @@ public:
virtual void readSettings(QSettings *settings);
Q_SLOT virtual void writeSettings(QSettings *settings);
virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply);
virtual void disconnectWidget();
Q_SLOT virtual void apply(QSettings *settings);
......
......@@ -236,7 +236,7 @@ static QString wrappedText(const QTextEdit *e)
const QChar newLine = QLatin1Char('\n');
QString rc;
QTextCursor cursor(e->document());
cursor.movePosition(QTextCursor::Start);
cursor.movePosition(QTextCursor::Start);
while (!cursor.atEnd()) {
cursor.select(QTextCursor::LineUnderCursor);
rc += cursor.selectedText();
......@@ -272,7 +272,7 @@ void SubmitEditorWidget::setLineWrap(bool v)
qDebug() << Q_FUNC_INFO << v;
if (v) {
m_d->m_ui.description->setLineWrapColumnOrWidth(m_d->m_lineWidth);
m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth);
} else {
m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap);
}
......@@ -488,7 +488,7 @@ void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction
void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
{
QMenu *menu = m_d->m_ui.description->createStandardContextMenu();
QMenu *menu = m_d->m_ui.description->createStandardContextMenu();
// Extend
foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, m_d->descriptionEditContextMenuActions) {
if (a.second) {
......
......@@ -104,7 +104,7 @@ void FieldEntry::deleteGuiLater()
clearButton->deleteLater();
browseButton->deleteLater();
toolBar->deleteLater();
lineEdit->deleteLater();
lineEdit->deleteLater();
combo->deleteLater();
layout->deleteLater();
}
......@@ -193,7 +193,7 @@ void SubmitFieldWidget::setFields(const QStringList & f)
{
// remove old fields
for (int i = m_d->fieldEntries.size() - 1 ; i >= 0 ; i--)
removeField(i);
removeField(i);
m_d->fields = f;
if (!f.empty())
......
......@@ -37,7 +37,7 @@ SOURCES += reloadpromptutils.cpp \
fancymainwindow.cpp \
detailsbutton.cpp \
detailswidget.cpp
win32 {
win32 {
SOURCES += abstractprocess_win.cpp \
consoleprocess_win.cpp \
winutils.cpp
......
......@@ -98,7 +98,7 @@ QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t,
if (!(*verQueryValueW)(data, TEXT("\\"), &versionInfo, &len)) {
*errorMessage = QString::fromLatin1("Unable to determine version string of %1: %2").arg(name, winErrorMessage(GetLastError()));
return QString();
}
}
QString rc;
switch (t) {
case WinDLLFileVersion:
......
......@@ -368,7 +368,7 @@ void CMakeRunPage::initializePage()
}
}
}
}
}
m_generatorComboBox->clear();
// Find out whether we have multiple msvc versions
QStringList msvcVersions = ProjectExplorer::ToolChain::availableMSVCVersions();
......@@ -412,7 +412,7 @@ void CMakeRunPage::runCMake()
generator = "-GCodeBlocks - NMake Makefiles";
m_cmakeWizard->setMsvcVersion(version);
}
}
}
}
#else // Q_OS_WIN
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
......
......@@ -51,7 +51,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_projectContext = uidm->uniqueIdentifier(CMakeProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
}
int CMakeManager::projectContext() const
......@@ -115,7 +115,7 @@ void CMakeManager::createXmlFile(QProcess *proc, const QStringList &arguments, c
proc->setProcessChannelMode(QProcess::MergedChannels);
proc->setEnvironment(env.toStringList());
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory;
proc->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator);
}
......
......@@ -20,6 +20,6 @@ SOURCES = cmakeproject.cpp \
cmakeopenprojectwizard.cpp \
cmakebuildenvironmentwidget.cpp
RESOURCES += cmakeproject.qrc
FORMS +=
FORMS +=
OTHER_FILES += CMakeProjectManager.pluginspec
......@@ -126,7 +126,7 @@ public:
protected:
void updateToolTipWithKeySequence();
QAction *m_action;
QList<CommandLocation> m_locations;
QString m_toolTip;
......
......@@ -40,7 +40,7 @@ namespace Core {
namespace Internal {
struct ShortcutItem;
class CommandsFile : public QObject
{
Q_OBJECT
......
......@@ -166,7 +166,7 @@ FORMS += dialogs/newdialog.ui \
generalsettings.ui
RESOURCES += core.qrc \
fancyactionbar.qrc
unix:!macx {
unix:!macx {
images.files = images/qtcreator_logo_*.png
images.path = /share/pixmaps
INSTALLS += images
......
......@@ -120,7 +120,7 @@ public:
const QString &contents = QString());
bool openExternalEditor(const QString &fileName, const QString &editorKind);
QStringList getOpenFileNames() const;
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
......
......@@ -170,7 +170,7 @@ public:
inline bool isView() const { return m_view != 0; }
inline bool isRoot() const { return m_isRoot; }
inline bool isSplitter() const { return m_splitter != 0; }
inline Core::IEditor *editor() const { return m_view ? m_view->currentEditor() : 0; }
inline QList<Core::IEditor *> editors() const { return m_view ? m_view->editors() : QList<Core::IEditor*>(); }
......
......@@ -26,7 +26,7 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef OPENEDITORSVIEW_H
#define OPENEDITORSVIEW_H
......
......@@ -284,7 +284,7 @@ public:
void mousePressEvent(QMouseEvent *ev)
{
if (ev->modifiers() & Qt::ShiftModifier)
if (ev->modifiers() & Qt::ShiftModifier)
Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent));
}
private:
......
......@@ -58,7 +58,7 @@ public:
virtual QString displayName() = 0;
virtual QKeySequence activationSequence();
// This design is not optimal, think about it again once we need to extend it
// It could be implemented as returning an object which has both the widget
// It could be implemented as returning an object which has both the widget
// and the docktoolbar widgets
// Similar to how IView
virtual NavigationView createWidget() = 0;
......
......@@ -138,7 +138,7 @@ static OutputPaneManager *m_instance = 0;
void OutputPaneManager::create()
{
m_instance = new OutputPaneManager;
m_instance = new OutputPaneManager;
}
void OutputPaneManager::destroy()
......
......@@ -37,13 +37,13 @@
#include <QtGui/QPainter>
#include <QtGui/QWidget>
/*
/*
* This is a set of helper classes to allow for widget animations in
* the style. Its mostly taken from Vista style so it should be fully documented
* there.
*
*/
class Animation
{
public :
......@@ -92,7 +92,7 @@ public:
void startAnimation(Animation *);
void stopAnimation(const QWidget *);
Animation* widgetAnimation(const QWidget *) const;
private:
QBasicTimer animationTimer;
QList <Animation*> animations;