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);