Skip to content

Commit 81ef171

Browse files
committed
[GRASS] non blocking raster import stream on win
1 parent aeb0e71 commit 81ef171

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/providers/grass/qgis.r.in.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extern "C"
6666
// http://lists.qt-project.org/pipermail/interest/2012-May/002110.html
6767
// http://lists.qt-project.org/pipermail/interest/2012-May/002117.html
6868
// TODO: This is just test if it works on Windows
69-
QByteArray readData( QFile & file, quint32 size )
69+
QByteArray readData( QFile & file, qint32 size )
7070
{
7171
QByteArray byteArray;
7272
forever
@@ -233,8 +233,10 @@ int main( int argc, char **argv )
233233
}
234234
G_put_raster_row( cf, buf, grass_type );
235235

236+
#ifndef Q_OS_WIN
236237
stdoutStream << ( bool )true; // row written
237238
stdoutFile.flush();
239+
#endif
238240
}
239241
//G_fatal_error( "%s", msg.toAscii().data() );
240242

src/providers/grass/qgsgrassimport.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,12 @@ bool QgsGrassRasterImport::import()
264264
outStream << false; // not canceled
265265
outStream << byteArray;
266266

267+
#ifndef Q_OS_WIN
267268
// wait until the row is written to allow quick cancel (don't send data to buffer)
268269
process->waitForReadyRead();
269270
bool result;
270271
outStream >> result;
272+
#endif
271273
}
272274
delete block;
273275
if ( isCanceled() )

0 commit comments

Comments
 (0)