Fix memory leaks.
--HG-- branch : develop
This commit is contained in:
parent
2107a2205a
commit
c01bc165db
|
@ -294,6 +294,13 @@ VCommandLinePtr VCommandLine::Get(const QCoreApplication& app)
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VCommandLine::~VCommandLine()
|
||||||
|
{
|
||||||
|
qDeleteAll(optionsUsed.begin(), optionsUsed.end());
|
||||||
|
optionsUsed.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------
|
||||||
Q_NORETURN void VCommandLine::Error(const QString &text) const
|
Q_NORETURN void VCommandLine::Error(const QString &text) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@ class VCommandLine
|
||||||
private:
|
private:
|
||||||
static VCommandLinePtr instance;
|
static VCommandLinePtr instance;
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
const QMap<QString, QCommandLineOption *> optionsUsed;
|
QMap<QString, QCommandLineOption *> optionsUsed;
|
||||||
bool isGuiEnabled;
|
bool isGuiEnabled;
|
||||||
friend class VApplication;
|
friend class VApplication;
|
||||||
|
|
||||||
|
@ -77,9 +77,8 @@ protected:
|
||||||
static VCommandLinePtr Get(const QCoreApplication& app);
|
static VCommandLinePtr Get(const QCoreApplication& app);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VCommandLine(const VCommandLine&) = delete;
|
Q_DISABLE_COPY(VCommandLine)
|
||||||
VCommandLine& operator =(const VCommandLine&) = delete;
|
virtual ~VCommandLine();
|
||||||
virtual ~VCommandLine(){}
|
|
||||||
|
|
||||||
//@brief creates object and applies export related options to parser
|
//@brief creates object and applies export related options to parser
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user