diff options
Diffstat (limited to 'examples/widgets/widgets/calculator/calculator.cpp')
-rw-r--r-- | examples/widgets/widgets/calculator/calculator.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/widgets/widgets/calculator/calculator.cpp b/examples/widgets/widgets/calculator/calculator.cpp index bb3836bd70..e76011ee0d 100644 --- a/examples/widgets/widgets/calculator/calculator.cpp +++ b/examples/widgets/widgets/calculator/calculator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** @@ -17,8 +17,8 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** @@ -40,7 +40,7 @@ #include <QtWidgets> -#include <math.h> +#include <cmath> #include "button.h" #include "calculator.h" @@ -164,9 +164,9 @@ void Calculator::unaryOperatorClicked() abortOperation(); return; } - result = sqrt(operand); + result = std::sqrt(operand); } else if (clickedOperator == tr("x\302\262")) { - result = pow(operand, 2.0); + result = std::pow(operand, 2.0); } else if (clickedOperator == tr("1/x")) { if (operand == 0.0) { abortOperation(); |