Clean up whitespace before EOL

Change-Id: I385544a10b9be66589b0d1a48594128035836c8a
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Orgad Shaneh
2012-11-28 20:28:42 +02:00
committed by hjk
parent 50417fd92a
commit 3747e941ad
50 changed files with 83 additions and 83 deletions

View File

@@ -133,7 +133,7 @@ enum { debugLeaks = 0 };
invokable methods of the "provider" object in the object pool. invokable methods of the "provider" object in the object pool.
The \c{ExtensionSystem::invoke} function template encapsulates 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. the success of the call is not checked.
\code \code

View File

@@ -226,7 +226,7 @@ QPacketProtocol::~QPacketProtocol()
/*! /*!
Returns the maximum packet size allowed. By default this is Returns the maximum packet size allowed. By default this is
2,147,483,647 bytes. 2,147,483,647 bytes.
If a packet claiming to be larger than the maximum packet size is received, If a packet claiming to be larger than the maximum packet size is received,
the QPacketProtocol::invalidPacket() signal is emitted. the QPacketProtocol::invalidPacket() signal is emitted.

View File

@@ -199,7 +199,7 @@ void ColorBox::paintEvent(QPaintEvent *event)
} }
m_cache = QPixmap::fromImage(cache); m_cache = QPixmap::fromImage(cache);
} }
p.drawPixmap(5, 5, m_cache); p.drawPixmap(5, 5, m_cache);
int x = clamp(m_color.hsvSaturationF() * 120, 0, 119) + 5; int x = clamp(m_color.hsvSaturationF() * 120, 0, 119) + 5;

View File

@@ -103,7 +103,7 @@ void ContextPaneTextWidget::setProperties(QmlJS::PropertyReader *propertyReader)
if (propertyReader->hasProperty(QLatin1String("font.pointSize"))) { if (propertyReader->hasProperty(QLatin1String("font.pointSize"))) {
QVariant variant = propertyReader->readProperty(QLatin1String("font.pointSize")); QVariant variant = propertyReader->readProperty(QLatin1String("font.pointSize"));
bool b; bool b;
ui->fontSizeSpinBox->setValue(variant.toInt(&b)); ui->fontSizeSpinBox->setValue(variant.toInt(&b));
ui->fontSizeSpinBox->setEnabled(b); ui->fontSizeSpinBox->setEnabled(b);
ui->fontSizeSpinBox->setIsPointSize(true); ui->fontSizeSpinBox->setIsPointSize(true);
} else if (!propertyReader->hasProperty(QLatin1String("font.pixelSize"))) { } else if (!propertyReader->hasProperty(QLatin1String("font.pixelSize"))) {
@@ -276,7 +276,7 @@ void ContextPaneTextWidget::onColorButtonToggled(bool flag)
ContextPaneWidget *parentContextWidget = qobject_cast<ContextPaneWidget*>(parentWidget()); ContextPaneWidget *parentContextWidget = qobject_cast<ContextPaneWidget*>(parentWidget());
QPoint p = mapToGlobal(ui->colorButton->pos()); QPoint p = mapToGlobal(ui->colorButton->pos());
parentContextWidget->colorDialog()->setupColor(ui->colorButton->color().toString()); parentContextWidget->colorDialog()->setupColor(ui->colorButton->color().toString());
p = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(p); p = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(p);
parentContextWidget->onShowColorDialog(flag, p); parentContextWidget->onShowColorDialog(flag, p);
} }
@@ -301,7 +301,7 @@ void ContextPaneTextWidget::onColorDialogCancled()
} }
void ContextPaneTextWidget::onFontSizeChanged(int) void ContextPaneTextWidget::onFontSizeChanged(int)
{ {
if (m_fontSizeTimer > 0) if (m_fontSizeTimer > 0)
killTimer(m_fontSizeTimer); killTimer(m_fontSizeTimer);
m_fontSizeTimer = startTimer(200); m_fontSizeTimer = startTimer(200);
@@ -310,9 +310,9 @@ void ContextPaneTextWidget::onFontSizeChanged(int)
void ContextPaneTextWidget::onFontFormatChanged() void ContextPaneTextWidget::onFontFormatChanged()
{ {
int size = ui->fontSizeSpinBox->value(); int size = ui->fontSizeSpinBox->value();
if (ui->fontSizeSpinBox->isPointSize()) { if (ui->fontSizeSpinBox->isPointSize()) {
emit removeAndChangeProperty(QLatin1String("font.pixelSize"), QLatin1String("font.pointSize"), size, true); emit removeAndChangeProperty(QLatin1String("font.pixelSize"), QLatin1String("font.pointSize"), size, true);
} else { } else {
emit removeAndChangeProperty(QLatin1String("font.pointSize"), QLatin1String("font.pixelSize"), size, true); emit removeAndChangeProperty(QLatin1String("font.pointSize"), QLatin1String("font.pixelSize"), size, true);
} }

View File

@@ -411,7 +411,7 @@ void ContextPaneWidget::onTogglePane()
} }
void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p) void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p)
{ {
if (checked) { if (checked) {
colorDialog()->setParent(parentWidget()); colorDialog()->setParent(parentWidget());
colorDialog()->move(p); colorDialog()->move(p);
@@ -423,7 +423,7 @@ void ContextPaneWidget::onShowColorDialog(bool checked, const QPoint &p)
} }
void ContextPaneWidget::onDisable(bool b) void ContextPaneWidget::onDisable(bool b)
{ {
enabledChanged(b); enabledChanged(b);
if (!b) { if (!b) {
hide(); hide();
@@ -448,7 +448,7 @@ void ContextPaneWidget::protectedMoved()
} }
QWidget* ContextPaneWidget::createFontWidget() QWidget* ContextPaneWidget::createFontWidget()
{ {
m_textWidget = new ContextPaneTextWidget(this); m_textWidget = new ContextPaneTextWidget(this);
connect(m_textWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); connect(m_textWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant)));
connect(m_textWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); connect(m_textWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString)));

View File

@@ -54,7 +54,7 @@ bool LabelFilter::eventFilter(QObject *obj, QEvent *event)
emit doubleClicked(); emit doubleClicked();
event->accept(); event->accept();
return true; return true;
} }
return QObject::eventFilter(obj, event); 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->horizontalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged()));
connect(ui->verticalStretchRadioButton, 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->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(); previewDialog();
m_fileWidget->setShowComboBox(true); m_fileWidget->setShowComboBox(true);
@@ -205,7 +205,7 @@ void ContextPaneWidgetImage::setProperties(QmlJS::PropertyReader *propertyReader
ui->cropAspectFitRadioButton->setChecked(true); ui->cropAspectFitRadioButton->setChecked(true);
} else { } else {
ui->stretchRadioButton->setChecked(true); ui->stretchRadioButton->setChecked(true);
} }
} }
if (propertyReader->hasProperty(QLatin1String("source"))) { if (propertyReader->hasProperty(QLatin1String("source"))) {
QString source = propertyReader->readProperty(QLatin1String("source")).toString(); QString source = propertyReader->readProperty(QLatin1String("source")).toString();
@@ -336,7 +336,7 @@ void ContextPaneWidgetImage::onFileNameChanged()
} }
void ContextPaneWidgetImage::onPixmapDoubleClicked() void ContextPaneWidgetImage::onPixmapDoubleClicked()
{ {
previewDialog()->setParent(parentWidget()->parentWidget()); previewDialog()->setParent(parentWidget()->parentWidget());
previewDialog()->setMaximumSize(previewDialog()->parentWidget()->size() - QSize(150, 100)); previewDialog()->setMaximumSize(previewDialog()->parentWidget()->size() - QSize(150, 100));
if (m_borderImage) if (m_borderImage)
@@ -358,7 +358,7 @@ void ContextPaneWidgetImage::onPixmapDoubleClicked()
if (previewDialog()->pos().x() < 0) if (previewDialog()->pos().x() < 0)
previewDialog()->move(0, previewDialog()->pos().y()); previewDialog()->move(0, previewDialog()->pos().y());
if (previewDialog()->pos().y() < 0) if (previewDialog()->pos().y() < 0)
previewDialog()->move(previewDialog()->pos().x(), 0); previewDialog()->move(previewDialog()->pos().x(), 0);
previewDialog()->raise(); previewDialog()->raise();
} }

View File

@@ -129,7 +129,7 @@ public:
explicit ContextPaneWidgetImage(QWidget *parent = 0, bool borderImage = false); explicit ContextPaneWidgetImage(QWidget *parent = 0, bool borderImage = false);
~ContextPaneWidgetImage(); ~ContextPaneWidgetImage();
void setProperties(QmlJS::PropertyReader *propertyReader); void setProperties(QmlJS::PropertyReader *propertyReader);
void setPath(const QString& path); void setPath(const QString& path);
PreviewDialog* previewDialog(); PreviewDialog* previewDialog();
signals: signals:

View File

@@ -74,7 +74,7 @@ ContextPaneWidgetRectangle::~ContextPaneWidgetRectangle()
} }
void ContextPaneWidgetRectangle::setProperties(QmlJS::PropertyReader *propertyReader) void ContextPaneWidgetRectangle::setProperties(QmlJS::PropertyReader *propertyReader)
{ {
m_hasGradient = propertyReader->hasProperty(QLatin1String("gradient")); m_hasGradient = propertyReader->hasProperty(QLatin1String("gradient"));
m_none = false; m_none = false;
m_hasBorder = false; m_hasBorder = false;

View File

@@ -64,7 +64,7 @@ QAbstractSpinBox::StepEnabled FontSizeSpinBox::stepEnabled() const
{ {
if (value() > 1) if (value() > 1)
return (StepUpEnabled | StepDownEnabled); return (StepUpEnabled | StepDownEnabled);
else else
return StepUpEnabled; return StepUpEnabled;
} }
void FontSizeSpinBox::setText() void FontSizeSpinBox::setText()

View File

@@ -220,7 +220,7 @@ bool QmlDirParser::parse(const QString &source)
} }
} }
} else { } else {
reportError(lineNumber, -1, reportError(lineNumber, -1,
QString::fromUtf8("a component declaration requires two or three arguments, but %1 were provided").arg(sectionCount)); QString::fromUtf8("a component declaration requires two or three arguments, but %1 were provided").arg(sectionCount));
} }

View File

@@ -114,7 +114,7 @@ QmlError &QmlError::operator=(const QmlError &other)
} }
/*! /*!
\internal \internal
*/ */
QmlError::~QmlError() QmlError::~QmlError()
{ {
@@ -211,7 +211,7 @@ QString QmlError::toString() const
rv = QLatin1String("<Unknown File>"); rv = QLatin1String("<Unknown File>");
} else if (line() != -1) { } else if (line() != -1) {
rv = url().toString() + QLatin1Char(':') + QString::number(line()); rv = url().toString() + QLatin1Char(':') + QString::number(line());
if(column() != -1) if(column() != -1)
rv += QLatin1Char(':') + QString::number(column()); rv += QLatin1Char(':') + QString::number(column());
} else { } else {
rv = url().toString(); rv = url().toString();
@@ -253,7 +253,7 @@ QDebug operator<<(QDebug debug, const QmlError &error)
if(error.column() > 0) { if(error.column() > 0) {
int column = qMax(0, error.column() - 1); int column = qMax(0, error.column() - 1);
column = qMin(column, line.length()); column = qMin(column, line.length());
QByteArray ind; QByteArray ind;
ind.reserve(column); ind.reserve(column);

View File

@@ -556,7 +556,7 @@ again:
_validTokenText = true; _validTokenText = true;
_tokenText.resize(0); _tokenText.resize(0);
startCode--; startCode--;
while (startCode != _codePtr - 1) while (startCode != _codePtr - 1)
_tokenText += *startCode++; _tokenText += *startCode++;
while (! _char.isNull()) { while (! _char.isNull()) {

View File

@@ -751,7 +751,7 @@ public:
AST::UiQualifiedId *qmlTypeName() const; AST::UiQualifiedId *qmlTypeName() const;
private: private:
virtual const Value *value(ReferenceContext *referenceContext) const; virtual const Value *value(ReferenceContext *referenceContext) const;
AST::UiQualifiedId *_qmlTypeName; AST::UiQualifiedId *_qmlTypeName;

View File

@@ -36,7 +36,7 @@
** $QT_END_LICENSE$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
#include <qdeclarative.h> #include <qdeclarative.h>
#include "qstyleplugin.h" #include "qstyleplugin.h"
#include "qstyleitem.h" #include "qstyleitem.h"

View File

@@ -164,7 +164,7 @@ FutureProgress::FutureProgress(QWidget *parent) :
connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int))); connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)), connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),
this, SLOT(setProgressText(QString))); this, SLOT(setProgressText(QString)));
connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel())); connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel()));
} }
/*! /*!

View File

@@ -85,7 +85,7 @@ VersionDialog::VersionDialog(QWidget *parent)
"The program is provided AS IS with NO WARRANTY OF ANY KIND, " "The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.<br/>") "PARTICULAR PURPOSE.<br/>")
.arg(version, .arg(version,
QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize), QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(Constants::IDE_YEAR), QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(Constants::IDE_YEAR),
(QLatin1String(Constants::IDE_AUTHOR)), ideVersionDescription, (QLatin1String(Constants::IDE_AUTHOR)), ideVersionDescription,

View File

@@ -766,7 +766,7 @@ void CodeFormatter::correctIndentation(const QTextBlock &block)
} }
bool CodeFormatter::tryExpression(bool alsoExpression) bool CodeFormatter::tryExpression(bool alsoExpression)
{ {
int newState = -1; int newState = -1;
const int kind = m_currentToken.kind(); const int kind = m_currentToken.kind();
@@ -1027,7 +1027,7 @@ void CodeFormatter::saveCurrentState(const QTextBlock &block)
void CodeFormatter::restoreCurrentState(const QTextBlock &block) void CodeFormatter::restoreCurrentState(const QTextBlock &block)
{ {
if (block.isValid()) { if (block.isValid()) {
BlockData blockData; BlockData blockData;
if (loadBlockData(block, &blockData)) { if (loadBlockData(block, &blockData)) {
m_indentDepth = blockData.m_indentDepth; m_indentDepth = blockData.m_indentDepth;

View File

@@ -371,7 +371,7 @@ void DisassemblerAgent::updateLocationMarker()
QPlainTextEdit *plainTextEdit = QPlainTextEdit *plainTextEdit =
qobject_cast<QPlainTextEdit *>(d->editor->widget()); qobject_cast<QPlainTextEdit *>(d->editor->widget());
QTC_ASSERT(plainTextEdit, return); QTC_ASSERT(plainTextEdit, return);
QTextCursor tc = plainTextEdit->textCursor(); QTextCursor tc = plainTextEdit->textCursor();
QTextBlock block = tc.document()->findBlockByNumber(lineNumber - 1); QTextBlock block = tc.document()->findBlockByNumber(lineNumber - 1);
tc.setPosition(block.position()); tc.setPosition(block.position());

View File

@@ -162,7 +162,7 @@ private:
QQueue<PdbCommand> m_commands; QQueue<PdbCommand> m_commands;
QByteArray m_inbuffer; QByteArray m_inbuffer;
QString m_scriptFileName; QString m_scriptFileName;
QProcess m_pdbProc; QProcess m_pdbProc;
QString m_pdb; QString m_pdb;

View File

@@ -93,7 +93,7 @@ void SnapshotTreeView::contextMenuEvent(QContextMenuEvent *ev)
QAction *actRemove = menu.addAction(tr("Remove Snapshot")); QAction *actRemove = menu.addAction(tr("Remove Snapshot"));
actRemove->setEnabled(idx.isValid()); actRemove->setEnabled(idx.isValid());
addBaseContextActions(&menu); addBaseContextActions(&menu);
QAction *act = menu.exec(ev->globalPos()); QAction *act = menu.exec(ev->globalPos());

View File

@@ -183,7 +183,7 @@ private slots:
private: private:
void syncGridFeature(); void syncGridFeature();
FormWindowBasePrivate *m_d; FormWindowBasePrivate *m_d;
}; };
} // namespace qdesigner_internal } // namespace qdesigner_internal

View File

@@ -288,7 +288,7 @@ void CentralWidget::focusInEvent(QFocusEvent * /* event */)
void CentralWidget::highlightSearchTerms() void CentralWidget::highlightSearchTerms()
{ {
if (HelpViewer *viewer = currentHelpViewer()) { if (HelpViewer *viewer = currentHelpViewer()) {
QHelpSearchEngine *searchEngine = QHelpSearchEngine *searchEngine =
LocalHelpManager::helpEngine().searchEngine(); LocalHelpManager::helpEngine().searchEngine();
QList<QHelpSearchQuery> queryList = searchEngine->query(); QList<QHelpSearchQuery> queryList = searchEngine->query();

View File

@@ -49,7 +49,7 @@ public:
: zoomCount(zoom) : zoomCount(zoom)
, forceFont(false) , forceFont(false)
, lastAnchor(QString()) , lastAnchor(QString())
{} {}
bool hasAnchorAt(QTextBrowser *browser, const QPoint& pos) bool hasAnchorAt(QTextBrowser *browser, const QPoint& pos)

View File

@@ -797,7 +797,7 @@ void PerforcePlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as)
{ {
if (!enableMenuAction(as, m_menuAction)) { if (!enableMenuAction(as, m_menuAction)) {
m_commandLocator->setEnabled(false); m_commandLocator->setEnabled(false);
return; return;
} }
const bool hasTopLevel = currentState().hasTopLevel(); const bool hasTopLevel = currentState().hasTopLevel();
m_commandLocator->setEnabled(hasTopLevel); m_commandLocator->setEnabled(hasTopLevel);

View File

@@ -313,7 +313,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QLatin1String("unused variable 'handler'"), QLatin1String("unused variable 'handler'"),
Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115, Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("gnumakeparser.cpp errors") 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" << 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" "/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp:264: error: expected primary-expression before ':' token\n"

View File

@@ -756,7 +756,7 @@ void SessionNode::watcherDestroyed(QObject *watcher)
by calling ProjectNode::unregisterWatcher and by calling ProjectNode::unregisterWatcher and
SessionNode::unregisterWatcher(). 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). well-known Observer pattern (Booch et al).
\sa ProjectExplorer::Node \sa ProjectExplorer::Node

View File

@@ -161,7 +161,7 @@ void DragTool::createQmlItemNode(const ItemLibraryEntry &itemLibraryEntry, QmlIt
Q_ASSERT(m_dragNode.modelNode().isValid()); Q_ASSERT(m_dragNode.modelNode().isValid());
QList<QmlItemNode> nodeList; QList<QmlItemNode> nodeList;
nodeList.append(m_dragNode); nodeList.append(m_dragNode);
m_selectionIndicator.setItems(scene()->itemsForQmlItemNodes(nodeList)); m_selectionIndicator.setItems(scene()->itemsForQmlItemNodes(nodeList));
} }

View File

@@ -32,7 +32,7 @@ namespace QmlDesigner {
namespace Internal { namespace Internal {
ItemLibraryImageProvider::ItemLibraryImageProvider() : ItemLibraryImageProvider::ItemLibraryImageProvider() :
QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap) QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap)
{ {
} }
@@ -44,7 +44,7 @@ QPixmap ItemLibraryImageProvider::requestPixmap(const QString &id, QSize *size,
size->setWidth(pixmap.width()); size->setWidth(pixmap.width());
size->setHeight(pixmap.height()); size->setHeight(pixmap.height());
} }
if (requestedSize.isValid()) if (requestedSize.isValid())
return pixmap.scaled(requestedSize); return pixmap.scaled(requestedSize);
return pixmap; return pixmap;
} }

View File

@@ -39,7 +39,7 @@ namespace Internal {
class ItemLibraryImageProvider : public QDeclarativeImageProvider class ItemLibraryImageProvider : public QDeclarativeImageProvider
{ {
public: public:
ItemLibraryImageProvider(); ItemLibraryImageProvider();
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize); QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
}; };

View File

@@ -252,7 +252,7 @@ NavigatorTreeModel::ItemRow NavigatorTreeModel::createItemRow(const ModelNode &n
void NavigatorTreeModel::updateItemRow(const ModelNode &node, ItemRow items) void NavigatorTreeModel::updateItemRow(const ModelNode &node, ItemRow items)
{ {
bool blockSignal = blockItemChangedSignal(true); bool blockSignal = blockItemChangedSignal(true);
items.idItem->setText(node.id()); items.idItem->setText(node.id());
items.visibilityItem->setCheckState(node.auxiliaryData("invisible").toBool() ? Qt::Unchecked : Qt::Checked); 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); propertyList.append(propertyName);
} }
} }
} }
return propertyList; return propertyList;
} }

