From 0da130c4eff1b829e968d7e63546aea2cad560fb Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 26 Apr 2022 10:21:12 +0200 Subject: Python: Apply 'static' pattern for singleton members Plus some cosmetics. Change-Id: Ia2c8f425f0491fbe6a0bbf2e508857a5550e4d38 Reviewed-by: Reviewed-by: David Schulz --- src/plugins/python/pyside.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/python/pyside.cpp') diff --git a/src/plugins/python/pyside.cpp b/src/plugins/python/pyside.cpp index 5dfa1065a1..6965305f2e 100644 --- a/src/plugins/python/pyside.cpp +++ b/src/plugins/python/pyside.cpp @@ -60,16 +60,16 @@ PySideInstaller *PySideInstaller::instance() return instance; } -void PySideInstaller::checkPySideInstallation(const Utils::FilePath &python, +void PySideInstaller::checkPySideInstallation(const FilePath &python, TextEditor::TextDocument *document) { document->infoBar()->removeInfo(installPySideInfoBarId); const QString pySide = importedPySide(document->plainText()); if (pySide == "PySide2" || pySide == "PySide6") - runPySideChecker(python, pySide, document); + instance()->runPySideChecker(python, pySide, document); } -bool PySideInstaller::missingPySideInstallation(const Utils::FilePath &pythonPath, +bool PySideInstaller::missingPySideInstallation(const FilePath &pythonPath, const QString &pySide) { QTC_ASSERT(!pySide.isEmpty(), return false); @@ -78,8 +78,7 @@ bool PySideInstaller::missingPySideInstallation(const Utils::FilePath &pythonPat return false; QtcProcess pythonProcess; - const CommandLine importPySideCheck(pythonPath, {"-c", "import " + pySide}); - pythonProcess.setCommand(importPySideCheck); + pythonProcess.setCommand({pythonPath, {"-c", "import " + pySide}}); pythonProcess.runBlocking(); const bool missing = pythonProcess.result() != ProcessResult::FinishedWithSuccess; if (!missing) -- cgit v1.2.1