Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compile errors, use toLatin1 instead of the deprecated toAscii() …
…for Qt5
  • Loading branch information
exiaoy committed Jul 13, 2013
1 parent 6aa70ce commit 15842d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions abstractlogview.cpp
Expand Up @@ -497,14 +497,14 @@ void AbstractLogView::keyPressEvent( QKeyEvent* keyEvent )
else if ( keyEvent->key() == Qt::Key_End )
jumpToRightOfScreen();
else {
const char character = (keyEvent->text())[0].toAscii();
const char character = (keyEvent->text())[0].toLatin1();

if ( ( character >= '0' ) && ( character <= '9' ) ) {
// Adds the digit to the timed buffer
digitsBuffer_.add( character );
}
else {
switch ( (keyEvent->text())[0].toAscii() ) {
switch ( (keyEvent->text())[0].toLatin1() ) {
case 'j':
{
int delta = qMax( 1, digitsBuffer_.content() );
Expand Down
2 changes: 1 addition & 1 deletion crawlerwidget.cpp
Expand Up @@ -342,7 +342,7 @@ void CrawlerWidget::keyPressEvent( QKeyEvent* keyEvent )
{
LOG(logDEBUG4) << "keyPressEvent received";

switch ( (keyEvent->text())[0].toAscii() ) {
switch ( (keyEvent->text())[0].toLatin1() ) {
case '/':
case '?':
displayQuickFindBar();
Expand Down

0 comments on commit 15842d4

Please sign in to comment.