summaryrefslogtreecommitdiffstats
path: root/examples/network/dnslookup/dnslookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix deprecation warnings agains u"..."_qs in dnslookup.cppEdward Welbourne2023-06-071-5/+5
| | | | | | Pick-to: 6.5 6.6 Change-Id: I29a177c7d46304c5b494218f5862195eb92c7684 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* DNS Lookup: Use ideomatic cstdio includeMårten Nordheim2023-03-021-19/+21
| | | | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I646f0c985adc45a17103b5f98394f3def4b6ada2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* DNS Lookup: Change local function to return struct instead of enumMårten Nordheim2023-03-021-36/+38
| | | | | | | | | | This let's us get rid of an out-parameter. Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Ifc08d3905932f28ecdfdf3a7de1499700cc7e606 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Use standard functions to print version/helpMårten Nordheim2023-03-021-4/+3
| | | | | | | | | | showHelp was already in use, but not showVersion. Return 0 in both cases, even if it's unreachable. Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Iba820e89d7de066130163e7829f75bbfcfa3f7dd Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: reflow some code to avoid exceeding column limitMårten Nordheim2023-03-021-15/+31
| | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Ic17ded256152f7d89bd200ea0e163f2b8f1ea70a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Use std::optional instead of casting enum to intMårten Nordheim2023-03-021-5/+5
| | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I0bd5dc004154c1c4026be2feb6187c53e5e77801 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Avoid unneeded allocations in parsing functionMårten Nordheim2023-03-021-11/+11
| | | | | | | | | | | By using .compare(~~~, Qt::CaseInsensitive) instead of .toLower() Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I60e1fdc0a54450e7385e90f84fd509e62b82d2c9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* examples: port network examples to new connection styleSamuel Gaist2022-12-211-1/+1
| | | | | | Task-number: QTBUG-106893 Change-Id: Id0f558362108fedececb9eede36becc04ff4e307 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-49/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Cleanup network examplesChristian Ehrlicher2019-11-061-2/+2
| | | | | | | | | | | Cleanup network examples: - use nullptr - use member-init - adjust includes - use new-style connects Change-Id: I80aa230168e5aec88a1bc93bbf49a471bfc30e7b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Network examples: cleanup foreach usageChristian Ehrlicher2019-01-061-8/+16
| | | | | | | | Replace deprecated foreach macro with range-based for loop Change-Id: I0d1f2cfd557d02ccc48b41b3fea137baa2962fc1 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Unify license header usage.Jani Heikkinen2016-03-291-3/+13
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-151-3/+3
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-4/+4
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Use QCommandLineParser in example dnslookup.Friedemann Kleint2014-03-151-51/+120
| | | | | | | | | | | Show how use QCommandLineParser with additional parameter checking for custom options and positional arguments. Also explain how to display help in GUI applications. Change-Id: I03513e09b7dd5b150259593da0af2ef2a281cab2 Reviewed-by: David Faure <david.faure@kdab.com>
* Examples: Add support for custom nameserver to dnslookupMandeep Sandhu2013-11-071-1/+12
| | | | | | | | | Updated dnslookup example to take an optional nameserver argument for doing DNS lookup against a specific nameserver. Task-number: QTBUG-30166 Change-Id: I9f46f9f766b56f770d2c8372e3bfad5c71023c73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QStringList::join(QChar) overload where applicable [examples]Marc Mutz2012-09-231-1/+1
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I1d0c9782cc1522d937b930531720e32d4c8f7ce8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-5/+5
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I94cc301ea75cc689bcb6e2d417120cf14e36808d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Add support for DNS lookups using native APIsJeremy Lainé2012-01-301-0/+155
The QDnsLookup class provides asynchronous APIs for performing DNS lookups. For now, the following lookups are supported: - A and AAAA - CNAME as defined per RFC 1035 - MX as defined per RFC 1035 - NS as defined per RFC 1035 - PTR as defined per RFC 1035 - SRV as defined per RFC 2782 - TXT as defined per RFC 1035 Task-number: QTBUG-10481 Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>