From 3ff242bcefcbf9eca80c7b7bb2cd5e4056b7db42 Mon Sep 17 00:00:00 2001 From: Petr Semiletov Date: Sat, 15 Sep 2018 21:13:48 +0300 Subject: [PATCH] qt4 fix --- logmemo.cpp | 6 ++---- logmemo.h | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/logmemo.cpp b/logmemo.cpp index 3c605fe..53104cd 100644 --- a/logmemo.cpp +++ b/logmemo.cpp @@ -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) @@ -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) { @@ -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(); diff --git a/logmemo.h b/logmemo.h index d4718ab..3afb947 100644 --- a/logmemo.h +++ b/logmemo.h @@ -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);