0
|
1 |
/****************************************************************************
|
|
2 |
**
|
4
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
0
|
4 |
** All rights reserved.
|
|
5 |
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
6 |
**
|
|
7 |
** This file is part of the QtNetwork module of the Qt Toolkit.
|
|
8 |
**
|
|
9 |
** $QT_BEGIN_LICENSE:LGPL$
|
|
10 |
** No Commercial Usage
|
|
11 |
** This file contains pre-release code and may not be distributed.
|
|
12 |
** You may use this file in accordance with the terms and conditions
|
|
13 |
** contained in the Technology Preview License Agreement accompanying
|
|
14 |
** this package.
|
|
15 |
**
|
|
16 |
** GNU Lesser General Public License Usage
|
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
18 |
** General Public License version 2.1 as published by the Free Software
|
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
20 |
** packaging of this file. Please review the following information to
|
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
23 |
**
|
|
24 |
** In addition, as a special exception, Nokia gives you certain additional
|
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
27 |
**
|
|
28 |
** If you have questions regarding the use of this file, please contact
|
|
29 |
** Nokia at qt-info@nokia.com.
|
|
30 |
**
|
|
31 |
**
|
|
32 |
**
|
|
33 |
**
|
|
34 |
**
|
|
35 |
**
|
|
36 |
**
|
|
37 |
**
|
|
38 |
** $QT_END_LICENSE$
|
|
39 |
**
|
|
40 |
****************************************************************************/
|
|
41 |
|
|
42 |
#include "qhostinfo.h"
|
|
43 |
#include "qhostinfo_p.h"
|
|
44 |
|
|
45 |
#include "QtCore/qscopedpointer.h"
|
|
46 |
#include <qabstracteventdispatcher.h>
|
|
47 |
#include <private/qunicodetables_p.h>
|
|
48 |
#include <qcoreapplication.h>
|
|
49 |
#include <qmetaobject.h>
|
|
50 |
#include <qregexp.h>
|
|
51 |
#include <private/qnativesocketengine_p.h>
|
|
52 |
#include <qstringlist.h>
|
|
53 |
#include <qthread.h>
|
|
54 |
#include <qtimer.h>
|
|
55 |
#include <qurl.h>
|
|
56 |
|
|
57 |
#ifdef Q_OS_UNIX
|
|
58 |
# include <unistd.h>
|
|
59 |
#endif
|
|
60 |
|
|
61 |
QT_BEGIN_NAMESPACE
|
|
62 |
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
63 |
#ifndef QT_NO_THREAD
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
64 |
Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
65 |
#endif
|
0
|
66 |
|
|
67 |
//#define QHOSTINFO_DEBUG
|
|
68 |
|
|
69 |
/*!
|
|
70 |
\class QHostInfo
|
|
71 |
\brief The QHostInfo class provides static functions for host name lookups.
|
|
72 |
|
|
73 |
\reentrant
|
|
74 |
\inmodule QtNetwork
|
|
75 |
\ingroup network
|
|
76 |
|
|
77 |
QHostInfo uses the lookup mechanisms provided by the operating
|
|
78 |
system to find the IP address(es) associated with a host name,
|
|
79 |
or the host name associated with an IP address.
|
|
80 |
The class provides two static convenience functions: one that
|
|
81 |
works asynchronously and emits a signal once the host is found,
|
|
82 |
and one that blocks and returns a QHostInfo object.
|
|
83 |
|
|
84 |
To look up a host's IP addresses asynchronously, call lookupHost(),
|
|
85 |
which takes the host name or IP address, a receiver object, and a slot
|
|
86 |
signature as arguments and returns an ID. You can abort the
|
|
87 |
lookup by calling abortHostLookup() with the lookup ID.
|
|
88 |
|
|
89 |
Example:
|
|
90 |
|
|
91 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 0
|
|
92 |
|
|
93 |
|
|
94 |
The slot is invoked when the results are ready. (If you use
|
|
95 |
Qt for Embedded Linux and disabled multithreading support by defining
|
|
96 |
\c QT_NO_THREAD, lookupHost() will block until the lookup has
|
|
97 |
finished.) The results are stored in a QHostInfo object. Call
|
|
98 |
addresses() to get the list of IP addresses for the host, and
|
|
99 |
hostName() to get the host name that was looked up.
|
|
100 |
|
|
101 |
If the lookup failed, error() returns the type of error that
|
|
102 |
occurred. errorString() gives a human-readable description of the
|
|
103 |
lookup error.
|
|
104 |
|
|
105 |
If you want a blocking lookup, use the QHostInfo::fromName() function:
|
|
106 |
|
|
107 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 1
|
|
108 |
|
|
109 |
QHostInfo supports Internationalized Domain Names (IDNs) through the
|
|
110 |
IDNA and Punycode standards.
|
|
111 |
|
|
112 |
To retrieve the name of the local host, use the static
|
|
113 |
QHostInfo::localHostName() function.
|
|
114 |
|
|
115 |
\sa QAbstractSocket, {http://www.rfc-editor.org/rfc/rfc3492.txt}{RFC 3492}
|
|
116 |
*/
|
|
117 |
|
|
118 |
static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
|
|
119 |
|
|
120 |
/*!
|
|
121 |
Looks up the IP address(es) associated with host name \a name, and
|
|
122 |
returns an ID for the lookup. When the result of the lookup is
|
|
123 |
ready, the slot or signal \a member in \a receiver is called with
|
|
124 |
a QHostInfo argument. The QHostInfo object can then be inspected
|
|
125 |
to get the results of the lookup.
|
|
126 |
|
|
127 |
The lookup is performed by a single function call, for example:
|
|
128 |
|
|
129 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 2
|
|
130 |
|
|
131 |
The implementation of the slot prints basic information about the
|
|
132 |
addresses returned by the lookup, or reports an error if it failed:
|
|
133 |
|
|
134 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 3
|
|
135 |
|
|
136 |
If you pass a literal IP address to \a name instead of a host name,
|
|
137 |
QHostInfo will search for the domain name for the IP (i.e., QHostInfo will
|
|
138 |
perform a \e reverse lookup). On success, the resulting QHostInfo will
|
|
139 |
contain both the resolved domain name and IP addresses for the host
|
|
140 |
name. Example:
|
|
141 |
|
|
142 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 4
|
|
143 |
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
144 |
\note There is no guarantee on the order the signals will be emitted
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
145 |
if you start multiple requests with lookupHost().
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
146 |
|
0
|
147 |
\sa abortHostLookup(), addresses(), error(), fromName()
|
|
148 |
*/
|
|
149 |
int QHostInfo::lookupHost(const QString &name, QObject *receiver,
|
|
150 |
const char *member)
|
|
151 |
{
|
|
152 |
#if defined QHOSTINFO_DEBUG
|
|
153 |
qDebug("QHostInfo::lookupHost(\"%s\", %p, %s)",
|
|
154 |
name.toLatin1().constData(), receiver, member ? member + 1 : 0);
|
|
155 |
#endif
|
|
156 |
if (!QAbstractEventDispatcher::instance(QThread::currentThread())) {
|
|
157 |
qWarning("QHostInfo::lookupHost() called with no event dispatcher");
|
|
158 |
return -1;
|
|
159 |
}
|
|
160 |
|
|
161 |
qRegisterMetaType<QHostInfo>("QHostInfo");
|
|
162 |
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
163 |
int id = theIdCounter.fetchAndAddRelaxed(1); // generate unique ID
|
0
|
164 |
|
|
165 |
if (name.isEmpty()) {
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
166 |
QHostInfo hostInfo(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
167 |
hostInfo.setError(QHostInfo::HostNotFound);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
168 |
hostInfo.setErrorString(QObject::tr("No host name given"));
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
169 |
QScopedPointer<QHostInfoResult> result(new QHostInfoResult);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
170 |
QObject::connect(result.data(), SIGNAL(resultsReady(QHostInfo)),
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
171 |
receiver, member, Qt::QueuedConnection);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
172 |
result.data()->emitResultsReady(hostInfo);
|
0
|
173 |
return id;
|
|
174 |
}
|
|
175 |
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
176 |
#ifdef QT_NO_THREAD
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
177 |
QHostInfo hostInfo = QHostInfoAgent::fromName(name);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
178 |
hostInfo.setLookupId(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
179 |
QScopedPointer<QHostInfoResult> result(new QHostInfoResult);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
180 |
QObject::connect(result.data(), SIGNAL(resultsReady(QHostInfo)),
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
181 |
receiver, member, Qt::QueuedConnection);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
182 |
result.data()->emitResultsReady(hostInfo);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
183 |
#else
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
184 |
QHostInfoRunnable* runnable = new QHostInfoRunnable(name, id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
185 |
QObject::connect(&runnable->resultEmitter, SIGNAL(resultsReady(QHostInfo)), receiver, member, Qt::QueuedConnection);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
186 |
theHostInfoLookupManager()->scheduleLookup(runnable);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
187 |
#endif
|
0
|
188 |
|
|
189 |
return id;
|
|
190 |
}
|
|
191 |
|
|
192 |
/*!
|
|
193 |
Aborts the host lookup with the ID \a id, as returned by lookupHost().
|
|
194 |
|
|
195 |
\sa lookupHost(), lookupId()
|
|
196 |
*/
|
|
197 |
void QHostInfo::abortHostLookup(int id)
|
|
198 |
{
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
199 |
#ifndef QT_NO_THREAD
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
200 |
theHostInfoLookupManager()->abortLookup(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
201 |
#else
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
202 |
// we cannot abort if it was non threaded.. the result signal has already been posted
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
203 |
Q_UNUSED(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
204 |
#endif
|
0
|
205 |
}
|
|
206 |
|
|
207 |
/*!
|
|
208 |
Looks up the IP address(es) for the given host \a name. The
|
|
209 |
function blocks during the lookup which means that execution of
|
|
210 |
the program is suspended until the results of the lookup are
|
|
211 |
ready. Returns the result of the lookup in a QHostInfo object.
|
|
212 |
|
|
213 |
If you pass a literal IP address to \a name instead of a host name,
|
|
214 |
QHostInfo will search for the domain name for the IP (i.e., QHostInfo will
|
|
215 |
perform a \e reverse lookup). On success, the returned QHostInfo will
|
|
216 |
contain both the resolved domain name and IP addresses for the host name.
|
|
217 |
|
|
218 |
\sa lookupHost()
|
|
219 |
*/
|
|
220 |
QHostInfo QHostInfo::fromName(const QString &name)
|
|
221 |
{
|
|
222 |
#if defined QHOSTINFO_DEBUG
|
|
223 |
qDebug("QHostInfo::fromName(\"%s\")",name.toLatin1().constData());
|
|
224 |
#endif
|
|
225 |
|
|
226 |
return QHostInfoAgent::fromName(name);
|
|
227 |
}
|
|
228 |
|
|
229 |
/*!
|
|
230 |
\enum QHostInfo::HostInfoError
|
|
231 |
|
|
232 |
This enum describes the various errors that can occur when trying
|
|
233 |
to resolve a host name.
|
|
234 |
|
|
235 |
\value NoError The lookup was successful.
|
|
236 |
\value HostNotFound No IP addresses were found for the host.
|
|
237 |
\value UnknownError An unknown error occurred.
|
|
238 |
|
|
239 |
\sa error(), setError()
|
|
240 |
*/
|
|
241 |
|
|
242 |
/*!
|
|
243 |
Constructs an empty host info object with lookup ID \a id.
|
|
244 |
|
|
245 |
\sa lookupId()
|
|
246 |
*/
|
|
247 |
QHostInfo::QHostInfo(int id)
|
|
248 |
: d(new QHostInfoPrivate)
|
|
249 |
{
|
|
250 |
d->lookupId = id;
|
|
251 |
}
|
|
252 |
|
|
253 |
/*!
|
|
254 |
Constructs a copy of \a other.
|
|
255 |
*/
|
|
256 |
QHostInfo::QHostInfo(const QHostInfo &other)
|
|
257 |
: d(new QHostInfoPrivate(*other.d.data()))
|
|
258 |
{
|
|
259 |
}
|
|
260 |
|
|
261 |
/*!
|
|
262 |
Assigns the data of the \a other object to this host info object,
|
|
263 |
and returns a reference to it.
|
|
264 |
*/
|
|
265 |
QHostInfo &QHostInfo::operator=(const QHostInfo &other)
|
|
266 |
{
|
|
267 |
*d.data() = *other.d.data();
|
|
268 |
return *this;
|
|
269 |
}
|
|
270 |
|
|
271 |
/*!
|
|
272 |
Destroys the host info object.
|
|
273 |
*/
|
|
274 |
QHostInfo::~QHostInfo()
|
|
275 |
{
|
|
276 |
}
|
|
277 |
|
|
278 |
/*!
|
|
279 |
Returns the list of IP addresses associated with hostName(). This
|
|
280 |
list may be empty.
|
|
281 |
|
|
282 |
Example:
|
|
283 |
|
|
284 |
\snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 5
|
|
285 |
|
|
286 |
\sa hostName(), error()
|
|
287 |
*/
|
|
288 |
QList<QHostAddress> QHostInfo::addresses() const
|
|
289 |
{
|
|
290 |
return d->addrs;
|
|
291 |
}
|
|
292 |
|
|
293 |
/*!
|
|
294 |
Sets the list of addresses in this QHostInfo to \a addresses.
|
|
295 |
|
|
296 |
\sa addresses()
|
|
297 |
*/
|
|
298 |
void QHostInfo::setAddresses(const QList<QHostAddress> &addresses)
|
|
299 |
{
|
|
300 |
d->addrs = addresses;
|
|
301 |
}
|
|
302 |
|
|
303 |
/*!
|
|
304 |
Returns the name of the host whose IP addresses were looked up.
|
|
305 |
|
|
306 |
\sa localHostName()
|
|
307 |
*/
|
|
308 |
QString QHostInfo::hostName() const
|
|
309 |
{
|
|
310 |
return d->hostName;
|
|
311 |
}
|
|
312 |
|
|
313 |
/*!
|
|
314 |
Sets the host name of this QHostInfo to \a hostName.
|
|
315 |
|
|
316 |
\sa hostName()
|
|
317 |
*/
|
|
318 |
void QHostInfo::setHostName(const QString &hostName)
|
|
319 |
{
|
|
320 |
d->hostName = hostName;
|
|
321 |
}
|
|
322 |
|
|
323 |
/*!
|
|
324 |
Returns the type of error that occurred if the host name lookup
|
|
325 |
failed; otherwise returns NoError.
|
|
326 |
|
|
327 |
\sa setError(), errorString()
|
|
328 |
*/
|
|
329 |
QHostInfo::HostInfoError QHostInfo::error() const
|
|
330 |
{
|
|
331 |
return d->err;
|
|
332 |
}
|
|
333 |
|
|
334 |
/*!
|
|
335 |
Sets the error type of this QHostInfo to \a error.
|
|
336 |
|
|
337 |
\sa error(), errorString()
|
|
338 |
*/
|
|
339 |
void QHostInfo::setError(HostInfoError error)
|
|
340 |
{
|
|
341 |
d->err = error;
|
|
342 |
}
|
|
343 |
|
|
344 |
/*!
|
|
345 |
Returns the ID of this lookup.
|
|
346 |
|
|
347 |
\sa setLookupId(), abortHostLookup(), hostName()
|
|
348 |
*/
|
|
349 |
int QHostInfo::lookupId() const
|
|
350 |
{
|
|
351 |
return d->lookupId;
|
|
352 |
}
|
|
353 |
|
|
354 |
/*!
|
|
355 |
Sets the ID of this lookup to \a id.
|
|
356 |
|
|
357 |
\sa lookupId(), lookupHost()
|
|
358 |
*/
|
|
359 |
void QHostInfo::setLookupId(int id)
|
|
360 |
{
|
|
361 |
d->lookupId = id;
|
|
362 |
}
|
|
363 |
|
|
364 |
/*!
|
|
365 |
If the lookup failed, this function returns a human readable
|
|
366 |
description of the error; otherwise "Unknown error" is returned.
|
|
367 |
|
|
368 |
\sa setErrorString(), error()
|
|
369 |
*/
|
|
370 |
QString QHostInfo::errorString() const
|
|
371 |
{
|
|
372 |
return d->errorStr;
|
|
373 |
}
|
|
374 |
|
|
375 |
/*!
|
|
376 |
Sets the human readable description of the error that occurred to \a str
|
|
377 |
if the lookup failed.
|
|
378 |
|
|
379 |
\sa errorString(), setError()
|
|
380 |
*/
|
|
381 |
void QHostInfo::setErrorString(const QString &str)
|
|
382 |
{
|
|
383 |
d->errorStr = str;
|
|
384 |
}
|
|
385 |
|
|
386 |
/*!
|
|
387 |
\fn QString QHostInfo::localHostName()
|
|
388 |
|
|
389 |
Returns the host name of this machine.
|
|
390 |
|
|
391 |
\sa hostName()
|
|
392 |
*/
|
|
393 |
|
|
394 |
/*!
|
|
395 |
\fn QString QHostInfo::localDomainName()
|
|
396 |
|
|
397 |
Returns the DNS domain of this machine.
|
|
398 |
|
|
399 |
Note: DNS domains are not related to domain names found in
|
|
400 |
Windows networks.
|
|
401 |
|
|
402 |
\sa hostName()
|
|
403 |
*/
|
|
404 |
|
3
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
405 |
#ifndef QT_NO_THREAD
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
406 |
QHostInfoRunnable::QHostInfoRunnable(QString hn, int i) : toBeLookedUp(hn), id(i)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
407 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
408 |
setAutoDelete(true);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
409 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
410 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
411 |
// the QHostInfoLookupManager will at some point call this via a QThreadPool
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
412 |
void QHostInfoRunnable::run()
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
413 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
414 |
QHostInfoLookupManager *manager = theHostInfoLookupManager();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
415 |
// check aborted
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
416 |
if (manager->wasAborted(id)) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
417 |
manager->lookupFinished(this);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
418 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
419 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
420 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
421 |
// check cache
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
422 |
// FIXME
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
423 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
424 |
// if not in cache: OS lookup
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
425 |
QHostInfo hostInfo = QHostInfoAgent::fromName(toBeLookedUp);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
426 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
427 |
// save to cache
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
428 |
// FIXME
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
429 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
430 |
// check aborted again
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
431 |
if (manager->wasAborted(id)) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
432 |
manager->lookupFinished(this);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
433 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
434 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
435 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
436 |
// signal emission
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
437 |
hostInfo.setLookupId(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
438 |
resultEmitter.emitResultsReady(hostInfo);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
439 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
440 |
manager->lookupFinished(this);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
441 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
442 |
// thread goes back to QThreadPool
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
443 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
444 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
445 |
QHostInfoLookupManager::QHostInfoLookupManager() : mutex(QMutex::Recursive), wasDeleted(false)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
446 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
447 |
moveToThread(QCoreApplicationPrivate::mainThread());
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
448 |
threadPool.setMaxThreadCount(5); // do 5 DNS lookups in parallel
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
449 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
450 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
451 |
QHostInfoLookupManager::~QHostInfoLookupManager()
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
452 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
453 |
wasDeleted = true;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
454 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
455 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
456 |
void QHostInfoLookupManager::work()
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
457 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
458 |
if (wasDeleted)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
459 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
460 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
461 |
// goals of this function:
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
462 |
// - launch new lookups via the thread pool
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
463 |
// - make sure only one lookup per host/IP is in progress
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
464 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
465 |
QMutexLocker locker(&mutex);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
466 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
467 |
if (!finishedLookups.isEmpty()) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
468 |
// remove ID from aborted if it is in there
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
469 |
for (int i = 0; i < finishedLookups.length(); i++) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
470 |
abortedLookups.removeAll(finishedLookups.at(i)->id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
471 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
472 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
473 |
finishedLookups.clear();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
474 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
475 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
476 |
if (!postponedLookups.isEmpty()) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
477 |
// try to start the postponed ones
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
478 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
479 |
QMutableListIterator<QHostInfoRunnable*> iterator(postponedLookups);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
480 |
while (iterator.hasNext()) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
481 |
QHostInfoRunnable* postponed = iterator.next();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
482 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
483 |
// check if none of the postponed hostnames is currently running
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
484 |
bool alreadyRunning = false;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
485 |
for (int i = 0; i < currentLookups.length(); i++) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
486 |
if (currentLookups.at(i)->toBeLookedUp == postponed->toBeLookedUp) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
487 |
alreadyRunning = true;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
488 |
break;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
489 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
490 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
491 |
if (!alreadyRunning) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
492 |
iterator.remove();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
493 |
scheduledLookups.prepend(postponed); // prepend! we want to finish it ASAP
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
494 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
495 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
496 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
497 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
498 |
if (!scheduledLookups.isEmpty()) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
499 |
// try to start the new ones
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
500 |
QMutableListIterator<QHostInfoRunnable*> iterator(scheduledLookups);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
501 |
while (iterator.hasNext()) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
502 |
QHostInfoRunnable *scheduled = iterator.next();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
503 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
504 |
// check if a lookup for this host is already running, then postpone
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
505 |
for (int i = 0; i < currentLookups.size(); i++) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
506 |
if (currentLookups.at(i)->toBeLookedUp == scheduled->toBeLookedUp) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
507 |
iterator.remove();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
508 |
postponedLookups.append(scheduled);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
509 |
scheduled = 0;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
510 |
break;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
511 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
512 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
513 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
514 |
if (scheduled && threadPool.tryStart(scheduled)) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
515 |
// runnable now running in new thread, track this in currentLookups
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
516 |
iterator.remove();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
517 |
currentLookups.append(scheduled);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
518 |
} else if (scheduled) {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
519 |
// wanted to start, but could not because thread pool is busy
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
520 |
break;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
521 |
} else {
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
522 |
// was postponed, continue iterating
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
523 |
continue;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
524 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
525 |
};
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
526 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
527 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
528 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
529 |
// called by QHostInfo
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
530 |
void QHostInfoLookupManager::scheduleLookup(QHostInfoRunnable *r)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
531 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
532 |
if (wasDeleted)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
533 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
534 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
535 |
QMutexLocker locker(&this->mutex);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
536 |
scheduledLookups.enqueue(r);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
537 |
work();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
538 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
539 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
540 |
// called by QHostInfo
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
541 |
void QHostInfoLookupManager::abortLookup(int id)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
542 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
543 |
if (wasDeleted)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
544 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
545 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
546 |
QMutexLocker locker(&this->mutex);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
547 |
if (!abortedLookups.contains(id))
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
548 |
abortedLookups.append(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
549 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
550 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
551 |
// called from QHostInfoRunnable
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
552 |
bool QHostInfoLookupManager::wasAborted(int id)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
553 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
554 |
if (wasDeleted)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
555 |
return true;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
556 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
557 |
QMutexLocker locker(&this->mutex);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
558 |
return abortedLookups.contains(id);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
559 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
560 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
561 |
// called from QHostInfoRunnable
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
562 |
void QHostInfoLookupManager::lookupFinished(QHostInfoRunnable *r)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
563 |
{
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
564 |
if (wasDeleted)
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
565 |
return;
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
566 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
567 |
QMutexLocker locker(&this->mutex);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
568 |
currentLookups.removeOne(r);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
569 |
finishedLookups.append(r);
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
570 |
work();
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
571 |
}
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
572 |
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
573 |
#endif // QT_NO_THREAD
|
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
diff
changeset
|
574 |
|
0
|
575 |
QT_END_NAMESPACE
|