diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index fdb299c7f2..2c35fcac88 100644 --- a/src/Gui/DlgExpressionInput.cpp +++ b/src/Gui/DlgExpressionInput.cpp @@ -41,7 +41,7 @@ using namespace App; using namespace Gui::Dialog; DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path, - boost::shared_ptr _expression, + std::shared_ptr _expression, const Base::Unit & _impliedUnit, QWidget *parent) : QDialog(parent) , ui(new Ui::DlgExpressionInput) @@ -135,7 +135,7 @@ void DlgExpressionInput::textChanged(const QString &text) setMinimumWidth(ui->expression->minimumWidth()); //now handle expression - boost::shared_ptr expr(ExpressionParser::parse(path.getDocumentObject(), text.toUtf8().constData())); + std::shared_ptr expr(ExpressionParser::parse(path.getDocumentObject(), text.toUtf8().constData())); if (expr) { std::string error = path.getDocumentObject()->ExpressionEngine.validateExpression(path, expr); diff --git a/src/Gui/DlgExpressionInput.h b/src/Gui/DlgExpressionInput.h index 9de74f5ec7..6d3e47c16c 100644 --- a/src/Gui/DlgExpressionInput.h +++ b/src/Gui/DlgExpressionInput.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace Ui { class DlgExpressionInput; @@ -51,10 +51,10 @@ class GuiExport DlgExpressionInput : public QDialog Q_OBJECT public: - explicit DlgExpressionInput(const App::ObjectIdentifier & _path, boost::shared_ptr _expression, const Base::Unit &_impliedUnit, QWidget *parent = 0); + explicit DlgExpressionInput(const App::ObjectIdentifier & _path, std::shared_ptr _expression, const Base::Unit &_impliedUnit, QWidget *parent = 0); ~DlgExpressionInput(); - boost::shared_ptr getExpression() const { return expression; } + std::shared_ptr getExpression() const { return expression; } bool discardedFormula() const { return discarded; } @@ -77,7 +77,7 @@ private Q_SLOTS: private: ::Ui::DlgExpressionInput *ui; - boost::shared_ptr expression; + std::shared_ptr expression; App::ObjectIdentifier path; bool discarded; const Base::Unit impliedUnit; diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index 0927244407..4ce14296e0 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -66,7 +66,7 @@ void ExpressionBinding::unbind() path = App::ObjectIdentifier(); } -void Gui::ExpressionBinding::setExpression(boost::shared_ptr expr) +void Gui::ExpressionBinding::setExpression(std::shared_ptr expr) { DocumentObject * docObj = path.getDocumentObject(); @@ -124,7 +124,7 @@ bool ExpressionBinding::hasExpression() const return isBound() && getExpression() != 0; } -boost::shared_ptr ExpressionBinding::getExpression() const +std::shared_ptr ExpressionBinding::getExpression() const { DocumentObject * docObj = path.getDocumentObject(); diff --git a/src/Gui/ExpressionBinding.h b/src/Gui/ExpressionBinding.h index f3e4e3ff21..cf57de31d9 100644 --- a/src/Gui/ExpressionBinding.h +++ b/src/Gui/ExpressionBinding.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -58,17 +58,17 @@ public: protected: const App::ObjectIdentifier & getPath() const { return path; } - boost::shared_ptr getExpression() const; + std::shared_ptr getExpression() const; std::string getExpressionString(bool no_throw=true) const; std::string getEscapedExpressionString() const; - virtual void setExpression(boost::shared_ptr expr); + virtual void setExpression(std::shared_ptr expr); //gets called when the bound expression is changed, either by this binding or any external action virtual void onChange() {} private: App::ObjectIdentifier path; - boost::shared_ptr lastExpression; + std::shared_ptr lastExpression; protected: QLabel* iconLabel; diff --git a/src/Gui/GraphvizView.h b/src/Gui/GraphvizView.h index d13bc240f9..0f4840bbd0 100644 --- a/src/Gui/GraphvizView.h +++ b/src/Gui/GraphvizView.h @@ -25,7 +25,6 @@ #define GUI_GRAPHVIZVIEW_H #include "MDIView.h" -#include #include diff --git a/src/Gui/GuiApplication.h b/src/Gui/GuiApplication.h index 7208f3926c..191148e216 100644 --- a/src/Gui/GuiApplication.h +++ b/src/Gui/GuiApplication.h @@ -27,7 +27,7 @@ #include "GuiApplicationNativeEventAware.h" #include // For Base::SystemExitException #include -#include +#include class QSessionManager; @@ -51,7 +51,7 @@ public: bool notify (QObject * receiver, QEvent * event); /// Pointer to exceptions caught in Qt event handler - boost::shared_ptr caughtException; + std::shared_ptr caughtException; public Q_SLOTS: void commitData(QSessionManager &manager); diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index 9192b8237b..13de51f382 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -113,7 +113,7 @@ void InputField::bind(const App::ObjectIdentifier &_path) DocumentObject * docObj = getPath().getDocumentObject(); if (docObj) { - boost::shared_ptr expr(docObj->getExpression(getPath()).expression); + std::shared_ptr expr(docObj->getExpression(getPath()).expression); if (expr) newInput(Tools::fromStdString(expr->toString())); @@ -157,7 +157,7 @@ QPixmap InputField::getValidationIcon(const char* name, const QSize& size) const void InputField::updateText(const Base::Quantity& quant) { if (isBound()) { - boost::shared_ptr e(getPath().getDocumentObject()->getExpression(getPath()).expression); + std::shared_ptr e(getPath().getDocumentObject()->getExpression(getPath()).expression); if (e) { setText(Tools::fromStdString(e->toString())); @@ -240,7 +240,7 @@ void InputField::newInput(const QString & text) fixup(input); if (isBound()) { - boost::shared_ptr e(ExpressionParser::parse(getPath().getDocumentObject(), input.toUtf8())); + std::shared_ptr e(ExpressionParser::parse(getPath().getDocumentObject(), input.toUtf8())); setExpression(e); diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 16f0113bbd..2606919ee3 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -335,7 +335,7 @@ void QuantitySpinBox::bind(const App::ObjectIdentifier &_path) iconLabel->show(); } -void Gui::QuantitySpinBox::setExpression(boost::shared_ptr expr) +void Gui::QuantitySpinBox::setExpression(std::shared_ptr expr) { Q_ASSERT(isBound()); @@ -661,7 +661,7 @@ void QuantitySpinBox::finishFormulaDialog() if (box->result() == QDialog::Accepted) setExpression(box->getExpression()); else if (box->discardedFormula()) - setExpression(boost::shared_ptr()); + setExpression(std::shared_ptr()); box->deleteLater(); diff --git a/src/Gui/QuantitySpinBox.h b/src/Gui/QuantitySpinBox.h index 678fcb944d..6a3da7b765 100644 --- a/src/Gui/QuantitySpinBox.h +++ b/src/Gui/QuantitySpinBox.h @@ -128,7 +128,7 @@ public: QSize minimumSizeHint() const; bool event(QEvent *event); - void setExpression(boost::shared_ptr expr); + void setExpression(std::shared_ptr expr); void bind(const App::ObjectIdentifier &_path); bool apply(const std::string &propName); diff --git a/src/Gui/SpinBox.cpp b/src/Gui/SpinBox.cpp index 428e65440c..476b7c0192 100644 --- a/src/Gui/SpinBox.cpp +++ b/src/Gui/SpinBox.cpp @@ -264,7 +264,7 @@ void UIntSpinBox::bind(const App::ObjectIdentifier &_path) iconLabel->show(); } -void UIntSpinBox::setExpression(boost::shared_ptr expr) +void UIntSpinBox::setExpression(std::shared_ptr expr) { Q_ASSERT(isBound()); @@ -399,7 +399,7 @@ void UIntSpinBox::finishFormulaDialog() if (box->result() == QDialog::Accepted) setExpression(box->getExpression()); else if (box->discardedFormula()) - setExpression(boost::shared_ptr()); + setExpression(std::shared_ptr()); box->deleteLater(); } @@ -473,7 +473,7 @@ void IntSpinBox::bind(const ObjectIdentifier& _path) { iconLabel->show(); } -void IntSpinBox::setExpression(boost::shared_ptr expr) +void IntSpinBox::setExpression(std::shared_ptr expr) { Q_ASSERT(isBound()); @@ -592,7 +592,7 @@ void IntSpinBox::finishFormulaDialog() if (box->result() == QDialog::Accepted) setExpression(box->getExpression()); else if (box->discardedFormula()) - setExpression(boost::shared_ptr()); + setExpression(std::shared_ptr()); box->deleteLater(); } @@ -666,7 +666,7 @@ void DoubleSpinBox::bind(const ObjectIdentifier& _path) { iconLabel->show(); } -void DoubleSpinBox::setExpression(boost::shared_ptr expr) +void DoubleSpinBox::setExpression(std::shared_ptr expr) { Q_ASSERT(isBound()); @@ -784,7 +784,7 @@ void DoubleSpinBox::finishFormulaDialog() if (box->result() == QDialog::Accepted) setExpression(box->getExpression()); else if (box->discardedFormula()) - setExpression(boost::shared_ptr()); + setExpression(std::shared_ptr()); box->deleteLater(); } diff --git a/src/Gui/SpinBox.h b/src/Gui/SpinBox.h index 90a16c5f28..0ae1f7ee4e 100644 --- a/src/Gui/SpinBox.h +++ b/src/Gui/SpinBox.h @@ -84,7 +84,7 @@ public: uint maximum() const; void setMaximum( uint value ); - void setExpression(boost::shared_ptr expr); + void setExpression(std::shared_ptr expr); void bind(const App::ObjectIdentifier &_path); bool apply(const std::string &propName); bool apply(); @@ -127,7 +127,7 @@ public: IntSpinBox ( QWidget* parent=0 ); virtual ~IntSpinBox(); - void setExpression(boost::shared_ptr expr); + void setExpression(std::shared_ptr expr); void bind(const App::ObjectIdentifier &_path); bool apply(const std::string &propName); @@ -154,7 +154,7 @@ public: DoubleSpinBox ( QWidget* parent=0 ); virtual ~DoubleSpinBox(); - void setExpression(boost::shared_ptr expr); + void setExpression(std::shared_ptr expr); void bind(const App::ObjectIdentifier &_path); bool apply(const std::string &propName); diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index a60e44a61d..55dce30d16 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -1404,7 +1404,7 @@ void ExpLineEdit::bind(const ObjectIdentifier& _path) { iconLabel->show(); } -void ExpLineEdit::setExpression(boost::shared_ptr expr) +void ExpLineEdit::setExpression(std::shared_ptr expr) { Q_ASSERT(isBound()); @@ -1512,7 +1512,7 @@ void ExpLineEdit::finishFormulaDialog() if (box->result() == QDialog::Accepted) setExpression(box->getExpression()); else if (box->discardedFormula()) - setExpression(boost::shared_ptr()); + setExpression(std::shared_ptr()); box->deleteLater(); diff --git a/src/Gui/Widgets.h b/src/Gui/Widgets.h index c27dba24b0..f6f3dd6402 100644 --- a/src/Gui/Widgets.h +++ b/src/Gui/Widgets.h @@ -461,7 +461,7 @@ class GuiExport ExpLineEdit : public QLineEdit, public ExpressionBinding public: ExpLineEdit ( QWidget * parent=0, bool expressionOnly=false ); - void setExpression(boost::shared_ptr expr); + void setExpression(std::shared_ptr expr); void bind(const App::ObjectIdentifier &_path); bool apply(const std::string &propName); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 6be34a396b..330a7224ca 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -121,11 +121,11 @@ void PropertyItem::onChange() if(hasExpression()) { for(auto child : childItems) { if(child && child->hasExpression()) - child->setExpression(boost::shared_ptr()); + child->setExpression(std::shared_ptr()); } for(auto item=parentItem;item;item=item->parentItem) { if(item->hasExpression()) - item->setExpression(boost::shared_ptr()); + item->setExpression(std::shared_ptr()); } } }