summaryrefslogtreecommitdiffstats
path: root/qtsoap/examples/population/main.cpp
blob: 56b411cb269e2c1cc1a9e44a70eb957e26202913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
// SPDX-License-Identifier: BSD-3-Clause

/*!
    This example shows QtSoap with a .NET web service.

    Gets the US Census Bureau population from any of 227 countries,
    the daily world population estimate, and the list of available
    countries.
*/
#include <QApplication>
#include "population.h"

#define USAGE1 QT_TRANSLATE_NOOP("Population::main", "XMethods' interface to a World Population .NET service.")
#define USAGE2 QT_TRANSLATE_NOOP("Population::main", "usage: %s <country>")


int main(int argc, char **argv)
{
    if (argc < 2) {
	qDebug(USAGE1);
	qDebug(USAGE2, argv[0]);
	qDebug(" ");

	return 1;
    }

    QApplication app(argc, argv, false);

    Population pop(argv[1], 0);

    return app.exec();
}