Commit ec84dd05 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Fix indentation

Mostly 3 leading spaces converted to 4

A few other indentation issues

Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent cf1b82b1
......@@ -454,7 +454,7 @@ const Name *rewriteName(const Name *name,
static QString chopConst(QString type)
{
while (1) {
while (1) {
if (type.startsWith(QLatin1String("const")))
type = type.mid(5);
else if (type.startsWith(QLatin1Char(' ')))
......@@ -515,7 +515,7 @@ static inline QString fixNestedTemplates(QString s)
&& s.at(size - 1) == QLatin1Char('>')
&& s.at(size - 2) == QLatin1Char(' ')
&& s.at(size - 3) != QLatin1Char('>'))
s.remove(size - 2, 1);
s.remove(size - 2, 1);
return s;
}
......@@ -607,14 +607,14 @@ CPLUSPLUS_EXPORT QString simplifySTLType(const QString &typeIn)
const QString value = inner.mid(pos, inner.size() - pos - 1).trimmed();
const QString valueEsc = QRegExp::escape(value);
QRegExp mapRE1(QString::fromLatin1("map<%1, ?%2, ?std::less<%3 ?>, ?%4\\s*>")
.arg(keyEsc, valueEsc, keyEsc, allocEsc));
.arg(keyEsc, valueEsc, keyEsc, allocEsc));
mapRE1.setMinimal(true);
QTC_ASSERT(mapRE1.isValid(), return typeIn);
if (mapRE1.indexIn(type) != -1) {
type.replace(mapRE1.cap(0), QString::fromLatin1("map<%1, %2>").arg(key, value));
} else {
QRegExp mapRE2(QString::fromLatin1("map<const %1, ?%2, ?std::less<const %3>, ?%4\\s*>")
.arg(keyEsc, valueEsc, keyEsc, allocEsc));
.arg(keyEsc, valueEsc, keyEsc, allocEsc));
mapRE2.setMinimal(true);
if (mapRE2.indexIn(type) != -1)
type.replace(mapRE2.cap(0), QString::fromLatin1("map<const %1, %2>").arg(key, value));
......
......@@ -327,37 +327,37 @@ int numberOfClosedEditors = 0;
/// Check if previous line is a CppStyle Doxygen Comment
bool isPreviousLineCppStyleComment(const QTextCursor &cursor)
{
const QTextBlock &currentBlock = cursor.block();
if (!currentBlock.isValid())
return false;
const QTextBlock &currentBlock = cursor.block();
if (!currentBlock.isValid())
return false;
const QTextBlock &actual = currentBlock.previous();
if (!actual.isValid())
return false;
const QTextBlock &actual = currentBlock.previous();
if (!actual.isValid())
return false;
const QString text = actual.text().trimmed();
if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")))
return true;
const QString text = actual.text().trimmed();
if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")))
return true;
return false;
return false;
}
/// Check if next line is a CppStyle Doxygen Comment
bool isNextLineCppStyleComment(const QTextCursor &cursor)
{
const QTextBlock &currentBlock = cursor.block();
if (!currentBlock.isValid())
return false;
const QTextBlock &currentBlock = cursor.block();
if (!currentBlock.isValid())
return false;
const QTextBlock &actual = currentBlock.next();
if (!actual.isValid())
return false;
const QTextBlock &actual = currentBlock.next();
if (!actual.isValid())
return false;
const QString text = actual.text().trimmed();
if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")))
return true;
const QString text = actual.text().trimmed();
if (text.startsWith(QLatin1String("///")) || text.startsWith(QLatin1String("//!")))
return true;
return false;
return false;
}
/// Check if line is a CppStyle Doxygen comment and the cursor is after the comment
......@@ -416,8 +416,9 @@ bool handleDoxygenCppStyleContinuation(QTextCursor &cursor,
// consider it as a continuation. Handles situations like:
// void d(); ///<enter>
if (!(text.trimmed().startsWith(QLatin1String("///"))
|| text.startsWith(QLatin1String("//!"))))
return false;
|| text.startsWith(QLatin1String("//!")))) {
return false;
}
QString newLine(QLatin1Char('\n'));
newLine.append(QString(offset, QLatin1Char(' '))); // indent correctly
......@@ -1366,9 +1367,9 @@ CPPEditorWidget::Link CPPEditorWidget::findMacroLink(const QByteArray &name) con
}
CPPEditorWidget::Link CPPEditorWidget::findMacroLink(const QByteArray &name,
Document::Ptr doc,
const Snapshot &snapshot,
QSet<QString> *processed) const
Document::Ptr doc,
const Snapshot &snapshot,
QSet<QString> *processed) const
{
if (doc && ! name.startsWith('<') && ! processed->contains(doc->fileName())) {
processed->insert(doc->fileName());
......@@ -1836,7 +1837,7 @@ void CPPEditorWidget::keyPressEvent(QKeyEvent *e)
startRename();
bool wantEditBlock = (cursor.position() >= m_currentRenameSelectionBegin.position()
&& cursor.position() <= m_currentRenameSelectionEnd.position());
&& cursor.position() <= m_currentRenameSelectionEnd.position());
if (wantEditBlock) {
// possible change inside rename selection
......@@ -1869,7 +1870,7 @@ bool CPPEditor::open(QString *errorString, const QString &fileName, const QStrin
{
bool b = TextEditor::BaseTextEditor::open(errorString, fileName, realFileName);
editorWidget()->setMimeType(
Core::ICore::mimeDatabase()->findByFile(QFileInfo(fileName)).type());
Core::ICore::mimeDatabase()->findByFile(QFileInfo(fileName)).type());
return b;
}
......@@ -1882,7 +1883,7 @@ void CPPEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
{
TextEditor::BaseTextEditorWidget::setFontSettings(fs);
CppHighlighter *highlighter
= qobject_cast<CppHighlighter*>(baseTextDocument()->syntaxHighlighter());
= qobject_cast<CppHighlighter*>(baseTextDocument()->syntaxHighlighter());
if (!highlighter)
return;
......
......@@ -438,7 +438,7 @@ void PdbEngine::handleListSymbols(const PdbResponse &response)
symbol.name = _(item.findChild("name").data());
symbols.append(symbol);
}
debuggerCore()->showModuleSymbols(moduleName, symbols);
debuggerCore()->showModuleSymbols(moduleName, symbols);
}
//////////////////////////////////////////////////////////////////////
......
......@@ -109,7 +109,7 @@ bool isIntType(const QByteArray &type)
bool isFloatType(const QByteArray &type)
{
return type == "float" || type == "double" || type == "qreal";
return type == "float" || type == "double" || type == "qreal";
}
bool isIntOrFloatType(const QByteArray &type)
......
......@@ -8000,7 +8000,7 @@ void FakeVimHandler::handleInput(const QString &keys)
void FakeVimHandler::setCurrentFileName(const QString &fileName)
{
d->m_currentFileName = fileName;
d->m_currentFileName = fileName;
}
QString FakeVimHandler::currentFileName() const
......@@ -8010,7 +8010,7 @@ QString FakeVimHandler::currentFileName() const
void FakeVimHandler::showMessage(MessageLevel level, const QString &msg)
{
d->showMessage(level, msg);
d->showMessage(level, msg);
}
QWidget *FakeVimHandler::widget()
......
......@@ -1717,8 +1717,7 @@ void FakeVimPluginPrivate::triggerCompletions()
// CompletionSupport::instance()->complete(editor->editor(), TextCompletion, false);
}
void FakeVimPluginPrivate::triggerSimpleCompletions(const QString &needle,
bool forward)
void FakeVimPluginPrivate::triggerSimpleCompletions(const QString &needle, bool forward)
{
// m_wordCompletion->setActive(needle, forward, qobject_cast<FakeVimHandler *>(sender()));
m_wordProvider->setActive(needle, forward, qobject_cast<FakeVimHandler *>(sender()));
......
......@@ -90,7 +90,7 @@ QString ProjectFilesFactory::displayName() const
ProjectFilesEditor::ProjectFilesEditor(ProjectFilesEditorWidget *editor)
: BaseTextEditor(editor)
{
setContext(Core::Context(Constants::C_FILESEDITOR));
setContext(Core::Context(Constants::C_FILESEDITOR));
}
Core::Id ProjectFilesEditor::id() const
......
......@@ -1285,7 +1285,7 @@ template <class NonModalDialog>
void GitPlugin::branchList()
{
showNonModalDialog(currentState().topLevel(), m_branchDialog);
showNonModalDialog(currentState().topLevel(), m_branchDialog);
}
void GitPlugin::remoteList()
......
......@@ -232,7 +232,7 @@ void GitSubmitEditorWidget::authorInformationChanged()
m_gitSubmitPanelUi.invalidEmailLabel->
setVisible(!emailIsValid() && !bothEmpty);
updateSubmitAction();
updateSubmitAction();
}
bool GitSubmitEditorWidget::emailIsValid() const
......
......@@ -198,7 +198,7 @@ void FormEditorItem::setFormEditorVisible(bool isVisible)
FormEditorItem::~FormEditorItem()
{
scene()->removeItemFromHash(this);
scene()->removeItemFromHash(this);
}
/* \brief returns the parent item skipping all proxyItem*/
......
......@@ -133,7 +133,7 @@ bool FormEditorScene::hasItemForQmlItemNode(const QmlItemNode &qmlItemNode) cons
void FormEditorScene::removeItemFromHash(FormEditorItem *item)
{
m_qmlItemNodeItemHash.remove(item->qmlItemNode());
m_qmlItemNodeItemHash.remove(item->qmlItemNode());
}
......@@ -316,7 +316,7 @@ void FormEditorScene::keyReleaseEvent(QKeyEvent *keyEvent)
FormEditorView *FormEditorScene::editorView() const
{
return m_editorView;
return m_editorView;
}
LayerItem* FormEditorScene::manipulatorLayerItem() const
......
......@@ -56,10 +56,10 @@ const char SOURCE_KEY[] = "Qnx.BlackBerry.DeployInformation.Source";
QString BarPackageDeployInformation::appDescriptorPath() const
{
if (userAppDescriptorPath.isEmpty())
return sourceDir + QLatin1String("/bar-descriptor.xml");
if (userAppDescriptorPath.isEmpty())
return sourceDir + QLatin1String("/bar-descriptor.xml");
return userAppDescriptorPath;
return userAppDescriptorPath;
}
QString BarPackageDeployInformation::packagePath() const
......
......@@ -51,9 +51,9 @@ class BlackBerryKeysWidget : public QWidget
{
Q_OBJECT
public:
explicit BlackBerryKeysWidget(QWidget *parent = 0);
explicit BlackBerryKeysWidget(QWidget *parent = 0);
void apply();
void apply();
private slots:
void registerKey();
......
......@@ -48,7 +48,7 @@ class BlackBerryNDKSettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0);
explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0);
signals:
void sdkPathChanged();
......
......@@ -1183,7 +1183,7 @@ void Qt4Project::unwatchFolders(const QStringList &l, Qt4PriFileNode *node)
// All the folder have a trailing slash!
namespace {
bool debugCFW = false;
bool debugCFW = false;
}
CentralizedFolderWatcher::CentralizedFolderWatcher(QObject *parent) : QObject(parent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment