SonarQube warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-06-05 19:47:25 +03:00
parent 8e7ea0f45f
commit 3a4871fcd0
5 changed files with 37 additions and 31 deletions

View file

@ -177,7 +177,7 @@ QString DialogMDataBase::ImgTag(const QString &number)
const bool ok = renderer.load(filePath);
if (ok)
{
const QScreen *screen = QApplication::screens().at(0);
const QScreen *screen = QGuiApplication::screens().at(0);
if (screen)
{
const QSize defSize = renderer.defaultSize();
@ -223,9 +223,7 @@ void DialogMDataBase::changeEvent(QEvent *event)
//---------------------------------------------------------------------------------------------------------------------
bool DialogMDataBase::eventFilter(QObject *target, QEvent *event)
{
if (target == ui->treeWidget)
{
if (event->type() == QEvent::KeyPress)
if (target == ui->treeWidget && event->type() == QEvent::KeyPress)
{
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
switch(keyEvent->key())
@ -248,7 +246,6 @@ bool DialogMDataBase::eventFilter(QObject *target, QEvent *event)
break;
}
}
}
return QDialog::eventFilter(target, event);
}

View file

@ -143,7 +143,10 @@ QmuParserBase::~QmuParserBase()
*/
QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser)
{
if (this != &a_Parser)
{
Assign(a_Parser);
}
return *this;
}

View file

@ -64,7 +64,10 @@ QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode)
*/
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode)
{
if (this != &a_ByteCode)
{
Assign(a_ByteCode);
}
return *this;
}

View file

@ -313,6 +313,8 @@ QmuParserCallback::QmuParserCallback (const QmuParserCallback &a_Fun )
//---------------------------------------------------------------------------------------------------------------------
QmuParserCallback &QmuParserCallback::operator=(const QmuParserCallback &a_Fun)
{
if (this != &a_Fun)
{
m_pFun = a_Fun.m_pFun;
m_iArgc = a_Fun.m_iArgc;
m_bAllowOpti = a_Fun.m_bAllowOpti;
@ -320,6 +322,7 @@ QmuParserCallback &QmuParserCallback::operator=(const QmuParserCallback &a_Fun)
m_iType = a_Fun.m_iType;
m_iPri = a_Fun.m_iPri;
m_eOprtAsct = a_Fun.m_eOprtAsct;
}
return *this;
}

View file

@ -8,7 +8,7 @@
include(../../../common.pri)
# Library use widgets
QT += widgets
QT += core widgets
# We don't need gui library.
QT -= gui