View File

@@ -652,7 +652,7 @@ protected:
QFontMetrics fm(font()); QFontMetrics fm(font());
if (fm.width(text()) > (contentsRect().width() - 8) && text().length() > 4) { if (fm.width(text()) > (contentsRect().width() - 8) && text().length() > 4) {
QPainter p(this); QPainter p(this);
QString elided_txt; QString elided_txt;
elided_txt = fm.elidedText(text(), Qt::ElideRight, contentsRect().width() - 8, Qt::TextShowMnemonic); elided_txt = fm.elidedText(text(), Qt::ElideRight, contentsRect().width() - 8, Qt::TextShowMnemonic);
p.drawText(contentsRect().adjusted(12, 0, 0, 0), Qt::TextSingleLine, elided_txt); p.drawText(contentsRect().adjusted(12, 0, 0, 0), Qt::TextSingleLine, elided_txt);
} }

View File

@@ -108,7 +108,7 @@ void OriginWidget::mouseReleaseEvent(QMouseEvent *event)
} }
void OriginWidget::mousePressEvent(QMouseEvent * event) void OriginWidget::mousePressEvent(QMouseEvent * event)
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
m_pressed = true; m_pressed = true;
for (int i = 0; i < positions.size(); i++) for (int i = 0; i < positions.size(); i++)

