Skip to content
Open
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 apps/pgmodeler-se/src/sourceeditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
Expand Down
2 changes: 1 addition & 1 deletion libs/libcanvas/src/basetableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ void BaseTableView::configureObjectShadow()
BaseObjectView::configureObjectShadow();
}

QList<TableObjectView *> BaseTableView::getSelectedChidren()
QList<TableObjectView *> BaseTableView::getSelectedChildren()
{
return sel_child_objs;
}
Expand Down
2 changes: 1 addition & 1 deletion libs/libcanvas/src/basetableview.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class __libcanvas BaseTableView: public BaseObjectView {
void configureObjectShadow();

//! \brief Returns a list of selected children objects
QList<TableObjectView *> getSelectedChidren();
QList<TableObjectView *> getSelectedChildren();

//! \brief Clear the selection over all selected children
void clearChildrenSelection();
Expand Down
4 changes: 2 additions & 2 deletions libs/libcanvas/src/objectsscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1897,7 +1897,7 @@ QList<QGraphicsItem *> 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);
}

Expand Down
6 changes: 3 additions & 3 deletions libs/libconnector/src/catalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -841,7 +841,7 @@ std::vector<attribs_map> Catalog::getMultipleAttributes(const QString &catalog_s
std::vector<attribs_map> obj_attribs;

loadCatalogQuery(catalog_sch);
schparser.ignoreUnkownAttributes(true);
schparser.ignoreUnknownAttributes(true);
schparser.ignoreEmptyAttributes(true);

attribs[Attributes::PgSqlVersion]=schparser.getPgSQLVersion();
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions libs/libconnector/src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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__);
}

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions libs/libconnector/src/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *){}
Expand Down Expand Up @@ -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();
Expand Down
14 changes: 7 additions & 7 deletions libs/libcore/src/baseobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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);
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions libs/libcore/src/databasemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CopyOptions::CopyMode>(attribs[Attributes::CopyMode].toUInt()),
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libs/libcore/src/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions libs/libcore/src/physicaltable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions libs/libcore/src/relationship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ PhysicalTable *Relationship::getReferenceTable()
}
}

void Relationship::setSiglePKColumn(bool value)
void Relationship::setSinglePKColumn(bool value)
{
if(rel_type==RelationshipNn)
{
Expand All @@ -2304,7 +2304,7 @@ void Relationship::setSiglePKColumn(bool value)
}
}

bool Relationship::isSiglePKColumn()
bool Relationship::isSinglePKColumn()
{
return single_pk_column;
}
Expand Down
4 changes: 2 additions & 2 deletions libs/libcore/src/relationship.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions libs/libcore/src/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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<Index *>(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);
Expand Down
4 changes: 2 additions & 2 deletions libs/libgui/src/dbobjects/relationshipwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions libs/libgui/src/settings/connectionsconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading