correct more indentations / whitespace

This commit is contained in:
plc-user
2024-04-24 14:14:40 +02:00
parent 17030aaa80
commit fa68d545d0
46 changed files with 903 additions and 903 deletions

View File

@@ -111,10 +111,10 @@ QStringList ElementsCollectionModel::mimeTypes() const
@return
*/
bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
Qt::DropAction action,
int row,
int column,
const QModelIndex &parent) const
Qt::DropAction action,
int row,
int column,
const QModelIndex &parent) const
{
if (!(QStandardItemModel::canDropMimeData(data,
action,
@@ -258,9 +258,9 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
@param projects : list of projects to load
*/
void ElementsCollectionModel::loadCollections(bool common_collection,
bool company_collection,
bool custom_collection,
QList<QETProject *> projects)
bool company_collection,
bool custom_collection,
QList<QETProject *> projects)
{
m_items_list_to_setUp.clear();
@@ -313,8 +313,8 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::commonElementsDirN(),
set_data,
m_hide_element)) {
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
@@ -324,41 +324,41 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
}
/**
@brief ElementsCollectionModel::addCompanyCollection
Add the company elements collection to this model
@param set_data
@brief ElementsCollectionModel::addCompanyCollection
Add the company elements collection to this model
@param set_data
*/
void ElementsCollectionModel::addCompanyCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::companyElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::companyElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
}
/**
@brief ElementsCollectionModel::addCustomCollection
Add the custom elements collection to this model
@param set_data
@brief ElementsCollectionModel::addCustomCollection
Add the custom elements collection to this model
@param set_data
*/
void ElementsCollectionModel::addCustomCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
}
/**
@@ -579,9 +579,9 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
{
QList <ElementCollectionItem *> child_list;
for (int i=0 ; i<rowCount() ; i++){
for (int i=0 ; i<rowCount() ; i++){
child_list.append(static_cast<ElementCollectionItem *>(item(i)));
}
}
foreach(ElementCollectionItem *eci, child_list) {
@@ -590,8 +590,8 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
if (eci->type() == FileElementCollectionItem::Type) {
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
match_eci = feci->itemAtPath(location.collectionPath(false));
}
}