aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck
Commit message (Collapse)AuthorAgeFilesLines
* 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-289-46/+46
| | | | | | | | 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>
* Qt Creator CMake portCristian Adam2019-05-171-0/+14
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@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 Utils::LanguageVersion::None handlingMarco Bubke2019-04-041-0/+2
| | | | | Change-Id: Id0d8bd59c1a317103ea309ee2f9b982ecfd6d6c7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@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>
* Utils: Move C++ language details from ProjectExplorer to UtilsMarco Bubke2019-01-151-1/+1
| | | | | | | | We want to use them in the backend processes too so it's nice to share them in Utils. A concrete size was added too because they should be serialized. Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Use plural like in other stringsRobert Loehning2018-11-291-1/+1
| | | | | Change-Id: I41031253c1c30e867bd4506a1de82c3400eb0b8e Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Fix missing translation contextsEike Ziller2018-10-251-0/+1
| | | | | | | Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* CppCheck: Add a category text and icon to the Option pageAlessandro Portale2018-10-221-0/+4
| | | | | | | | | All analyzer plugins need to set these for the case that they are the only loaded analyzer plugin. Task-number: QTCREATORBUG-21354 Change-Id: Ibb889ef2f4e2c10ebc9927301607b7539066b5ea Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Cppcheck: Add missing space to translatable stringLeena Miettinen2018-10-191-1/+1
| | | | | Change-Id: I87924a6b8dddf51d7dafae88176686746417acd5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools/ProjectExplorer: Remove enum duplicationNikolai Kosjar2018-10-081-1/+1
| | | | | | | | ... between CppTools::ProjectPart and ProjectExplorer::ToolChain. Change-Id: I8b448747e454adbed77547460383b8515462cc81 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Toolchains: Detect unspecified language versionNikolai Kosjar2018-10-081-0/+4
| | | | | | | | | | | | | | | | | | | | We checked the command line from the project manager for "-std=X" and friends to figure out the language version to use. However, if such a flag was not provided, we assumed the latest version we support. This could conflict with the actual version of the compiler and its predefined macros. Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the predefined macros of the toolchain. The MSVC compiler is an exception to this, as it does not seem to properly set the value - check for _MSVC_LANG if possible, otherwise simply assume some versions as before. While at it, add also support for C17/C18 and the upcoming C++2a. Task-number: QTCREATORBUG-20884 Task-number: QTCREATORBUG-21188 Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* qbs: Remove pointless ExtensionSystem dependency from pluginsNikolai Kosjar2018-10-081-1/+0
| | | | | | | | A QtcPlugin depends on ExtensionSystem, so there is no need to restate the dependency. Change-Id: I8e0cb5f94858e912f5ce528ee67b683d4d837c27 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Cppcheck: Kill current check process only when neededSergey Morozov2018-09-303-6/+8
| | | | | | | Kill only if it processes specified files Change-Id: I5dee99ec8aeaf3bf4d9dbf6aad195f54176170a2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Cppcheck: Fix progress parsingSergey Morozov2018-09-281-1/+1
| | | | | Change-Id: I14bc5b93b00fee25d9e307606c4fc7b30ca23fe8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Cppcheck: Reduce uses of autoOrgad Shaneh2018-09-266-55/+51
| | | | | | | Conform to coding rules. Change-Id: I57600bd450665d5db87710bb2444e39e7ecbf3e3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Replace another assertion with a conditionOrgad Shaneh2018-09-261-1/+2
| | | | | | | Missed in 3f4438e2ebc796fd5b2eab7018f270b6477f7d77. Change-Id: Ie0ddeb7aad5dc70aec788b9df1954e884684cba1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Replace assertion with a conditionOrgad Shaneh2018-09-251-1/+2
| | | | | | | There are several editor types without path. Change-Id: Ieb7f3453ae83d6b64488a5f9381b5e7927ff1ece Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Cppcheck: Add cppcheck static analysis toolSergey Morozov2018-09-1820-0/+1916
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>