forked from qt-creator/qt-creator
Don't pass QChar as const & since it's just a unsigned short
Reviewed-by: ogoffart
This commit is contained in:
@@ -38,7 +38,7 @@ using namespace CPlusPlus;
|
||||
|
||||
enum { MAX_NUM_LINES = 20 };
|
||||
|
||||
static bool shouldOverrideChar(const QChar &ch)
|
||||
static bool shouldOverrideChar(QChar ch)
|
||||
{
|
||||
switch (ch.unicode()) {
|
||||
case ')': case ']': case ';': case '"': case '\'':
|
||||
@@ -84,7 +84,7 @@ bool MatchingText::shouldInsertMatchingText(const QTextCursor &tc)
|
||||
return shouldInsertMatchingText(doc->characterAt(tc.selectionEnd()));
|
||||
}
|
||||
|
||||
bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead)
|
||||
bool MatchingText::shouldInsertMatchingText(QChar lookAhead)
|
||||
{
|
||||
switch (lookAhead.unicode()) {
|
||||
case '{': case '}':
|
||||
@@ -101,7 +101,7 @@ bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead)
|
||||
}
|
||||
|
||||
QString MatchingText::insertMatchingBrace(const QTextCursor &cursor, const QString &textToProcess,
|
||||
const QChar &la, int *skippedChars) const
|
||||
QChar la, int *skippedChars) const
|
||||
{
|
||||
QTextCursor tc = cursor;
|
||||
QTextDocument *doc = tc.document();
|
||||
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
MatchingText();
|
||||
|
||||
static bool shouldInsertMatchingText(const QTextCursor &tc);
|
||||
static bool shouldInsertMatchingText(const QChar &lookAhead);
|
||||
static bool shouldInsertMatchingText(QChar lookAhead);
|
||||
|
||||
QString insertMatchingBrace(const QTextCursor &tc, const QString &text,
|
||||
const QChar &la, int *skippedChars) const;
|
||||
QChar la, int *skippedChars) const;
|
||||
QString insertParagraphSeparator(const QTextCursor &tc) const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user