diff options
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 16 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 18 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_symbian.cpp | 38 |
3 files changed, 36 insertions, 36 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 3413c9b..a16d4ca 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE #ifndef Q_OS_SYMBIAN Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager) #else -Q_GLOBAL_STATIC(QSymbianHostInfoLookupManger, theHostInfoLookupManager) +Q_GLOBAL_STATIC(QSymbianHostInfoLookupManager, theHostInfoLookupManager) #endif /*! @@ -202,7 +202,7 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver, manager->scheduleLookup(runnable); } #else - QSymbianHostInfoLookupManger *manager = theHostInfoLookupManager(); + QSymbianHostInfoLookupManager *manager = theHostInfoLookupManager(); if (manager) { // the application is still alive @@ -267,7 +267,7 @@ QHostInfo QHostInfo::fromName(const QString &name) #endif QHostInfo hostInfo = QHostInfoAgent::fromName(name); - QAbstractHostInfoLookupManger* manager = theHostInfoLookupManager(); + QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); manager->cache.put(name, hostInfo); return hostInfo; } @@ -280,7 +280,7 @@ QHostInfo QHostInfoPrivate::fromName(const QString &name, QSharedPointer<QNetwor #endif QHostInfo hostInfo = QHostInfoAgent::fromName(name, session); - QAbstractHostInfoLookupManger* manager = theHostInfoLookupManager(); + QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); manager->cache.put(name, hostInfo); return hostInfo; } @@ -707,7 +707,7 @@ QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *id = -1; // check cache - QAbstractHostInfoLookupManger* manager = theHostInfoLookupManager(); + QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); if (manager && manager->cache.isEnabled()) { QHostInfo info = manager->cache.get(name, valid); if (*valid) { @@ -724,7 +724,7 @@ QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char void qt_qhostinfo_clear_cache() { - QAbstractHostInfoLookupManger* manager = theHostInfoLookupManager(); + QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); if (manager) { manager->clear(); } @@ -732,7 +732,7 @@ void qt_qhostinfo_clear_cache() void Q_AUTOTEST_EXPORT qt_qhostinfo_enable_cache(bool e) { - QAbstractHostInfoLookupManger* manager = theHostInfoLookupManager(); + QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); if (manager) { manager->cache.setEnabled(e); } @@ -800,7 +800,7 @@ void QHostInfoCache::clear() cache.clear(); } -QAbstractHostInfoLookupManger* QAbstractHostInfoLookupManger::globalInstance() +QAbstractHostInfoLookupManager* QAbstractHostInfoLookupManager::globalInstance() { return theHostInfoLookupManager(); } diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index ceec04d..bae6efa 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -172,24 +172,24 @@ public: }; -class QAbstractHostInfoLookupManger : public QObject +class QAbstractHostInfoLookupManager : public QObject { Q_OBJECT public: - ~QAbstractHostInfoLookupManger() {} + ~QAbstractHostInfoLookupManager() {} virtual void clear() = 0; QHostInfoCache cache; protected: - QAbstractHostInfoLookupManger() {} - static QAbstractHostInfoLookupManger* globalInstance(); + QAbstractHostInfoLookupManager() {} + static QAbstractHostInfoLookupManager* globalInstance(); }; #ifndef Q_OS_SYMBIAN -class QHostInfoLookupManager : public QAbstractHostInfoLookupManger +class QHostInfoLookupManager : public QAbstractHostInfoLookupManager { Q_OBJECT public: @@ -279,14 +279,14 @@ private: } iState; }; -class QSymbianHostInfoLookupManger : public QAbstractHostInfoLookupManger +class QSymbianHostInfoLookupManager : public QAbstractHostInfoLookupManager { Q_OBJECT public: - QSymbianHostInfoLookupManger(); - ~QSymbianHostInfoLookupManger(); + QSymbianHostInfoLookupManager(); + ~QSymbianHostInfoLookupManager(); - static QSymbianHostInfoLookupManger* globalInstance(); + static QSymbianHostInfoLookupManager* globalInstance(); int id(); void clear(); diff --git a/src/network/kernel/qhostinfo_symbian.cpp b/src/network/kernel/qhostinfo_symbian.cpp index a38a845..ded2416 100644 --- a/src/network/kernel/qhostinfo_symbian.cpp +++ b/src/network/kernel/qhostinfo_symbian.cpp @@ -221,7 +221,7 @@ QSymbianHostResolver::QSymbianHostResolver(const QString &hostName, int identifi QSymbianHostResolver::~QSymbianHostResolver() { #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::~QSymbianHostResolver" << id(); + qDebug() << "QSymbianHostInfoLookupManager::~QSymbianHostResolver" << id(); #endif Cancel(); iHostResolver.Close(); @@ -236,7 +236,7 @@ void QSymbianHostResolver::requestHostLookup() iHostName.toLatin1().constData(), id()); #endif - QSymbianHostInfoLookupManger *manager = QSymbianHostInfoLookupManger::globalInstance(); + QSymbianHostInfoLookupManager *manager = QSymbianHostInfoLookupManager::globalInstance(); if (manager->cache.isEnabled()) { //check if name has been put in the cache while this request was queued bool valid; @@ -360,7 +360,7 @@ void QSymbianHostResolver::returnResults() #endif iState = EIdle; - QSymbianHostInfoLookupManger *manager = QSymbianHostInfoLookupManger::globalInstance(); + QSymbianHostInfoLookupManager *manager = QSymbianHostInfoLookupManager::globalInstance(); if (manager->cache.isEnabled()) { manager->cache.put(iHostName, iResults); } @@ -376,7 +376,7 @@ TInt QSymbianHostResolver::RunError(TInt aError) QT_TRY { iState = EIdle; - QSymbianHostInfoLookupManger *manager = QSymbianHostInfoLookupManger::globalInstance(); + QSymbianHostInfoLookupManager *manager = QSymbianHostInfoLookupManager::globalInstance(); manager->lookupFinished(this); setError_helper(iResults, aError); @@ -448,19 +448,19 @@ int QSymbianHostResolver::id() return iResults.lookupId(); } -QSymbianHostInfoLookupManger::QSymbianHostInfoLookupManger() +QSymbianHostInfoLookupManager::QSymbianHostInfoLookupManager() { } -QSymbianHostInfoLookupManger::~QSymbianHostInfoLookupManger() +QSymbianHostInfoLookupManager::~QSymbianHostInfoLookupManager() { } -void QSymbianHostInfoLookupManger::clear() +void QSymbianHostInfoLookupManager::clear() { QMutexLocker locker(&mutex); #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::clear" << QThread::currentThreadId(); + qDebug() << "QSymbianHostInfoLookupManager::clear" << QThread::currentThreadId(); #endif //TODO: these aren't deleted because of thread unsafety, but that is a behaviour difference //qDeleteAll(iCurrentLookups); @@ -468,12 +468,12 @@ void QSymbianHostInfoLookupManger::clear() cache.clear(); } -void QSymbianHostInfoLookupManger::lookupFinished(QSymbianHostResolver *r) +void QSymbianHostInfoLookupManager::lookupFinished(QSymbianHostResolver *r) { QMutexLocker locker(&mutex); #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::lookupFinished" << QThread::currentThreadId() << r->id() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); + qDebug() << "QSymbianHostInfoLookupManager::lookupFinished" << QThread::currentThreadId() << r->id() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); #endif // remove finished lookup from array and destroy TInt count = iCurrentLookups.count(); @@ -487,10 +487,10 @@ void QSymbianHostInfoLookupManger::lookupFinished(QSymbianHostResolver *r) runNextLookup(); } -void QSymbianHostInfoLookupManger::runNextLookup() +void QSymbianHostInfoLookupManager::runNextLookup() { #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::runNextLookup" << QThread::currentThreadId() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); + qDebug() << "QSymbianHostInfoLookupManager::runNextLookup" << QThread::currentThreadId() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); #endif // check to see if there are any scheduled lookups if (iScheduledLookups.count() > 0) { @@ -503,12 +503,12 @@ void QSymbianHostInfoLookupManger::runNextLookup() } // called from QHostInfo -void QSymbianHostInfoLookupManger::scheduleLookup(QSymbianHostResolver* r) +void QSymbianHostInfoLookupManager::scheduleLookup(QSymbianHostResolver* r) { QMutexLocker locker(&mutex); #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::scheduleLookup" << QThread::currentThreadId() << r->id() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); + qDebug() << "QSymbianHostInfoLookupManager::scheduleLookup" << QThread::currentThreadId() << r->id() << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); #endif // Check to see if we have space on the current lookups pool. if (iCurrentLookups.count() >= KMaxConcurrentLookups) { @@ -527,12 +527,12 @@ void QSymbianHostInfoLookupManger::scheduleLookup(QSymbianHostResolver* r) } } -void QSymbianHostInfoLookupManger::abortLookup(int id) +void QSymbianHostInfoLookupManager::abortLookup(int id) { QMutexLocker locker(&mutex); #if defined(QHOSTINFO_DEBUG) - qDebug() << "QSymbianHostInfoLookupManger::abortLookup" << QThread::currentThreadId() << id << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); + qDebug() << "QSymbianHostInfoLookupManager::abortLookup" << QThread::currentThreadId() << id << "current" << iCurrentLookups.count() << "queued" << iScheduledLookups.count(); #endif int i = 0; // Find the aborted lookup by ID. @@ -557,10 +557,10 @@ void QSymbianHostInfoLookupManger::abortLookup(int id) } } -QSymbianHostInfoLookupManger* QSymbianHostInfoLookupManger::globalInstance() +QSymbianHostInfoLookupManager* QSymbianHostInfoLookupManager::globalInstance() { - return static_cast<QSymbianHostInfoLookupManger*> - (QAbstractHostInfoLookupManger::globalInstance()); + return static_cast<QSymbianHostInfoLookupManager*> + (QAbstractHostInfoLookupManager::globalInstance()); } QT_END_NAMESPACE |