From ebcb1d80bf517aceb69778e1e9f67e5f4da8c484 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 28 Jul 2012 15:50:52 -0500 Subject: Fix build warnings Thanks to Bruce Sass for the patch! --- tools/designer/editor/completion.cpp | 14 +++++++------- tools/designer/editor/parenmatcher.cpp | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tools/designer/editor') diff --git a/tools/designer/editor/completion.cpp b/tools/designer/editor/completion.cpp index 9ab09fa..0473d06 100644 --- a/tools/designer/editor/completion.cpp +++ b/tools/designer/editor/completion.cpp @@ -363,8 +363,8 @@ bool EditorCompletion::eventFilter( QObject *o, QEvent *e ) } } - if ( ke->text().length() && !( ke->state() & AltButton ) && - ( !ke->ascii() || ke->ascii() >= 32 ) || + if ( ( ke->text().length() && !( ke->state() & AltButton ) && + ( !ke->ascii() || ke->ascii() >= 32 ) ) || ( ke->text() == "\t" && !( ke->state() & ControlButton ) ) ) { if ( ke->key() == Key_Tab ) { if ( curEditor->textCursor()->index() == 0 && @@ -372,13 +372,13 @@ bool EditorCompletion::eventFilter( QObject *o, QEvent *e ) return FALSE; if ( doCompletion() ) return TRUE; - } else if ( ke->key() == Key_Period && + } else if ( ( ke->key() == Key_Period && ( curEditor->textCursor()->index() == 0 || - curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c != '.' ) + curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c != '.' ) ) || - ke->key() == Key_Greater && + ( ke->key() == Key_Greater && curEditor->textCursor()->index() > 0 && - curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c == '-' ) { + curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c == '-' ) ) { doObjectCompletion(); } else { if ( !doArgumentHint( ke->text() == "(" ) ) @@ -423,7 +423,7 @@ bool EditorCompletion::eventFilter( QObject *o, QEvent *e ) return TRUE; } } - if ( o == functionLabel || ::qt_cast(o) && functionLabel->isVisible() ) { + if ( o == functionLabel || ( ::qt_cast(o) && functionLabel->isVisible() ) ) { if ( e->type() == QEvent::KeyPress ) { QKeyEvent *ke = (QKeyEvent*)e; if ( ke->key() == Key_Escape ) { diff --git a/tools/designer/editor/parenmatcher.cpp b/tools/designer/editor/parenmatcher.cpp index ae7a3b5..d312b7a 100644 --- a/tools/designer/editor/parenmatcher.cpp +++ b/tools/designer/editor/parenmatcher.cpp @@ -120,9 +120,9 @@ bool ParenMatcher::checkOpenParen( QTextCursor *cursor ) } int id = Match; - if ( c == '{' && closedParen.chr != '}' || - c == '(' && closedParen.chr != ')' || - c == '[' && closedParen.chr != ']' ) + if ( ( c == '{' && closedParen.chr != '}' ) || + ( c == '(' && closedParen.chr != ')' ) || + ( c == '[' && closedParen.chr != ']' ) ) id = Mismatch; cursor->document()->setSelectionStart( id, *cursor ); int tidx = cursor->index(); @@ -194,9 +194,9 @@ bool ParenMatcher::checkClosedParen( QTextCursor *cursor ) } int id = Match; - if ( c == '}' && openParen.chr != '{' || - c == ')' && openParen.chr != '(' || - c == ']' && openParen.chr != '[' ) + if ( ( c == '}' && openParen.chr != '{' ) || + ( c == ')' && openParen.chr != '(' ) || + ( c == ']' && openParen.chr != '[' ) ) id = Mismatch; cursor->document()->setSelectionStart( id, *cursor ); int tidx = cursor->index(); -- cgit v1.2.1