Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo #3346

Merged
merged 5 commits into from
Apr 12, 2024
Merged

Typo #3346

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LiteEditor/fileview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ void FileViewTree::OnRenameProject(wxCommandEvent& event)
return;
}

if(!::clIsVaidProjectName(newname)) {
if(!::clIsValidProjectName(newname)) {
wxMessageBox(_("Project names may contain only the following characters [a-z0-9_-]"), "CodeLite",
wxOK | wxICON_WARNING | wxCENTER, this);
return;
Expand Down
16 changes: 8 additions & 8 deletions Plugin/build_config_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ wxXmlNode* BuildConfigCommon::ToXml() const
return node;
}

void BuildConfigCommon::SetPreprocessor(const wxString& pre) { FillFromSmiColonString(m_preprocessor, pre); }
void BuildConfigCommon::SetPreprocessor(const wxString& pre) { FillFromSemiColonString(m_preprocessor, pre); }

void BuildConfigCommon::SetIncludePath(const wxString& path) { FillFromSmiColonString(m_includePath, path); }
void BuildConfigCommon::SetIncludePath(const wxString& path) { FillFromSemiColonString(m_includePath, path); }

void BuildConfigCommon::SetLibraries(const wxString& libs) { FillFromSmiColonString(m_libs, libs); }
void BuildConfigCommon::SetLibraries(const wxString& libs) { FillFromSemiColonString(m_libs, libs); }

void BuildConfigCommon::SetLibPath(const wxString& paths) { FillFromSmiColonString(m_libPath, paths); }
void BuildConfigCommon::SetLibPath(const wxString& paths) { FillFromSemiColonString(m_libPath, paths); }

static wxString ConvertToSmiColonString(const wxArrayString& array)
static wxString ConvertToSemiColonString(const wxArrayString& array)
{
wxString result;
for(size_t i = 0; i < array.GetCount(); i++) {
Expand All @@ -170,11 +170,11 @@ static wxString ConvertToSmiColonString(const wxArrayString& array)
return result.BeforeLast(';');
}

wxString BuildConfigCommon::GetLibPath() const { return ConvertToSmiColonString(m_libPath); }
wxString BuildConfigCommon::GetLibPath() const { return ConvertToSemiColonString(m_libPath); }

wxString BuildConfigCommon::GetLibraries() const { return ConvertToSmiColonString(m_libs); }
wxString BuildConfigCommon::GetLibraries() const { return ConvertToSemiColonString(m_libs); }

wxString BuildConfigCommon::GetIncludePath() const { return ConvertToSmiColonString(m_includePath); }
wxString BuildConfigCommon::GetIncludePath() const { return ConvertToSemiColonString(m_includePath); }

wxString BuildConfigCommon::GetPreprocessor() const
{
Expand Down
10 changes: 5 additions & 5 deletions Plugin/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static wxString MacGetInstallPath()
#include <unistd.h>
#endif

struct ProjListCompartor {
struct ProjListComparator {
bool operator()(const ProjectPtr p1, const ProjectPtr p2) const { return p1->GetName() > p2->GetName(); }
};

Expand Down Expand Up @@ -673,13 +673,13 @@ bool IsFileReadOnly(const wxFileName& filename)
#endif
}

void FillFromSmiColonString(wxArrayString& arr, const wxString& str)
void FillFromSemiColonString(wxArrayString& arr, const wxString& str)
{
arr.clear();
arr = StringUtils::BuildArgv(str);
}

wxString ArrayToSmiColonString(const wxArrayString& array)
wxString ArrayToSemiColonString(const wxArrayString& array)
eranif marked this conversation as resolved.
Show resolved Hide resolved
{
wxString result;
for (size_t i = 0; i < array.GetCount(); i++) {
Expand Down Expand Up @@ -861,7 +861,7 @@ void GetProjectTemplateList(std::list<ProjectPtr>& list)
{
DoReadProjectTemplatesFromFolder(clStandardPaths::Get().GetProjectTemplatesDir(), list);
DoReadProjectTemplatesFromFolder(clStandardPaths::Get().GetUserProjectTemplatesDir(), list, false);
list.sort(ProjListCompartor());
list.sort(ProjListComparator());
}

thread_local std::unordered_set<wxString> words;
Expand Down Expand Up @@ -1823,7 +1823,7 @@ void clStripTerminalColouring(const wxString& buffer, wxString& modbuffer)
StringUtils::StripTerminalColouring(buffer, modbuffer);
}

bool clIsVaidProjectName(const wxString& name)
bool clIsValidProjectName(const wxString& name)
{
return name.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-") == wxString::npos;
}
Expand Down
6 changes: 3 additions & 3 deletions Plugin/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ WXDLLIMPEXP_SDK bool IsFileReadOnly(const wxFileName& filename);
* \param arr [out] the array to fill
* \param str the string to split
*/
WXDLLIMPEXP_SDK void FillFromSmiColonString(wxArrayString& arr, const wxString& str);
WXDLLIMPEXP_SDK void FillFromSemiColonString(wxArrayString& arr, const wxString& str);

/**
* \brief return a string semi-colon separated of the given array
*/
WXDLLIMPEXP_SDK wxString ArrayToSmiColonString(const wxArrayString& array);
WXDLLIMPEXP_SDK wxString ArrayToSemiColonString(const wxArrayString& array);

/**
* \brief Remove all semi colons of the given string
Expand Down Expand Up @@ -550,7 +550,7 @@ WXDLLIMPEXP_SDK void clStripTerminalColouring(const wxString& buffer, wxString&
/**
* @brief return true if the name is valid
*/
WXDLLIMPEXP_SDK bool clIsVaidProjectName(const wxString& name);
WXDLLIMPEXP_SDK bool clIsValidProjectName(const wxString& name);

/**
* @brief support for Hi-Res displays
Expand Down