GUI: Renamed functions
This commit is contained in:
parent
ad1b3361db
commit
c2069c4b76
|
@ -87,9 +87,9 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
|
||||||
connect(mUI.mBtnBrowseBuildDir, SIGNAL(clicked()), this, SLOT(BrowseBuildDir()));
|
connect(mUI.mBtnBrowseBuildDir, SIGNAL(clicked()), this, SLOT(BrowseBuildDir()));
|
||||||
connect(mUI.mBtnBrowseCompileDatabase, SIGNAL(clicked()), this, SLOT(BrowseCompileDatabase()));
|
connect(mUI.mBtnBrowseCompileDatabase, SIGNAL(clicked()), this, SLOT(BrowseCompileDatabase()));
|
||||||
connect(mUI.mBtnBrowseVisualStudio, SIGNAL(clicked()), this, SLOT(BrowseVisualStudio()));
|
connect(mUI.mBtnBrowseVisualStudio, SIGNAL(clicked()), this, SLOT(BrowseVisualStudio()));
|
||||||
connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(AddPath()));
|
connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(AddCheckPath()));
|
||||||
connect(mUI.mBtnEditCheckPath, SIGNAL(clicked()), this, SLOT(EditPath()));
|
connect(mUI.mBtnEditCheckPath, SIGNAL(clicked()), this, SLOT(EditCheckPath()));
|
||||||
connect(mUI.mBtnRemoveCheckPath, SIGNAL(clicked()), this, SLOT(RemovePath()));
|
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()));
|
||||||
|
@ -126,7 +126,7 @@ void ProjectFileDialog::LoadFromProjectFile(const ProjectFile *projectFile) {
|
||||||
SetBuildDir(projectFile->GetBuildDir());
|
SetBuildDir(projectFile->GetBuildDir());
|
||||||
SetIncludepaths(projectFile->GetIncludeDirs());
|
SetIncludepaths(projectFile->GetIncludeDirs());
|
||||||
SetDefines(projectFile->GetDefines());
|
SetDefines(projectFile->GetDefines());
|
||||||
SetPaths(projectFile->GetCheckPaths());
|
SetCheckPaths(projectFile->GetCheckPaths());
|
||||||
SetImportProject(projectFile->GetImportProject());
|
SetImportProject(projectFile->GetImportProject());
|
||||||
SetExcludedPaths(projectFile->GetExcludedPaths());
|
SetExcludedPaths(projectFile->GetExcludedPaths());
|
||||||
SetLibraries(projectFile->GetLibraries());
|
SetLibraries(projectFile->GetLibraries());
|
||||||
|
@ -139,7 +139,7 @@ void ProjectFileDialog::SaveToProjectFile(ProjectFile *projectFile) const {
|
||||||
projectFile->SetImportProject(GetImportProject());
|
projectFile->SetImportProject(GetImportProject());
|
||||||
projectFile->SetIncludes(GetIncludePaths());
|
projectFile->SetIncludes(GetIncludePaths());
|
||||||
projectFile->SetDefines(GetDefines());
|
projectFile->SetDefines(GetDefines());
|
||||||
projectFile->SetCheckPaths(GetPaths());
|
projectFile->SetCheckPaths(GetCheckPaths());
|
||||||
projectFile->SetExcludedPaths(GetExcludedPaths());
|
projectFile->SetExcludedPaths(GetExcludedPaths());
|
||||||
projectFile->SetLibraries(GetLibraries());
|
projectFile->SetLibraries(GetLibraries());
|
||||||
projectFile->SetSuppressions(GetSuppressions());
|
projectFile->SetSuppressions(GetSuppressions());
|
||||||
|
@ -208,7 +208,7 @@ void ProjectFileDialog::AddIncludeDir(const QString &dir)
|
||||||
mUI.mListIncludeDirs->addItem(item);
|
mUI.mListIncludeDirs->addItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFileDialog::AddPath(const QString &path)
|
void ProjectFileDialog::AddCheckPath(const QString &path)
|
||||||
{
|
{
|
||||||
if (path.isNull() || path.isEmpty())
|
if (path.isNull() || path.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
@ -273,7 +273,7 @@ QStringList ProjectFileDialog::GetDefines() const
|
||||||
return defines;
|
return defines;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList ProjectFileDialog::GetPaths() const
|
QStringList ProjectFileDialog::GetCheckPaths() const
|
||||||
{
|
{
|
||||||
const int count = mUI.mListCheckPaths->count();
|
const int count = mUI.mListCheckPaths->count();
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
|
@ -357,10 +357,10 @@ void ProjectFileDialog::SetDefines(const QStringList &defines)
|
||||||
mUI.mEditDefines->setText(definestr);
|
mUI.mEditDefines->setText(definestr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFileDialog::SetPaths(const QStringList &paths)
|
void ProjectFileDialog::SetCheckPaths(const QStringList &paths)
|
||||||
{
|
{
|
||||||
foreach (QString path, paths) {
|
foreach (QString path, paths) {
|
||||||
AddPath(path);
|
AddCheckPath(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,6 +386,26 @@ void ProjectFileDialog::SetSuppressions(const QStringList &suppressions)
|
||||||
mUI.mListSuppressions->sortItems();
|
mUI.mListSuppressions->sortItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProjectFileDialog::AddCheckPath()
|
||||||
|
{
|
||||||
|
QString dir = getExistingDirectory(tr("Select a directory to check"), false);
|
||||||
|
if (!dir.isEmpty())
|
||||||
|
AddCheckPath(dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProjectFileDialog::EditCheckPath()
|
||||||
|
{
|
||||||
|
QListWidgetItem *item = mUI.mListCheckPaths->currentItem();
|
||||||
|
mUI.mListCheckPaths->editItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProjectFileDialog::RemoveCheckPath()
|
||||||
|
{
|
||||||
|
const int row = mUI.mListCheckPaths->currentRow();
|
||||||
|
QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row);
|
||||||
|
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);
|
||||||
|
@ -393,13 +413,6 @@ void ProjectFileDialog::AddIncludeDir()
|
||||||
AddIncludeDir(dir);
|
AddIncludeDir(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFileDialog::AddPath()
|
|
||||||
{
|
|
||||||
QString dir = getExistingDirectory(tr("Select a directory to check"), false);
|
|
||||||
if (!dir.isEmpty())
|
|
||||||
AddPath(dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProjectFileDialog::RemoveIncludeDir()
|
void ProjectFileDialog::RemoveIncludeDir()
|
||||||
{
|
{
|
||||||
const int row = mUI.mListIncludeDirs->currentRow();
|
const int row = mUI.mListIncludeDirs->currentRow();
|
||||||
|
@ -413,19 +426,6 @@ void ProjectFileDialog::EditIncludeDir()
|
||||||
mUI.mListIncludeDirs->editItem(item);
|
mUI.mListIncludeDirs->editItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFileDialog::EditPath()
|
|
||||||
{
|
|
||||||
QListWidgetItem *item = mUI.mListCheckPaths->currentItem();
|
|
||||||
mUI.mListCheckPaths->editItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProjectFileDialog::RemovePath()
|
|
||||||
{
|
|
||||||
const int row = mUI.mListCheckPaths->currentRow();
|
|
||||||
QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row);
|
|
||||||
delete 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);
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
* @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 GetPaths() const;
|
QStringList GetCheckPaths() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return excluded paths from the dialog control.
|
* @brief Return excluded paths from the dialog control.
|
||||||
|
@ -120,7 +120,7 @@ public:
|
||||||
* @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 SetPaths(const QStringList &paths);
|
void SetCheckPaths(const QStringList &paths);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set excluded paths to dialog control.
|
* @brief Set excluded paths to dialog control.
|
||||||
|
@ -157,17 +157,27 @@ protected slots:
|
||||||
*/
|
*/
|
||||||
void BrowseCompileDatabase();
|
void BrowseCompileDatabase();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Add new path to check.
|
||||||
|
*/
|
||||||
|
void AddCheckPath();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Edit path in the list.
|
||||||
|
*/
|
||||||
|
void EditCheckPath();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Remove path from the list.
|
||||||
|
*/
|
||||||
|
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 Add new path to check.
|
|
||||||
*/
|
|
||||||
void AddPath();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove include directory from the list.
|
* @brief Remove include directory from the list.
|
||||||
*/
|
*/
|
||||||
|
@ -178,16 +188,6 @@ protected slots:
|
||||||
*/
|
*/
|
||||||
void EditIncludeDir();
|
void EditIncludeDir();
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Edit path in the list.
|
|
||||||
*/
|
|
||||||
void EditPath();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Remove path from the list.
|
|
||||||
*/
|
|
||||||
void RemovePath();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add new path to exclude.
|
* @brief Add new path to exclude.
|
||||||
*/
|
*/
|
||||||
|
@ -245,7 +245,7 @@ protected:
|
||||||
* @brief Add new path to check.
|
* @brief Add new path to check.
|
||||||
* @param path Path to add.
|
* @param path Path to add.
|
||||||
*/
|
*/
|
||||||
void AddPath(const QString &path);
|
void AddCheckPath(const QString &path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add new path to ignore list.
|
* @brief Add new path to ignore list.
|
||||||
|
|
Loading…
Reference in New Issue