View File

@@ -254,11 +254,11 @@ void PropertyEditor::NodeType::setup(const QmlObjectNode &fxObjectNode, const QS
m_backendAnchorBinding.setup(QmlItemNode(fxObjectNode.modelNode())); m_backendAnchorBinding.setup(QmlItemNode(fxObjectNode.modelNode()));
ctxt->setContextProperty("anchorBackend", &m_backendAnchorBinding); ctxt->setContextProperty("anchorBackend", &m_backendAnchorBinding);
ctxt->setContextProperty("transaction", m_propertyEditorTransaction.data()); ctxt->setContextProperty("transaction", m_propertyEditorTransaction.data());
m_contextObject->setSpecificsUrl(qmlSpecificsFile); m_contextObject->setSpecificsUrl(qmlSpecificsFile);
m_contextObject->setStateName(stateName); m_contextObject->setStateName(stateName);
if (!fxObjectNode.isValid()) if (!fxObjectNode.isValid())
return; return;
@@ -774,7 +774,7 @@ void PropertyEditor::resetView()
ctxt->setContextProperty("finishedNotify", QVariant(false)); ctxt->setContextProperty("finishedNotify", QVariant(false));
if (specificQmlData.isEmpty()) if (specificQmlData.isEmpty())
type->m_contextObject->setSpecificQmlData(specificQmlData); type->m_contextObject->setSpecificQmlData(specificQmlData);
type->m_contextObject->setGlobalBaseUrl(qmlFile); type->m_contextObject->setGlobalBaseUrl(qmlFile);
type->m_contextObject->setSpecificQmlData(specificQmlData); type->m_contextObject->setSpecificQmlData(specificQmlData);
type->m_view->setSource(qmlFile); type->m_view->setSource(qmlFile);
@@ -785,7 +785,7 @@ void PropertyEditor::resetView()
fxObjectNode = QmlObjectNode(m_selectedNode); fxObjectNode = QmlObjectNode(m_selectedNode);
} }
QDeclarativeContext *ctxt = type->m_view->rootContext(); QDeclarativeContext *ctxt = type->m_view->rootContext();
ctxt->setContextProperty("finishedNotify", QVariant(false)); ctxt->setContextProperty("finishedNotify", QVariant(false));
if (specificQmlData.isEmpty()) if (specificQmlData.isEmpty())
type->m_contextObject->setSpecificQmlData(specificQmlData); type->m_contextObject->setSpecificQmlData(specificQmlData);

