mirror of
https://github.com/altlinux/admc.git
synced 2025-03-22 02:50:30 +03:00
remove duplicate load_attributes() call
remove load_attributes() call in load_row add load_attributes() call to load_and_add_row
This commit is contained in:
parent
140b0c8841
commit
73971d045d
@ -382,11 +382,10 @@ bool set_attribute(const QString &dn, const QString &attribute, const QString &v
|
||||
}
|
||||
|
||||
if (result == AD_SUCCESS) {
|
||||
emit ad_interface.set_attribute_complete(dn, attribute, old_value, value);
|
||||
|
||||
// TODO: there's a duplicate load_attributes in ad_model's on_set_attribute_complete()
|
||||
// Make it so that there's only one call, preferrably here
|
||||
// Reload attributes to get new value
|
||||
load_attributes(dn);
|
||||
|
||||
emit ad_interface.set_attribute_complete(dn, attribute, old_value, value);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
@ -72,7 +72,6 @@ bool AdModel::dropMimeData(const QMimeData *data, Qt::DropAction, int row, int c
|
||||
}
|
||||
|
||||
void load_row(QList<QStandardItem*> row, const QString &dn) {
|
||||
load_attributes(dn);
|
||||
QMap<QString, QList<QString>> attributes = get_attributes(dn);
|
||||
|
||||
// TODO: get rid of "if (x.contains(y))"
|
||||
@ -166,6 +165,9 @@ void load_and_add_row(QStandardItem *parent, const QString &dn) {
|
||||
row.push_back(new QStandardItem());
|
||||
}
|
||||
|
||||
// Load attributes since this is the first time this entry is loaded
|
||||
load_attributes(dn);
|
||||
|
||||
load_row(row, dn);
|
||||
|
||||
// Set fetch flag because row is new and can be fetched
|
||||
|
Loading…
x
Reference in New Issue
Block a user