summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorAxel Waggershauser <awagger@gmail.com>2013-03-15 00:42:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-16 20:22:50 +0100
commitb11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch)
treef81e40ee49f5109b4100048d131d5bb922b448aa /src/gui/text
parent72367a94a750355eb748793ce8c365373a332c9c (diff)
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qcssparser.cpp8
-rw-r--r--src/gui/text/qstatictext.cpp22
-rw-r--r--src/gui/text/qstatictext.h2
-rw-r--r--src/gui/text/qstatictext_p.h2
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp2
-rw-r--r--src/gui/text/qtextdocument.cpp4
-rw-r--r--src/gui/text/qtextlayout.cpp4
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/text/qtextodfwriter.cpp14
-rw-r--r--src/gui/text/qtextoption.cpp2
-rw-r--r--src/gui/text/qtexttable.cpp6
12 files changed, 35 insertions, 35 deletions
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index eaca605652..b7b8e919ad 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -183,7 +183,7 @@ QT_BEGIN_NAMESPACE
This signal is emitted when the specified \a block has been updated.
Subclasses of QAbstractTextDocumentLayout should emit this signal when
- the layout of \a block has changed in order to repaint.
+ the layout of \a block has changed in order to repaint.
*/
/*!
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 5f610e3fb7..1264330873 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -537,7 +537,7 @@ QSize ValueExtractor::sizeValue(const Declaration &decl)
lengthValueFromData(qvariant_cast<LengthData>(v.at(1)), f));
}
- LengthData x[2] = { {0, LengthData::None }, {0, LengthData::None} };
+ LengthData x[2] = { {0, LengthData::None }, {0, LengthData::None} };
if (decl.d->values.count() > 0)
x[0] = lengthValue(decl.d->values.at(0));
if (decl.d->values.count() > 1)
@@ -917,7 +917,7 @@ void ValueExtractor::borderValue(const Declaration &decl, int *width, QCss::Bord
if (decl.d->values.isEmpty())
return;
-
+
BorderData data;
data.width.number = 0;
data.width.unit = LengthData::None;
@@ -1465,7 +1465,7 @@ QRect Declaration::rectValue() const
{
if (d->values.count() != 1)
return QRect();
-
+
if (d->parsed.isValid())
return qvariant_cast<QRect>(d->parsed);
@@ -1934,7 +1934,7 @@ QVector<StyleRule> StyleSelector::styleRulesForNode(NodePtr node)
return rules;
QMap<uint, StyleRule> weightedRules; // (spec, rule) that will be sorted below
-
+
//prune using indexed stylesheet
for (int sheetIdx = 0; sheetIdx < styleSheets.count(); ++sheetIdx) {
const StyleSheet &styleSheet = styleSheets.at(sheetIdx);
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 2c1683f416..cd88e3bbe4 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE
\mainclass
QStaticText provides a way to cache layout data for a block of text so that it can be drawn
- more efficiently than by using QPainter::drawText() in which the layout information is
- recalculated with every call.
+ more efficiently than by using QPainter::drawText() in which the layout information is
+ recalculated with every call.
The class primarily provides an optimization for cases where the text, its font and the
transformations on the painter are static over several paint events. If the text or its layout
@@ -97,8 +97,8 @@ QT_BEGIN_NAMESPACE
\endcode
The QStaticText class can be used to mimic the behavior of QPainter::drawText() to a specific
- point with no boundaries, and also when QPainter::drawText() is called with a bounding
- rectangle.
+ point with no boundaries, and also when QPainter::drawText() is called with a bounding
+ rectangle.
If a bounding rectangle is not required, create a QStaticText object without setting a preferred
text width. The text will then occupy a single line.
@@ -151,7 +151,7 @@ QT_BEGIN_NAMESPACE
/*!
Constructs an empty QStaticText
*/
-QStaticText::QStaticText()
+QStaticText::QStaticText()
: data(new QStaticTextPrivate)
{
}
@@ -161,7 +161,7 @@ QStaticText::QStaticText()
*/
QStaticText::QStaticText(const QString &text)
: data(new QStaticTextPrivate)
-{
+{
data->text = text;
data->invalidate();
}
@@ -169,7 +169,7 @@ QStaticText::QStaticText(const QString &text)
/*!
Constructs a QStaticText object which is a copy of \a other.
*/
-QStaticText::QStaticText(const QStaticText &other)
+QStaticText::QStaticText(const QStaticText &other)
{
data = other.data;
}
@@ -186,7 +186,7 @@ QStaticText::~QStaticText()
\internal
*/
void QStaticText::detach()
-{
+{
if (data->ref.load() != 1)
data.detach();
}
@@ -219,7 +219,7 @@ void QStaticText::prepare(const QTransform &matrix, const QFont &font)
Assigns \a other to this QStaticText.
*/
QStaticText &QStaticText::operator=(const QStaticText &other)
-{
+{
data = other.data;
return *this;
}
@@ -300,7 +300,7 @@ Qt::TextFormat QStaticText::textFormat() const
\sa setText()
*/
-QString QStaticText::text() const
+QString QStaticText::text() const
{
return data->text;
}
@@ -651,7 +651,7 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p)
.arg(QString::number(color.blue(), 16), 2, QLatin1Char('0')));
#endif
document.setDefaultFont(font);
- document.setDocumentMargin(0.0);
+ document.setDocumentMargin(0.0);
#ifndef QT_NO_TEXTHTMLPARSER
document.setHtml(text);
#else
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index 60fa82712b..e41c475495 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
class QStaticTextPrivate;
class Q_GUI_EXPORT QStaticText
-{
+{
public:
enum PerformanceHint {
ModerateCaching,
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 1434c54417..4451f27b27 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -77,7 +77,7 @@ public:
class Q_GUI_EXPORT QStaticTextItem
{
-public:
+public:
QStaticTextItem() : chars(0), numChars(0), useBackendOptimizations(false),
userDataNeedsUpdate(0), m_fontEngine(0), m_userData(0) {}
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index e8e1c81dab..784aeb9a71 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -380,7 +380,7 @@ void QSyntaxHighlighter::rehighlight()
\since 4.6
Reapplies the highlighting to the given QTextBlock \a block.
-
+
\sa rehighlight()
*/
void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 34133c5e07..b83af30f7f 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -416,12 +416,12 @@ void QTextDocument::redo(QTextCursor *cursor)
}
/*! \enum QTextDocument::Stacks
-
+
\value UndoStack The undo stack.
\value RedoStack The redo stack.
\value UndoAndRedoStacks Both the undo and redo stacks.
*/
-
+
/*!
\since 4.7
Clears the stacks specified by \a stacksToClear.
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 833e4c5037..50908f9908 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1022,7 +1022,7 @@ static inline QRectF clipIfValid(const QRectF &rect, const QRectF &clip)
*/
#if !defined(QT_NO_RAWFONT)
QList<QGlyphRun> QTextLayout::glyphRuns(int from, int length) const
-{
+{
if (from < 0)
from = 0;
if (length < 0)
@@ -1651,7 +1651,7 @@ namespace {
}
inline glyph_t currentGlyph() const
- {
+ {
Q_ASSERT(currentPosition > 0);
Q_ASSERT(logClusters[currentPosition - 1] < glyphs.numGlyphs);
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 80ed2f023f..8465dcdaad 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -636,7 +636,7 @@ QTextFrame::iterator QTextFrame::begin() const
/*!
Returns an iterator pointing to the position past the last document element inside the frame.
- Please see the document \l{STL-Style Iterators} for more information.
+ Please see the document \l{STL-Style Iterators} for more information.
\sa begin()
*/
QTextFrame::iterator QTextFrame::end() const
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index d83dc98e22..1572648d7f 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -677,13 +677,13 @@ void QTextOdfWriter::writeFrameFormat(QXmlStreamWriter &writer, QTextFrameFormat
writer.writeEndElement(); // style
// TODO consider putting the following properties in a qt-namespace.
-// Position position () const
-// qreal border () const
-// QBrush borderBrush () const
-// BorderStyle borderStyle () const
-// qreal padding () const
-// QTextLength width () const
-// QTextLength height () const
+// Position position () const
+// qreal border () const
+// QBrush borderBrush () const
+// BorderStyle borderStyle () const
+// qreal padding () const
+// QTextLength width () const
+// QTextLength height () const
// PageBreakFlags pageBreakPolicy () const
}
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 7b5d20bc5c..c939020457 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -394,7 +394,7 @@ QList<QTextOption::Tab> QTextOption::tabs() const
/*!
\fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar())
-
+
Creates a tab with the given position, tab type, and delimiter
(\a pos, \a tabType, \a delim).
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 0c9ec6203e..a56f8060e0 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -535,11 +535,11 @@ void QTextTablePrivate::update() const
Rows and columns within a QTextTable can be merged and split using
the mergeCells() and splitCell() functions. However, only cells that span multiple
rows or columns can be split. (Merging or splitting does not increase or decrease
- the number of rows and columns.)
+ the number of rows and columns.)
Note that if you have merged multiple columns and rows into one cell, you will not
- be able to split the merged cell into new cells spanning over more than one row
- or column. To be able to split cells spanning over several rows and columns you
+ be able to split the merged cell into new cells spanning over more than one row
+ or column. To be able to split cells spanning over several rows and columns you
need to do this over several iterations.
\table 80%