GUI: Rename methods

This commit is contained in:
Daniel Marjamäki 2017-07-28 13:43:49 +02:00
parent 97a86313aa
commit c1eb71e84d
20 changed files with 298 additions and 300 deletions

View File

@ -34,8 +34,8 @@ ApplicationDialog::ApplicationDialog(const QString &title,
{ {
mUI.setupUi(this); mUI.setupUi(this);
connect(mUI.mButtonBrowse, SIGNAL(clicked()), this, SLOT(Browse())); connect(mUI.mButtonBrowse, SIGNAL(clicked()), this, SLOT(browse()));
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok())); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(ok()));
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject())); connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
mUI.mPath->setText(app.getPath()); mUI.mPath->setText(app.getPath());
mUI.mName->setText(app.getName()); mUI.mName->setText(app.getName());
@ -50,7 +50,7 @@ ApplicationDialog::~ApplicationDialog()
//dtor //dtor
} }
void ApplicationDialog::Browse() void ApplicationDialog::browse()
{ {
QString filter; QString filter;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -70,7 +70,7 @@ void ApplicationDialog::Browse()
} }
} }
void ApplicationDialog::Ok() void ApplicationDialog::ok()
{ {
if (mUI.mName->text().isEmpty() || mUI.mPath->text().isEmpty()) { if (mUI.mName->text().isEmpty() || mUI.mPath->text().isEmpty()) {
QMessageBox msg(QMessageBox::Warning, QMessageBox msg(QMessageBox::Warning,

View File

@ -51,13 +51,13 @@ public:
protected slots: protected slots:
void Ok(); void ok();
/** /**
* @brief Slot to browse for an application * @brief Slot to browse for an application
* *
*/ */
void Browse(); void browse();
protected: protected:

View File

@ -65,7 +65,7 @@ void CheckThread::run()
mCppcheck.analyseWholeProgram(buildDir, files2); mCppcheck.analyseWholeProgram(buildDir, files2);
} }
mFiles.clear(); mFiles.clear();
emit Done(); emit done();
return; return;
} }
@ -73,7 +73,7 @@ void CheckThread::run()
while (!file.isEmpty() && mState == Running) { while (!file.isEmpty() && mState == Running) {
qDebug() << "Checking file" << file; qDebug() << "Checking file" << file;
mCppcheck.check(file.toStdString()); mCppcheck.check(file.toStdString());
emit FileChecked(file); emit fileChecked(file);
if (mState == Running) if (mState == Running)
file = mResult.getNextFile(); file = mResult.getNextFile();
@ -84,7 +84,7 @@ void CheckThread::run()
file = QString::fromStdString(fileSettings.filename); file = QString::fromStdString(fileSettings.filename);
qDebug() << "Checking file" << file; qDebug() << "Checking file" << file;
mCppcheck.check(fileSettings); mCppcheck.check(fileSettings);
emit FileChecked(file); emit fileChecked(file);
if (mState == Running) if (mState == Running)
fileSettings = mResult.getNextFileSettings(); fileSettings = mResult.getNextFileSettings();
@ -95,7 +95,7 @@ void CheckThread::run()
else else
mState = Stopped; mState = Stopped;
emit Done(); emit done();
} }
void CheckThread::stop() void CheckThread::stop()

View File

@ -67,9 +67,9 @@ signals:
* @brief cpp checking is done * @brief cpp checking is done
* *
*/ */
void Done(); void done();
void FileChecked(const QString &file); void fileChecked(const QString &file);
protected: protected:
/** /**

View File

@ -65,7 +65,7 @@ int main(int argc, char *argv[])
} }
TranslationHandler* th = new TranslationHandler(&app); TranslationHandler* th = new TranslationHandler(&app);
th->SetLanguage(settings->value(SETTINGS_LANGUAGE, th->SuggestLanguage()).toString()); th->setLanguage(settings->value(SETTINGS_LANGUAGE, th->suggestLanguage()).toString());
if (!CheckArgs(app.arguments())) if (!CheckArgs(app.arguments()))
return 0; return 0;

View File

@ -351,7 +351,7 @@ void MainWindow::saveSettings() const
mApplications->saveSettings(); mApplications->saveSettings();
mSettings->setValue(SETTINGS_LANGUAGE, mTranslation->GetCurrentLanguage()); mSettings->setValue(SETTINGS_LANGUAGE, mTranslation->getCurrentLanguage());
mUI.mResults->saveSettings(mSettings); mUI.mResults->saveSettings(mSettings);
} }
@ -459,14 +459,14 @@ void MainWindow::checkCode(const QString& code, const QString& filename)
// Initialize dummy ThreadResult as ErrorLogger // Initialize dummy ThreadResult as ErrorLogger
ThreadResult result; ThreadResult result;
result.setFiles(QStringList(filename)); result.setFiles(QStringList(filename));
connect(&result, SIGNAL(Progress(int, const QString&)), connect(&result, SIGNAL(progress(int, const QString&)),
mUI.mResults, SLOT(Progress(int, const QString&))); mUI.mResults, SLOT(progress(int, const QString&)));
connect(&result, SIGNAL(Error(const ErrorItem &)), connect(&result, SIGNAL(error(const ErrorItem &)),
mUI.mResults, SLOT(Error(const ErrorItem &))); mUI.mResults, SLOT(error(const ErrorItem &)));
connect(&result, SIGNAL(Log(const QString &)), connect(&result, SIGNAL(log(const QString &)),
this, SLOT(Log(const QString &))); this, SLOT(log(const QString &)));
connect(&result, SIGNAL(DebugError(const ErrorItem &)), connect(&result, SIGNAL(debugError(const ErrorItem &)),
this, SLOT(DebugError(const ErrorItem &))); this, SLOT(debugError(const ErrorItem &)));
// Create CppCheck instance // Create CppCheck instance
CppCheck cppcheck(result, true); CppCheck cppcheck(result, true);
@ -895,13 +895,13 @@ void MainWindow::programSettings()
{ {
SettingsDialog dialog(mApplications, mTranslation, this); SettingsDialog dialog(mApplications, mTranslation, this);
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {
dialog.SaveSettingValues(); dialog.saveSettingValues();
mUI.mResults->updateSettings(dialog.ShowFullPath(), mUI.mResults->updateSettings(dialog.showFullPath(),
dialog.SaveFullPath(), dialog.saveFullPath(),
dialog.SaveAllErrors(), dialog.saveAllErrors(),
dialog.ShowNoErrorsMessage(), dialog.showNoErrorsMessage(),
dialog.ShowErrorId(), dialog.showErrorId(),
dialog.ShowInconclusive()); dialog.showInconclusive());
const QString newLang = mSettings->value(SETTINGS_LANGUAGE, "en").toString(); const QString newLang = mSettings->value(SETTINGS_LANGUAGE, "en").toString();
setLanguage(newLang); setLanguage(newLang);
} }
@ -1231,11 +1231,11 @@ void MainWindow::formatAndSetTitle(const QString &text)
void MainWindow::setLanguage(const QString &code) void MainWindow::setLanguage(const QString &code)
{ {
const QString currentLang = mTranslation->GetCurrentLanguage(); const QString currentLang = mTranslation->getCurrentLanguage();
if (currentLang == code) if (currentLang == code)
return; return;
if (mTranslation->SetLanguage(code)) { if (mTranslation->setLanguage(code)) {
//Translate everything that is visible here //Translate everything that is visible here
mUI.retranslateUi(this); mUI.retranslateUi(this);
mUI.mResults->translate(); mUI.mResults->translate();

View File

@ -86,11 +86,11 @@ bool Project::open()
bool Project::edit() bool Project::edit()
{ {
ProjectFileDialog dlg(mFilename, mParentWidget); ProjectFileDialog dlg(mFilename, mParentWidget);
dlg.LoadFromProjectFile(mProjectFile); dlg.loadFromProjectFile(mProjectFile);
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != QDialog::Accepted)
return false; return false;
dlg.SaveToProjectFile(mProjectFile); dlg.saveToProjectFile(mProjectFile);
if (!mProjectFile->write()) { if (!mProjectFile->write()) {
QMessageBox msg(QMessageBox::Critical, QMessageBox msg(QMessageBox::Critical,

View File

@ -42,7 +42,7 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
QString filename = inf.fileName(); QString filename = inf.fileName();
QString title = tr("Project file: %1").arg(filename); QString title = tr("Project file: %1").arg(filename);
setWindowTitle(title); setWindowTitle(title);
LoadSettings(); loadSettings();
// Checkboxes for the libraries.. // Checkboxes for the libraries..
const QString applicationFilePath = QCoreApplication::applicationFilePath(); const QString applicationFilePath = QCoreApplication::applicationFilePath();
@ -91,66 +91,66 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
} }
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept())); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept()));
connect(mUI.mBtnBrowseBuildDir, SIGNAL(clicked()), this, SLOT(BrowseBuildDir())); connect(mUI.mBtnBrowseBuildDir, SIGNAL(clicked()), this, SLOT(browseBuildDir()));
connect(mUI.mBtnBrowseImportProject, SIGNAL(clicked()), this, SLOT(BrowseImportProject())); connect(mUI.mBtnBrowseImportProject, SIGNAL(clicked()), this, SLOT(browseImportProject()));
connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(AddCheckPath())); connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(addCheckPath()));
connect(mUI.mBtnEditCheckPath, SIGNAL(clicked()), this, SLOT(EditCheckPath())); connect(mUI.mBtnEditCheckPath, SIGNAL(clicked()), this, SLOT(editCheckPath()));
connect(mUI.mBtnRemoveCheckPath, SIGNAL(clicked()), this, SLOT(RemoveCheckPath())); connect(mUI.mBtnRemoveCheckPath, SIGNAL(clicked()), this, SLOT(removeCheckPath()));
connect(mUI.mBtnAddInclude, SIGNAL(clicked()), this, SLOT(AddIncludeDir())); connect(mUI.mBtnAddInclude, SIGNAL(clicked()), this, SLOT(addIncludeDir()));
connect(mUI.mBtnEditInclude, SIGNAL(clicked()), this, SLOT(EditIncludeDir())); connect(mUI.mBtnEditInclude, SIGNAL(clicked()), this, SLOT(editIncludeDir()));
connect(mUI.mBtnRemoveInclude, SIGNAL(clicked()), this, SLOT(RemoveIncludeDir())); connect(mUI.mBtnRemoveInclude, SIGNAL(clicked()), this, SLOT(removeIncludeDir()));
connect(mUI.mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(AddExcludePath())); connect(mUI.mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(addExcludePath()));
connect(mUI.mBtnEditIgnorePath, SIGNAL(clicked()), this, SLOT(EditExcludePath())); connect(mUI.mBtnEditIgnorePath, SIGNAL(clicked()), this, SLOT(editExcludePath()));
connect(mUI.mBtnRemoveIgnorePath, SIGNAL(clicked()), this, SLOT(RemoveExcludePath())); connect(mUI.mBtnRemoveIgnorePath, SIGNAL(clicked()), this, SLOT(removeExcludePath()));
connect(mUI.mBtnIncludeUp, SIGNAL(clicked()), this, SLOT(MoveIncludePathUp())); connect(mUI.mBtnIncludeUp, SIGNAL(clicked()), this, SLOT(moveIncludePathUp()));
connect(mUI.mBtnIncludeDown, SIGNAL(clicked()), this, SLOT(MoveIncludePathDown())); connect(mUI.mBtnIncludeDown, SIGNAL(clicked()), this, SLOT(moveIncludePathDown()));
connect(mUI.mBtnAddSuppression, SIGNAL(clicked()), this, SLOT(AddSuppression())); connect(mUI.mBtnAddSuppression, SIGNAL(clicked()), this, SLOT(addSuppression()));
connect(mUI.mBtnRemoveSuppression, SIGNAL(clicked()), this, SLOT(RemoveSuppression())); connect(mUI.mBtnRemoveSuppression, SIGNAL(clicked()), this, SLOT(removeSuppression()));
} }
ProjectFileDialog::~ProjectFileDialog() ProjectFileDialog::~ProjectFileDialog()
{ {
SaveSettings(); saveSettings();
} }
void ProjectFileDialog::LoadSettings() void ProjectFileDialog::loadSettings()
{ {
QSettings settings; QSettings settings;
resize(settings.value(SETTINGS_PROJECT_DIALOG_WIDTH, 470).toInt(), resize(settings.value(SETTINGS_PROJECT_DIALOG_WIDTH, 470).toInt(),
settings.value(SETTINGS_PROJECT_DIALOG_HEIGHT, 330).toInt()); settings.value(SETTINGS_PROJECT_DIALOG_HEIGHT, 330).toInt());
} }
void ProjectFileDialog::SaveSettings() const void ProjectFileDialog::saveSettings() const
{ {
QSettings settings; QSettings settings;
settings.setValue(SETTINGS_PROJECT_DIALOG_WIDTH, size().width()); settings.setValue(SETTINGS_PROJECT_DIALOG_WIDTH, size().width());
settings.setValue(SETTINGS_PROJECT_DIALOG_HEIGHT, size().height()); settings.setValue(SETTINGS_PROJECT_DIALOG_HEIGHT, size().height());
} }
void ProjectFileDialog::LoadFromProjectFile(const ProjectFile *projectFile) void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile)
{ {
SetRootPath(projectFile->getRootPath()); setRootPath(projectFile->getRootPath());
SetBuildDir(projectFile->getBuildDir()); setBuildDir(projectFile->getBuildDir());
SetIncludepaths(projectFile->getIncludeDirs()); setIncludepaths(projectFile->getIncludeDirs());
SetDefines(projectFile->getDefines()); setDefines(projectFile->getDefines());
SetCheckPaths(projectFile->getCheckPaths()); setCheckPaths(projectFile->getCheckPaths());
SetImportProject(projectFile->getImportProject()); setImportProject(projectFile->getImportProject());
SetExcludedPaths(projectFile->getExcludedPaths()); setExcludedPaths(projectFile->getExcludedPaths());
SetLibraries(projectFile->getLibraries()); setLibraries(projectFile->getLibraries());
SetSuppressions(projectFile->getSuppressions()); setSuppressions(projectFile->getSuppressions());
} }
void ProjectFileDialog::SaveToProjectFile(ProjectFile *projectFile) const void ProjectFileDialog::saveToProjectFile(ProjectFile *projectFile) const
{ {
projectFile->setRootPath(GetRootPath()); projectFile->setRootPath(getRootPath());
projectFile->setBuildDir(GetBuildDir()); projectFile->setBuildDir(getBuildDir());
projectFile->setImportProject(GetImportProject()); projectFile->setImportProject(getImportProject());
projectFile->setIncludes(GetIncludePaths()); projectFile->setIncludes(getIncludePaths());
projectFile->setDefines(GetDefines()); projectFile->setDefines(getDefines());
projectFile->setCheckPaths(GetCheckPaths()); projectFile->setCheckPaths(getCheckPaths());
projectFile->setExcludedPaths(GetExcludedPaths()); projectFile->setExcludedPaths(getExcludedPaths());
projectFile->setLibraries(GetLibraries()); projectFile->setLibraries(getLibraries());
projectFile->setSuppressions(GetSuppressions()); projectFile->setSuppressions(getSuppressions());
} }
QString ProjectFileDialog::getExistingDirectory(const QString &caption, bool trailingSlash) QString ProjectFileDialog::getExistingDirectory(const QString &caption, bool trailingSlash)
@ -178,14 +178,14 @@ QString ProjectFileDialog::getExistingDirectory(const QString &caption, bool tra
return selectedDir; return selectedDir;
} }
void ProjectFileDialog::BrowseBuildDir() void ProjectFileDialog::browseBuildDir()
{ {
const QString dir(getExistingDirectory(tr("Select Cppcheck build dir"), false)); const QString dir(getExistingDirectory(tr("Select Cppcheck build dir"), false));
if (!dir.isEmpty()) if (!dir.isEmpty())
mUI.mEditBuildDir->setText(dir); mUI.mEditBuildDir->setText(dir);
} }
void ProjectFileDialog::BrowseImportProject() void ProjectFileDialog::browseImportProject()
{ {
const QFileInfo inf(mFilePath); const QFileInfo inf(mFilePath);
const QDir &dir = inf.absoluteDir(); const QDir &dir = inf.absoluteDir();
@ -196,7 +196,7 @@ void ProjectFileDialog::BrowseImportProject()
mUI.mEditImportProject->setText(dir.relativeFilePath(fileName)); mUI.mEditImportProject->setText(dir.relativeFilePath(fileName));
} }
void ProjectFileDialog::AddIncludeDir(const QString &dir) void ProjectFileDialog::addIncludeDir(const QString &dir)
{ {
if (dir.isNull() || dir.isEmpty()) if (dir.isNull() || dir.isEmpty())
return; return;
@ -207,7 +207,7 @@ void ProjectFileDialog::AddIncludeDir(const QString &dir)
mUI.mListIncludeDirs->addItem(item); mUI.mListIncludeDirs->addItem(item);
} }
void ProjectFileDialog::AddCheckPath(const QString &path) void ProjectFileDialog::addCheckPath(const QString &path)
{ {
if (path.isNull() || path.isEmpty()) if (path.isNull() || path.isEmpty())
return; return;
@ -218,7 +218,7 @@ void ProjectFileDialog::AddCheckPath(const QString &path)
mUI.mListCheckPaths->addItem(item); mUI.mListCheckPaths->addItem(item);
} }
void ProjectFileDialog::AddExcludePath(const QString &path) void ProjectFileDialog::addExcludePath(const QString &path)
{ {
if (path.isNull() || path.isEmpty()) if (path.isNull() || path.isEmpty())
return; return;
@ -229,7 +229,7 @@ void ProjectFileDialog::AddExcludePath(const QString &path)
mUI.mListExcludedPaths->addItem(item); mUI.mListExcludedPaths->addItem(item);
} }
QString ProjectFileDialog::GetRootPath() const QString ProjectFileDialog::getRootPath() const
{ {
QString root = mUI.mEditProjectRoot->text(); QString root = mUI.mEditProjectRoot->text();
root = root.trimmed(); root = root.trimmed();
@ -237,17 +237,17 @@ QString ProjectFileDialog::GetRootPath() const
return root; return root;
} }
QString ProjectFileDialog::GetBuildDir() const QString ProjectFileDialog::getBuildDir() const
{ {
return mUI.mEditBuildDir->text(); return mUI.mEditBuildDir->text();
} }
QString ProjectFileDialog::GetImportProject() const QString ProjectFileDialog::getImportProject() const
{ {
return mUI.mEditImportProject->text(); return mUI.mEditImportProject->text();
} }
QStringList ProjectFileDialog::GetIncludePaths() const QStringList ProjectFileDialog::getIncludePaths() const
{ {
const int count = mUI.mListIncludeDirs->count(); const int count = mUI.mListIncludeDirs->count();
QStringList includePaths; QStringList includePaths;
@ -258,7 +258,7 @@ QStringList ProjectFileDialog::GetIncludePaths() const
return includePaths; return includePaths;
} }
QStringList ProjectFileDialog::GetDefines() const QStringList ProjectFileDialog::getDefines() const
{ {
QString define = mUI.mEditDefines->text(); QString define = mUI.mEditDefines->text();
QStringList defines; QStringList defines;
@ -272,7 +272,7 @@ QStringList ProjectFileDialog::GetDefines() const
return defines; return defines;
} }
QStringList ProjectFileDialog::GetCheckPaths() const QStringList ProjectFileDialog::getCheckPaths() const
{ {
const int count = mUI.mListCheckPaths->count(); const int count = mUI.mListCheckPaths->count();
QStringList paths; QStringList paths;
@ -283,7 +283,7 @@ QStringList ProjectFileDialog::GetCheckPaths() const
return paths; return paths;
} }
QStringList ProjectFileDialog::GetExcludedPaths() const QStringList ProjectFileDialog::getExcludedPaths() const
{ {
const int count = mUI.mListExcludedPaths->count(); const int count = mUI.mListExcludedPaths->count();
QStringList paths; QStringList paths;
@ -294,7 +294,7 @@ QStringList ProjectFileDialog::GetExcludedPaths() const
return paths; return paths;
} }
QStringList ProjectFileDialog::GetLibraries() const QStringList ProjectFileDialog::getLibraries() const
{ {
QStringList libraries; QStringList libraries;
foreach (const QCheckBox *checkbox, mLibraryCheckboxes) { foreach (const QCheckBox *checkbox, mLibraryCheckboxes) {
@ -304,7 +304,7 @@ QStringList ProjectFileDialog::GetLibraries() const
return libraries; return libraries;
} }
QStringList ProjectFileDialog::GetSuppressions() const QStringList ProjectFileDialog::getSuppressions() const
{ {
QStringList suppressions; QStringList suppressions;
const int count = mUI.mListSuppressions->count(); const int count = mUI.mListSuppressions->count();
@ -315,29 +315,29 @@ QStringList ProjectFileDialog::GetSuppressions() const
return suppressions; return suppressions;
} }
void ProjectFileDialog::SetRootPath(const QString &root) void ProjectFileDialog::setRootPath(const QString &root)
{ {
mUI.mEditProjectRoot->setText(QDir::toNativeSeparators(root)); mUI.mEditProjectRoot->setText(QDir::toNativeSeparators(root));
} }
void ProjectFileDialog::SetBuildDir(const QString &buildDir) void ProjectFileDialog::setBuildDir(const QString &buildDir)
{ {
mUI.mEditBuildDir->setText(buildDir); mUI.mEditBuildDir->setText(buildDir);
} }
void ProjectFileDialog::SetImportProject(const QString &importProject) void ProjectFileDialog::setImportProject(const QString &importProject)
{ {
mUI.mEditImportProject->setText(importProject); mUI.mEditImportProject->setText(importProject);
} }
void ProjectFileDialog::SetIncludepaths(const QStringList &includes) void ProjectFileDialog::setIncludepaths(const QStringList &includes)
{ {
foreach (QString dir, includes) { foreach (QString dir, includes) {
AddIncludeDir(dir); addIncludeDir(dir);
} }
} }
void ProjectFileDialog::SetDefines(const QStringList &defines) void ProjectFileDialog::setDefines(const QStringList &defines)
{ {
QString definestr; QString definestr;
QString define; QString define;
@ -351,21 +351,21 @@ void ProjectFileDialog::SetDefines(const QStringList &defines)
mUI.mEditDefines->setText(definestr); mUI.mEditDefines->setText(definestr);
} }
void ProjectFileDialog::SetCheckPaths(const QStringList &paths) void ProjectFileDialog::setCheckPaths(const QStringList &paths)
{ {
foreach (QString path, paths) { foreach (QString path, paths) {
AddCheckPath(path); addCheckPath(path);
} }
} }
void ProjectFileDialog::SetExcludedPaths(const QStringList &paths) void ProjectFileDialog::setExcludedPaths(const QStringList &paths)
{ {
foreach (QString path, paths) { foreach (QString path, paths) {
AddExcludePath(path); addExcludePath(path);
} }
} }
void ProjectFileDialog::SetLibraries(const QStringList &libraries) void ProjectFileDialog::setLibraries(const QStringList &libraries)
{ {
for (int i = 0; i < mLibraryCheckboxes.size(); i++) { for (int i = 0; i < mLibraryCheckboxes.size(); i++) {
QCheckBox *checkbox = mLibraryCheckboxes[i]; QCheckBox *checkbox = mLibraryCheckboxes[i];
@ -373,74 +373,74 @@ void ProjectFileDialog::SetLibraries(const QStringList &libraries)
} }
} }
void ProjectFileDialog::SetSuppressions(const QStringList &suppressions) void ProjectFileDialog::setSuppressions(const QStringList &suppressions)
{ {
mUI.mListSuppressions->clear(); mUI.mListSuppressions->clear();
mUI.mListSuppressions->addItems(suppressions); mUI.mListSuppressions->addItems(suppressions);
mUI.mListSuppressions->sortItems(); mUI.mListSuppressions->sortItems();
} }
void ProjectFileDialog::AddCheckPath() void ProjectFileDialog::addCheckPath()
{ {
QString dir = getExistingDirectory(tr("Select a directory to check"), false); QString dir = getExistingDirectory(tr("Select a directory to check"), false);
if (!dir.isEmpty()) if (!dir.isEmpty())
AddCheckPath(dir); addCheckPath(dir);
} }
void ProjectFileDialog::EditCheckPath() void ProjectFileDialog::editCheckPath()
{ {
QListWidgetItem *item = mUI.mListCheckPaths->currentItem(); QListWidgetItem *item = mUI.mListCheckPaths->currentItem();
mUI.mListCheckPaths->editItem(item); mUI.mListCheckPaths->editItem(item);
} }
void ProjectFileDialog::RemoveCheckPath() void ProjectFileDialog::removeCheckPath()
{ {
const int row = mUI.mListCheckPaths->currentRow(); const int row = mUI.mListCheckPaths->currentRow();
QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row); QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row);
delete item; delete item;
} }
void ProjectFileDialog::AddIncludeDir() void ProjectFileDialog::addIncludeDir()
{ {
const QString dir = getExistingDirectory(tr("Select include directory"), true); const QString dir = getExistingDirectory(tr("Select include directory"), true);
if (!dir.isEmpty()) if (!dir.isEmpty())
AddIncludeDir(dir); addIncludeDir(dir);
} }
void ProjectFileDialog::RemoveIncludeDir() void ProjectFileDialog::removeIncludeDir()
{ {
const int row = mUI.mListIncludeDirs->currentRow(); const int row = mUI.mListIncludeDirs->currentRow();
QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row);
delete item; delete item;
} }
void ProjectFileDialog::EditIncludeDir() void ProjectFileDialog::editIncludeDir()
{ {
QListWidgetItem *item = mUI.mListIncludeDirs->currentItem(); QListWidgetItem *item = mUI.mListIncludeDirs->currentItem();
mUI.mListIncludeDirs->editItem(item); mUI.mListIncludeDirs->editItem(item);
} }
void ProjectFileDialog::AddExcludePath() void ProjectFileDialog::addExcludePath()
{ {
QString dir = getExistingDirectory(tr("Select directory to ignore"), true); QString dir = getExistingDirectory(tr("Select directory to ignore"), true);
if (!dir.isEmpty()) if (!dir.isEmpty())
AddExcludePath(dir); addExcludePath(dir);
} }
void ProjectFileDialog::EditExcludePath() void ProjectFileDialog::editExcludePath()
{ {
QListWidgetItem *item = mUI.mListExcludedPaths->currentItem(); QListWidgetItem *item = mUI.mListExcludedPaths->currentItem();
mUI.mListExcludedPaths->editItem(item); mUI.mListExcludedPaths->editItem(item);
} }
void ProjectFileDialog::RemoveExcludePath() void ProjectFileDialog::removeExcludePath()
{ {
const int row = mUI.mListExcludedPaths->currentRow(); const int row = mUI.mListExcludedPaths->currentRow();
QListWidgetItem *item = mUI.mListExcludedPaths->takeItem(row); QListWidgetItem *item = mUI.mListExcludedPaths->takeItem(row);
delete item; delete item;
} }
void ProjectFileDialog::MoveIncludePathUp() void ProjectFileDialog::moveIncludePathUp()
{ {
int row = mUI.mListIncludeDirs->currentRow(); int row = mUI.mListIncludeDirs->currentRow();
QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row);
@ -449,7 +449,7 @@ void ProjectFileDialog::MoveIncludePathUp()
mUI.mListIncludeDirs->setCurrentItem(item); mUI.mListIncludeDirs->setCurrentItem(item);
} }
void ProjectFileDialog::MoveIncludePathDown() void ProjectFileDialog::moveIncludePathDown()
{ {
int row = mUI.mListIncludeDirs->currentRow(); int row = mUI.mListIncludeDirs->currentRow();
QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row); QListWidgetItem *item = mUI.mListIncludeDirs->takeItem(row);
@ -459,7 +459,7 @@ void ProjectFileDialog::MoveIncludePathDown()
mUI.mListIncludeDirs->setCurrentItem(item); mUI.mListIncludeDirs->setCurrentItem(item);
} }
void ProjectFileDialog::AddSuppression() void ProjectFileDialog::addSuppression()
{ {
class QErrorLogger : public ErrorLogger { class QErrorLogger : public ErrorLogger {
public: public:
@ -484,7 +484,7 @@ void ProjectFileDialog::AddSuppression()
} }
} }
void ProjectFileDialog::RemoveSuppression() void ProjectFileDialog::removeSuppression()
{ {
const int row = mUI.mListSuppressions->currentRow(); const int row = mUI.mListSuppressions->currentRow();
QListWidgetItem *item = mUI.mListSuppressions->takeItem(row); QListWidgetItem *item = mUI.mListSuppressions->takeItem(row);

View File

@ -43,210 +43,210 @@ public:
ProjectFileDialog(const QString &path, QWidget *parent = 0); ProjectFileDialog(const QString &path, QWidget *parent = 0);
virtual ~ProjectFileDialog(); virtual ~ProjectFileDialog();
void LoadFromProjectFile(const ProjectFile *projectFile); void loadFromProjectFile(const ProjectFile *projectFile);
void SaveToProjectFile(ProjectFile *projectFile) const; void saveToProjectFile(ProjectFile *projectFile) const;
/** /**
* @brief Return project root path from the dialog control. * @brief Return project root path from the dialog control.
* @return Project root path. * @return Project root path.
*/ */
QString GetRootPath() const; QString getRootPath() const;
QString GetImportProject() const; QString getImportProject() const;
/** Get Cppcheck build dir */ /** Get Cppcheck build dir */
QString GetBuildDir() const; QString getBuildDir() const;
/** /**
* @brief Return include paths from the dialog control. * @brief Return include paths from the dialog control.
* @return List of include paths. * @return List of include paths.
*/ */
QStringList GetIncludePaths() const; QStringList getIncludePaths() const;
/** /**
* @brief Return define names from the dialog control. * @brief Return define names from the dialog control.
* @return List of define names. * @return List of define names.
*/ */
QStringList GetDefines() const; QStringList getDefines() const;
/** /**
* @brief Return check paths from the dialog control. * @brief Return check paths from the dialog control.
* @return List of check paths. * @return List of check paths.
*/ */
QStringList GetCheckPaths() const; QStringList getCheckPaths() const;
/** /**
* @brief Return excluded paths from the dialog control. * @brief Return excluded paths from the dialog control.
* @return List of excluded paths. * @return List of excluded paths.
*/ */
QStringList GetExcludedPaths() const; QStringList getExcludedPaths() const;
/** /**
* @brief Return selected libraries from the dialog control. * @brief Return selected libraries from the dialog control.
* @return List of libraries. * @return List of libraries.
*/ */
QStringList GetLibraries() const; QStringList getLibraries() const;
/** /**
* @brief Return suppressions from the dialog control. * @brief Return suppressions from the dialog control.
* @return List of suppressions. * @return List of suppressions.
*/ */
QStringList GetSuppressions() const; QStringList getSuppressions() const;
/** /**
* @brief Set project root path to dialog control. * @brief Set project root path to dialog control.
* @param root Project root path to set to dialog control. * @param root Project root path to set to dialog control.
*/ */
void SetRootPath(const QString &root); void setRootPath(const QString &root);
/** Set build dir */ /** Set build dir */
void SetBuildDir(const QString &buildDir); void setBuildDir(const QString &buildDir);
void SetImportProject(const QString &importProject); void setImportProject(const QString &importProject);
/** /**
* @brief Set include paths to dialog control. * @brief Set include paths to dialog control.
* @param includes List of include paths to set to dialog control. * @param includes List of include paths to set to dialog control.
*/ */
void SetIncludepaths(const QStringList &includes); void setIncludepaths(const QStringList &includes);
/** /**
* @brief Set define names to dialog control. * @brief Set define names to dialog control.
* @param defines List of define names to set to dialog control. * @param defines List of define names to set to dialog control.
*/ */
void SetDefines(const QStringList &defines); void setDefines(const QStringList &defines);
/** /**
* @brief Set check paths to dialog control. * @brief Set check paths to dialog control.
* @param paths List of path names to set to dialog control. * @param paths List of path names to set to dialog control.
*/ */
void SetCheckPaths(const QStringList &paths); void setCheckPaths(const QStringList &paths);
/** /**
* @brief Set excluded paths to dialog control. * @brief Set excluded paths to dialog control.
* @param paths List of path names to set to dialog control. * @param paths List of path names to set to dialog control.
*/ */
void SetExcludedPaths(const QStringList &paths); void setExcludedPaths(const QStringList &paths);
/** /**
* @brief Set libraries to dialog control. * @brief Set libraries to dialog control.
* @param libraries List of libraries to set to dialog control. * @param libraries List of libraries to set to dialog control.
*/ */
void SetLibraries(const QStringList &libraries); void setLibraries(const QStringList &libraries);
/** /**
* @brief Set suppressions to dialog control. * @brief Set suppressions to dialog control.
* @param suppressions List of suppressions to set to dialog control. * @param suppressions List of suppressions to set to dialog control.
*/ */
void SetSuppressions(const QStringList &suppressions); void setSuppressions(const QStringList &suppressions);
protected slots: protected slots:
/** /**
* @brief Browse for build dir. * @brief Browse for build dir.
*/ */
void BrowseBuildDir(); void browseBuildDir();
/** /**
* @brief Browse for solution / project / compile database. * @brief Browse for solution / project / compile database.
*/ */
void BrowseImportProject(); void browseImportProject();
/** /**
* @brief Add new path to check. * @brief Add new path to check.
*/ */
void AddCheckPath(); void addCheckPath();
/** /**
* @brief Edit path in the list. * @brief Edit path in the list.
*/ */
void EditCheckPath(); void editCheckPath();
/** /**
* @brief Remove path from the list. * @brief Remove path from the list.
*/ */
void RemoveCheckPath(); void removeCheckPath();
/** /**
* @brief Browse for include directory. * @brief Browse for include directory.
* Allow user to add new include directory to the list. * Allow user to add new include directory to the list.
*/ */
void AddIncludeDir(); void addIncludeDir();
/** /**
* @brief Remove include directory from the list. * @brief Remove include directory from the list.
*/ */
void RemoveIncludeDir(); void removeIncludeDir();
/** /**
* @brief Edit include directory in the list. * @brief Edit include directory in the list.
*/ */
void EditIncludeDir(); void editIncludeDir();
/** /**
* @brief Add new path to exclude. * @brief Add new path to exclude.
*/ */
void AddExcludePath(); void addExcludePath();
/** /**
* @brief Edit excluded path in the list. * @brief Edit excluded path in the list.
*/ */
void EditExcludePath(); void editExcludePath();
/** /**
* @brief Remove excluded path from the list. * @brief Remove excluded path from the list.
*/ */
void RemoveExcludePath(); void removeExcludePath();
/** /**
* @brief Move include path up in the list. * @brief Move include path up in the list.
*/ */
void MoveIncludePathUp(); void moveIncludePathUp();
/** /**
* @brief Move include path down in the list. * @brief Move include path down in the list.
*/ */
void MoveIncludePathDown(); void moveIncludePathDown();
/** /**
* @brief Add suppression to the list * @brief Add suppression to the list
*/ */
void AddSuppression(); void addSuppression();
/** /**
* @brief Remove selected suppression from the list * @brief Remove selected suppression from the list
*/ */
void RemoveSuppression(); void removeSuppression();
protected: protected:
/** /**
* @brief Save dialog settings. * @brief Save dialog settings.
*/ */
void LoadSettings(); void loadSettings();
/** /**
* @brief Load dialog settings. * @brief Load dialog settings.
*/ */
void SaveSettings() const; void saveSettings() const;
/** /**
* @brief Add new indlude directory. * @brief Add new indlude directory.
* @param dir Directory to add. * @param dir Directory to add.
*/ */
void AddIncludeDir(const QString &dir); void addIncludeDir(const QString &dir);
/** /**
* @brief Add new path to check. * @brief Add new path to check.
* @param path Path to add. * @param path Path to add.
*/ */
void AddCheckPath(const QString &path); void addCheckPath(const QString &path);
/** /**
* @brief Add new path to ignore list. * @brief Add new path to ignore list.
* @param path Path to add. * @param path Path to add.
*/ */
void AddExcludePath(const QString &path); void addExcludePath(const QString &path);
private: private:
Ui::ProjectFile mUI; Ui::ProjectFile mUI;

View File

@ -553,7 +553,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
signalMapper->setMapping(start, defaultApplicationIndex); signalMapper->setMapping(start, defaultApplicationIndex);
connect(signalMapper, SIGNAL(mapped(int)), connect(signalMapper, SIGNAL(mapped(int)),
this, SLOT(Context(int))); this, SLOT(context(int)));
} }
// Add menuitems to copy full path/filename to clipboard // Add menuitems to copy full path/filename to clipboard
@ -594,14 +594,14 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
menu.addAction(hideallid); menu.addAction(hideallid);
menu.addAction(opencontainingfolder); menu.addAction(opencontainingfolder);
connect(recheckSelectedFiles, SIGNAL(triggered()), this, SLOT(RecheckSelectedFiles())); connect(recheckSelectedFiles, SIGNAL(triggered()), this, SLOT(recheckSelectedFiles()));
connect(copyfilename, SIGNAL(triggered()), this, SLOT(CopyFilename())); connect(copyfilename, SIGNAL(triggered()), this, SLOT(copyFilename()));
connect(copypath, SIGNAL(triggered()), this, SLOT(CopyFullPath())); connect(copypath, SIGNAL(triggered()), this, SLOT(copyFullPath()));
connect(copymessage, SIGNAL(triggered()), this, SLOT(CopyMessage())); connect(copymessage, SIGNAL(triggered()), this, SLOT(copyMessage()));
connect(copymessageid, SIGNAL(triggered()), this, SLOT(CopyMessageId())); connect(copymessageid, SIGNAL(triggered()), this, SLOT(copyMessageId()));
connect(hide, SIGNAL(triggered()), this, SLOT(HideResult())); connect(hide, SIGNAL(triggered()), this, SLOT(hideResult()));
connect(hideallid, SIGNAL(triggered()), this, SLOT(HideAllIdResult())); connect(hideallid, SIGNAL(triggered()), this, SLOT(hideAllIdResult()));
connect(opencontainingfolder, SIGNAL(triggered()), this, SLOT(OpenContainingFolder())); connect(opencontainingfolder, SIGNAL(triggered()), this, SLOT(openContainingFolder()));
} }
//Start the menu //Start the menu
@ -617,7 +617,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
} }
disconnect(signalMapper, SIGNAL(mapped(int)), disconnect(signalMapper, SIGNAL(mapped(int)),
this, SLOT(Context(int))); this, SLOT(context(int)));
//And remove the signal mapper //And remove the signal mapper
delete signalMapper; delete signalMapper;
} }

