Changeset View
Changeset View
Standalone View
Standalone View
pythonstylechecking.cpp
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2016 Sven Brauch <mail@svenbrauch.de> | 2 | * Copyright 2016 Sven Brauch <mail@svenbrauch.de> | ||
3 | * | 3 | * | ||
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | 5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation; either version 2 of | 6 | * published by the Free Software Foundation; either version 2 of | ||
Context not available. | |||||
8 | * accepted by the membership of KDE e.V. (or its successor approved | 8 | * accepted by the membership of KDE e.V. (or its successor approved | ||
9 | * by the membership of KDE e.V.), which shall act as a proxy | 9 | * by the membership of KDE e.V.), which shall act as a proxy | ||
10 | * defined in Section 14 of version 3 of the license. | 10 | * defined in Section 14 of version 3 of the license. | ||
11 | * | 11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. | ||
16 | * | 16 | * | ||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | * | 19 | * | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #include "pythonstylechecking.h" | 22 | #include "pythonstylechecking.h" | ||
Context not available. | |||||
67 | auto serverPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kdevpythonsupport/codestyle.py"); | 67 | auto serverPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kdevpythonsupport/codestyle.py"); | ||
68 | if ( serverPath.isEmpty() ) { | 68 | if ( serverPath.isEmpty() ) { | ||
69 | qWarning() << "setup problem: codestyle.py not found"; | 69 | qWarning() << "setup problem: codestyle.py not found"; | ||
70 | m_mutex.unlock(); | ||||
70 | return; | 71 | return; | ||
71 | } | 72 | } | ||
72 | m_checkerProcess.start(python, {serverPath}); | 73 | m_checkerProcess.start(python, {serverPath}); | ||
73 | m_checkerProcess.waitForStarted(30); | 74 | m_checkerProcess.waitForStarted(30); | ||
74 | if ( m_checkerProcess.state() != QProcess::Running ) { | 75 | if ( m_checkerProcess.state() != QProcess::Running ) { | ||
75 | qWarning() << "failed to start code checker process"; | 76 | qWarning() << "failed to start code checker process"; | ||
77 | m_mutex.unlock(); | ||||
76 | return; | 78 | return; | ||
77 | } | 79 | } | ||
78 | } | 80 | } | ||
Context not available. |