diff --git a/retroshare-gui/src/gui/common/RsButtonOnText.cpp b/retroshare-gui/src/gui/common/RsButtonOnText.cpp index 6907a81aa..e93134deb 100644 --- a/retroshare-gui/src/gui/common/RsButtonOnText.cpp +++ b/retroshare-gui/src/gui/common/RsButtonOnText.cpp @@ -11,67 +11,55 @@ #include RSButtonOnText::RSButtonOnText(QWidget *parent) - : QPushButton(parent) + : QPushButton(parent), _textEdit(NULL), _textEditViewPort(NULL), _textCursor(NULL) + , _lenght(-1), _mouseOver(false), _pressed(false) { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; } RSButtonOnText::RSButtonOnText(const QString &text, QWidget *parent) - : QPushButton(parent) + : QPushButton(parent), _textEdit(NULL), _textEditViewPort(NULL), _textCursor(NULL) + , _lenght(-1), _mouseOver(false), _pressed(false) //: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11 { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; setText(text); } RSButtonOnText::RSButtonOnText(const QIcon& icon, const QString &text, QWidget *parent) - : QPushButton(parent) + : QPushButton(parent), _textEdit(NULL), _textEditViewPort(NULL), _textCursor(NULL) + , _lenght(-1), _mouseOver(false), _pressed(false) //: RSButtonOnText(text, parent)//delegating constructors only available with -std=c++11 or -std=gnu++11 { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; setIcon(icon); setText(text); } RSButtonOnText::RSButtonOnText(QTextEdit *textEdit, QWidget *parent) : QPushButton(parent) + , _lenght(-1), _mouseOver(false), _pressed(false) //: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11 { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; - appendToText(textEdit); + appendToText(textEdit); } RSButtonOnText::RSButtonOnText(const QString &text, QTextEdit *textEdit, QWidget *parent) : QPushButton(parent) + , _lenght(-1), _mouseOver(false), _pressed(false) //: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11 { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; setText(text); appendToText(textEdit); } RSButtonOnText::RSButtonOnText(const QIcon& icon, const QString &text, QTextEdit *textEdit, QWidget *parent) : QPushButton(parent) + , _lenght(-1), _mouseOver(false), _pressed(false) //: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11 { _uuid = QUuid::createUuid().toString(); - _lenght = -1; - _mouseOver = false; - _pressed = false; setIcon(icon); setText(text); appendToText(textEdit); diff --git a/retroshare-gui/src/gui/common/RsButtonOnText.h b/retroshare-gui/src/gui/common/RsButtonOnText.h index 63f5f3248..2d6ecbc5a 100644 --- a/retroshare-gui/src/gui/common/RsButtonOnText.h +++ b/retroshare-gui/src/gui/common/RsButtonOnText.h @@ -35,10 +35,10 @@ private: bool isEventForThis(QObject *obj, QEvent *event, QPoint &point); QString _uuid; - int _lenght;//Because cursor end position move durring editing QTextEdit* _textEdit; QWidget* _textEditViewPort; QTextCursor* _textCursor; + int _lenght;//Because cursor end position move durring editing bool _mouseOver; bool _pressed;