View File

@@ -34,7 +34,7 @@ namespace QmlDesigner {
void SiblingComboBox::setItemNode(const QVariant &itemNode) void SiblingComboBox::setItemNode(const QVariant &itemNode)
{ {
if (!itemNode.value<ModelNode>().isValid() || !QmlItemNode(itemNode.value<ModelNode>()).hasNodeParent()) if (!itemNode.value<ModelNode>().isValid() || !QmlItemNode(itemNode.value<ModelNode>()).hasNodeParent())
return; return;
m_itemNode = itemNode.value<ModelNode>(); m_itemNode = itemNode.value<ModelNode>();

View File

@@ -77,7 +77,7 @@ protected:
{ return m_textModifier; } { return m_textModifier; }
bool includeSurroundingWhitespace(int &start, int &end) const; 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 QStringList &propertyOrder);
static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder); static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder);

View File

@@ -762,7 +762,7 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
nodeList = filterNodesForSkipItems(nodeList); nodeList = filterNodesForSkipItems(nodeList);
QList<VariantProperty> variantPropertyList; QList<VariantProperty> variantPropertyList;
QList<BindingProperty> bindingPropertyList; QList<BindingProperty> bindingPropertyList;
QVector<PropertyValueContainer> auxiliaryContainerVector; QVector<PropertyValueContainer> auxiliaryContainerVector;
foreach (const ModelNode &node, nodeList) { foreach (const ModelNode &node, nodeList) {

View File

@@ -88,7 +88,7 @@ void SubComponentManager::addImport(int pos, const Import &import)
} }
} else { } else {
QString url = import.url(); QString url = import.url();
url.replace(QLatin1Char('.'), QLatin1Char('/')); url.replace(QLatin1Char('.'), QLatin1Char('/'));
foreach (const QString &path, importPaths()) { foreach (const QString &path, importPaths()) {

View File

@@ -199,7 +199,7 @@ void ModelMerger::replaceModel(const ModelNode &modelNode)
syncNodeProperties(rootNode, modelNode, idRenamingHash, view()); syncNodeProperties(rootNode, modelNode, idRenamingHash, view());
syncNodeListProperties(rootNode, modelNode, idRenamingHash, view()); syncNodeListProperties(rootNode, modelNode, idRenamingHash, view());
m_view->changeRootNodeType(modelNode.type(), modelNode.majorVersion(), modelNode.minorVersion()); m_view->changeRootNodeType(modelNode.type(), modelNode.majorVersion(), modelNode.minorVersion());
} catch (RewritingException &e) { } catch (RewritingException &e) {
qWarning() << e.description(); //silent error qWarning() << e.description(); //silent error
} }
} }

