summaryrefslogtreecommitdiff
path: root/src/plugins/cppcheck/cppcheckrunner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*hjk2023-01-101-1/+1
| | | | | | | | | | | | ... and re-use the old QtcProcess::readAllStandard* names for a QString-returning 'decoded' version. For now, only use that in 'full Utf8' cases, to stay bug-compatible, the plan is, however, to employ the QTextCodecs we have already in the channel buffers. That will be one-by-one, though. Change-Id: Id209e0671920d4ea4197918e872f441254112d52 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CppCheck: Tr::tr and code cosmeticshjk2023-01-101-4/+2
| | | | | Change-Id: I5e6583984f7dc94e998df3c20840f2ba2e801ab8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Cppcheck: Do not start non-existing toolChristian Stenger2022-10-271-1/+1
| | | | | | | | Just pollutes the General Messages pane, so skip execution if tool is not existing. Change-Id: Ib78e3a8ccd992ff2d58f183102c778c800156b89 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppcheckRunner: Connect to done() signal instead of finished()Jarek Kobus2022-06-211-42/+26
| | | | | | | | Simplify internals a bit. Change-Id: I4871b73f605af4d56e4993b6d71bbb22b4fce27d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Use QtcProcess in CppcheckRunnerJarek Kobus2021-11-051-2/+3
| | | | | Change-Id: I0b5f9956a20673acb44903b2e35564a8862810ae Reviewed-by: hjk <hjk@qt.io>
* CppCheck: Use more FilePathhjk2021-10-051-2/+2
| | | | | Change-Id: I45da67df4b76032303b57f567d73ae01bf9f2e91 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Drop QProcess specific parameters from QtcProcess::finished()hjk2021-06-141-1/+1
| | | | | | | | | | | Mid-term plan is to concentrate on use of QtcProcess::result() instead which is a bit more system-agnostic. There's quite a bit of potential for downstream cleanup by re-using QtcProcess::exitMessage() now. Change-Id: I3806b3f5933d96e64b7cfb18cc6c52823fddcbcd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppCheck: Use line-based output callbackChristian Stenger2021-06-041-36/+7
| | | | | Change-Id: I1b2341f71908a00f820b47109fcc4fda2134a83b Reviewed-by: hjk <hjk@qt.io>
* CppCheck: Fix getting output from QtcProcessChristian Stenger2021-06-031-16/+16
| | | | | Change-Id: Ic11d1f31afe7412ec606bdbd751deb4088d5cd3f Reviewed-by: hjk <hjk@qt.io>
* Utils: Move QProcess base to QtcProcessPrivatehjk2021-06-021-6/+5
| | | | | Change-Id: I4c6811d42e051fadfcf32edb664ff3bc09e692e6 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use new, more evocative MessageManager APIEike Ziller2020-12-161-1/+1
| | | | | | | At various places where semantics doesn't change. Change-Id: Ib4d4a5c9f067e109126c6de88257f9e198a71447 Reviewed-by: hjk <hjk@qt.io>
* CppCheck: Split QProcess::start command line manuallyhjk2020-05-041-1/+1
| | | | | | | Qt6 removed the convenience function taking the whole command line. Change-Id: I0b77eb15c6cd9cff25028dec4baf4a4a70eba83c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Rename FilePathList to simply FilePathshjk2019-12-181-6/+6
| | | | | | | The exact storage type does not really matter here. Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Encourage marking of raw command line parametershjk2019-06-061-1/+1
| | | | | Change-Id: Id66ac07732c66ab8c1232fe1f58042de8a61abb0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Extract a CommandLine structure from a QtcProcesshjk2019-05-291-1/+3
| | | | | | | | | | | | We regularly pass around strings or filenames or pairs of strings or filenames and stringlist etc the in the end will be used as a kind of "command line", with quite a bit of ad-hoc user code and QtcProcess::addArg etc to set them up and manipulate them. Let's have a class for that concept. Change-Id: I288ab939d853b32c717135a65242c584c2beab50 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-8/+8
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: RemoveFileName::{size,count,length}hjk2019-05-101-1/+1
| | | | | | | Use .toString().{size,count,length} instead. Change-Id: Ib697155f441a8297fb179921bcd3397719a44073 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix some deprecation warnings in basic pluginsFriedemann Kleint2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix warnings apppearing in 5.13, for example: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations] ... warning: ‘static QRgb QColorDialog::getRgba(QRgb, bool*, QWidget*)’ is deprecated: Use getColor() [-Wdeprecated-declarations] warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] ... warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] ... warning: ‘void QTextOption::setTabStop(qreal)’ is deprecated [-Wdeprecated-declarations] warning: ‘void QList<T>::swap(int, int) [with T = ProjectExplorer::BuildStep*]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] warning: ‘void QProcess::setReadChannelMode(QProcess::ProcessChannelMode)’ is deprecated: Use QProcess::setProcessChannelMode() instead [-Wdeprecated-declarations] ... warning: ‘QString QFileInfo::readLink() const’ is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] Change-Id: I1d893d42d372245892f2de8406f52dbe7bbd552a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Cppcheck: Kill current check process only when neededSergey Morozov2018-09-301-4/+6
| | | | | | | Kill only if it processes specified files Change-Id: I5dee99ec8aeaf3bf4d9dbf6aad195f54176170a2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Cppcheck: Reduce uses of autoOrgad Shaneh2018-09-261-7/+7
| | | | | | | Conform to coding rules. Change-Id: I57600bd450665d5db87710bb2444e39e7ecbf3e3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Add cppcheck static analysis toolSergey Morozov2018-09-181-0/+216
Automatically checks currently opened documents and displays results via text marks/annotations. CppcheckTrigger detects when to check files or clear results. CppcheckTextMarkManager stores/clears text marks with checks' results. CppcheckTool generates run arguments and parses output. CppcheckRunner runs cppcheck binary. CppcheckOptions configures CppcheckTool. Task-number: QTCREATORBUG-20418 Change-Id: I8eafeac7af6137d2c9061ae75d4a56c85b3b5a2d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>