diff --git a/apps/pgmodeler-se/src/sourceeditorwidget.cpp b/apps/pgmodeler-se/src/sourceeditorwidget.cpp index 8548a8a2c..58da711be 100644 --- a/apps/pgmodeler-se/src/sourceeditorwidget.cpp +++ b/apps/pgmodeler-se/src/sourceeditorwidget.cpp @@ -230,7 +230,7 @@ void SourceEditorWidget::validateSyntax() { editor_txt->setPalette(def_editor_pal); schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.setSearchPath(QFileInfo(filename).absolutePath()); schparser.loadBuffer(editor_txt->toPlainText()); schparser.getSourceCode({}); diff --git a/libs/libcanvas/src/basetableview.cpp b/libs/libcanvas/src/basetableview.cpp index 7ef59b9c8..69d9b6ddd 100644 --- a/libs/libcanvas/src/basetableview.cpp +++ b/libs/libcanvas/src/basetableview.cpp @@ -520,7 +520,7 @@ void BaseTableView::configureObjectShadow() BaseObjectView::configureObjectShadow(); } -QList BaseTableView::getSelectedChidren() +QList BaseTableView::getSelectedChildren() { return sel_child_objs; } diff --git a/libs/libcanvas/src/basetableview.h b/libs/libcanvas/src/basetableview.h index 3746882ed..210d9499e 100644 --- a/libs/libcanvas/src/basetableview.h +++ b/libs/libcanvas/src/basetableview.h @@ -172,7 +172,7 @@ class __libcanvas BaseTableView: public BaseObjectView { void configureObjectShadow(); //! \brief Returns a list of selected children objects - QList getSelectedChidren(); + QList getSelectedChildren(); //! \brief Clear the selection over all selected children void clearChildrenSelection(); diff --git a/libs/libcanvas/src/objectsscene.cpp b/libs/libcanvas/src/objectsscene.cpp index 9051637a8..b9eb90eee 100644 --- a/libs/libcanvas/src/objectsscene.cpp +++ b/libs/libcanvas/src/objectsscene.cpp @@ -982,7 +982,7 @@ void ObjectsScene::handleChildrenSelectionChanged() if(!tab_view) return; - if(tab_view->getSelectedChidren().empty()) + if(tab_view->getSelectedChildren().empty()) tabs_sel_children.removeAll(tab_view); else if(!tabs_sel_children.contains(tab_view)) tabs_sel_children.append(tab_view); @@ -1897,7 +1897,7 @@ QList ObjectsScene::selectedItems() const for(auto &tab_view :tabs_sel_children) { - for(auto &tab_obj : tab_view->getSelectedChidren()) + for(auto &tab_obj : tab_view->getSelectedChildren()) items.append(tab_obj); } diff --git a/libs/libconnector/src/catalog.cpp b/libs/libconnector/src/catalog.cpp index ec5dc28c7..bbad8bcf0 100644 --- a/libs/libconnector/src/catalog.cpp +++ b/libs/libconnector/src/catalog.cpp @@ -477,7 +477,7 @@ QString Catalog::getCatalogQuery(const QString &qry_type, ObjectType obj_type, b } loadCatalogQuery(BaseObject::getSchemaName(obj_type)); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); attribs[Attributes::PgSqlVersion]=schparser.getPgSQLVersion(); @@ -841,7 +841,7 @@ std::vector Catalog::getMultipleAttributes(const QString &catalog_s std::vector obj_attribs; loadCatalogQuery(catalog_sch); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); attribs[Attributes::PgSqlVersion]=schparser.getPgSQLVersion(); @@ -1026,7 +1026,7 @@ attribs_map Catalog::getServerAttributes() attribs_map tuple, attribs_aux; loadCatalogQuery("server"); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); sql = schparser.getSourceCode(attribs).simplified(); connection.executeDMLCommand(sql, res); diff --git a/libs/libconnector/src/connection.cpp b/libs/libconnector/src/connection.cpp index 0256b9298..8cba944b4 100644 --- a/libs/libconnector/src/connection.cpp +++ b/libs/libconnector/src/connection.cpp @@ -241,11 +241,11 @@ void Connection::connect() else if(connection) { if(!silence_conn_err) - throw Exception(ErrorCode::ConnectionAlreadyStablished, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(ErrorCode::ConnectionAlreadyEstablished, __PRETTY_FUNCTION__, __FILE__, __LINE__); else { QTextStream err(stderr); - err << QT_TR_NOOP("ERROR: trying to open an already stablished connection.") << Qt::endl + err << QT_TR_NOOP("ERROR: trying to open an already established connection.") << Qt::endl << "Conn. info: [ " << connection_str << "]" << Qt::endl; this->close(); } @@ -260,8 +260,8 @@ void Connection::connect() if(connection==nullptr || PQstatus(connection)==CONNECTION_BAD) { //Raise the error generated by the DBMS - throw Exception(Exception::getErrorMessage(ErrorCode::ConnectionNotStablished) - .arg(PQerrorMessage(connection)), ErrorCode::ConnectionNotStablished, + throw Exception(Exception::getErrorMessage(ErrorCode::ConnectionNotEstablished) + .arg(PQerrorMessage(connection)), ErrorCode::ConnectionNotEstablished, __PRETTY_FUNCTION__, __FILE__, __LINE__); } @@ -375,9 +375,9 @@ QString Connection::getConnectionId(bool host_port_only, bool incl_db_name, bool return conn_id; } -bool Connection::isStablished() +bool Connection::isEstablished() { - return (connection != nullptr); + return connection != nullptr; } bool Connection::isConfigured() @@ -530,7 +530,7 @@ void Connection::switchToDatabase(const QString &dbname) try { //Closing the current connection if it's opened - if(isStablished()) + if(isEstablished()) close(); //Change the database name and reconfigure the connection string @@ -551,7 +551,7 @@ void Connection::switchToDatabase(const QString &dbname) void Connection::operator = (const Connection &conn) { - if(this->isStablished()) + if(this->isEstablished()) this->close(); this->auto_browse_db=conn.auto_browse_db; diff --git a/libs/libconnector/src/connection.h b/libs/libconnector/src/connection.h index 4a037b2a0..5a839f102 100644 --- a/libs/libconnector/src/connection.h +++ b/libs/libconnector/src/connection.h @@ -61,7 +61,7 @@ class __libconnector Connection { /*! \brief This static method disable the notice messages when executing commands. By default all connections are created with notice disabled. To enable it the user - must call Connection::setNoticeEnabled(). Note: connections already stablished + must call Connection::setNoticeEnabled(). Note: already established connections aren't affected when calling this method the user must disconnect then connect again to enable output. */ static void disableNoticeOutput(void *, const PGresult *){} @@ -233,13 +233,13 @@ class __libconnector Connection { static QStringList getNotices(); /*! \brief Change the current database to the specified db name using the parameters from the current - stablished connection causing the connection to be reset and moved to the new database. + established connection causing the connection to be reset and moved to the new database. The effect of this is the same by type \c dbname on psql console. In case of errors the method will raise an exception and switch back to the previous database. */ void switchToDatabase(const QString &dbname); - //! \brief Returns if the connection is stablished - bool isStablished(); + //! \brief Returns if the connection is established + bool isEstablished(); //! \brief Returns if the connection is configured (has some attributes set) bool isConfigured(); diff --git a/libs/libcore/src/baseobject.cpp b/libs/libcore/src/baseobject.cpp index 0e3d6e03f..b60f60246 100644 --- a/libs/libcore/src/baseobject.cpp +++ b/libs/libcore/src/baseobject.cpp @@ -890,7 +890,7 @@ QString BaseObject::getSourceCode(SchemaParser::CodeType def_type, bool reduced_ SchemaParser sch_parser; QString filename=GlobalAttributes::getSchemaFilePath(GlobalAttributes::AlterSchemaDir, Attributes::Owner); - sch_parser.ignoreUnkownAttributes(true); + sch_parser.ignoreUnknownAttributes(true); attributes[Attributes::Owner]=sch_parser.getSourceCode(filename, attributes); } } @@ -909,7 +909,7 @@ QString BaseObject::getSourceCode(SchemaParser::CodeType def_type, bool reduced_ else attributes[Attributes::Comment]=comment; - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attributes[Attributes::Comment]= schparser.getSourceCode(Attributes::Comment, attributes, def_type); @@ -921,7 +921,7 @@ QString BaseObject::getSourceCode(SchemaParser::CodeType def_type, bool reduced_ if(def_type==SchemaParser::XmlCode) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attributes[Attributes::AppendedSql]= schparser.getSourceCode(QString(Attributes::AppendedSql).remove('-'), attributes, def_type); } @@ -937,7 +937,7 @@ QString BaseObject::getSourceCode(SchemaParser::CodeType def_type, bool reduced_ if(def_type==SchemaParser::XmlCode) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attributes[Attributes::PrependedSql]= schparser.getSourceCode(QString(Attributes::PrependedSql).remove('-'), attributes, def_type); } @@ -1350,7 +1350,7 @@ QString BaseObject::getDropCode(bool cascade) setBasicAttributes(true); schparser.setPgSQLVersion(BaseObject::pgsql_ver, ignore_db_version); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); attribs=attributes; @@ -1382,7 +1382,7 @@ QString BaseObject::getAlterCode(QString sch_name, attribs_map &attribs, bool ig schparser.setPgSQLVersion(BaseObject::pgsql_ver, ignore_db_version); schparser.ignoreEmptyAttributes(ignore_empty_attribs); - schparser.ignoreUnkownAttributes(ignore_ukn_attribs); + schparser.ignoreUnknownAttributes(ignore_ukn_attribs); return schparser.getSourceCode(alter_sch_file, attribs); } catch(Exception &e) @@ -1472,7 +1472,7 @@ QString BaseObject::getAlterCommentDefinition(BaseObject *object, attribs_map at attributes[Attributes::Comment]=comm_obj; } - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); return schparser.getSourceCode(Attributes::Comment, attributes, SchemaParser::SqlCode); } diff --git a/libs/libcore/src/databasemodel.cpp b/libs/libcore/src/databasemodel.cpp index 734af9e5b..ceb4ccb07 100644 --- a/libs/libcore/src/databasemodel.cpp +++ b/libs/libcore/src/databasemodel.cpp @@ -7199,7 +7199,7 @@ BaseRelationship *DatabaseModel::createRelationship() rel->setActionType(upd_action, Constraint::UpdateAction); rel->setActionType(del_action, Constraint::DeleteAction); rel->setSQLDisabled(sql_disabled); - rel->setSiglePKColumn(single_pk_col); + rel->setSinglePKColumn(single_pk_col); rel->setDeferrable(deferrable); rel->setDeferralType(defer_type); rel->setCopyOptions(CopyOptions(static_cast(attribs[Attributes::CopyMode].toUInt()), @@ -9339,7 +9339,7 @@ void DatabaseModel::saveObjectsMetadata(const QString &filename, MetaAttrOptions if(obj_type!=ObjectType::Schema || !attribs[Attributes::XPos].isEmpty()) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Position]= schparser.getSourceCode(GlobalAttributes::getSchemaFilePath(GlobalAttributes::XMLSchemaDir, Attributes::Position), attribs); @@ -9365,7 +9365,7 @@ void DatabaseModel::saveObjectsMetadata(const QString &filename, MetaAttrOptions attribs[Attributes::XPos]=QString::number(pnt.x()); attribs[Attributes::YPos]=QString::number(pnt.y()); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Position]+= schparser.getSourceCode(GlobalAttributes::getSchemaFilePath(GlobalAttributes::XMLSchemaDir, Attributes::Position), attribs); @@ -9430,7 +9430,7 @@ void DatabaseModel::saveObjectsMetadata(const QString &filename, MetaAttrOptions tr("Saving metadata of the object `%1' (%2)") .arg(object->getSignature()).arg(object->getTypeName()), enum_t(obj_type)); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); objs_def += schparser.getSourceCode( GlobalAttributes::getSchemaFilePath(GlobalAttributes::XMLSchemaDir, diff --git a/libs/libcore/src/extension.cpp b/libs/libcore/src/extension.cpp index 5662ac8b3..be2fcb139 100644 --- a/libs/libcore/src/extension.cpp +++ b/libs/libcore/src/extension.cpp @@ -162,7 +162,7 @@ QString Extension::getSourceCode(SchemaParser::CodeType def_type) obj_attr[Attributes::Type] = BaseObject::getSchemaName(ext_obj.getType()); obj_attr[Attributes::Parent] = ext_obj.getParent(); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); attributes[Attributes::Objects] += schparser.getSourceCode(Attributes::Object, obj_attr, def_type); } diff --git a/libs/libcore/src/physicaltable.cpp b/libs/libcore/src/physicaltable.cpp index 3a6191a12..70fd9d1ad 100644 --- a/libs/libcore/src/physicaltable.cpp +++ b/libs/libcore/src/physicaltable.cpp @@ -162,12 +162,12 @@ void PhysicalTable::setCommentAttribute(TableObject *tab_obj) attribs[Attributes::EscapeComment]=BaseObject::isEscapeComments() ? Attributes::True : ""; attribs[Attributes::Comment]=comment; - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); if(tab_obj->isSQLDisabled()) attributes[Attributes::ColsComment]+="-- "; attributes[Attributes::ColsComment]+=schparser.getSourceCode(Attributes::Comment, attribs, SchemaParser::SqlCode); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); } } @@ -201,7 +201,7 @@ void PhysicalTable::setRelObjectsIndexesAttribute() aux_attribs[Attributes::Name]=obj_idx.first; aux_attribs[Attributes::Index]=QString::number(obj_idx.second); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); aux_attribs[Attributes::Objects]+=schparser.getSourceCode(Attributes::Object, aux_attribs, SchemaParser::XmlCode); } diff --git a/libs/libcore/src/relationship.cpp b/libs/libcore/src/relationship.cpp index 4c06a674c..0f6a0f5b5 100644 --- a/libs/libcore/src/relationship.cpp +++ b/libs/libcore/src/relationship.cpp @@ -2295,7 +2295,7 @@ PhysicalTable *Relationship::getReferenceTable() } } -void Relationship::setSiglePKColumn(bool value) +void Relationship::setSinglePKColumn(bool value) { if(rel_type==RelationshipNn) { @@ -2304,7 +2304,7 @@ void Relationship::setSiglePKColumn(bool value) } } -bool Relationship::isSiglePKColumn() +bool Relationship::isSinglePKColumn() { return single_pk_column; } diff --git a/libs/libcore/src/relationship.h b/libs/libcore/src/relationship.h index 0f2113c4c..e70527527 100644 --- a/libs/libcore/src/relationship.h +++ b/libs/libcore/src/relationship.h @@ -536,9 +536,9 @@ class __libcore Relationship: public BaseRelationship { has 2 reference tables, which may be obtained by the method BaseRelationship::getTable() */ PhysicalTable *getReferenceTable(); - void setSiglePKColumn(bool value); + void setSinglePKColumn(bool value); - bool isSiglePKColumn(); + bool isSinglePKColumn(); //! \brief Returns SQL / XML definition for the relationship. virtual QString getSourceCode(SchemaParser::CodeType def_type) final; diff --git a/libs/libcore/src/view.cpp b/libs/libcore/src/view.cpp index 37cfda052..75d81eb4e 100644 --- a/libs/libcore/src/view.cpp +++ b/libs/libcore/src/view.cpp @@ -893,7 +893,7 @@ QString View::getDataDictionary(bool split, bool md_format, const attribs_map &e aux_attrs[Attributes::Name] = col.getName(); aux_attrs[Attributes::Type] = col.getType(); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Columns] += schparser.getSourceCode(GlobalAttributes::getDictSchemaFilePath(md_format, BaseObject::getSchemaName(ObjectType::Column)), aux_attrs); aux_attrs.clear(); } @@ -907,7 +907,7 @@ QString View::getDataDictionary(bool split, bool md_format, const attribs_map &e for(auto &obj : indexes) attribs[Attributes::Indexes] += dynamic_cast(obj)->getDataDictionary(md_format); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Objects] += schparser.getSourceCode(GlobalAttributes::getDictSchemaFilePath(md_format, Attributes::Objects), attribs); schparser.ignoreEmptyAttributes(true); diff --git a/libs/libgui/src/dbobjects/relationshipwidget.cpp b/libs/libgui/src/dbobjects/relationshipwidget.cpp index c1e7dd8af..7804d9a6d 100644 --- a/libs/libgui/src/dbobjects/relationshipwidget.cpp +++ b/libs/libgui/src/dbobjects/relationshipwidget.cpp @@ -312,7 +312,7 @@ void RelationshipWidget::setAttributes(DatabaseModel *model, OperationList *op_l if(aux_rel) { - single_pk_chk->setChecked(aux_rel->isSiglePKColumn()); + single_pk_chk->setChecked(aux_rel->isSinglePKColumn()); table1_mand_chk->setChecked(aux_rel->isTableMandatory(BaseRelationship::SrcTable)); table2_mand_chk->setChecked(aux_rel->isTableMandatory(BaseRelationship::DstTable)); identifier_chk->setChecked(aux_rel->isIdentifier()); @@ -1183,7 +1183,7 @@ void RelationshipWidget::applyConfiguration() rel->setFKIndexType(index_type_cmb->currentIndex() != 0 ? IndexingType(index_type_cmb->currentText()) : IndexingType::Null); if(rel_type == BaseRelationship::RelationshipNn) - rel->setSiglePKColumn(single_pk_chk->isChecked()); + rel->setSinglePKColumn(single_pk_chk->isChecked()); } count=rel_columns_lst->count(); diff --git a/libs/libgui/src/settings/connectionsconfigwidget.cpp b/libs/libgui/src/settings/connectionsconfigwidget.cpp index 9f81ca680..3004e00d0 100644 --- a/libs/libgui/src/settings/connectionsconfigwidget.cpp +++ b/libs/libgui/src/settings/connectionsconfigwidget.cpp @@ -543,19 +543,19 @@ void ConnectionsConfigWidget::saveConfiguration() attribs[DefaultFor.arg(Attributes::Diff)]=(conn->isDefaultForOperation(Connection::OpDiff) ? Attributes::True : ""); attribs[DefaultFor.arg(Attributes::Validation)]=(conn->isDefaultForOperation(Connection::OpValidation) ? Attributes::True : ""); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); config_params[GlobalAttributes::ConnectionsConf][Attributes::Connections]+= schparser.getSourceCode(GlobalAttributes::getTmplConfigurationFilePath(GlobalAttributes::SchemasDir, GlobalAttributes::ConnectionsConf + GlobalAttributes::SchemaExt), attribs); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); } } - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); BaseConfigWidget::saveConfiguration(GlobalAttributes::ConnectionsConf, config_params); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); //setConfigurationChanged(false); } catch(Exception &e) diff --git a/libs/libgui/src/settings/generalconfigwidget.cpp b/libs/libgui/src/settings/generalconfigwidget.cpp index 42444a6cb..e38d5be34 100644 --- a/libs/libgui/src/settings/generalconfigwidget.cpp +++ b/libs/libgui/src/settings/generalconfigwidget.cpp @@ -518,11 +518,11 @@ void GeneralConfigWidget::saveConfiguration() itr->first==Attributes::SqlTool || itr->first==Attributes::LayersConfig) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); config_params[Attributes::Configuration][Attributes::DockWidgets]+= schparser.getSourceCode(widget_sch, itr->second); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); schparser.ignoreEmptyAttributes(false); } @@ -547,10 +547,10 @@ void GeneralConfigWidget::saveConfiguration() attribs[Attributes::Height] = QString::number(itr.second.geometry.height()); attribs[Attributes::Maximized] = itr.second.maximized ? Attributes::True : ""; - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); config_params[Attributes::Configuration][Attributes::WidgetsGeometry]+= schparser.getSourceCode(widget_sch, attribs); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); } } diff --git a/libs/libgui/src/settings/relationshipconfigwidget.cpp b/libs/libgui/src/settings/relationshipconfigwidget.cpp index e436eaae0..9a1deda89 100644 --- a/libs/libgui/src/settings/relationshipconfigwidget.cpp +++ b/libs/libgui/src/settings/relationshipconfigwidget.cpp @@ -174,7 +174,7 @@ void RelationshipConfigWidget::saveConfiguration() for(auto &itr : patterns) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); config_params[itr.first] = itr.second; config_params[Attributes::NamePatterns][Attributes::Patterns] += schparser.getSourceCode(patterns_sch, itr.second); diff --git a/libs/libgui/src/settings/snippetsconfigwidget.cpp b/libs/libgui/src/settings/snippetsconfigwidget.cpp index afb2ee19f..dc1325bb6 100644 --- a/libs/libgui/src/settings/snippetsconfigwidget.cpp +++ b/libs/libgui/src/settings/snippetsconfigwidget.cpp @@ -181,7 +181,7 @@ QString SnippetsConfigWidget::parseSnippet(attribs_map snippet, attribs_map attr } schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); return schparser.getSourceCode(attribs); } catch(Exception &e) @@ -238,7 +238,7 @@ bool SnippetsConfigWidget::isSnippetValid(attribs_map &attribs, const QString &o schparser.loadBuffer(buf); schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.getSourceCode(attribs); } catch(Exception &e) diff --git a/libs/libgui/src/tools/databaseexplorerwidget.cpp b/libs/libgui/src/tools/databaseexplorerwidget.cpp index 2b09e9125..629e83148 100644 --- a/libs/libgui/src/tools/databaseexplorerwidget.cpp +++ b/libs/libgui/src/tools/databaseexplorerwidget.cpp @@ -1428,7 +1428,7 @@ void DatabaseExplorerWidget::dropObject(QTreeWidgetItem *item, bool cascade) //Generate the drop command schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); drop_cmd=schparser.getSourceCode(Attributes::Drop, attribs, SchemaParser::SqlCode); if(cascade) @@ -1495,7 +1495,7 @@ bool DatabaseExplorerWidget::truncateTable(const QString &sch_name, const QStrin //Generate the truncate command schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); truc_cmd=schparser.getSourceCode(GlobalAttributes::getSchemaFilePath(GlobalAttributes::AlterSchemaDir, Attributes::Truncate), attribs); @@ -2015,7 +2015,7 @@ void DatabaseExplorerWidget::finishObjectRename() //Generate the drop command schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); rename_cmd=schparser.getSourceCode(GlobalAttributes::getSchemaFilePath(GlobalAttributes::AlterSchemaDir, Attributes::Rename), attribs); diff --git a/libs/libgui/src/tools/databaseimporthelper.cpp b/libs/libgui/src/tools/databaseimporthelper.cpp index 75cabca0e..b8f56a21c 100644 --- a/libs/libgui/src/tools/databaseimporthelper.cpp +++ b/libs/libgui/src/tools/databaseimporthelper.cpp @@ -21,7 +21,7 @@ #include "utilsns.h" #include "coreutilsns.h" -const QString DatabaseImportHelper::UnkownObjectOidXml {"\t\n"}; +const QString DatabaseImportHelper::UnknownObjectOidXml {"\t\n"}; DatabaseImportHelper::DatabaseImportHelper(QObject *parent) : QObject(parent) { @@ -954,9 +954,9 @@ QString DatabaseImportHelper::getDependencyObject(const QString &oid, ObjectType if(generate_xml) { obj_attr[Attributes::ReducedForm] = Attributes::True; - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); xml_def = schparser.getSourceCode(BaseObject::getSchemaName(obj_type), obj_attr, SchemaParser::XmlCode); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); } else xml_def = obj_name; @@ -964,7 +964,7 @@ QString DatabaseImportHelper::getDependencyObject(const QString &oid, ObjectType else /* If the object oid is valid but there is no attribute set to it creates a xml definition containing an alert indicating that the object is unknown */ - xml_def = UnkownObjectOidXml.arg(oid); + xml_def = UnknownObjectOidXml.arg(oid); return xml_def; } @@ -980,10 +980,10 @@ void DatabaseImportHelper::loadObjectXML(ObjectType obj_type, attribs_map &attri try { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); xml_buf=schparser.getSourceCode(BaseObject::getSchemaName(obj_type), attribs, SchemaParser::XmlCode); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); xmlparser->restartParser(); if(debug_mode) @@ -1197,7 +1197,7 @@ Extension *DatabaseImportHelper::createExtension(attribs_map &attribs) aux_attrs[Attributes::Type] = BaseObject::getSchemaName(ObjectType::Schema); schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Objects] += schparser.getSourceCode(Attributes::Object, aux_attrs, SchemaParser::XmlCode); } @@ -1227,7 +1227,7 @@ Extension *DatabaseImportHelper::createExtension(attribs_map &attribs) aux_attrs[Attributes::Type] = BaseObject::getSchemaName(ObjectType::Type); schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Objects] += schparser.getSourceCode(Attributes::Object, aux_attrs, SchemaParser::XmlCode); } @@ -1564,9 +1564,9 @@ OperatorClass *DatabaseImportHelper::createOperatorClass(attribs_map &attribs) //Generating the complete XML code for operator class elements for(unsigned i=0; i < elems.size(); i++) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); attribs[Attributes::Elements]+=schparser.getSourceCode(Attributes::Element, elems[i], SchemaParser::XmlCode); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); } loadObjectXML(ObjectType::OpClass, attribs); @@ -3666,9 +3666,9 @@ QString DatabaseImportHelper::getType(const QString &oid_str, bool generate_xml, extra_attribs[Attributes::Name]=obj_name; extra_attribs[Attributes::Dimension]=(dimension > 0 ? QString::number(dimension) : ""); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); xml_def = schparser.getSourceCode(Attributes::PgSqlBaseType, extra_attribs, SchemaParser::XmlCode); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); return xml_def; } diff --git a/libs/libgui/src/tools/databaseimporthelper.h b/libs/libgui/src/tools/databaseimporthelper.h index 1e605ed16..5eaada4ed 100644 --- a/libs/libgui/src/tools/databaseimporthelper.h +++ b/libs/libgui/src/tools/databaseimporthelper.h @@ -40,7 +40,7 @@ class __libgui DatabaseImportHelper: public QObject { //! \brief Random number generator engine used to generate random colors for imported schemas std::default_random_engine rand_num_engine; - static const QString UnkownObjectOidXml; + static const QString UnknownObjectOidXml; /*! \brief File handle to log the import process. This file is opened for writing only when the 'ignore_errors' is true */ diff --git a/libs/libgui/src/tools/modeldatabasediffform.cpp b/libs/libgui/src/tools/modeldatabasediffform.cpp index 847d9b8e8..ca4cf05ee 100644 --- a/libs/libgui/src/tools/modeldatabasediffform.cpp +++ b/libs/libgui/src/tools/modeldatabasediffform.cpp @@ -1229,10 +1229,10 @@ void ModelDatabaseDiffForm::saveConfiguration() for(auto &conf : config_params) { - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.ignoreEmptyAttributes(true); presets += schparser.getSourceCode(preset_sch, conf.second); - schparser.ignoreUnkownAttributes(false); + schparser.ignoreUnknownAttributes(false); schparser.ignoreEmptyAttributes(false); } diff --git a/libs/libgui/src/tools/modelexporthelper.cpp b/libs/libgui/src/tools/modelexporthelper.cpp index b0187f519..8bc6e2523 100644 --- a/libs/libgui/src/tools/modelexporthelper.cpp +++ b/libs/libgui/src/tools/modelexporthelper.cpp @@ -867,7 +867,7 @@ void ModelExportHelper::exportBufferToDBMS(const QString &buffer, Connection &co to permit the user, in case of error, identify what object is wrongly configured. */ ts.setString(&sql_buf); - if(!conn.isStablished()) + if(!conn.isEstablished()) { orig_conn_db_name = conn.getConnectionParam(Connection::ParamDbName); @@ -1141,7 +1141,7 @@ void ModelExportHelper::exportBufferToDBMS(const QString &buffer, Connection &co } catch(Exception &e) { - if(conn.isStablished() && in_transaction) + if(conn.isEstablished() && in_transaction) { try { diff --git a/libs/libgui/src/tools/sqlexecutionhelper.cpp b/libs/libgui/src/tools/sqlexecutionhelper.cpp index e873e07f5..4bcc497bd 100644 --- a/libs/libgui/src/tools/sqlexecutionhelper.cpp +++ b/libs/libgui/src/tools/sqlexecutionhelper.cpp @@ -66,7 +66,7 @@ void SQLExecutionHelper::executeCommand() result_model = nullptr; cancelled = false; - if(!connection.isStablished()) + if(!connection.isEstablished()) { connection.setNoticeEnabled(true); connection.connect(); @@ -92,7 +92,7 @@ void SQLExecutionHelper::executeCommand() void SQLExecutionHelper::cancelCommand() { - if(connection.isStablished()) + if(connection.isEstablished()) { connection.requestCancel(); cancelled = true; diff --git a/libs/libgui/src/widgets/modelwidget.cpp b/libs/libgui/src/widgets/modelwidget.cpp index c2d2f9cba..bd958655e 100644 --- a/libs/libgui/src/widgets/modelwidget.cpp +++ b/libs/libgui/src/widgets/modelwidget.cpp @@ -1491,7 +1491,7 @@ void ModelWidget::convertRelationshipNN() tab_name = tab->getName(); //Forcing the creation of the single pk column - if(rel->isSiglePKColumn()) + if(rel->isSinglePKColumn()) { col = pk->getColumn(0, Constraint::SourceCols); pk_cols.push_back(col->getName()); @@ -1595,7 +1595,7 @@ void ModelWidget::convertRelationshipNN() The relationship will be identifier if the single pk column attribute of the original relationship is false */ rel1 = new Relationship(Relationship::Relationship1n, src_tab, tab, src_mand, false, - !rel->isSiglePKColumn()); + !rel->isSinglePKColumn()); rel1->setLayers(layers); rel1->setCustomColor(rel_color); rel1->setLayers(layers); @@ -1607,7 +1607,7 @@ void ModelWidget::convertRelationshipNN() The relationship will be identifier if the single pk column attribute of the original relationship is false */ rel2 = new Relationship(Relationship::Relationship1n, dst_tab, tab, dst_mand, - false, !rel->isSiglePKColumn()); + false, !rel->isSinglePKColumn()); rel2->setLayers(layers); rel2->setCustomColor(rel_color); rel2->setLayers(layers); diff --git a/libs/libparsers/src/schemaparser.cpp b/libs/libparsers/src/schemaparser.cpp index ebf7e6e57..e735ff097 100644 --- a/libs/libparsers/src/schemaparser.cpp +++ b/libs/libparsers/src/schemaparser.cpp @@ -734,8 +734,8 @@ bool SchemaParser::evaluateComparisonExpr() } else if(attributes.count(attrib)==0 && !ignore_unk_atribs) { - throw Exception(getParseError(ErrorCode::UnkownAttribute, "", attrib), - ErrorCode::UnkownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(getParseError(ErrorCode::UnknownAttribute, "", attrib), + ErrorCode::UnknownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); } else { @@ -853,8 +853,8 @@ void SchemaParser::defineAttribute() if(attributes.count(attrib)==0 && !ignore_unk_atribs) { - throw Exception(getParseError(ErrorCode::UnkownAttribute), - ErrorCode::UnkownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(getParseError(ErrorCode::UnknownAttribute), + ErrorCode::UnknownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); } value += to_xml_entity ? UtilsNs::convertToXmlEntities(attributes[attrib]) : attributes[attrib]; @@ -942,8 +942,8 @@ void SchemaParser::unsetAttribute() if(attributes.count(attrib)==0 && !ignore_unk_atribs) { - throw Exception(getParseError(ErrorCode::UnkownAttribute, "", attrib), - ErrorCode::UnkownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(getParseError(ErrorCode::UnknownAttribute, "", attrib), + ErrorCode::UnknownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); } else if(!AttribRegExp.match(attrib).hasMatch()) { @@ -1037,8 +1037,8 @@ bool SchemaParser::evaluateExpression() //Raises an error if the attribute does is unknown if(attributes.count(attrib)==0 && !ignore_unk_atribs) { - throw Exception(getParseError(ErrorCode::UnkownAttribute, "", attrib), - ErrorCode::UnkownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(getParseError(ErrorCode::UnknownAttribute, "", attrib), + ErrorCode::UnknownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); } //Error 1: A conditional token other than %or %not %and if found on conditional expression @@ -1232,7 +1232,7 @@ QString SchemaParser::getSourceCode(const QString & obj_name, attribs_map &attri } } -void SchemaParser::ignoreUnkownAttributes(bool ignore) +void SchemaParser::ignoreUnknownAttributes(bool ignore) { ignore_unk_atribs=ignore; } @@ -1330,8 +1330,8 @@ QString SchemaParser::getSourceCode(const attribs_map &attribs) { if(!ignore_unk_atribs) { - throw Exception(getParseError(ErrorCode::UnkownAttribute, "", atrib), - ErrorCode::UnkownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); + throw Exception(getParseError(ErrorCode::UnknownAttribute, "", atrib), + ErrorCode::UnknownAttribute, __PRETTY_FUNCTION__, __FILE__, __LINE__); } else attributes[atrib] = ""; diff --git a/libs/libparsers/src/schemaparser.h b/libs/libparsers/src/schemaparser.h index ff4a67ddb..3c41e7a7d 100644 --- a/libs/libparsers/src/schemaparser.h +++ b/libs/libparsers/src/schemaparser.h @@ -336,7 +336,7 @@ class __libparsers SchemaParser { void restartParser(); //! \brief Set if the parser must ignore unknown attributes avoiding exception throwing - void ignoreUnkownAttributes(bool ignore); + void ignoreUnknownAttributes(bool ignore); //! \brief Set if the parser must ignore empty attributes avoiding exception throwing void ignoreEmptyAttributes(bool ignore); diff --git a/libs/libutils/src/exception.cpp b/libs/libutils/src/exception.cpp index 5cf710c5b..e371f2c6e 100644 --- a/libs/libutils/src/exception.cpp +++ b/libs/libutils/src/exception.cpp @@ -166,7 +166,7 @@ QString Exception::messages[Exception::ErrorCount][2]={ {"InvalidSyntax", QT_TR_NOOP("Invalid syntax in file `%1', line %2, column %3!")}, {"InvalidInclude", QT_TR_NOOP("Invalid include statement in file `%1', line %2, column %3!")}, {"InvalidInstruction", QT_TR_NOOP("Invalid instruction `%1' on file `%2', line %3, column %4!")}, - {"UnkownAttribute", QT_TR_NOOP("Unknown attribute `%1' in file `%2', line %3, column %4!")}, + {"UnknownAttribute", QT_TR_NOOP("Unknown attribute `%1' in file `%2', line %3, column %4!")}, {"InvalidMetacharacter", QT_TR_NOOP("Invalid metacharacter `%1' in file `%2', line %3, column %4!")}, {"InvalidOperatorInExpression", QT_TR_NOOP("Invalid operator `%1' in comparison expression, file `%2', line %3, column %4!")}, {"UndefinedAttributeValue", QT_TR_NOOP("Attribute `%1' with an undefined value in file `%2', line %3, column %4!")}, @@ -182,9 +182,9 @@ QString Exception::messages[Exception::ErrorCount][2]={ {"OprInexistentElement", QT_TR_NOOP("Operation with element which does not exists in the element tree currently loaded!")}, {"AsgInvalidConnParameter", QT_TR_NOOP("Assignment of a value to an invalid connection parameter!")}, {"OprNotAllocatedConnection", QT_TR_NOOP("Operation on connection not established!")}, - {"ConnectionNotConfigured", QT_TR_NOOP("Attempt to connect without define configuration parameters!")}, - {"ConnectionAlreadyStablished", QT_TR_NOOP("Attempt to start a connection already stablished!")}, - {"ConnectionNotStablished", QT_TR_NOOP("Could not connect to the database.\nMessage returned: `%1'")}, + {"ConnectionNotConfigured", QT_TR_NOOP("Attempt to connect without defined configuration parameters!")}, + {"ConnectionAlreadyEstablished", QT_TR_NOOP("Attempt to start an already established connection!")}, + {"ConnectionNotEstablished", QT_TR_NOOP("Could not connect to the database.\nMessage returned: `%1'")}, {"AsgNotAllocatedSQLResult", QT_TR_NOOP("Assignment of not allocated SQL command result!")}, {"IncomprehensibleDBMSResponse", QT_TR_NOOP("Unable to allocate the result of the SQL command because the response from the DBMS was not understood by the client!")}, {"DBMSFatalError", QT_TR_NOOP("Unable to allocate command result for the SQL because the server has generated a fatal error!\nMessage returned by the DBMS: `%1'")}, @@ -213,7 +213,7 @@ QString Exception::messages[Exception::ErrorCount][2]={ {"InvUsageInsteadOfUpdateTrigger", QT_TR_NOOP("A trigger cannot make reference to columns when using INSTEAD OF mode and UPDATE event!")}, {"AsgColumnNoParent", QT_TR_NOOP("Assignment of a column which has no parent table to the object `%1' (%2)!")}, {"InvUseConstraintTriggerAttribs", QT_TR_NOOP("Only constraint triggers can be deferrable or reference another table!")}, - {"RefInvalidFunctionIdTypeConfig", QT_TR_NOOP("Reference to a function id which is incompatible with the user define type configuration!")}, + {"RefInvalidFunctionIdTypeConfig", QT_TR_NOOP("Reference to a function id which is incompatible with the user defined type configuration!")}, {"AsgInvalidOpClassObject", QT_TR_NOOP("The operator class assigned to the object `%1' (%2) must use `btree' as indexing method!")}, {"InvPostgreSQLVersion", QT_TR_NOOP("Unsupported PostgreSQL version (%1) detected! Valid versions must be between %2 and %3.")}, {"ValidationFailure", QT_TR_NOOP("The validation process failed due to an error triggered by the validation helper. For more details about the error check the exception stack!")}, diff --git a/libs/libutils/src/exception.h b/libs/libutils/src/exception.h index c102b649a..b6c6eb426 100644 --- a/libs/libutils/src/exception.h +++ b/libs/libutils/src/exception.h @@ -180,7 +180,7 @@ enum class ErrorCode: unsigned { InvalidSyntax, InvalidInclude, InvalidInstruction, - UnkownAttribute, + UnknownAttribute, InvalidMetacharacter, InvalidOperatorInExpression, UndefinedAttributeValue, @@ -197,8 +197,8 @@ enum class ErrorCode: unsigned { AsgInvalidConnParameter, OprNotAllocatedConnection, ConnectionNotConfigured, - ConnectionAlreadyStablished, - ConnectionNotStablished, + ConnectionAlreadyEstablished, + ConnectionNotEstablished, AsgNotAllocatedSQLResult, IncomprehensibleDBMSResponse, DBMSFatalError, diff --git a/tests/src/schemafilessyntaxtest/schemafilessyntaxtest.cpp b/tests/src/schemafilessyntaxtest/schemafilessyntaxtest.cpp index 972d8aa48..bd71cd348 100644 --- a/tests/src/schemafilessyntaxtest/schemafilessyntaxtest.cpp +++ b/tests/src/schemafilessyntaxtest/schemafilessyntaxtest.cpp @@ -52,7 +52,7 @@ void SchemaFilesSyntaxTest::schemasDontGenerateSyntaxErrors() for(auto &sch_file : sch_files) { schparser.ignoreEmptyAttributes(true); - schparser.ignoreUnkownAttributes(true); + schparser.ignoreUnknownAttributes(true); schparser.getSourceCode(path + GlobalAttributes::DirSeparator + sch_file, attrs); } }