mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Fix various typos in source documentation and comments (cont.)
Found via `codespell`
This commit is contained in:
committed by
Laurent Trinques
parent
a76e5446aa
commit
1994235bc5
@@ -257,7 +257,7 @@ ElementsLocation ECHSXmlToFile::copyElement(ElementsLocation &source, ElementsLo
|
||||
|
||||
QString new_element_name = rename.isEmpty() ? source.fileName() : rename;
|
||||
|
||||
//Get the xml descrption of the element
|
||||
//Get the xml description of the element
|
||||
QDomDocument document;
|
||||
document.appendChild(document.importNode(source.xml(), true));
|
||||
|
||||
@@ -336,22 +336,22 @@ ElementsLocation ElementCollectionHandler::copy(ElementsLocation &source, Elemen
|
||||
|
||||
/**
|
||||
@brief ElementCollectionHandler::createDir
|
||||
Create a directorie with name as child of parent.
|
||||
Create a directory with name as child of parent.
|
||||
Parent must be a directory
|
||||
@param parent : parent of the dir to create
|
||||
@param name : name of directorie to create
|
||||
@param name_list : translations of the directorie name
|
||||
@return : ElementsLocation that represent the new directorie, location can be null if an error was occurred
|
||||
@param name : name of directory to create
|
||||
@param name_list : translations of the directory name
|
||||
@return : ElementsLocation that represent the new directory, location can be null if an error was occurred
|
||||
*/
|
||||
ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list)
|
||||
{
|
||||
//Parent must be a directorie and writable
|
||||
//Parent must be a directory and writable
|
||||
if (!(parent.isDirectory() && parent.isWritable() && parent.exist())) {
|
||||
qDebug() << "ElementCollectionHandler::createDir : the prerequisites are not valid. " << parent;
|
||||
return ElementsLocation();
|
||||
}
|
||||
|
||||
//Directorie to create must not already exist
|
||||
//Directory to create must not already exist
|
||||
ElementsLocation created_dir = parent;
|
||||
created_dir.addToPath(name);
|
||||
if (created_dir.exist()) {
|
||||
|
||||
@@ -128,7 +128,7 @@ bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
|
||||
if (!qsi)
|
||||
qsi = itemFromIndex(parent);
|
||||
|
||||
//Drop in the common collection is forbiden
|
||||
//Drop in the common collection is forbidden
|
||||
if (qsi->type() == FileElementCollectionItem::Type)
|
||||
if (static_cast<FileElementCollectionItem *>(qsi)->isCommonCollection())
|
||||
return false;
|
||||
@@ -193,7 +193,7 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
|
||||
if (location.exist())
|
||||
{
|
||||
//If feci have a child with the same path of location,
|
||||
//we remove the existing child befor insert new child
|
||||
//we remove the existing child before insert new child
|
||||
for (int i=0 ; i<feci->rowCount() ; i++) {
|
||||
if (static_cast<FileElementCollectionItem *>(
|
||||
feci->child(i))->collectionPath()
|
||||
|
||||
@@ -585,7 +585,7 @@ void ElementsCollectionWidget::resetShowThisDir()
|
||||
|
||||
/**
|
||||
@brief ElementsCollectionWidget::dirProperties
|
||||
Open an informative dialog about the curent index
|
||||
Open an informative dialog about the current index
|
||||
*/
|
||||
void ElementsCollectionWidget::dirProperties()
|
||||
{
|
||||
|
||||
@@ -140,7 +140,7 @@ bool ElementsLocation::operator!=(const ElementsLocation &other) const
|
||||
@return The base name of the element or directory.
|
||||
Unlike ElementsLocation::fileName,
|
||||
this method don't return the extension name.
|
||||
For exemple if this location represent an element they return myElement.
|
||||
For example if this location represent an element they return myElement.
|
||||
@see fileName()
|
||||
*/
|
||||
QString ElementsLocation::baseName() const
|
||||
|
||||
@@ -160,7 +160,7 @@ QDomElement XmlElementCollection::root() const
|
||||
|
||||
/**
|
||||
@brief XmlElementCollection::importCategory
|
||||
@return The QDomElement import (the begining of a xml collection) or
|
||||
@return The QDomElement import (the beginning of an xml collection) or
|
||||
a null QDomElement if doesn't exist.
|
||||
*/
|
||||
QDomElement XmlElementCollection::importCategory() const
|
||||
@@ -511,7 +511,7 @@ QString XmlElementCollection::addElement(ElementsLocation &location)
|
||||
|
||||
/**
|
||||
@brief XmlElementCollection::addElementDefinition
|
||||
Add the élément defintion xml_definition
|
||||
Add the element definition xml_definition
|
||||
in the directory at path dir_path with the name elmt_name.
|
||||
@param dir_path :
|
||||
the path of the directory where we must add the element.
|
||||
@@ -624,13 +624,13 @@ bool XmlElementCollection::exist(const QString &path) const
|
||||
|
||||
/**
|
||||
@brief XmlElementCollection::createDir
|
||||
Create a child directorie at path path with the name name.
|
||||
Create a child directory at path path with the name name.
|
||||
Emit directorieAdded if success.
|
||||
@param path : path of parent diectorie
|
||||
@param name : name of the directori to create.
|
||||
@param name_list : translation of the directorie name.
|
||||
@param name_list : translation of the directory name.
|
||||
@return true if creation success,
|
||||
if directorie already exist return true.
|
||||
if directory already exists, return true.
|
||||
*/
|
||||
bool XmlElementCollection::createDir(const QString& path,
|
||||
const QString& name,
|
||||
@@ -644,7 +644,7 @@ bool XmlElementCollection::createDir(const QString& path,
|
||||
|
||||
QDomElement parent_dir = directory(path);
|
||||
if (parent_dir.isNull()) {
|
||||
qDebug() << "XmlElementCollection::createDir : directorie at path doesn't exist";
|
||||
qDebug() << "XmlElementCollection::createDir : directory at path doesn't exist";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ bool XmlElementCollection::createDir(const QString& path,
|
||||
@brief XmlElementCollection::removeDir
|
||||
Remove the directory at path path.
|
||||
@param path
|
||||
@return true if successfuly removed and emit directoryRemoved(QString),
|
||||
@return true if successfully removed and emit directoryRemoved(QString),
|
||||
else false.
|
||||
*/
|
||||
bool XmlElementCollection::removeDir(const QString& path)
|
||||
@@ -682,7 +682,7 @@ bool XmlElementCollection::removeDir(const QString& path)
|
||||
Return all locations stored in dom_element (element and directory).
|
||||
If dom_element is null, return all location owned by this collection
|
||||
dom_element must be a child of this collection.
|
||||
@param dom_element : dom_element where we must to search location.
|
||||
@param dom_element : dom_element where we must search location.
|
||||
@param childs = if true return all childs location of dom_element,
|
||||
if false, only return the direct childs location of dom_element.
|
||||
@return
|
||||
@@ -867,7 +867,7 @@ ElementsLocation XmlElementCollection::copyDirectory(
|
||||
QDomNode other_collection_node = source.projectCollection()->child(source.collectionPath(false)).cloneNode(deep_copy);
|
||||
|
||||
//We don't make a deep copy,
|
||||
// but we must to get the local names of the copied directory
|
||||
// but we must get the local names of the copied directory
|
||||
if (!deep_copy) {
|
||||
QDomNode names = source.projectCollection()->child(source.collectionPath(false)).namedItem("names");
|
||||
if (!names.isNull() && names.isElement())
|
||||
|
||||
@@ -90,31 +90,31 @@ class XmlElementCollection : public QObject
|
||||
signals:
|
||||
/**
|
||||
@brief elementAdded
|
||||
This signal is emited when a element is added to this collection
|
||||
This signal is emitted when a element is added to this collection
|
||||
@param collection_path : the path of element in this collection
|
||||
*/
|
||||
void elementAdded(QString collection_path);
|
||||
/**
|
||||
@brief elementChanged
|
||||
This signal is emited when the defintion of the element at path was changed
|
||||
This signal is emitted when the definition of the element at path was changed
|
||||
@param collection_path : the path of this element in this collection
|
||||
*/
|
||||
void elementChanged (QString collection_path);
|
||||
/**
|
||||
@brief elementRemoved
|
||||
This signal is emited when an element is removed to this collection
|
||||
This signal is emitted when an element is removed from this collection
|
||||
@param collection_path : the path of the removed element in this collection
|
||||
*/
|
||||
void elementRemoved(QString collection_path);
|
||||
/**
|
||||
@brief directorieAdded
|
||||
This signal is emited when a directorie is added to this collection
|
||||
@param collection_path : the path of the new directorie
|
||||
This signal is emitted when a directory is added to this collection
|
||||
@param collection_path : the path of the new directory
|
||||
*/
|
||||
void directorieAdded(QString collection_path);
|
||||
/**
|
||||
@brief directoryRemoved
|
||||
This signal is emited when a directory is removed to this collection
|
||||
This signal is emitted when a directory is removed from this collection
|
||||
@param collection_path : the path of the removed directory
|
||||
*/
|
||||
void directoryRemoved(QString collection_path);
|
||||
|
||||
Reference in New Issue
Block a user