Skip to content
Permalink
Browse files

use wait cursor in blocking http transactions

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 7, 2007
1 parent ca3c0e2 commit b0084e50c0c2ae765b6ed6a2dc889f1e6df87c4c
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/core/qgshttptransaction.cpp
@@ -138,17 +138,20 @@ bool QgsHttpTransaction::getSynchronously(QByteArray &respondedContent, int redi
QgsDebugMsg("QgsHttpTransaction::getSynchronously: Starting get with id " + QString::number(httpid) + ".");
QgsDebugMsg("QgsHttpTransaction::getSynchronously: Setting httpactive = TRUE");

// let the user know we're going to possibly be taking a while
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));

httpactive = TRUE;

// A little trick to make this function blocking
while ( httpactive )
{
// Do something else, maybe even network processing events
qApp->processEvents();

// TODO: Implement a network timeout
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
}

QApplication::restoreOverrideCursor();

#ifdef QGISDEBUG
QgsDebugMsg("QgsHttpTransaction::getSynchronously: Response received.");

0 comments on commit b0084e5

Please sign in to comment.
You can’t perform that action at this time.