From: Debian Qt/KDE Maintainers Date: Sun, 11 Sep 2016 12:30:31 +0000 (+0000) Subject: check_system_double-conversion X-Git-Tag: archive/raspbian/5.7.1-2+rpi1~1^2^2^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=136e82fc429abc99e8372a2813ba6b73d1e7f0a9;p=qtdeclarative-opensource-src.git check_system_double-conversion Gbp-Pq: Name check_system_double-conversion.patch --- diff --git a/config.tests/double-conversion/double-conversion.pro b/config.tests/double-conversion/double-conversion.pro new file mode 100644 index 000000000..a8485191c --- /dev/null +++ b/config.tests/double-conversion/double-conversion.pro @@ -0,0 +1,6 @@ +CONFIG -= qt +CONFIG += console + +SOURCES += main.cpp + +LIBS += -ldouble-conversion diff --git a/config.tests/double-conversion/main.cpp b/config.tests/double-conversion/main.cpp new file mode 100644 index 000000000..d7c3381cd --- /dev/null +++ b/config.tests/double-conversion/main.cpp @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Lisandro Damián Nicanor Pérez Meyer +** +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +using namespace double_conversion; + +int main(int, char**) +{ + DoubleToStringConverter(0,"inf","nan",'e',-2,5,3,3); + return 0; +} diff --git a/qtdeclarative.pro b/qtdeclarative.pro index 5b94da9b6..30d40e22f 100644 --- a/qtdeclarative.pro +++ b/qtdeclarative.pro @@ -1,4 +1,10 @@ CONFIG += tests_need_tools examples_need_tools + +linux { + load(configure) + qtCompileTest(double-conversion) +} + load(qt_parts) !python_available { diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri index 5ffdebe32..0e5ac70bd 100644 --- a/src/qml/jsruntime/jsruntime.pri +++ b/src/qml/jsruntime/jsruntime.pri @@ -113,4 +113,9 @@ valgrind { ios: DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -include(../../3rdparty/double-conversion/double-conversion.pri) +config_double-conversion { + DEFINES += SYSTEM_DOUBLECONVERSION + LIBS_PRIVATE += -ldouble-conversion +} else { + include(../../3rdparty/double-conversion/double-conversion.pri) +} diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp index 4ae30a7f3..489b4425b 100644 --- a/src/qml/jsruntime/qv4numberobject.cpp +++ b/src/qml/jsruntime/qv4numberobject.cpp @@ -39,7 +39,12 @@ #include #include #include + +#ifdef SYSTEM_DOUBLECONVERSION +#include +#else #include +#endif using namespace QV4; diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index d8ae7d4e9..b169466d7 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -60,7 +60,11 @@ #include -#include "../../3rdparty/double-conversion/double-conversion.h" +#ifdef SYSTEM_DOUBLECONVERSION +#include +#else +#include +#endif #ifdef QV4_COUNT_RUNTIME_FUNCTIONS # include