Commit 469d1379 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

UPDATED code cleaning

parent 54f84de6
...@@ -186,7 +186,7 @@ Action::ApplyStatus Action::trigger(QWidget* parent) { ...@@ -186,7 +186,7 @@ Action::ApplyStatus Action::trigger(QWidget* parent) {
if (targetComponents.size() > 0 || getComponent().isEmpty()) { if (targetComponents.size() > 0 || getComponent().isEmpty()) {
if (isEmbedded) { if (isEmbedded) {
// if there are no parents to use use the action viewer // if there are no parents to use use the action viewer
if (!parent) { if (parent == nullptr) {
ActionViewer::getInstance()->embedActionWidget(this); ActionViewer::getInstance()->embedActionWidget(this);
} }
else { else {
......
...@@ -241,7 +241,7 @@ public slots: ...@@ -241,7 +241,7 @@ public slots:
* The parent widget is used if the action is embedded, see class description for more information about the algorithm. * The parent widget is used if the action is embedded, see class description for more information about the algorithm.
* This method cannot be redefined in inherited class. * This method cannot be redefined in inherited class.
*/ */
ApplyStatus trigger(QWidget* parent = NULL); ApplyStatus trigger(QWidget* parent = nullptr);
/** /**
* This method is called when the action has to be applied on the target list (get the target lists using getTargets()) * This method is called when the action has to be applied on the target list (get the target lists using getTargets())
......
...@@ -231,7 +231,7 @@ void ActionViewer::updateActionViewer(UpdateReason reason) { ...@@ -231,7 +231,7 @@ void ActionViewer::updateActionViewer(UpdateReason reason) {
ActionList actionset = Application::getActions(Application::getSelectedComponents(), tagLineEdit->text()); ActionList actionset = Application::getActions(Application::getSelectedComponents(), tagLineEdit->text());
if (!actionset.isEmpty()) { if (!actionset.isEmpty()) {
if (1 == actionset.size()) { if (actionset.size() == 1) {
action = *(actionset.begin()); action = *(actionset.begin());
nameComboBox->setCurrentIndex(nameComboBox->findText(action->getName())); nameComboBox->setCurrentIndex(nameComboBox->findText(action->getName()));
updateActionViewer(ActionNameChanged); updateActionViewer(ActionNameChanged);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment