small selfcheck improvements (#3888)
* CI-unixish.yml: added missing cppcheck-lib library to GUI selfcheck * CI-unixish.yml: split triage from tools selfcheck since it requires the qt library * replaced Q_NULLPTR with nullptr * fixed passedByValue selfcheck warning
This commit is contained in:
parent
8b3647edd7
commit
e208fc67c1
|
@ -229,6 +229,8 @@ jobs:
|
|||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck --cppcheck-build-dir=b1 -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings cli lib
|
||||
# check gui with qt settings
|
||||
mkdir b2
|
||||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck --cppcheck-build-dir=b2 -D__CPPCHECK__ -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=qt --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings gui/*.cpp gui/temp/*.cpp
|
||||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck --cppcheck-build-dir=b2 -D__CPPCHECK__ -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --library=qt --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings gui/*.cpp gui/temp/*.cpp
|
||||
# self check test and tools
|
||||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli -Igui --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings test/*.cpp tools
|
||||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli -Igui --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings test/*.cpp tools/*.cpp
|
||||
# triage
|
||||
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --library=qt -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Igui --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings tools/triage
|
||||
|
|
|
@ -47,7 +47,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
srcFiles{"*.cpp", "*.cxx", "*.cc", "*.c++", "*.C", "*.c", "*.cl"}
|
||||
{
|
||||
ui->setupUi(this);
|
||||
std::srand(static_cast<unsigned int>(std::time(Q_NULLPTR)));
|
||||
std::srand(static_cast<unsigned int>(std::time(nullptr)));
|
||||
QDir workFolder(WORK_FOLDER);
|
||||
if (!workFolder.exists()) {
|
||||
workFolder.mkdir(WORK_FOLDER);
|
||||
|
@ -308,7 +308,7 @@ void MainWindow::showSrcFile(const QString &fileName, const QString &url, const
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::fileTreeFilter(QString str)
|
||||
void MainWindow::fileTreeFilter(const QString &str)
|
||||
{
|
||||
mFSmodel.setNameFilters(QStringList{"*" + str + "*"});
|
||||
mFSmodel.setNameFilterDisables(false);
|
||||
|
|
|
@ -33,7 +33,7 @@ class MainWindow : public QMainWindow {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = Q_NULLPTR);
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
MainWindow(const MainWindow &) = delete;
|
||||
MainWindow &operator=(const MainWindow &) = delete;
|
||||
~MainWindow();
|
||||
|
@ -44,7 +44,7 @@ public slots:
|
|||
void filter(QString filter);
|
||||
void showResult(QListWidgetItem *item);
|
||||
void refreshResults();
|
||||
void fileTreeFilter(QString str);
|
||||
void fileTreeFilter(const QString &str);
|
||||
void findInFilesClicked();
|
||||
void directorytreeDoubleClick();
|
||||
void searchResultsDoubleClick();
|
||||
|
|
Loading…
Reference in New Issue