Skip to content

Commit

Permalink
use wait cursor in blocking http transactions
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 7, 2007
1 parent ca3c0e2 commit b0084e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/qgshttptransaction.cpp
Expand Up @@ -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.");

Expand Down

0 comments on commit b0084e5

Please sign in to comment.