aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-19 15:29:20 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-19 15:29:20 (GMT)
commitcdef90c0bcc7e0e6636618f0edfee6940d82114f (patch)
tree9fd66d510d543a6bc6bbf726df848d5b647b3100
parent32853b47329d4e26e6c46c56e2e05fea235215b5 (diff)
fix my formatting errors
-rw-r--r--src/include/ktexteditor/codecompletionmodel.h6
-rw-r--r--src/include/ktexteditor/cursor.h77
-rw-r--r--src/include/ktexteditor/document.h8
-rw-r--r--src/include/ktexteditor/documentcursor.h32
-rw-r--r--src/include/ktexteditor/editor.h4
-rw-r--r--src/include/ktexteditor/highlightinterface.h3
-rw-r--r--src/include/ktexteditor/markinterface.h3
-rw-r--r--src/include/ktexteditor/movingcursor.h36
-rw-r--r--src/include/ktexteditor/movingrange.h36
-rw-r--r--src/include/ktexteditor/plugin.h6
-rw-r--r--src/include/ktexteditor/range.h47
-rw-r--r--src/include/ktexteditor/view.h2
12 files changed, 91 insertions, 169 deletions
diff --git a/src/include/ktexteditor/codecompletionmodel.h b/src/include/ktexteditor/codecompletionmodel.h
index 8477ecd..ee9e22a 100644
--- a/src/include/ktexteditor/codecompletionmodel.h
+++ b/src/include/ktexteditor/codecompletionmodel.h
@@ -384,7 +384,7 @@ public:
* @param invocationType How the code completion was triggered
* */
virtual void completionInvoked(KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType);
-
+
/**
* This function is responsible for inserting a selected completion into the
* view. The default implementation replaces the text that the completions
@@ -395,8 +395,8 @@ public:
* so far)
* @param index identifies the completion match to insert
* */
- virtual void executeCompletionItem (KTextEditor::View *view, const Range &word, const QModelIndex &index) const;
-
+ virtual void executeCompletionItem(KTextEditor::View *view, const Range &word, const QModelIndex &index) const;
+
// Reimplementations
/**
* Reimplemented from QAbstractItemModel::columnCount(). The default implementation
diff --git a/src/include/ktexteditor/cursor.h b/src/include/ktexteditor/cursor.h
index 91f63ea..89330c3 100644
--- a/src/include/ktexteditor/cursor.h
+++ b/src/include/ktexteditor/cursor.h
@@ -61,8 +61,7 @@ public:
*/
Cursor()
: m_line(0)
- , m_column(0)
- {
+ , m_column(0) {
}
/**
@@ -73,16 +72,14 @@ public:
*/
Cursor(int line, int column)
: m_line(line)
- , m_column(column)
- {
+ , m_column(column) {
}
/**
* Returns whether the current position of this cursor is a valid position
* (line + column must both be >= 0).
*/
- bool isValid() const
- {
+ bool isValid() const {
return m_line >= 0 && m_column >= 0;
}
@@ -91,16 +88,14 @@ public:
* The returned cursor position is set to (-1, -1).
* \see isValid()
*/
- static Cursor invalid()
- {
+ static Cursor invalid() {
return Cursor(-1, -1);
}
/**
* Returns a cursor representing the start of any document - i.e., line 0, column 0.
*/
- static Cursor start()
- {
+ static Cursor start() {
return Cursor();
}
@@ -115,8 +110,7 @@ public:
*
* \param position new cursor position
*/
- void setPosition(const Cursor &position)
- {
+ void setPosition(const Cursor &position) {
m_line = position.m_line;
m_column = position.m_column;
}
@@ -129,8 +123,7 @@ public:
* \param line new cursor line
* \param column new cursor column
*/
- void setPosition(int line, int column)
- {
+ void setPosition(int line, int column) {
m_line = line;
m_column = column;
}
@@ -139,8 +132,7 @@ public:
* Retrieve the line on which this cursor is situated.
* \return line number, where 0 is the first line.
*/
- int line() const
- {
+ int line() const {
return m_line;
}
@@ -148,8 +140,7 @@ public:
* Set the cursor line to \e line.
* \param line new cursor line
*/
- void setLine(int line)
- {
+ void setLine(int line) {
m_line = line;
}
@@ -157,8 +148,7 @@ public:
* Retrieve the column on which this cursor is situated.
* \return column number, where 0 is the first column.
*/
- int column() const
- {
+ int column() const {
return m_column;
}
@@ -166,8 +156,7 @@ public:
* Set the cursor column to \e column.
* \param column new cursor column
*/
- void setColumn(int column)
- {
+ void setColumn(int column) {
m_column = column;
}
@@ -175,8 +164,7 @@ public:
* Determine if this cursor is located at the start of a line.
* \return \e true if the cursor is situated at the start of the line, \e false if it isn't.
*/
- bool atStartOfLine() const
- {
+ bool atStartOfLine() const {
return m_column == 0;
}
@@ -184,8 +172,7 @@ public:
* Determine if this cursor is located at the start of a document.
* \return \e true if the cursor is situated at the start of the document, \e false if it isn't.
*/
- bool atStartOfDocument() const
- {
+ bool atStartOfDocument() const {
return m_line == 0 && m_column == 0;
}
@@ -194,8 +181,7 @@ public:
* \param line will be filled with current cursor line
* \param column will be filled with current cursor column
*/
- void position(int &line, int &column) const
- {
+ void position(int &line, int &column) const {
line = m_line;
column = m_column;
}
@@ -207,8 +193,7 @@ public:
* \param c2 the second position
* \return a the summation of the two input cursors
*/
- inline friend Cursor operator+(const Cursor &c1, const Cursor &c2)
- {
+ inline friend Cursor operator+(const Cursor &c1, const Cursor &c2) {
return Cursor(c1.line() + c2.line(), c1.column() + c2.column());
}
@@ -218,8 +203,7 @@ public:
* \param c2 the position to add
* \return a reference to the cursor which has just been added to
*/
- inline friend Cursor &operator+=(Cursor &c1, const Cursor &c2)
- {
+ inline friend Cursor &operator+=(Cursor &c1, const Cursor &c2) {
c1.setPosition(c1.line() + c2.line(), c1.column() + c2.column());
return c1;
}
@@ -232,8 +216,7 @@ public:
* \param c2 the second position
* \return a cursor representing the subtraction of \p c2 from \p c1
*/
- inline friend Cursor operator-(const Cursor &c1, const Cursor &c2)
- {
+ inline friend Cursor operator-(const Cursor &c1, const Cursor &c2) {
return Cursor(c1.line() - c2.line(), c1.column() - c2.column());
}
@@ -243,8 +226,7 @@ public:
* \param c2 the position to subtract
* \return a reference to the cursor which has just been subtracted from
*/
- inline friend Cursor &operator-=(Cursor &c1, const Cursor &c2)
- {
+ inline friend Cursor &operator-=(Cursor &c1, const Cursor &c2) {
c1.setPosition(c1.line() - c2.line(), c1.column() - c2.column());
return c1;
}
@@ -259,8 +241,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's line and column are \e equal.
*/
- inline friend bool operator==(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator==(const Cursor &c1, const Cursor &c2) {
return c1.line() == c2.line() && c1.column() == c2.column();
}
@@ -270,8 +251,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's line and column are \e not equal.
*/
- inline friend bool operator!=(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator!=(const Cursor &c1, const Cursor &c2) {
return !(c1 == c2);
}
@@ -282,8 +262,7 @@ public:
* \return \e true, if c1's position is greater than c2's position,
* otherwise \e false.
*/
- inline friend bool operator>(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator>(const Cursor &c1, const Cursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.m_column > c2.m_column);
}
@@ -294,8 +273,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator>=(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator>=(const Cursor &c1, const Cursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.m_column >= c2.m_column);
}
@@ -306,8 +284,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator<(const Cursor &c1, const Cursor &c2) {
return !(c1 >= c2);
}
@@ -318,16 +295,14 @@ public:
* \return \e true, if c1's position is lesser than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<=(const Cursor &c1, const Cursor &c2)
- {
+ inline friend bool operator<=(const Cursor &c1, const Cursor &c2) {
return !(c1 > c2);
}
/**
* qDebug() stream operator. Writes this cursor to the debug output in a nicely formatted way.
*/
- inline friend QDebug operator<< (QDebug s, const Cursor &cursor)
- {
+ inline friend QDebug operator<< (QDebug s, const Cursor &cursor) {
if (&cursor) {
s.nospace() << "(" << cursor.line() << ", " << cursor.column() << ")";
} else {
@@ -354,7 +329,7 @@ private:
}
-Q_DECLARE_TYPEINFO (KTextEditor::Cursor, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(KTextEditor::Cursor, Q_MOVABLE_TYPE);
#endif
diff --git a/src/include/ktexteditor/document.h b/src/include/ktexteditor/document.h
index b635da9..b498772 100644
--- a/src/include/ktexteditor/document.h
+++ b/src/include/ktexteditor/document.h
@@ -134,7 +134,7 @@ protected:
* \param parent parent object
* \see Editor::createDocument()
*/
- Document (DocumentPrivate *impl, QObject *parent);
+ Document(DocumentPrivate *impl, QObject *parent);
public:
/**
@@ -470,8 +470,7 @@ public:
* A Range which encompasses the whole document.
* \return A range from the start to the end of the document
*/
- inline Range documentRange() const
- {
+ inline Range documentRange() const {
return Range(Cursor::start(), documentEnd());
}
@@ -502,8 +501,7 @@ public:
* \param line line
* \see lineLength(), line()
*/
- inline Cursor endOfLine(int line) const
- {
+ inline Cursor endOfLine(int line) const {
return Cursor(line, lineLength(line));
}
diff --git a/src/include/ktexteditor/documentcursor.h b/src/include/ktexteditor/documentcursor.h
index 8f9ec21..a805643 100644
--- a/src/include/ktexteditor/documentcursor.h
+++ b/src/include/ktexteditor/documentcursor.h
@@ -162,8 +162,7 @@ public:
* i.e. whether line() >= 0 and column() >= 0.
* \return \e true , if the cursor position is valid, otherwise \e false
*/
- inline bool isValid() const
- {
+ inline bool isValid() const {
return line() >= 0 && column() >= 0;
}
@@ -173,8 +172,7 @@ public:
* \return \e true , if the cursor is a valid text position, otherwise \e false
*/
// TODO KDE5: use KTE::Document::isValidTextPosition()
- inline bool isValidTextPosition() const
- {
+ inline bool isValidTextPosition() const {
return isValid() && line() < document()->lines() && column() <= document()->lineLength(line());
}
@@ -309,8 +307,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's assigned document, line and column are \e equal.
*/
- inline friend bool operator==(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator==(const DocumentCursor &c1, const DocumentCursor &c2) {
return c1.document() == c2.document() && c1.line() == c2.line() && c1.column() == c2.column();
}
@@ -320,8 +317,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's assigned document, line and column are \e not equal.
*/
- inline friend bool operator!=(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator!=(const DocumentCursor &c1, const DocumentCursor &c2) {
return !(c1 == c2);
}
@@ -332,8 +328,7 @@ public:
* \return \e true, if c1's position is greater than c2's position,
* otherwise \e false.
*/
- inline friend bool operator>(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator>(const DocumentCursor &c1, const DocumentCursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.column() > c2.column());
}
@@ -344,8 +339,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator>=(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator>=(const DocumentCursor &c1, const DocumentCursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.column() >= c2.column());
}
@@ -356,8 +350,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator<(const DocumentCursor &c1, const DocumentCursor &c2) {
return !(c1 >= c2);
}
@@ -368,8 +361,7 @@ public:
* \return \e true, if c1's position is lesser than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<=(const DocumentCursor &c1, const DocumentCursor &c2)
- {
+ inline friend bool operator<=(const DocumentCursor &c1, const DocumentCursor &c2) {
return !(c1 > c2);
}
@@ -379,8 +371,7 @@ public:
* @param cursor cursor to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const DocumentCursor *cursor)
- {
+ inline friend QDebug operator<< (QDebug s, const DocumentCursor *cursor) {
if (cursor) {
s.nospace() << "(" << cursor->document() << ": " << cursor->line() << ", " << cursor->column() << ")";
} else {
@@ -395,8 +386,7 @@ public:
* @param cursor cursor to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const DocumentCursor &cursor)
- {
+ inline friend QDebug operator<< (QDebug s, const DocumentCursor &cursor) {
return s << &cursor;
}
@@ -407,7 +397,7 @@ private:
}
-Q_DECLARE_TYPEINFO (KTextEditor::DocumentCursor, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(KTextEditor::DocumentCursor, Q_MOVABLE_TYPE);
#endif
diff --git a/src/include/ktexteditor/editor.h b/src/include/ktexteditor/editor.h
index 875c3c6..d0b225d 100644
--- a/src/include/ktexteditor/editor.h
+++ b/src/include/ktexteditor/editor.h
@@ -111,7 +111,7 @@ protected:
*
* @param impl d-pointer to use
*/
- Editor (EditorPrivate *impl);
+ Editor(EditorPrivate *impl);
/**
* Virtual destructor.
@@ -181,7 +181,7 @@ public:
* Get the current default encoding for this Editor part.
* \return default encoding
*/
- QString defaultEncoding () const;
+ QString defaultEncoding() const;
/*
* Configuration management.
diff --git a/src/include/ktexteditor/highlightinterface.h b/src/include/ktexteditor/highlightinterface.h
index 29a5bc1..fb4620a 100644
--- a/src/include/ktexteditor/highlightinterface.h
+++ b/src/include/ktexteditor/highlightinterface.h
@@ -113,8 +113,7 @@ public:
/// TODO: KDE5 mark as movable
struct AttributeBlock {
AttributeBlock(const int _start, const int _length, const Attribute::Ptr &_attribute)
- : start(_start), length(_length), attribute(_attribute)
- {
+ : start(_start), length(_length), attribute(_attribute) {
}
/// The column this attribute starts at.
int start;
diff --git a/src/include/ktexteditor/markinterface.h b/src/include/ktexteditor/markinterface.h
index fd28db5..cd46c5d 100644
--- a/src/include/ktexteditor/markinterface.h
+++ b/src/include/ktexteditor/markinterface.h
@@ -198,8 +198,7 @@ public:
* supports the new size!
* \return number of reserved marker types
*/
- static int reservedMarkersCount()
- {
+ static int reservedMarkersCount() {
return 7;
}
diff --git a/src/include/ktexteditor/movingcursor.h b/src/include/ktexteditor/movingcursor.h
index e718c3d..8783c39 100644
--- a/src/include/ktexteditor/movingcursor.h
+++ b/src/include/ktexteditor/movingcursor.h
@@ -169,8 +169,7 @@ public:
* i.e. whether line() >= 0 and column() >= 0.
* \return \e true , if the cursor position is valid, otherwise \e false
*/
- inline bool isValid() const
- {
+ inline bool isValid() const {
return line() >= 0 && column() >= 0;
}
@@ -180,8 +179,7 @@ public:
* \return \e true , if the cursor is a valid text position , otherwise \e false
*/
// TODO KDE5: use KTE::Document::isValidTextPosition()
- inline bool isValidTextPosition() const
- {
+ inline bool isValidTextPosition() const {
return isValid() && line() < document()->lines() && column() <= document()->lineLength(line());
}
@@ -272,8 +270,7 @@ public:
* Even if this cursor belongs to a range, the created one not.
* @return normal cursor
*/
- const Cursor toCursor() const
- {
+ const Cursor toCursor() const {
return Cursor(line(), column());
}
@@ -282,8 +279,7 @@ public:
* Even if this cursor belongs to a range, the created one not.
* @return normal cursor
*/
- operator const Cursor() const
- {
+ operator const Cursor() const {
return Cursor(line(), column());
}
@@ -300,8 +296,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's line and column are \e equal.
*/
- inline friend bool operator==(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator==(const MovingCursor &c1, const MovingCursor &c2) {
return c1.line() == c2.line() && c1.column() == c2.column();
}
@@ -311,8 +306,7 @@ public:
* \param c2 second cursor to compare
* \return \e true, if c1's and c2's line and column are \e not equal.
*/
- inline friend bool operator!=(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator!=(const MovingCursor &c1, const MovingCursor &c2) {
return !(c1 == c2);
}
@@ -323,8 +317,7 @@ public:
* \return \e true, if c1's position is greater than c2's position,
* otherwise \e false.
*/
- inline friend bool operator>(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator>(const MovingCursor &c1, const MovingCursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.column() > c2.column());
}
@@ -335,8 +328,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator>=(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator>=(const MovingCursor &c1, const MovingCursor &c2) {
return c1.line() > c2.line() || (c1.line() == c2.line() && c1.column() >= c2.column());
}
@@ -347,8 +339,7 @@ public:
* \return \e true, if c1's position is greater than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator<(const MovingCursor &c1, const MovingCursor &c2) {
return !(c1 >= c2);
}
@@ -359,8 +350,7 @@ public:
* \return \e true, if c1's position is lesser than or equal to c2's
* position, otherwise \e false.
*/
- inline friend bool operator<=(const MovingCursor &c1, const MovingCursor &c2)
- {
+ inline friend bool operator<=(const MovingCursor &c1, const MovingCursor &c2) {
return !(c1 > c2);
}
@@ -370,8 +360,7 @@ public:
* @param cursor cursor to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const MovingCursor *cursor)
- {
+ inline friend QDebug operator<< (QDebug s, const MovingCursor *cursor) {
if (cursor) {
s.nospace() << "(" << cursor->line() << ", " << cursor->column() << ")";
} else {
@@ -386,8 +375,7 @@ public:
* @param cursor cursor to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const MovingCursor &cursor)
- {
+ inline friend QDebug operator<< (QDebug s, const MovingCursor &cursor) {
return s << &cursor;
}
};
diff --git a/src/include/ktexteditor/movingrange.h b/src/include/ktexteditor/movingrange.h
index 633a604..4920079 100644
--- a/src/include/ktexteditor/movingrange.h
+++ b/src/include/ktexteditor/movingrange.h
@@ -342,8 +342,7 @@ public:
* Convert this clever range into a dumb one.
* @return normal range
*/
- const Range toRange() const
- {
+ const Range toRange() const {
return Range(start().toCursor(), end().toCursor());
}
@@ -351,8 +350,7 @@ public:
* Convert this clever range into a dumb one. Equal to toRange, allowing to use implicit conversion.
* @return normal range
*/
- operator const Range() const
- {
+ operator const Range() const {
return Range(start().toCursor(), end().toCursor());
}
@@ -362,8 +360,7 @@ public:
* @param cursor range to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const MovingRange *range)
- {
+ inline friend QDebug operator<< (QDebug s, const MovingRange *range) {
if (range) {
s << "[" << range->start() << " -> " << range->end() << "]";
} else {
@@ -378,8 +375,7 @@ public:
* @param range range to print
* @return debug stream
*/
- inline friend QDebug operator<< (QDebug s, const MovingRange &range)
- {
+ inline friend QDebug operator<< (QDebug s, const MovingRange &range) {
return s << &range;
}
@@ -389,8 +385,7 @@ public:
*
* \returns \e true if the range contains no characters, otherwise \e false
*/
- inline bool isEmpty() const
- {
+ inline bool isEmpty() const {
return start() == end();
}
@@ -408,8 +403,7 @@ public:
*
* \return \e true, if this range contains \e range, otherwise \e false
*/
- inline bool contains(const Range &range) const
- {
+ inline bool contains(const Range &range) const {
return range.start() >= start() && range.end() <= end();
}
@@ -420,8 +414,7 @@ public:
*
* \return \e true if the cursor is contained within this range, otherwise \e false.
*/
- inline bool contains(const Cursor &cursor) const
- {
+ inline bool contains(const Cursor &cursor) const {
return cursor >= start() && cursor < end();
}
@@ -432,8 +425,7 @@ public:
*
* \return \e true if the line is wholly encompassed by this range, otherwise \e false.
*/
- inline bool containsLine(int line) const
- {
+ inline bool containsLine(int line) const {
return (line > start().line() || (line == start().line() && !start().column())) && line < end().line();
}
@@ -444,8 +436,7 @@ public:
*
* \return \e true if the range contains \e column, otherwise \e false
*/
- inline bool containsColumn(int column) const
- {
+ inline bool containsColumn(int column) const {
return column >= start().column() && column < end().column();
}
@@ -465,8 +456,7 @@ public:
*
* \return \e true, if the range overlaps at least part of \e line, otherwise \e false
*/
- inline bool overlapsLine(int line) const
- {
+ inline bool overlapsLine(int line) const {
return line >= start().line() && line <= end().line();
}
@@ -480,8 +470,7 @@ public:
* \return \e true if the column is between the range's starting and ending
* columns, otherwise \e false.
*/
- inline bool overlapsColumn(int column) const
- {
+ inline bool overlapsColumn(int column) const {
return start().column() <= column && end().column() > column;
}
@@ -492,8 +481,7 @@ public:
* \return \e true if both the start and end positions are on the same
* line, otherwise \e false
*/
- inline bool onSingleLine() const
- {
+ inline bool onSingleLine() const {
return start().line() == end().line();
}
diff --git a/src/include/ktexteditor/plugin.h b/src/include/ktexteditor/plugin.h
index 88094db..046982d 100644
--- a/src/include/ktexteditor/plugin.h
+++ b/src/include/ktexteditor/plugin.h
@@ -110,12 +110,12 @@ public:
* Create a new application plugin.
* \param parent parent object
*/
- Plugin (QObject *parent);
+ Plugin(QObject *parent);
/**
* Virtual destructor.
*/
- virtual ~Plugin ();
+ virtual ~Plugin();
/**
* Create a new View for this plugin for the given KTextEditor::MainWindow
@@ -126,7 +126,7 @@ public:
* \param mainWindow the MainWindow for which a view should be created
* \return the new created view or NULL
*/
- virtual QObject *createView (KTextEditor::MainWindow *mainWindow) = 0;
+ virtual QObject *createView(KTextEditor::MainWindow *mainWindow) = 0;
private:
class PluginPrivate *const d;
diff --git a/src/include/ktexteditor/range.h b/src/include/ktexteditor/range.h
index 3133e60..2c703e0 100644
--- a/src/include/ktexteditor/range.h
+++ b/src/include/ktexteditor/range.h
@@ -120,8 +120,7 @@ public:
*
* \returns const reference to the start position of this range.
*/
- const Cursor &start() const
- {
+ const Cursor &start() const {
return m_start;
}
@@ -130,8 +129,7 @@ public:
*
* \returns const reference to the end position of this range.
*/
- const Cursor &end() const
- {
+ const Cursor &end() const {
return m_end;
}
@@ -175,8 +173,7 @@ public:
*
* \param start new start cursor
*/
- void setStart(const Cursor &start)
- {
+ void setStart(const Cursor &start) {
if (start > end()) {
setRange(start, start);
} else {
@@ -191,8 +188,7 @@ public:
*
* \param end new end cursor
*/
- void setEnd(const Cursor &end)
- {
+ void setEnd(const Cursor &end) {
if (end < start()) {
setRange(end, end);
} else {
@@ -419,8 +415,7 @@ public:
*
* \return a the summation of the two input ranges
*/
- inline friend Range operator+(const Range &r1, const Range &r2)
- {
+ inline friend Range operator+(const Range &r1, const Range &r2) {
return Range(r1.start() + r2.start(), r1.end() + r2.end());
}
@@ -432,8 +427,7 @@ public:
*
* \return a reference to the cursor which has just been added to
*/
- inline friend Range &operator+=(Range &r1, const Range &r2)
- {
+ inline friend Range &operator+=(Range &r1, const Range &r2) {
r1.setRange(r1.start() + r2.start(), r1.end() + r2.end());
return r1;
}
@@ -447,8 +441,7 @@ public:
*
* \return a range representing the subtraction of \p r2 from \p r1
*/
- inline friend Range operator-(const Range &r1, const Range &r2)
- {
+ inline friend Range operator-(const Range &r1, const Range &r2) {
return Range(r1.start() - r2.start(), r1.end() - r2.end());
}
@@ -460,8 +453,7 @@ public:
*
* \return a reference to the range which has just been subtracted from
*/
- inline friend Range &operator-=(Range &r1, const Range &r2)
- {
+ inline friend Range &operator-=(Range &r1, const Range &r2) {
r1.setRange(r1.start() - r2.start(), r1.end() - r2.end());
return r1;
}
@@ -474,8 +466,7 @@ public:
*
* \return the intersected range, invalid() if there is no overlap
*/
- inline friend Range operator&(const Range &r1, const Range &r2)
- {
+ inline friend Range operator&(const Range &r1, const Range &r2) {
return r1.intersect(r2);
}
@@ -487,8 +478,7 @@ public:
*
* \return a reference to this range, after the intersection has taken place
*/
- inline friend Range &operator&=(Range &r1, const Range &r2)
- {
+ inline friend Range &operator&=(Range &r1, const Range &r2) {
r1.setRange(r1.intersect(r2));
return r1;
}
@@ -501,8 +491,7 @@ public:
*
* \return \e true if \e r1 and \e r2 equal, otherwise \e false
*/
- inline friend bool operator==(const Range &r1, const Range &r2)
- {
+ inline friend bool operator==(const Range &r1, const Range &r2) {
return r1.start() == r2.start() && r1.end() == r2.end();
}
@@ -514,8 +503,7 @@ public:
*
* \return \e true if \e r1 and \e r2 do \e not equal, otherwise \e false
*/
- inline friend bool operator!=(const Range &r1, const Range &r2)
- {
+ inline friend bool operator!=(const Range &r1, const Range &r2) {
return r1.start() != r2.start() || r1.end() != r2.end();
}
@@ -528,8 +516,7 @@ public:
*
* \return \e true if \e r1 starts after where \e r2 ends, otherwise \e false
*/
- inline friend bool operator>(const Range &r1, const Range &r2)
- {
+ inline friend bool operator>(const Range &r1, const Range &r2) {
return r1.start() > r2.end();
}
@@ -542,16 +529,14 @@ public:
*
* \return \e true if \e r1 ends before \e r2 begins, otherwise \e false
*/
- inline friend bool operator<(const Range &r1, const Range &r2)
- {
+ inline friend bool operator<(const Range &r1, const Range &r2) {
return r1.end() < r2.start();
}
/**
* qDebug() stream operator. Writes this range to the debug output in a nicely formatted way.
*/
- inline friend QDebug operator<< (QDebug s, const Range &range)
- {
+ inline friend QDebug operator<< (QDebug s, const Range &range) {
if (&range) {
s << "[" << range.start() << " -> " << range.end() << "]";
} else {
@@ -578,7 +563,7 @@ private:
}
-Q_DECLARE_TYPEINFO (KTextEditor::Range, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(KTextEditor::Range, Q_MOVABLE_TYPE);
#endif
diff --git a/src/include/ktexteditor/view.h b/src/include/ktexteditor/view.h
index 5d185c8..a957c12 100644
--- a/src/include/ktexteditor/view.h
+++ b/src/include/ktexteditor/view.h
@@ -164,7 +164,7 @@ protected:
* \param parent parent widget
* \see Document::createView()
*/
- View (ViewPrivate *impl, QWidget *parent);
+ View(ViewPrivate *impl, QWidget *parent);
public:
/**