View File

@@ -234,7 +234,7 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
rootModelNode.variantProperty("y") = propertyPairList.at(1).second; rootModelNode.variantProperty("y") = propertyPairList.at(1).second;
ModelMerger merger(this); ModelMerger merger(this);
newNode = merger.insertModel(rootModelNode); newNode = merger.insertModel(rootModelNode);
} }
} }

View File

@@ -96,7 +96,7 @@ instanciated instance of this object.
*/ */
QVariant QmlObjectNode::instanceValue(const QString &name) const QVariant QmlObjectNode::instanceValue(const QString &name) const
{ {
return nodeInstance().property(name); return nodeInstance().property(name);
} }

View File

@@ -139,7 +139,7 @@ static inline QString fixEscapedUnicodeChar(const QString &value) //convert "\u2
} }
return value; return value;
} }
static inline bool isSignalPropertyName(const QString &signalName) static inline bool isSignalPropertyName(const QString &signalName)
{ {
// see QmlCompiler::isSignalPropertyName // see QmlCompiler::isSignalPropertyName
@@ -258,7 +258,7 @@ static bool isCustomParserType(const QString &type)
static bool isPropertyChangesType(const QString &type) static bool isPropertyChangesType(const QString &type)
{ {
return type == QLatin1String("PropertyChanges") || type == QLatin1String("QtQuick.PropertyChanges") || type == QLatin1String("Qt.PropertyChanges"); return type == QLatin1String("PropertyChanges") || type == QLatin1String("QtQuick.PropertyChanges") || type == QLatin1String("Qt.PropertyChanges");
} }
@@ -1567,7 +1567,7 @@ ModelNode ModelAmender::listPropertyMissingModelNode(NodeListProperty &modelProp
modelProperty.reparentHere(newNode); modelProperty.reparentHere(newNode);
} else { //The default property could a NodeProperty implicitly (delegate:) } else { //The default property could a NodeProperty implicitly (delegate:)
modelProperty.parentModelNode().removeProperty(modelProperty.name()); modelProperty.parentModelNode().removeProperty(modelProperty.name());
modelProperty.reparentHere(newNode); modelProperty.reparentHere(newNode);
} }
} else { } else {
modelProperty.reparentHere(newNode); modelProperty.reparentHere(newNode);

View File

@@ -49,7 +49,7 @@ public:
bool equals(const DesignerSettings &other) const; bool equals(const DesignerSettings &other) const;
bool openDesignMode; bool openDesignMode;
int itemSpacing; int itemSpacing;
int snapMargin; int snapMargin;
int canvasWidth; int canvasWidth;
int canvasHeight; int canvasHeight;
bool warningsInDesigner; bool warningsInDesigner;

View File

@@ -219,7 +219,7 @@ void QuickToolBar::apply(TextEditor::BaseTextEditor *editor, Document::Ptr docum
m_node = 0; m_node = 0;
PropertyReader propertyReader(document, initializer); PropertyReader propertyReader(document, initializer);
QTextCursor tc(editor->editorWidget()->document()); QTextCursor tc(editor->editorWidget()->document());
tc.setPosition(offset); tc.setPosition(offset);
QPoint p1 = editor->editorWidget()->mapToParent(editor->editorWidget()->viewport()->mapToParent(editor->editorWidget()->cursorRect(tc).topLeft()) - QPoint(0, contextWidget()->height() + 10)); QPoint p1 = editor->editorWidget()->mapToParent(editor->editorWidget()->viewport()->mapToParent(editor->editorWidget()->cursorRect(tc).topLeft()) - QPoint(0, contextWidget()->height() + 10));
tc.setPosition(end); tc.setPosition(end);
QPoint p2 = editor->editorWidget()->mapToParent(editor->editorWidget()->viewport()->mapToParent(editor->editorWidget()->cursorRect(tc).bottomLeft()) + QPoint(0, 10)); QPoint p2 = editor->editorWidget()->mapToParent(editor->editorWidget()->viewport()->mapToParent(editor->editorWidget()->cursorRect(tc).bottomLeft()) + QPoint(0, 10));
@@ -237,7 +237,7 @@ void QuickToolBar::apply(TextEditor::BaseTextEditor *editor, Document::Ptr docum
contextWidget()->rePosition(p3 , p1, p2, QuickToolBarSettings::get().pinContextPane); contextWidget()->rePosition(p3 , p1, p2, QuickToolBarSettings::get().pinContextPane);
contextWidget()->setOptions(QuickToolBarSettings::get().enableContextPane, QuickToolBarSettings::get().pinContextPane); contextWidget()->setOptions(QuickToolBarSettings::get().enableContextPane, QuickToolBarSettings::get().pinContextPane);
contextWidget()->setPath(document->path()); contextWidget()->setPath(document->path());
contextWidget()->setProperties(&propertyReader); contextWidget()->setProperties(&propertyReader);
m_doc = document; m_doc = document;
m_node = node; m_node = node;
} else { } else {

View File

@@ -108,7 +108,7 @@ protected:
private: private:
void ctor(); void ctor();
static bool isValidVersion(QtSupport::BaseQtVersion *version); static bool isValidVersion(QtSupport::BaseQtVersion *version);
static QString canonicalCapsPath(const QString &filePath); static QString canonicalCapsPath(const QString &filePath);
Utils::Environment baseEnvironment() const; Utils::Environment baseEnvironment() const;

View File

@@ -351,7 +351,7 @@ void HighlightDefinitionHandler::keywordStarted(const QXmlAttributes &atts)
} }
void HighlightDefinitionHandler::intStarted(const QXmlAttributes &atts) void HighlightDefinitionHandler::intStarted(const QXmlAttributes &atts)
{ {
ruleElementStarted(atts, QSharedPointer<Rule>(new IntRule)); ruleElementStarted(atts, QSharedPointer<Rule>(new IntRule));
} }
@@ -361,17 +361,17 @@ void HighlightDefinitionHandler::floatStarted(const QXmlAttributes &atts)
} }
void HighlightDefinitionHandler::hlCOctStarted(const QXmlAttributes &atts) void HighlightDefinitionHandler::hlCOctStarted(const QXmlAttributes &atts)
{ {
ruleElementStarted(atts, QSharedPointer<Rule>(new HlCOctRule)); ruleElementStarted(atts, QSharedPointer<Rule>(new HlCOctRule));
} }
void HighlightDefinitionHandler::hlCHexStarted(const QXmlAttributes &atts) void HighlightDefinitionHandler::hlCHexStarted(const QXmlAttributes &atts)
{ {
ruleElementStarted(atts, QSharedPointer<Rule>(new HlCHexRule)); ruleElementStarted(atts, QSharedPointer<Rule>(new HlCHexRule));
} }
void HighlightDefinitionHandler::hlCStringCharStarted(const QXmlAttributes &atts) void HighlightDefinitionHandler::hlCStringCharStarted(const QXmlAttributes &atts)
{ {
ruleElementStarted(atts, QSharedPointer<Rule>(new HlCStringCharRule)); ruleElementStarted(atts, QSharedPointer<Rule>(new HlCStringCharRule));
} }
@@ -389,7 +389,7 @@ void HighlightDefinitionHandler::rangeDetectStarted(const QXmlAttributes &atts)
} }
void HighlightDefinitionHandler::lineContinue(const QXmlAttributes &atts) void HighlightDefinitionHandler::lineContinue(const QXmlAttributes &atts)
{ {
ruleElementStarted(atts, QSharedPointer<Rule>(new LineContinueRule)); ruleElementStarted(atts, QSharedPointer<Rule>(new LineContinueRule));
} }

