mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
Fix CppCheck in RsButtonOnText
/retroshare-gui/src/gui/common/RsButtonOnText.cpp:13: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEdit' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:13: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEditViewPort' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:13: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textCursor' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:21: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEdit' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:21: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEditViewPort' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:21: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textCursor' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:32: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEdit' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:32: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textEditViewPort' is not initialized in the constructor. /retroshare-gui/src/gui/common/RsButtonOnText.cpp:32: warning: Cppcheck(uninitMemberVar): Member variable 'RSButtonOnText::_textCursor' is not initialized in the constructor.
This commit is contained in:
parent
214e382a0a
commit
ee7e950f5f
@ -11,67 +11,55 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
RSButtonOnText::RSButtonOnText(QWidget *parent)
|
RSButtonOnText::RSButtonOnText(QWidget *parent)
|
||||||
: QPushButton(parent)
|
: QPushButton(parent), _textEdit(NULL), _textEditViewPort(NULL), _textCursor(NULL)
|
||||||
|
, _lenght(-1), _mouseOver(false), _pressed(false)
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
}
|
}
|
||||||
RSButtonOnText::RSButtonOnText(const QString &text, QWidget *parent)
|
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
|
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
setText(text);
|
setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
RSButtonOnText::RSButtonOnText(const QIcon& icon, const QString &text, QWidget *parent)
|
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
|
//: RSButtonOnText(text, parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
setIcon(icon);
|
setIcon(icon);
|
||||||
setText(text);
|
setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
RSButtonOnText::RSButtonOnText(QTextEdit *textEdit, QWidget *parent)
|
RSButtonOnText::RSButtonOnText(QTextEdit *textEdit, QWidget *parent)
|
||||||
: QPushButton(parent)
|
: QPushButton(parent)
|
||||||
|
, _lenght(-1), _mouseOver(false), _pressed(false)
|
||||||
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
appendToText(textEdit);
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
appendToText(textEdit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RSButtonOnText::RSButtonOnText(const QString &text, QTextEdit *textEdit, QWidget *parent)
|
RSButtonOnText::RSButtonOnText(const QString &text, QTextEdit *textEdit, QWidget *parent)
|
||||||
: QPushButton(parent)
|
: QPushButton(parent)
|
||||||
|
, _lenght(-1), _mouseOver(false), _pressed(false)
|
||||||
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
setText(text);
|
setText(text);
|
||||||
appendToText(textEdit);
|
appendToText(textEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
RSButtonOnText::RSButtonOnText(const QIcon& icon, const QString &text, QTextEdit *textEdit, QWidget *parent)
|
RSButtonOnText::RSButtonOnText(const QIcon& icon, const QString &text, QTextEdit *textEdit, QWidget *parent)
|
||||||
: QPushButton(parent)
|
: QPushButton(parent)
|
||||||
|
, _lenght(-1), _mouseOver(false), _pressed(false)
|
||||||
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
//: RSButtonOnText(parent)//delegating constructors only available with -std=c++11 or -std=gnu++11
|
||||||
{
|
{
|
||||||
_uuid = QUuid::createUuid().toString();
|
_uuid = QUuid::createUuid().toString();
|
||||||
_lenght = -1;
|
|
||||||
_mouseOver = false;
|
|
||||||
_pressed = false;
|
|
||||||
setIcon(icon);
|
setIcon(icon);
|
||||||
setText(text);
|
setText(text);
|
||||||
appendToText(textEdit);
|
appendToText(textEdit);
|
||||||
|
@ -35,10 +35,10 @@ private:
|
|||||||
bool isEventForThis(QObject *obj, QEvent *event, QPoint &point);
|
bool isEventForThis(QObject *obj, QEvent *event, QPoint &point);
|
||||||
|
|
||||||
QString _uuid;
|
QString _uuid;
|
||||||
int _lenght;//Because cursor end position move durring editing
|
|
||||||
QTextEdit* _textEdit;
|
QTextEdit* _textEdit;
|
||||||
QWidget* _textEditViewPort;
|
QWidget* _textEditViewPort;
|
||||||
QTextCursor* _textCursor;
|
QTextCursor* _textCursor;
|
||||||
|
int _lenght;//Because cursor end position move durring editing
|
||||||
bool _mouseOver;
|
bool _mouseOver;
|
||||||
bool _pressed;
|
bool _pressed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user