diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index 4c41359df..abcbc4f08 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -444,7 +444,7 @@ void PuzzleApplication::ActivateDarkMode() //--------------------------------------------------------------------------------------------------------------------- void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) { - std::shared_ptrcmd = CommandLine(); + VPuzzleCommandLinePtr cmd = CommandLine(); // QCommandLineParser parser; // parser.setApplicationDescription(tr("Valentina's manual layout editor.")); // parser.addHelpOption(); @@ -641,7 +641,7 @@ void PuzzleApplication::Clean() } //-------------------------------------------------------------------------------------------- -const std::shared_ptr PuzzleApplication::CommandLine() +const VPuzzleCommandLinePtr PuzzleApplication::CommandLine() { return VPuzzleCommandLine::instance; } diff --git a/src/app/puzzle/puzzleapplication.h b/src/app/puzzle/puzzleapplication.h index 780ea0617..73d22c03b 100644 --- a/src/app/puzzle/puzzleapplication.h +++ b/src/app/puzzle/puzzleapplication.h @@ -71,7 +71,7 @@ public: void ActivateDarkMode(); void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments); - const std::shared_ptr CommandLine(); + const VPuzzleCommandLinePtr CommandLine(); public slots: void ProcessCMD(); diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index 4b54e9ad9..bd34962d6 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -76,7 +76,7 @@ VPuzzleCommandLine::VPuzzleCommandLine(): } //------------------------------------------------------------------------------------------- -std::shared_ptr VPuzzleCommandLine::Instance(const QCoreApplication &app) +VPuzzleCommandLinePtr VPuzzleCommandLine::Instance(const QCoreApplication &app) { if (instance == nullptr) { diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index d802e3c73..737592e89 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -5,6 +5,9 @@ #include #include +class VPuzzleCommandLine; +using VPuzzleCommandLinePtr = std::shared_ptr; + class VPuzzleCommandLine: public QObject { friend class PuzzleApplication; @@ -44,13 +47,11 @@ public: protected: VPuzzleCommandLine(); - /** - * @brief create the single instance of the class inside puzzleapplication - */ - static std::shared_ptr Instance(const QCoreApplication &app); + /** @brief create the single instance of the class inside puzzleapplication */ + static VPuzzleCommandLinePtr Instance(const QCoreApplication &app); private: Q_DISABLE_COPY(VPuzzleCommandLine) - static std::shared_ptr instance; + static VPuzzleCommandLinePtr instance; QCommandLineParser parser; bool isGuiEnabled;