Commit 3747e941 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

Clean up whitespace before EOL



Change-Id: I385544a10b9be66589b0d1a48594128035836c8a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 50417fd9
......@@ -133,7 +133,7 @@ enum { debugLeaks = 0 };
invokable methods of the "provider" object in the object pool.
The \c{ExtensionSystem::invoke} function template encapsulates
{ExtensionSystem::Invoker} construction for the common case where
{ExtensionSystem::Invoker} construction for the common case where
the success of the call is not checked.
\code
......
......@@ -226,7 +226,7 @@ QPacketProtocol::~QPacketProtocol()
/*!
Returns the maximum packet size allowed. By default this is
2,147,483,647 bytes.
If a packet claiming to be larger than the maximum packet size is received,
the QPacketProtocol::invalidPacket() signal is emitted.
......
......@@ -199,7 +199,7 @@ void ColorBox::paintEvent(QPaintEvent *event)
}
m_cache = QPixmap::fromImage(cache);
}
p.drawPixmap(5, 5, m_cache);
int x = clamp(m_color.hsvSaturationF() * 120, 0, 119) + 5;
......
......@@ -103,7 +103,7 @@ void ContextPaneTextWidget::setProperties(QmlJS::PropertyReader *propertyReader)
if (propertyReader->hasProperty(QLatin1String("font.pointSize"))) {
QVariant variant = propertyReader->readProperty(QLatin1String("font.pointSize"));
bool b;
ui->fontSizeSpinBox->setValue(variant.toInt(&b));
ui->fontSizeSpinBox->setValue(variant.toInt(&b));
ui->fontSizeSpinBox->setEnabled(b);
ui->fontSizeSpinBox->setIsPointSize(true);
} else if (!propertyReader->hasProperty(QLatin1String("font.pixelSize"))) {
......@@ -276,7 +276,7 @@ void ContextPaneTextWidget::onColorButtonToggled(bool flag)
ContextPaneWidget *parentContextWidget = qobject_cast<ContextPaneWidget*>(parentWidget());
QPoint p = mapToGlobal(ui->colorButton->pos());
parentContextWidget->colorDialog()->setupColor(ui->colorButton->color().toString());
p = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(p);
p = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(p);
parentContextWidget->onShowColorDialog(flag, p);
}
......@@ -301,7 +301,7 @@ void ContextPaneTextWidget::onColorDialogCancled()
}
void ContextPaneTextWidget::onFontSizeChanged(int)
{
{
if (m_fontSizeTimer > 0)
killTimer(m_fontSizeTimer);
m_fontSizeTimer = startTimer(200);
......@@ -310,9 +310,9 @@ void ContextPaneTextWidget::onFontSizeChanged(int)
void ContextPaneTextWidget::onFontFormatChanged()
{
int size = ui->fontSizeSpinBox->value();
if (ui->fontSizeSpinBox->isPointSize()) {
if (ui->fontSizeSpinBox->isPointSize()) {
emit removeAndChangeProperty(QLatin1String("font.pixelSize"), QLatin1String("font.pointSize"), size, true);
} else {
} else {
emit removeAndChangeProperty(QLatin1String("font.pointSize"), QLatin1String("font.pixelSize"), size, true);
}
......
......@@ -411,7 +411,7 @@ void ContextPaneWidget::onTogglePane()
}
void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p)
{
{
if (checked) {
colorDialog()->setParent(parentWidget());
colorDialog()->move(p);
......@@ -423,7 +423,7 @@ void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p)
}
void ContextPaneWidget::onDisable(bool b)
{
{
enabledChanged(b);
if (!b) {
hide();
......@@ -448,7 +448,7 @@ void ContextPaneWidget::protectedMoved()
}
QWidget* ContextPaneWidget::createFontWidget()
{
{
m_textWidget = new ContextPaneTextWidget(this);
connect(m_textWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant)));
connect(m_textWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString)));
......
......@@ -54,7 +54,7 @@ bool LabelFilter::eventFilter(QObject *obj, QEvent *event)
emit doubleClicked();
event->accept();
return true;
}
}
return QObject::eventFilter(obj, event);
}
......@@ -113,7 +113,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
connect(ui->horizontalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
connect(ui->verticalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
connect(ui->preserveAspectFitRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
connect(ui->cropAspectFitRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
connect(ui->cropAspectFitRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
}
previewDialog();
m_fileWidget->setShowComboBox(true);
......@@ -205,7 +205,7 @@ void ContextPaneWidgetImage::setProperties(QmlJS::PropertyReader *propertyReader
ui->cropAspectFitRadioButton->setChecked(true);
} else {
ui->stretchRadioButton->setChecked(true);
}
}
}
if (propertyReader->hasProperty(QLatin1String("source"))) {
QString source = propertyReader->readProperty(QLatin1String("source")).toString();
......@@ -336,7 +336,7 @@ void ContextPaneWidgetImage::onFileNameChanged()
}
void ContextPaneWidgetImage::onPixmapDoubleClicked()
{
{
previewDialog()->setParent(parentWidget()->parentWidget());
previewDialog()->setMaximumSize(previewDialog()->parentWidget()->size() - QSize(150, 100));
if (m_borderImage)
......@@ -358,7 +358,7 @@ void ContextPaneWidgetImage::onPixmapDoubleClicked()
if (previewDialog()->pos().x() < 0)
previewDialog()->move(0, previewDialog()->pos().y());
if (previewDialog()->pos().y() < 0)
previewDialog()->move(previewDialog()->pos().x(), 0);
previewDialog()->move(previewDialog()->pos().x(), 0);
previewDialog()->raise();
}
......
......@@ -129,7 +129,7 @@ public:
explicit ContextPaneWidgetImage(QWidget *parent = 0, bool borderImage = false);
~ContextPaneWidgetImage();
void setProperties(QmlJS::PropertyReader *propertyReader);
void setPath(const QString& path);
void setPath(const QString& path);
PreviewDialog* previewDialog();
signals:
......
......@@ -74,7 +74,7 @@ ContextPaneWidgetRectangle::~ContextPaneWidgetRectangle()
}
void ContextPaneWidgetRectangle::setProperties(QmlJS::PropertyReader *propertyReader)
{
{
m_hasGradient = propertyReader->hasProperty(QLatin1String("gradient"));
m_none = false;
m_hasBorder = false;
......
......@@ -64,7 +64,7 @@ QAbstractSpinBox::StepEnabled FontSizeSpinBox::stepEnabled() const
{
if (value() > 1)
return (StepUpEnabled | StepDownEnabled);
else
else
return StepUpEnabled;
}
void FontSizeSpinBox::setText()
......
......@@ -220,7 +220,7 @@ bool QmlDirParser::parse(const QString &source)
}
}
} else {
reportError(lineNumber, -1,
reportError(lineNumber, -1,
QString::fromUtf8("a component declaration requires two or three arguments, but %1 were provided").arg(sectionCount));
}
......
......@@ -114,7 +114,7 @@ QmlError &QmlError::operator=(const QmlError &other)
}
/*!
\internal
\internal
*/
QmlError::~QmlError()
{
......@@ -211,7 +211,7 @@ QString QmlError::toString() const
rv = QLatin1String("<Unknown File>");
} else if (line() != -1) {
rv = url().toString() + QLatin1Char(':') + QString::number(line());
if(column() != -1)
if(column() != -1)
rv += QLatin1Char(':') + QString::number(column());
} else {
rv = url().toString();
......@@ -253,7 +253,7 @@ QDebug operator<<(QDebug debug, const QmlError &error)
if(error.column() > 0) {
int column = qMax(0, error.column() - 1);
column = qMin(column, line.length());
column = qMin(column, line.length());
QByteArray ind;
ind.reserve(column);
......
......@@ -556,7 +556,7 @@ again:
_validTokenText = true;
_tokenText.resize(0);
startCode--;
while (startCode != _codePtr - 1)
while (startCode != _codePtr - 1)
_tokenText += *startCode++;
while (! _char.isNull()) {
......
......@@ -751,7 +751,7 @@ public:
AST::UiQualifiedId *qmlTypeName() const;
private:
private:
virtual const Value *value(ReferenceContext *referenceContext) const;
AST::UiQualifiedId *_qmlTypeName;
......
......@@ -36,7 +36,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qdeclarative.h>
#include "qstyleplugin.h"
#include "qstyleitem.h"
......
......@@ -164,7 +164,7 @@ FutureProgress::FutureProgress(QWidget *parent) :
connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),
this, SLOT(setProgressText(QString)));
connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel()));
connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel()));
}
/*!
......
......@@ -85,7 +85,7 @@ VersionDialog::VersionDialog(QWidget *parent)
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>")
.arg(version,
.arg(version,
QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(Constants::IDE_YEAR),
(QLatin1String(Constants::IDE_AUTHOR)), ideVersionDescription,
......
......@@ -766,7 +766,7 @@ void CodeFormatter::correctIndentation(const QTextBlock &block)
}
bool CodeFormatter::tryExpression(bool alsoExpression)
{
{
int newState = -1;
const int kind = m_currentToken.kind();
......@@ -1027,7 +1027,7 @@ void CodeFormatter::saveCurrentState(const QTextBlock &block)
void CodeFormatter::restoreCurrentState(const QTextBlock &block)
{
if (block.isValid()) {
if (block.isValid()) {
BlockData blockData;
if (loadBlockData(block, &blockData)) {
m_indentDepth = blockData.m_indentDepth;
......
......@@ -371,7 +371,7 @@ void DisassemblerAgent::updateLocationMarker()
QPlainTextEdit *plainTextEdit =
qobject_cast<QPlainTextEdit *>(d->editor->widget());
QTC_ASSERT(plainTextEdit, return);
QTC_ASSERT(plainTextEdit, return);
QTextCursor tc = plainTextEdit->textCursor();
QTextBlock block = tc.document()->findBlockByNumber(lineNumber - 1);
tc.setPosition(block.position());
......
......@@ -162,7 +162,7 @@ private:
QQueue<PdbCommand> m_commands;
QByteArray m_inbuffer;
QByteArray m_inbuffer;
QString m_scriptFileName;
QProcess m_pdbProc;
QString m_pdb;
......
......@@ -93,7 +93,7 @@ void SnapshotTreeView::contextMenuEvent(QContextMenuEvent *ev)
QAction *actRemove = menu.addAction(tr("Remove Snapshot"));
actRemove->setEnabled(idx.isValid());
addBaseContextActions(&menu);
QAction *act = menu.exec(ev->globalPos());
......
......@@ -183,7 +183,7 @@ private slots:
private:
void syncGridFeature();
FormWindowBasePrivate *m_d;
FormWindowBasePrivate *m_d;
};
} // namespace qdesigner_internal
......
......@@ -288,7 +288,7 @@ void CentralWidget::focusInEvent(QFocusEvent * /* event */)
void CentralWidget::highlightSearchTerms()
{
if (HelpViewer *viewer = currentHelpViewer()) {
QHelpSearchEngine *searchEngine =
QHelpSearchEngine *searchEngine =
LocalHelpManager::helpEngine().searchEngine();
QList<QHelpSearchQuery> queryList = searchEngine->query();
......
......@@ -49,7 +49,7 @@ public:
: zoomCount(zoom)
, forceFont(false)
, lastAnchor(QString())
{}
bool hasAnchorAt(QTextBrowser *browser, const QPoint& pos)
......
......@@ -797,7 +797,7 @@ void PerforcePlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as)
{
if (!enableMenuAction(as, m_menuAction)) {
m_commandLocator->setEnabled(false);
return;
return;
}
const bool hasTopLevel = currentState().hasTopLevel();
m_commandLocator->setEnabled(hasTopLevel);
......
......@@ -313,7 +313,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QLatin1String("unused variable 'handler'"),
Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115,
categoryCompile))
<< QString();
<< QString();
QTest::newRow("gnumakeparser.cpp errors")
<< QString::fromLatin1("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp: In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':\n"
"/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp:264: error: expected primary-expression before ':' token\n"
......
......@@ -756,7 +756,7 @@ void SessionNode::watcherDestroyed(QObject *watcher)
by calling ProjectNode::unregisterWatcher and
SessionNode::unregisterWatcher().
The NodesWatcher is similar to the Observer in the
The NodesWatcher is similar to the Observer in the
well-known Observer pattern (Booch et al).
\sa ProjectExplorer::Node
......
......@@ -161,7 +161,7 @@ void DragTool::createQmlItemNode(const ItemLibraryEntry &itemLibraryEntry, QmlIt
Q_ASSERT(m_dragNode.modelNode().isValid());
QList<QmlItemNode> nodeList;
nodeList.append(m_dragNode);
nodeList.append(m_dragNode);
m_selectionIndicator.setItems(scene()->itemsForQmlItemNodes(nodeList));
}
......
......@@ -32,7 +32,7 @@ namespace QmlDesigner {
namespace Internal {
ItemLibraryImageProvider::ItemLibraryImageProvider() :
ItemLibraryImageProvider::ItemLibraryImageProvider() :
QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap)
{
}
......@@ -44,7 +44,7 @@ QPixmap ItemLibraryImageProvider::requestPixmap(const QString &id, QSize *size,
size->setWidth(pixmap.width());
size->setHeight(pixmap.height());
}
if (requestedSize.isValid())
if (requestedSize.isValid())
return pixmap.scaled(requestedSize);
return pixmap;
}
......
......@@ -39,7 +39,7 @@ namespace Internal {
class ItemLibraryImageProvider : public QDeclarativeImageProvider
{
public:
ItemLibraryImageProvider();
ItemLibraryImageProvider();
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
};
......
......@@ -252,7 +252,7 @@ NavigatorTreeModel::ItemRow NavigatorTreeModel::createItemRow(const ModelNode &n
void NavigatorTreeModel::updateItemRow(const ModelNode &node, ItemRow items)
{
bool blockSignal = blockItemChangedSignal(true);
bool blockSignal = blockItemChangedSignal(true);
items.idItem->setText(node.id());
items.visibilityItem->setCheckState(node.auxiliaryData("invisible").toBool() ? Qt::Unchecked : Qt::Checked);
......@@ -632,7 +632,7 @@ QStringList NavigatorTreeModel::visibleProperties(const ModelNode &node) const
propertyList.append(propertyName);
}
}
}
}
return propertyList;
}
......
......@@ -652,7 +652,7 @@ protected:
QFontMetrics fm(font());
if (fm.width(text()) > (contentsRect().width() - 8) && text().length() > 4) {
QPainter p(this);
QString elided_txt;
QString elided_txt;
elided_txt = fm.elidedText(text(), Qt::ElideRight, contentsRect().width() - 8, Qt::TextShowMnemonic);
p.drawText(contentsRect().adjusted(12, 0, 0, 0), Qt::TextSingleLine, elided_txt);
}
......
......@@ -108,7 +108,7 @@ void OriginWidget::mouseReleaseEvent(QMouseEvent *event)
}
void OriginWidget::mousePressEvent(QMouseEvent * event)
{
{
if (event->button() == Qt::LeftButton) {
m_pressed = true;
for (int i = 0; i < positions.size(); i++)
......
......@@ -254,11 +254,11 @@ void PropertyEditor::NodeType::setup(const QmlObjectNode &fxObjectNode, const QS
m_backendAnchorBinding.setup(QmlItemNode(fxObjectNode.modelNode()));
ctxt->setContextProperty("anchorBackend", &m_backendAnchorBinding);
ctxt->setContextProperty("transaction", m_propertyEditorTransaction.data());
m_contextObject->setSpecificsUrl(qmlSpecificsFile);
m_contextObject->setStateName(stateName);
if (!fxObjectNode.isValid())
return;
......@@ -774,7 +774,7 @@ void PropertyEditor::resetView()
ctxt->setContextProperty("finishedNotify", QVariant(false));
if (specificQmlData.isEmpty())
type->m_contextObject->setSpecificQmlData(specificQmlData);
type->m_contextObject->setGlobalBaseUrl(qmlFile);
type->m_contextObject->setSpecificQmlData(specificQmlData);
type->m_view->setSource(qmlFile);
......@@ -785,7 +785,7 @@ void PropertyEditor::resetView()
fxObjectNode = QmlObjectNode(m_selectedNode);
}
QDeclarativeContext *ctxt = type->m_view->rootContext();
ctxt->setContextProperty("finishedNotify", QVariant(false));
if (specificQmlData.isEmpty())
type->m_contextObject->setSpecificQmlData(specificQmlData);
......
......@@ -34,7 +34,7 @@ namespace QmlDesigner {
void SiblingComboBox::setItemNode(const QVariant &itemNode)
{
if (!itemNode.value<ModelNode>().isValid() || !QmlItemNode(itemNode.value<ModelNode>()).hasNodeParent())
return;
m_itemNode = itemNode.value<ModelNode>();
......
......@@ -77,7 +77,7 @@ protected:
{ return m_textModifier; }
bool includeSurroundingWhitespace(int &start, int &end) const;
void includeLeadingEmptyLine(int &start) const;
void includeLeadingEmptyLine(int &start) const;
static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QStringList &propertyOrder);
static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder);
......
......@@ -762,7 +762,7 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
nodeList = filterNodesForSkipItems(nodeList);
QList<VariantProperty> variantPropertyList;
QList<BindingProperty> bindingPropertyList;
QList<BindingProperty> bindingPropertyList;
QVector<PropertyValueContainer> auxiliaryContainerVector;
foreach (const ModelNode &node, nodeList) {
......
......@@ -88,7 +88,7 @@ void SubComponentManager::addImport(int pos, const Import &import)
}
} else {
QString url = import.url();
url.replace(QLatin1Char('.'), QLatin1Char('/'));
foreach (const QString &path, importPaths()) {
......
......@@ -199,7 +199,7 @@ void ModelMerger::replaceModel(const ModelNode &modelNode)
syncNodeProperties(rootNode, modelNode, idRenamingHash, view());
syncNodeListProperties(rootNode, modelNode, idRenamingHash, view());
m_view->changeRootNodeType(modelNode.type(), modelNode.majorVersion(), modelNode.minorVersion());
} catch (RewritingException &e) {
} catch (RewritingException &e) {
qWarning() << e.description(); //silent error
}
}
......
......@@ -234,7 +234,7 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
rootModelNode.variantProperty("y") = propertyPairList.at(1).second;
ModelMerger merger(this);
newNode = merger.insertModel(rootModelNode);
newNode = merger.insertModel(rootModelNode);
}
}
......
......@@ -96,7 +96,7 @@ instanciated instance of this object.
*/
QVariant QmlObjectNode::instanceValue(const QString &name) const
{
{
return nodeInstance().property(name);
}
......
......@@ -139,7 +139,7 @@ static inline QString fixEscapedUnicodeChar(const QString &value) //convert "\u2
}
return value;
}
static inline bool isSignalPropertyName(const QString &signalName)
{
// see QmlCompiler::isSignalPropertyName
......@@ -258,7 +258,7 @@ static bool isCustomParserType(const QString &type)
static bool isPropertyChangesType(const QString &type)
{
{
return type == QLatin1String("PropertyChanges") || type == QLatin1String("QtQuick.PropertyChanges") || type == QLatin1String("Qt.PropertyChanges");
}
......@@ -1567,7 +1567,7 @@ ModelNode ModelAmender::listPropertyMissingModelNode(NodeListProperty &modelProp
modelProperty.reparentHere(newNode);
} else { //The default property could a NodeProperty implicitly (delegate:)
modelProperty.parentModelNode().removeProperty(modelProperty.name());
modelProperty.reparentHere(newNode);
modelProperty.reparentHere(newNode);
}
} else {
modelProperty.reparentHere(newNode);
......