Skip to content

Commit 28e210b

Browse files
committed
fix qgis-server crash moving QCursor to the GUI classes (follow 454c732)
1 parent 4a44daa commit 28e210b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/core/symbology-ng/qgssvgcache.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,10 @@ QByteArray QgsSvgCache::getImageData( const QString &path ) const
265265

266266
// wait until the image download finished
267267
// TODO: connect to the reply->finished() signal
268-
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
269268
while ( !reply->isFinished() )
270269
{
271270
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents, 500 );
272271
}
273-
QApplication::restoreOverrideCursor();
274272

275273
if ( reply->error() != QNetworkReply::NoError )
276274
{

src/gui/symbology-ng/qgssymbollayerv2widget.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#include <QAbstractButton>
3535
#include <QColorDialog>
36+
#include <QCursor>
3637
#include <QDir>
3738
#include <QFileDialog>
3839
#include <QPainter>
@@ -801,7 +802,11 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mFileLineEdit_editingFinished()
801802
return;
802803
}
803804
}
805+
806+
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
804807
mLayer->setPath( mFileLineEdit->text() );
808+
QApplication::restoreOverrideCursor();
809+
805810
setGuiForSvg( mLayer );
806811
emit changed();
807812
}
@@ -994,7 +999,11 @@ void QgsSVGFillSymbolLayerWidget::on_mSVGLineEdit_editingFinished()
994999
return;
9951000
}
9961001
}
1002+
1003+
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
9971004
mLayer->setSvgFilePath( mSVGLineEdit->text() );
1005+
QApplication::restoreOverrideCursor();
1006+
9981007
updateParamGui();
9991008
emit changed();
10001009
}

0 commit comments

Comments
 (0)