Skip to content

Commit

Permalink
fix qgis-server crash moving QCursor to the GUI classes (follow 454c732)
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Nov 27, 2012
1 parent 4a44daa commit 28e210b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/core/symbology-ng/qgssvgcache.cpp
Expand Up @@ -265,12 +265,10 @@ QByteArray QgsSvgCache::getImageData( const QString &path ) const

// wait until the image download finished
// TODO: connect to the reply->finished() signal
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
while ( !reply->isFinished() )
{
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents, 500 );
}
QApplication::restoreOverrideCursor();

if ( reply->error() != QNetworkReply::NoError )
{
Expand Down
9 changes: 9 additions & 0 deletions src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Expand Up @@ -33,6 +33,7 @@

#include <QAbstractButton>
#include <QColorDialog>
#include <QCursor>
#include <QDir>
#include <QFileDialog>
#include <QPainter>
Expand Down Expand Up @@ -801,7 +802,11 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mFileLineEdit_editingFinished()
return;
}
}

QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
mLayer->setPath( mFileLineEdit->text() );
QApplication::restoreOverrideCursor();

setGuiForSvg( mLayer );
emit changed();
}
Expand Down Expand Up @@ -994,7 +999,11 @@ void QgsSVGFillSymbolLayerWidget::on_mSVGLineEdit_editingFinished()
return;
}
}

QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
mLayer->setSvgFilePath( mSVGLineEdit->text() );
QApplication::restoreOverrideCursor();

updateParamGui();
emit changed();
}
Expand Down

0 comments on commit 28e210b

Please sign in to comment.