Cppcheck warning. Virtual function 'OpenSettings' is called from constructor

'VApplication(int&argc,char**argv)'.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-07-09 10:45:23 +03:00
parent 126658f03f
commit 2235a5d3d8
2 changed files with 6 additions and 7 deletions

View File

@ -43,8 +43,6 @@
#include <QDir>
#include <QProcess>
#include <QTemporaryFile>
#include <QUndoStack>
#include <QTemporaryFile>
#include <QFile>
#include <QStandardPaths>
#include <QMessageBox>
@ -266,13 +264,9 @@ VApplication::VApplication(int &argc, char **argv)
// Setting the Application version
setApplicationVersion(APP_VERSION_STR);
OpenSettings();
// making sure will create new instance...just in case we will ever do 2 objects of VApplication
VCommandLine::Reset();
LoadTranslation(QLocale().name());// By default the console version uses system locale
VCommandLine::Get(*this);
undoStack = new QUndoStack(this);
}
//---------------------------------------------------------------------------------------------------------------------
@ -555,6 +549,8 @@ void VApplication::ClearOldLogs() const
//---------------------------------------------------------------------------------------------------------------------
void VApplication::InitOptions()
{
OpenSettings();
// Run creation log after sending crash report
StartLogging();
@ -565,6 +561,8 @@ void VApplication::InitOptions()
qDebug()<<"Command-line arguments:"<<arguments();
qDebug()<<"Process ID:"<<applicationPid();
LoadTranslation(QLocale().name());// By default the console version uses system locale
if (VApplication::IsGUIMode())// By default console version uses system locale
{
LoadTranslation(ValentinaSettings()->GetLocale());

View File

@ -35,6 +35,7 @@
#include <QStringData>
#include <QStringDataPtr>
#include <QTranslator>
#include <QUndoStack>
#include <Qt>
#include <QtDebug>
@ -44,7 +45,7 @@
//---------------------------------------------------------------------------------------------------------------------
VAbstractApplication::VAbstractApplication(int &argc, char **argv)
:QApplication(argc, argv),
undoStack(nullptr),
undoStack(new QUndoStack(this)),
mainWindow(nullptr),
settings(nullptr),
qtTranslator(nullptr),