View File

@@ -35,7 +35,7 @@ using namespace Internal;
void KeywordList::addKeyword(const QString &keyword) void KeywordList::addKeyword(const QString &keyword)
{ {
if (keyword.isEmpty()) if (keyword.isEmpty())
return; return;
m_keywords.insert(keyword); m_keywords.insert(keyword);
} }

View File

@@ -54,7 +54,7 @@ ManageDefinitionsDialog::ManageDefinitionsDialog(
m_definitionsMetaData(metaDataList), m_definitionsMetaData(metaDataList),
m_path(path) m_path(path)
{ {
ui.setupUi(this); ui.setupUi(this);
ui.definitionsTable->setHorizontalHeaderLabels( ui.definitionsTable->setHorizontalHeaderLabels(
QStringList() << tr("Name") << tr("Installed") << tr("Available")); QStringList() << tr("Name") << tr("Installed") << tr("Available"));
ui.definitionsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); ui.definitionsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);

View File

@@ -163,7 +163,7 @@ bool Rule::charPredicateMatchSucceed(const QString &text,
} }
bool Rule::matchSucceed(const QString &text, const int length, ProgressData *progress) bool Rule::matchSucceed(const QString &text, const int length, ProgressData *progress)
{ {
if (m_firstNonSpace && !progress->isOnlySpacesSoFar()) if (m_firstNonSpace && !progress->isOnlySpacesSoFar())
return false; return false;

View File

@@ -124,7 +124,7 @@ public:
void setPattern(const QString &pattern); void setPattern(const QString &pattern);
void setInsensitive(const QString &insensitive); void setInsensitive(const QString &insensitive);
void setMinimal(const QString &minimal); void setMinimal(const QString &minimal);
private: private:
virtual bool doMatchSucceed(const QString &text, virtual bool doMatchSucceed(const QString &text,

View File

@@ -161,13 +161,13 @@ inline const char *unicodeToHTML(ushort unicode_char)
case 0x00BD: return "frac12"; // (189 ) vulgar fraction one half = fraction one half case 0x00BD: return "frac12"; // (189 ) vulgar fraction one half = fraction one half
case 0x00BE: return "frac34"; // (190 ) vulgar fraction three quarters = fraction three quarters case 0x00BE: return "frac34"; // (190 ) vulgar fraction three quarters = fraction three quarters
case 0x00BF: return "iquest"; // (191 ) inverted question mark = turned question mark case 0x00BF: return "iquest"; // (191 ) inverted question mark = turned question mark
case 0x00C0: return "Agrave"; // (192 ) capital letter A with grave = capital letter case 0x00C0: return "Agrave"; // (192 ) capital letter A with grave = capital letter
case 0x00C1: return "Aacute"; // (193 ) capital letter A with acute case 0x00C1: return "Aacute"; // (193 ) capital letter A with acute
case 0x00C2: return "Acirc"; // (194 ) capital letter A with circumflex case 0x00C2: return "Acirc"; // (194 ) capital letter A with circumflex
case 0x00C3: return "Atilde"; // (195 ) capital letter A with tilde case 0x00C3: return "Atilde"; // (195 ) capital letter A with tilde
case 0x00C4: return "Auml"; // (196 ) capital letter A with diaeresis case 0x00C4: return "Auml"; // (196 ) capital letter A with diaeresis
case 0x00C5: return "Aring"; // (197 ) capital letter A with ring above = capital letter case 0x00C5: return "Aring"; // (197 ) capital letter A with ring above = capital letter
case 0x00C6: return "AElig"; // (198 ) capital letter AE = capital ligature case 0x00C6: return "AElig"; // (198 ) capital letter AE = capital ligature
case 0x00C7: return "Ccedil"; // (199 ) capital letter C with cedilla case 0x00C7: return "Ccedil"; // (199 ) capital letter C with cedilla
case 0x00C8: return "Egrave"; // (200 ) capital letter E with grave case 0x00C8: return "Egrave"; // (200 ) capital letter E with grave
case 0x00C9: return "Eacute"; // (201 ) capital letter E with acute case 0x00C9: return "Eacute"; // (201 ) capital letter E with acute
@@ -185,7 +185,7 @@ inline const char *unicodeToHTML(ushort unicode_char)
case 0x00D5: return "Otilde"; // (213 ) capital letter O with tilde case 0x00D5: return "Otilde"; // (213 ) capital letter O with tilde
case 0x00D6: return "Ouml"; // (214 ) capital letter O with diaeresis case 0x00D6: return "Ouml"; // (214 ) capital letter O with diaeresis
case 0x00D7: return "times"; // (215 ) multiplication sign case 0x00D7: return "times"; // (215 ) multiplication sign
case 0x00D8: return "Oslash"; // (216 ) capital letter O with stroke = capital letter case 0x00D8: return "Oslash"; // (216 ) capital letter O with stroke = capital letter
case 0x00D9: return "Ugrave"; // (217 ) capital letter U with grave case 0x00D9: return "Ugrave"; // (217 ) capital letter U with grave
case 0x00DA: return "Uacute"; // (218 ) capital letter U with acute case 0x00DA: return "Uacute"; // (218 ) capital letter U with acute
case 0x00DB: return "Ucirc"; // (219 ) capital letter U with circumflex case 0x00DB: return "Ucirc"; // (219 ) capital letter U with circumflex
@@ -193,13 +193,13 @@ inline const char *unicodeToHTML(ushort unicode_char)
case 0x00DD: return "Yacute"; // (221 ) capital letter Y with acute case 0x00DD: return "Yacute"; // (221 ) capital letter Y with acute
case 0x00DE: return "THORN"; // (222 ) capital letter THORN case 0x00DE: return "THORN"; // (222 ) capital letter THORN
case 0x00DF: return "szlig"; // (223 ) small letter sharp s = ess-zed case 0x00DF: return "szlig"; // (223 ) small letter sharp s = ess-zed
case 0x00E0: return "agrave"; // (224 ) small letter a with grave = small letter case 0x00E0: return "agrave"; // (224 ) small letter a with grave = small letter
case 0x00E1: return "aacute"; // (225 ) small letter a with acute case 0x00E1: return "aacute"; // (225 ) small letter a with acute
case 0x00E2: return "acirc"; // (226 ) small letter a with circumflex case 0x00E2: return "acirc"; // (226 ) small letter a with circumflex
case 0x00E3: return "atilde"; // (227 ) small letter a with tilde case 0x00E3: return "atilde"; // (227 ) small letter a with tilde
case 0x00E4: return "auml"; // (228 ) small letter a with diaeresis case 0x00E4: return "auml"; // (228 ) small letter a with diaeresis
case 0x00E5: return "aring"; // (229 ) small letter a with ring above = small letter case 0x00E5: return "aring"; // (229 ) small letter a with ring above = small letter
case 0x00E6: return "aelig"; // (230 ) small letter ae = small letter case 0x00E6: return "aelig"; // (230 ) small letter ae = small letter
case 0x00E7: return "ccedil"; // (231 ) small letter c with cedilla case 0x00E7: return "ccedil"; // (231 ) small letter c with cedilla
case 0x00E8: return "egrave"; // (232 ) small letter e with grave case 0x00E8: return "egrave"; // (232 ) small letter e with grave
case 0x00E9: return "eacute"; // (233 ) small letter e with acute case 0x00E9: return "eacute"; // (233 ) small letter e with acute
@@ -217,7 +217,7 @@ inline const char *unicodeToHTML(ushort unicode_char)
case 0x00F5: return "otilde"; // (245 ) small letter o with tilde case 0x00F5: return "otilde"; // (245 ) small letter o with tilde
case 0x00F6: return "ouml"; // (246 ) small letter o with diaeresis case 0x00F6: return "ouml"; // (246 ) small letter o with diaeresis
case 0x00F7: return "divide"; // (247 ) division sign case 0x00F7: return "divide"; // (247 ) division sign
case 0x00F8: return "oslash"; // (248 ) small letter o with stroke = small letter case 0x00F8: return "oslash"; // (248 ) small letter o with stroke = small letter
case 0x00F9: return "ugrave"; // (249 ) small letter u with grave case 0x00F9: return "ugrave"; // (249 ) small letter u with grave
case 0x00FA: return "uacute"; // (250 ) small letter u with acute case 0x00FA: return "uacute"; // (250 ) small letter u with acute
case 0x00FB: return "ucirc"; // (251 ) small letter u with circumflex case 0x00FB: return "ucirc"; // (251 ) small letter u with circumflex