summaryrefslogtreecommitdiff
path: root/src/plugins/python/pyside.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-04-26 10:21:12 +0200
committerhjk <hjk@qt.io>2022-04-27 08:55:02 +0000
commit0da130c4eff1b829e968d7e63546aea2cad560fb (patch)
treeadc41fc6d593932aff836ca54d9d54750b76dbee /src/plugins/python/pyside.cpp
parent28cfdf388ae3e3ed7e073e98a83c737d889d887f (diff)
downloadqt-creator-0da130c4eff1b829e968d7e63546aea2cad560fb.tar.gz
Python: Apply 'static' pattern for singleton members
Plus some cosmetics. Change-Id: Ia2c8f425f0491fbe6a0bbf2e508857a5550e4d38 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pyside.cpp')
-rw-r--r--src/plugins/python/pyside.cpp9
1 files changed, 4 insertions, 5 deletions
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)