Cppcheck warning. Virtual function 'OpenSettings' is called from constructor
'VApplication(int&argc,char**argv)'. --HG-- branch : develop
This commit is contained in:
parent
126658f03f
commit
2235a5d3d8
|
@ -43,8 +43,6 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QUndoStack>
|
|
||||||
#include <QTemporaryFile>
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -266,13 +264,9 @@ VApplication::VApplication(int &argc, char **argv)
|
||||||
// Setting the Application version
|
// Setting the Application version
|
||||||
setApplicationVersion(APP_VERSION_STR);
|
setApplicationVersion(APP_VERSION_STR);
|
||||||
|
|
||||||
OpenSettings();
|
|
||||||
|
|
||||||
// making sure will create new instance...just in case we will ever do 2 objects of VApplication
|
// making sure will create new instance...just in case we will ever do 2 objects of VApplication
|
||||||
VCommandLine::Reset();
|
VCommandLine::Reset();
|
||||||
LoadTranslation(QLocale().name());// By default the console version uses system locale
|
|
||||||
VCommandLine::Get(*this);
|
VCommandLine::Get(*this);
|
||||||
undoStack = new QUndoStack(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -555,6 +549,8 @@ void VApplication::ClearOldLogs() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VApplication::InitOptions()
|
void VApplication::InitOptions()
|
||||||
{
|
{
|
||||||
|
OpenSettings();
|
||||||
|
|
||||||
// Run creation log after sending crash report
|
// Run creation log after sending crash report
|
||||||
StartLogging();
|
StartLogging();
|
||||||
|
|
||||||
|
@ -565,6 +561,8 @@ void VApplication::InitOptions()
|
||||||
qDebug()<<"Command-line arguments:"<<arguments();
|
qDebug()<<"Command-line arguments:"<<arguments();
|
||||||
qDebug()<<"Process ID:"<<applicationPid();
|
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
|
if (VApplication::IsGUIMode())// By default console version uses system locale
|
||||||
{
|
{
|
||||||
LoadTranslation(ValentinaSettings()->GetLocale());
|
LoadTranslation(ValentinaSettings()->GetLocale());
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <QStringData>
|
#include <QStringData>
|
||||||
#include <QStringDataPtr>
|
#include <QStringDataPtr>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
#include <QUndoStack>
|
||||||
#include <Qt>
|
#include <Qt>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
||||||
:QApplication(argc, argv),
|
:QApplication(argc, argv),
|
||||||
undoStack(nullptr),
|
undoStack(new QUndoStack(this)),
|
||||||
mainWindow(nullptr),
|
mainWindow(nullptr),
|
||||||
settings(nullptr),
|
settings(nullptr),
|
||||||
qtTranslator(nullptr),
|
qtTranslator(nullptr),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user