Skip to content
Permalink
Browse files
use wait cursor in blocking http transactions
git-svn-id: http://svn.osgeo.org/qgis/trunk@7348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 7, 2007
1 parent c297131 commit d31849bbdcfe7fc289bd7853fb86d1b1197ac3ca
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 d31849b

Please sign in to comment.