Skip to content

Commit

Permalink
qt4 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
psemiletov committed Sep 15, 2018
1 parent 421a743 commit 3ff242b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions logmemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CLogMemo::CLogMemo (QWidget *parent): QPlainTextEdit (parent)
Qt::TextSelectableByKeyboard);
}


#if QT_VERSION >= 0x050000
void CLogMemo::log_terminal (const QString &text)
{
if (no_jump)
Expand Down Expand Up @@ -79,7 +79,7 @@ void CLogMemo::log_terminal (const QString &text)
cr.movePosition (QTextCursor::Down, QTextCursor::MoveAnchor, 0);
setTextCursor (cr);
}

#endif

void CLogMemo::log (const QString &text)
{
Expand Down Expand Up @@ -116,12 +116,10 @@ void CLogMemo::log (const QString &text)
}



void CLogMemo::mouseDoubleClickEvent (QMouseEvent *event)
{
QTextCursor cur = cursorForPosition (event->pos());


QString txt = toPlainText();
int pos = cur.position();

Expand Down
3 changes: 3 additions & 0 deletions logmemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class CLogMemo: public QPlainTextEdit
CLogMemo (QWidget *parent = 0);

void log (const QString &text);

#if QT_VERSION >= 0x050000
void log_terminal (const QString &text);
#endif

void mouseDoubleClickEvent(QMouseEvent *event);

Expand Down

0 comments on commit 3ff242b

Please sign in to comment.