diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-26 10:28:24 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-10-26 10:28:24 +0000 |
commit | 00b2e45a97205975ee91aa43f00e3dbef1a8907b (patch) | |
tree | ed44e50bc893e87434d72470c2c809b1fb34de72 /src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp | |
parent | 9cd527bc1f384926985d63c741641316a66f17a4 (diff) | |
parent | e28e91ae99b8c3859899e04cc9370534c7c7b86d (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev
Diffstat (limited to 'src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp')
-rw-r--r-- | src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp b/src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp new file mode 100644 index 0000000000..fc7fd7814a --- /dev/null +++ b/src/network/doc/snippets/code/src_network_kernel_qnetworkinterface.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/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 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] + QNetworkInterface::interfaceFromName(name).index() +//! [0] + +//! [1] + QNetworkInterface::interfaceFromIndex(index).name() +//! [1] |