View File

@ -195,7 +195,7 @@ void ResultsView::printPreview()
{ {
QPrinter printer; QPrinter printer;
QPrintPreviewDialog dialog(&printer, this); QPrintPreviewDialog dialog(&printer, this);
connect(&dialog, SIGNAL(paintRequested(QPrinter*)), SLOT(Print(QPrinter*))); connect(&dialog, SIGNAL(paintRequested(QPrinter*)), SLOT(print(QPrinter*)));
dialog.exec(); dialog.exec();
} }

View File

@ -26,10 +26,10 @@ ScratchPad::ScratchPad(MainWindow& mainWindow)
{ {
mUI.setupUi(this); mUI.setupUi(this);
connect(mUI.mCheckButton, SIGNAL(clicked()), this, SLOT(CheckButtonClicked())); connect(mUI.mCheckButton, SIGNAL(clicked()), this, SLOT(checkButtonClicked()));
} }
void ScratchPad::CheckButtonClicked() void ScratchPad::checkButtonClicked()
{ {
QString filename = mUI.lineEdit->text(); QString filename = mUI.lineEdit->text();
if (filename.isEmpty()) if (filename.isEmpty())

View File

@ -39,7 +39,7 @@ private slots:
/** /**
* @brief Called when check button is clicked. * @brief Called when check button is clicked.
*/ */
void CheckButtonClicked(); void checkButtonClicked();
private: private:
Ui::ScratchPad mUI; Ui::ScratchPad mUI;

View File

@ -43,38 +43,38 @@ SettingsDialog::SettingsDialog(ApplicationList *list,
mTempApplications->copy(list); mTempApplications->copy(list);
mUI.mJobs->setText(settings.value(SETTINGS_CHECK_THREADS, 1).toString()); mUI.mJobs->setText(settings.value(SETTINGS_CHECK_THREADS, 1).toString());
mUI.mForce->setCheckState(BoolToCheckState(settings.value(SETTINGS_CHECK_FORCE, false).toBool())); mUI.mForce->setCheckState(boolToCheckState(settings.value(SETTINGS_CHECK_FORCE, false).toBool()));
mUI.mShowFullPath->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_FULL_PATH, false).toBool())); mUI.mShowFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_FULL_PATH, false).toBool()));
mUI.mShowNoErrorsMessage->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_NO_ERRORS, false).toBool())); mUI.mShowNoErrorsMessage->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_NO_ERRORS, false).toBool()));
mUI.mShowDebugWarnings->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_DEBUG_WARNINGS, false).toBool())); mUI.mShowDebugWarnings->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_DEBUG_WARNINGS, false).toBool()));
mUI.mSaveAllErrors->setCheckState(BoolToCheckState(settings.value(SETTINGS_SAVE_ALL_ERRORS, false).toBool())); mUI.mSaveAllErrors->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_ALL_ERRORS, false).toBool()));
mUI.mSaveFullPath->setCheckState(BoolToCheckState(settings.value(SETTINGS_SAVE_FULL_PATH, false).toBool())); mUI.mSaveFullPath->setCheckState(boolToCheckState(settings.value(SETTINGS_SAVE_FULL_PATH, false).toBool()));
mUI.mInlineSuppressions->setCheckState(BoolToCheckState(settings.value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool())); mUI.mInlineSuppressions->setCheckState(boolToCheckState(settings.value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool()));
mUI.mEnableInconclusive->setCheckState(BoolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool())); mUI.mEnableInconclusive->setCheckState(boolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool()));
mUI.mShowStatistics->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool())); mUI.mShowStatistics->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool()));
mUI.mShowErrorId->setCheckState(BoolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool())); mUI.mShowErrorId->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool()));
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok())); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(ok()));
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject())); connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
connect(mUI.mBtnAddApplication, SIGNAL(clicked()), connect(mUI.mBtnAddApplication, SIGNAL(clicked()),
this, SLOT(AddApplication())); this, SLOT(addApplication()));
connect(mUI.mBtnRemoveApplication, SIGNAL(clicked()), connect(mUI.mBtnRemoveApplication, SIGNAL(clicked()),
this, SLOT(RemoveApplication())); this, SLOT(removeApplication()));
connect(mUI.mBtnEditApplication, SIGNAL(clicked()), connect(mUI.mBtnEditApplication, SIGNAL(clicked()),
this, SLOT(EditApplication())); this, SLOT(editApplication()));
connect(mUI.mBtnDefaultApplication, SIGNAL(clicked()), connect(mUI.mBtnDefaultApplication, SIGNAL(clicked()),
this, SLOT(DefaultApplication())); this, SLOT(defaultApplication()));
connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
this, SLOT(EditApplication())); this, SLOT(editApplication()));
connect(mUI.mBtnAddIncludePath, SIGNAL(clicked()), connect(mUI.mBtnAddIncludePath, SIGNAL(clicked()),
this, SLOT(AddIncludePath())); this, SLOT(addIncludePath()));
connect(mUI.mBtnRemoveIncludePath, SIGNAL(clicked()), connect(mUI.mBtnRemoveIncludePath, SIGNAL(clicked()),
this, SLOT(RemoveIncludePath())); this, SLOT(removeIncludePath()));
connect(mUI.mBtnEditIncludePath, SIGNAL(clicked()), connect(mUI.mBtnEditIncludePath, SIGNAL(clicked()),
this, SLOT(EditIncludePath())); this, SLOT(editIncludePath()));
mUI.mListWidget->setSortingEnabled(false); mUI.mListWidget->setSortingEnabled(false);
PopulateApplicationList(); populateApplicationList();
const int count = QThread::idealThreadCount(); const int count = QThread::idealThreadCount();
if (count != -1) if (count != -1)
@ -82,17 +82,17 @@ SettingsDialog::SettingsDialog(ApplicationList *list,
else else
mUI.mLblIdealThreads->setText(tr("N/A")); mUI.mLblIdealThreads->setText(tr("N/A"));
LoadSettings(); loadSettings();
InitTranslationsList(); initTranslationsList();
InitIncludepathsList(); initIncludepathsList();
} }
SettingsDialog::~SettingsDialog() SettingsDialog::~SettingsDialog()
{ {
SaveSettings(); saveSettings();
} }
void SettingsDialog::AddIncludePath(const QString &path) void SettingsDialog::addIncludePath(const QString &path)
{ {
if (path.isNull() || path.isEmpty()) if (path.isNull() || path.isEmpty())
return; return;
@ -102,20 +102,20 @@ void SettingsDialog::AddIncludePath(const QString &path)
mUI.mListIncludePaths->addItem(item); mUI.mListIncludePaths->addItem(item);
} }
void SettingsDialog::InitIncludepathsList() void SettingsDialog::initIncludepathsList()
{ {
QSettings settings; QSettings settings;
const QString allPaths = settings.value(SETTINGS_GLOBAL_INCLUDE_PATHS).toString(); const QString allPaths = settings.value(SETTINGS_GLOBAL_INCLUDE_PATHS).toString();
const QStringList paths = allPaths.split(";", QString::SkipEmptyParts); const QStringList paths = allPaths.split(";", QString::SkipEmptyParts);
foreach (QString path, paths) { foreach (QString path, paths) {
AddIncludePath(path); addIncludePath(path);
} }
} }
void SettingsDialog::InitTranslationsList() void SettingsDialog::initTranslationsList()
{ {
const QString current = mTranslator->GetCurrentLanguage(); const QString current = mTranslator->getCurrentLanguage();
QList<TranslationInfo> translations = mTranslator->GetTranslations(); QList<TranslationInfo> translations = mTranslator->getTranslations();
foreach (TranslationInfo translation, translations) { foreach (TranslationInfo translation, translations) {
QListWidgetItem *item = new QListWidgetItem; QListWidgetItem *item = new QListWidgetItem;
item->setText(translation.mName); item->setText(translation.mName);
@ -126,7 +126,7 @@ void SettingsDialog::InitTranslationsList()
} }
} }
Qt::CheckState SettingsDialog::BoolToCheckState(bool yes) Qt::CheckState SettingsDialog::boolToCheckState(bool yes)
{ {
if (yes) { if (yes) {
return Qt::Checked; return Qt::Checked;
@ -134,7 +134,7 @@ Qt::CheckState SettingsDialog::BoolToCheckState(bool yes)
return Qt::Unchecked; return Qt::Unchecked;
} }
bool SettingsDialog::CheckStateToBool(Qt::CheckState state) bool SettingsDialog::checkStateToBool(Qt::CheckState state)
{ {
if (state == Qt::Checked) { if (state == Qt::Checked) {
return true; return true;
@ -143,21 +143,21 @@ bool SettingsDialog::CheckStateToBool(Qt::CheckState state)
} }
void SettingsDialog::LoadSettings() void SettingsDialog::loadSettings()
{ {
QSettings settings; QSettings settings;
resize(settings.value(SETTINGS_CHECK_DIALOG_WIDTH, 800).toInt(), resize(settings.value(SETTINGS_CHECK_DIALOG_WIDTH, 800).toInt(),
settings.value(SETTINGS_CHECK_DIALOG_HEIGHT, 600).toInt()); settings.value(SETTINGS_CHECK_DIALOG_HEIGHT, 600).toInt());
} }
void SettingsDialog::SaveSettings() const void SettingsDialog::saveSettings() const
{ {
QSettings settings; QSettings settings;
settings.setValue(SETTINGS_CHECK_DIALOG_WIDTH, size().width()); settings.setValue(SETTINGS_CHECK_DIALOG_WIDTH, size().width());
settings.setValue(SETTINGS_CHECK_DIALOG_HEIGHT, size().height()); settings.setValue(SETTINGS_CHECK_DIALOG_HEIGHT, size().height());
} }
void SettingsDialog::SaveSettingValues() const void SettingsDialog::saveSettingValues() const
{ {
int jobs = mUI.mJobs->text().toInt(); int jobs = mUI.mJobs->text().toInt();
if (jobs <= 0) { if (jobs <= 0) {
@ -166,16 +166,16 @@ void SettingsDialog::SaveSettingValues() const
QSettings settings; QSettings settings;
settings.setValue(SETTINGS_CHECK_THREADS, jobs); settings.setValue(SETTINGS_CHECK_THREADS, jobs);
SaveCheckboxValue(&settings, mUI.mForce, SETTINGS_CHECK_FORCE); saveCheckboxValue(&settings, mUI.mForce, SETTINGS_CHECK_FORCE);
SaveCheckboxValue(&settings, mUI.mSaveAllErrors, SETTINGS_SAVE_ALL_ERRORS); saveCheckboxValue(&settings, mUI.mSaveAllErrors, SETTINGS_SAVE_ALL_ERRORS);
SaveCheckboxValue(&settings, mUI.mSaveFullPath, SETTINGS_SAVE_FULL_PATH); saveCheckboxValue(&settings, mUI.mSaveFullPath, SETTINGS_SAVE_FULL_PATH);
SaveCheckboxValue(&settings, mUI.mShowFullPath, SETTINGS_SHOW_FULL_PATH); saveCheckboxValue(&settings, mUI.mShowFullPath, SETTINGS_SHOW_FULL_PATH);
SaveCheckboxValue(&settings, mUI.mShowNoErrorsMessage, SETTINGS_SHOW_NO_ERRORS); saveCheckboxValue(&settings, mUI.mShowNoErrorsMessage, SETTINGS_SHOW_NO_ERRORS);
SaveCheckboxValue(&settings, mUI.mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS); saveCheckboxValue(&settings, mUI.mShowDebugWarnings, SETTINGS_SHOW_DEBUG_WARNINGS);
SaveCheckboxValue(&settings, mUI.mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS); saveCheckboxValue(&settings, mUI.mInlineSuppressions, SETTINGS_INLINE_SUPPRESSIONS);
SaveCheckboxValue(&settings, mUI.mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS); saveCheckboxValue(&settings, mUI.mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS);
SaveCheckboxValue(&settings, mUI.mShowStatistics, SETTINGS_SHOW_STATISTICS); saveCheckboxValue(&settings, mUI.mShowStatistics, SETTINGS_SHOW_STATISTICS);
SaveCheckboxValue(&settings, mUI.mShowErrorId, SETTINGS_SHOW_ERROR_ID); saveCheckboxValue(&settings, mUI.mShowErrorId, SETTINGS_SHOW_ERROR_ID);
const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem(); const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem();
if (currentLang) { if (currentLang) {
@ -193,13 +193,13 @@ void SettingsDialog::SaveSettingValues() const
settings.setValue(SETTINGS_GLOBAL_INCLUDE_PATHS, includePaths); settings.setValue(SETTINGS_GLOBAL_INCLUDE_PATHS, includePaths);
} }
void SettingsDialog::SaveCheckboxValue(QSettings *settings, QCheckBox *box, void SettingsDialog::saveCheckboxValue(QSettings *settings, QCheckBox *box,
const QString &name) const QString &name)
{ {
settings->setValue(name, CheckStateToBool(box->checkState())); settings->setValue(name, checkStateToBool(box->checkState()));
} }
void SettingsDialog::AddApplication() void SettingsDialog::addApplication()
{ {
Application app; Application app;
ApplicationDialog dialog(tr("Add a new application"), app, this); ApplicationDialog dialog(tr("Add a new application"), app, this);
@ -210,7 +210,7 @@ void SettingsDialog::AddApplication()
} }
} }
void SettingsDialog::RemoveApplication() void SettingsDialog::removeApplication()
{ {
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems(); QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
foreach (QListWidgetItem *item, selected) { foreach (QListWidgetItem *item, selected) {
@ -225,10 +225,10 @@ void SettingsDialog::RemoveApplication()
mTempApplications->setDefault(currentDefault - 1); mTempApplications->setDefault(currentDefault - 1);
} }
mUI.mListWidget->clear(); mUI.mListWidget->clear();
PopulateApplicationList(); populateApplicationList();
} }
void SettingsDialog::EditApplication() void SettingsDialog::editApplication()
{ {
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems(); QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
QListWidgetItem *item = 0; QListWidgetItem *item = 0;
@ -246,18 +246,18 @@ void SettingsDialog::EditApplication()
} }
} }
void SettingsDialog::DefaultApplication() void SettingsDialog::defaultApplication()
{ {
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems(); QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
if (!selected.isEmpty()) { if (!selected.isEmpty()) {
int index = mUI.mListWidget->row(selected[0]); int index = mUI.mListWidget->row(selected[0]);
mTempApplications->setDefault(index); mTempApplications->setDefault(index);
mUI.mListWidget->clear(); mUI.mListWidget->clear();
PopulateApplicationList(); populateApplicationList();
} }
} }
void SettingsDialog::PopulateApplicationList() void SettingsDialog::populateApplicationList()
{ {
const int defapp = mTempApplications->getDefaultApplication(); const int defapp = mTempApplications->getDefaultApplication();
for (int i = 0; i < mTempApplications->getApplicationCount(); i++) { for (int i = 0; i < mTempApplications->getApplicationCount(); i++) {
@ -282,62 +282,62 @@ void SettingsDialog::PopulateApplicationList()
} }
} }
void SettingsDialog::Ok() void SettingsDialog::ok()
{ {
mApplications->copy(mTempApplications); mApplications->copy(mTempApplications);
accept(); accept();
} }
bool SettingsDialog::ShowFullPath() const bool SettingsDialog::showFullPath() const
{ {
return CheckStateToBool(mUI.mShowFullPath->checkState()); return checkStateToBool(mUI.mShowFullPath->checkState());
} }
bool SettingsDialog::SaveFullPath() const bool SettingsDialog::saveFullPath() const
{ {
return CheckStateToBool(mUI.mSaveFullPath->checkState()); return checkStateToBool(mUI.mSaveFullPath->checkState());
} }
bool SettingsDialog::SaveAllErrors() const bool SettingsDialog::saveAllErrors() const
{ {
return CheckStateToBool(mUI.mSaveAllErrors->checkState()); return checkStateToBool(mUI.mSaveAllErrors->checkState());
} }
bool SettingsDialog::ShowNoErrorsMessage() const bool SettingsDialog::showNoErrorsMessage() const
{ {
return CheckStateToBool(mUI.mShowNoErrorsMessage->checkState()); return checkStateToBool(mUI.mShowNoErrorsMessage->checkState());
} }
bool SettingsDialog::ShowErrorId() const bool SettingsDialog::showErrorId() const
{ {
return CheckStateToBool(mUI.mShowErrorId->checkState()); return checkStateToBool(mUI.mShowErrorId->checkState());
} }
bool SettingsDialog::ShowInconclusive() const bool SettingsDialog::showInconclusive() const
{ {
return CheckStateToBool(mUI.mEnableInconclusive->checkState()); return checkStateToBool(mUI.mEnableInconclusive->checkState());
} }
void SettingsDialog::AddIncludePath() void SettingsDialog::addIncludePath()
{ {
QString selectedDir = QFileDialog::getExistingDirectory(this, QString selectedDir = QFileDialog::getExistingDirectory(this,
tr("Select include directory"), tr("Select include directory"),
getPath(SETTINGS_LAST_INCLUDE_PATH)); getPath(SETTINGS_LAST_INCLUDE_PATH));
if (!selectedDir.isEmpty()) { if (!selectedDir.isEmpty()) {
AddIncludePath(selectedDir); addIncludePath(selectedDir);
setPath(SETTINGS_LAST_INCLUDE_PATH, selectedDir); setPath(SETTINGS_LAST_INCLUDE_PATH, selectedDir);
} }
} }
void SettingsDialog::RemoveIncludePath() void SettingsDialog::removeIncludePath()
{ {
const int row = mUI.mListIncludePaths->currentRow(); const int row = mUI.mListIncludePaths->currentRow();
QListWidgetItem *item = mUI.mListIncludePaths->takeItem(row); QListWidgetItem *item = mUI.mListIncludePaths->takeItem(row);
delete item; delete item;
} }
void SettingsDialog::EditIncludePath() void SettingsDialog::editIncludePath()
{ {
QListWidgetItem *item = mUI.mListIncludePaths->currentItem(); QListWidgetItem *item = mUI.mListIncludePaths->currentItem();
mUI.mListIncludePaths->editItem(item); mUI.mListIncludePaths->editItem(item);

View File

@ -47,21 +47,21 @@ public:
* @brief Save all values to QSettings * @brief Save all values to QSettings
* *
*/ */
void SaveSettingValues() const; void saveSettingValues() const;
/** /**
* @brief Get checkbox value for mShowFullPath * @brief Get checkbox value for mShowFullPath
* *
* @return should full path of errors be shown in the tree * @return should full path of errors be shown in the tree
*/ */
bool ShowFullPath() const; bool showFullPath() const;
/** /**
* @brief Get checkbox value for mSaveFullPath * @brief Get checkbox value for mSaveFullPath
* *
* @return should full path of files be saved when creating a report * @return should full path of files be saved when creating a report
*/ */
bool SaveFullPath() const; bool saveFullPath() const;
/** /**
@ -69,14 +69,14 @@ public:
* *
* @return Should "no errors message" be hidden * @return Should "no errors message" be hidden
*/ */
bool ShowNoErrorsMessage() const; bool showNoErrorsMessage() const;
/** /**
* @brief Get checkbox value for mShowIdColumn * @brief Get checkbox value for mShowIdColumn
* *
* @return Should error id column be displayed * @return Should error id column be displayed
*/ */
bool ShowErrorId() const; bool showErrorId() const;
/** /**
@ -84,63 +84,63 @@ public:
* *
* @return Should inconclusive column be displayed * @return Should inconclusive column be displayed
*/ */
bool ShowInconclusive() const; bool showInconclusive() const;
/** /**
* @brief Get checkbox value for mSaveAllErrors * @brief Get checkbox value for mSaveAllErrors
* *
* @return should all errors be saved to report * @return should all errors be saved to report
*/ */
bool SaveAllErrors() const; bool saveAllErrors() const;
protected slots: protected slots:
/** /**
* @brief Slot for clicking OK. * @brief Slot for clicking OK.
* *
*/ */
void Ok(); void ok();
/** /**
* @brief Slot for adding a new application to the list * @brief Slot for adding a new application to the list
* *
*/ */
void AddApplication(); void addApplication();
/** /**
* @brief Slot for deleting an application from the list * @brief Slot for deleting an application from the list
* *
*/ */
void RemoveApplication(); void removeApplication();
/** /**
* @brief Slot for modifying an application in the list * @brief Slot for modifying an application in the list
* *
*/ */
void EditApplication(); void editApplication();
/** /**
* @brief Slot for making the selected application as the default (first) * @brief Slot for making the selected application as the default (first)
* *
*/ */
void DefaultApplication(); void defaultApplication();
/** /**
* @brief Slot for adding new include path * @brief Slot for adding new include path
* *
*/ */
void AddIncludePath(); void addIncludePath();
/** /**
* @brief Slot for removing an include path. * @brief Slot for removing an include path.
* *
*/ */
void RemoveIncludePath(); void removeIncludePath();
/** /**
* @brief Slot for editing an include path. * @brief Slot for editing an include path.
* *
*/ */
void EditIncludePath(); void editIncludePath();
protected: protected:
@ -149,27 +149,26 @@ protected:
* @param path Path to add. * @param path Path to add.
* *
*/ */
void AddIncludePath(const QString &path); void addIncludePath(const QString &path);
/** /**
* @brief Clear all applications from the list and re insert them from mTempApplications * @brief Clear all applications from the list and re insert them from mTempApplications
* *
*/ */
void PopulateApplicationList(); void populateApplicationList();
/** /**
* @brief Load saved values * @brief Load saved values
* Loads dialog size and column widths. * Loads dialog size and column widths.
* *
*/ */
void SaveSettings() const; void loadSettings();
/** /**
* @brief Save settings * @brief Save settings
* Save dialog size and column widths. * Save dialog size and column widths.
*
*/ */
void LoadSettings(); void saveSettings() const;
/** /**
* @brief Save a single checkboxes value * @brief Save a single checkboxes value
@ -178,7 +177,7 @@ protected:
* @param box checkbox to save * @param box checkbox to save
* @param name name for QSettings to store the value * @param name name for QSettings to store the value
*/ */
static void SaveCheckboxValue(QSettings *settings, QCheckBox *box, const QString &name); static void saveCheckboxValue(QSettings *settings, QCheckBox *box, const QString &name);
/** /**
* @brief Convert bool to Qt::CheckState * @brief Convert bool to Qt::CheckState
@ -186,7 +185,7 @@ protected:
* @param yes value to convert * @param yes value to convert
* @return value converted to Qt::CheckState * @return value converted to Qt::CheckState
*/ */
static Qt::CheckState BoolToCheckState(bool yes); static Qt::CheckState boolToCheckState(bool yes);
/** /**
* @brief Converts Qt::CheckState to bool * @brief Converts Qt::CheckState to bool
@ -194,17 +193,17 @@ protected:
* @param state Qt::CheckState to convert * @param state Qt::CheckState to convert
* @return converted value * @return converted value
*/ */
static bool CheckStateToBool(Qt::CheckState state); static bool checkStateToBool(Qt::CheckState state);
/** /**
* @brief Populate the include paths-list. * @brief Populate the include paths-list.
*/ */
void InitIncludepathsList(); void initIncludepathsList();
/** /**
* @brief Populate the translations list. * @brief Populate the translations list.
*/ */
void InitTranslationsList(); void initTranslationsList();
/** /**
* @brief List of applications user has specified * @brief List of applications user has specified

View File

@ -36,8 +36,7 @@ StatsDialog::StatsDialog(QWidget *parent)
mUI.setupUi(this); mUI.setupUi(this);
connect(mUI.mCopyToClipboard, SIGNAL(pressed()), this, SLOT(copyToClipboard())); connect(mUI.mCopyToClipboard, SIGNAL(pressed()), this, SLOT(copyToClipboard()));
connect(mUI.mPDFexport, SIGNAL(pressed()), this, SLOT(PDFexport())); connect(mUI.mPDFexport, SIGNAL(pressed()), this, SLOT(pdfExport()));
} }
void StatsDialog::setProject(const Project& project) void StatsDialog::setProject(const Project& project)
@ -94,7 +93,7 @@ void StatsDialog::setScanDuration(double seconds)
mUI.mScanDuration->setText(parts.join(tr(" and "))); mUI.mScanDuration->setText(parts.join(tr(" and ")));
} }
void StatsDialog::PDFexport() void StatsDialog::pdfExport()
{ {
const QString Stat = QString( const QString Stat = QString(
"<center><h1>%1 %2</h1></center>\n" "<center><h1>%1 %2</h1></center>\n"

View File

@ -64,7 +64,7 @@ public:
private slots: private slots:
void copyToClipboard(); void copyToClipboard();
void PDFexport(); void pdfExport();
private: private:
Ui::StatsDialog mUI; Ui::StatsDialog mUI;

View File

@ -120,9 +120,9 @@ void ThreadHandler::setThreadCount(const int count)
//Create new threads //Create new threads
for (int i = mThreads.size(); i < count; i++) { for (int i = mThreads.size(); i < count; i++) {
mThreads << new CheckThread(mResults); mThreads << new CheckThread(mResults);
connect(mThreads.last(), SIGNAL(Done()), connect(mThreads.last(), SIGNAL(done()),
this, SLOT(threadDone())); this, SLOT(threadDone()));
connect(mThreads.last(), SIGNAL(FileChecked(const QString &)), connect(mThreads.last(), SIGNAL(fileChecked(const QString &)),
&mResults, SLOT(fileChecked(const QString &))); &mResults, SLOT(fileChecked(const QString &)));
} }
@ -133,9 +133,9 @@ void ThreadHandler::removeThreads()
{ {
for (int i = 0; i < mThreads.size(); i++) { for (int i = 0; i < mThreads.size(); i++) {
mThreads[i]->terminate(); mThreads[i]->terminate();
disconnect(mThreads.last(), SIGNAL(Done()), disconnect(mThreads.last(), SIGNAL(done()),
this, SLOT(threadDone())); this, SLOT(threadDone()));
disconnect(mThreads.last(), SIGNAL(FileChecked(const QString &)), disconnect(mThreads.last(), SIGNAL(fileChecked(const QString &)),
&mResults, SLOT(fileChecked(const QString &))); &mResults, SLOT(fileChecked(const QString &)));
delete mThreads[i]; delete mThreads[i];

View File

@ -51,26 +51,26 @@ TranslationHandler::TranslationHandler(QObject *parent) :
{ {
// Add our available languages // Add our available languages
// Keep this list sorted // Keep this list sorted
AddTranslation("Chinese (Simplified)", "cppcheck_zh_CN"); addTranslation("Chinese (Simplified)", "cppcheck_zh_CN");
AddTranslation("Dutch", "cppcheck_nl"); addTranslation("Dutch", "cppcheck_nl");
AddTranslation("English", "cppcheck_en"); addTranslation("English", "cppcheck_en");
AddTranslation("Finnish", "cppcheck_fi"); addTranslation("Finnish", "cppcheck_fi");
AddTranslation("French", "cppcheck_fr"); addTranslation("French", "cppcheck_fr");
AddTranslation("German", "cppcheck_de"); addTranslation("German", "cppcheck_de");
AddTranslation("Italian", "cppcheck_it"); addTranslation("Italian", "cppcheck_it");
AddTranslation("Japanese", "cppcheck_ja"); addTranslation("Japanese", "cppcheck_ja");
AddTranslation("Korean", "cppcheck_ko"); addTranslation("Korean", "cppcheck_ko");
AddTranslation("Russian", "cppcheck_ru"); addTranslation("Russian", "cppcheck_ru");
AddTranslation("Serbian", "cppcheck_sr"); addTranslation("Serbian", "cppcheck_sr");
AddTranslation("Spanish", "cppcheck_es"); addTranslation("Spanish", "cppcheck_es");
AddTranslation("Swedish", "cppcheck_sv"); addTranslation("Swedish", "cppcheck_sv");
} }
TranslationHandler::~TranslationHandler() TranslationHandler::~TranslationHandler()
{ {
} }
const QStringList TranslationHandler::GetNames() const const QStringList TranslationHandler::getNames() const
{ {
QStringList names; QStringList names;
foreach (TranslationInfo translation, mTranslations) { foreach (TranslationInfo translation, mTranslations) {
@ -79,7 +79,7 @@ const QStringList TranslationHandler::GetNames() const
return names; return names;
} }
bool TranslationHandler::SetLanguage(const QString &code) bool TranslationHandler::setLanguage(const QString &code)
{ {
bool failure = false; bool failure = false;
QString error; QString error;
@ -98,7 +98,7 @@ bool TranslationHandler::SetLanguage(const QString &code)
} }
//Make sure the translator is otherwise valid //Make sure the translator is otherwise valid
int index = GetLanguageIndexByCode(code); int index = getLanguageIndexByCode(code);
if (index == -1) { if (index == -1) {
error = QObject::tr("Unknown language specified!"); error = QObject::tr("Unknown language specified!");
failure = true; failure = true;
@ -161,19 +161,19 @@ bool TranslationHandler::SetLanguage(const QString &code)
return true; return true;
} }
QString TranslationHandler::GetCurrentLanguage() const QString TranslationHandler::getCurrentLanguage() const
{ {
return mCurrentLanguage; return mCurrentLanguage;
} }
QString TranslationHandler::SuggestLanguage() const QString TranslationHandler::suggestLanguage() const
{ {
//Get language from system locale's name ie sv_SE or zh_CN //Get language from system locale's name ie sv_SE or zh_CN
QString language = QLocale::system().name(); QString language = QLocale::system().name();
//qDebug()<<"Your language is"<<language; //qDebug()<<"Your language is"<<language;
//And see if we can find it from our list of language files //And see if we can find it from our list of language files
int index = GetLanguageIndexByCode(language); int index = getLanguageIndexByCode(language);
//If nothing found, return English //If nothing found, return English
if (index < 0) { if (index < 0) {
@ -183,7 +183,7 @@ QString TranslationHandler::SuggestLanguage() const
return language; return language;
} }
void TranslationHandler::AddTranslation(const char *name, const char *filename) void TranslationHandler::addTranslation(const char *name, const char *filename)
{ {
TranslationInfo info; TranslationInfo info;
info.mName = name; info.mName = name;
@ -193,7 +193,7 @@ void TranslationHandler::AddTranslation(const char *name, const char *filename)
mTranslations.append(info); mTranslations.append(info);
} }
int TranslationHandler::GetLanguageIndexByCode(const QString &code) const int TranslationHandler::getLanguageIndexByCode(const QString &code) const
{ {
int index = -1; int index = -1;
for (int i = 0; i < mTranslations.size(); i++) { for (int i = 0; i < mTranslations.size(); i++) {

View File

@ -69,14 +69,14 @@ public:
* @return List of available translation names. * @return List of available translation names.
* *
*/ */
const QStringList GetNames() const; const QStringList getNames() const;
/** /**
* @brief Get a list of available translations. * @brief Get a list of available translations.
* @return List of available translations. * @return List of available translations.
* *
*/ */
QList<TranslationInfo> GetTranslations() const { QList<TranslationInfo> getTranslations() const {
return mTranslations; return mTranslations;
} }
@ -86,14 +86,14 @@ public:
* @return true if succeeds, false otherwise. * @return true if succeeds, false otherwise.
* *
*/ */
bool SetLanguage(const QString &code); bool setLanguage(const QString &code);
/** /**
* @brief Get currently selected translation. * @brief Get currently selected translation.
* @return ISO 639 language code for current translation. * @return ISO 639 language code for current translation.
* *
*/ */
QString GetCurrentLanguage() const; QString getCurrentLanguage() const;
/** /**
* @brief Get translation suggestion for the system. * @brief Get translation suggestion for the system.
@ -103,7 +103,7 @@ public:
* @return Suggested translation ISO 639 language code. * @return Suggested translation ISO 639 language code.
* *
*/ */
QString SuggestLanguage() const; QString suggestLanguage() const;
protected: protected:
@ -113,7 +113,7 @@ protected:
* @param filename Filename of the translation. * @param filename Filename of the translation.
* *
*/ */
void AddTranslation(const char *name, const char *filename); void addTranslation(const char *name, const char *filename);
/** /**
* @brief Find language in the list and return its index. * @brief Find language in the list and return its index.
@ -121,7 +121,7 @@ protected:
* @return Index at list, or -1 if not found. * @return Index at list, or -1 if not found.
* *
*/ */
int GetLanguageIndexByCode(const QString &code) const; int getLanguageIndexByCode(const QString &code) const;
private: private: