Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 44
Registered: ‎05-22-2013
My Device: Blackberry 10
My Carrier: 02

Re: QtConcurrent Using Member Functions doubts

It is a means for me to communicate the byte data to process from the Image class to the ImageProcessor class.

Highlighted
Developer
Posts: 44
Registered: ‎05-22-2013
My Device: Blackberry 10
My Carrier: 02

Re: QtConcurrent Using Member Functions doubts

Still having problems with QtConcurrent::run

 

console log on debuging. 

 

MsgNak received - resending
Remote target is little-endian
No source file named MapLayer.cpp.
[New pid 174354664 tid 2]
[New pid 174354664 tid 3]
warning: Could not load shared library symbols for libOSUser.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libpanel.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libGSLUser.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for egl14.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for OpenGLES11.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for OpenGLES20.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for 2 libraries, e.g. eglsub-screen.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for eglsub-egl_oem.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for sc-a2xx.so.
Do you need "set solib-search-path" or "set sysroot"?
[New pid 174354664 tid 4]
[New pid 174354664 tid 5]
[New pid 174354664 tid 6]
[New pid 174354664 tid 7]
[New pid 174354664 tid 8]
[New pid 174354664 tid 9]
[New pid 174354664 tid 10]
[New pid 174354664 tid 11]
[Switching to pid 174354664 tid 11]
[New pid 174354664 tid 12]
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0

 I suppose the last six lines should be of interest. This happens when control moves to qtconcurrentrunbase.h.

 

my code snippet for concurrent run job.

 

		ImageLoader * loader = new ImageLoader(imagePath);

	    QFuture<QByteArray> future = QtConcurrent::run(loader, &ImageLoader::startLoading);

	    // Invoke our d slot after 
	    bool ok = connect(&m_loadWatcher, SIGNAL(finished()), this, SLOT(onImageLoadingFinished()));
	    Q_ASSERT(ok);
	    Q_UNUSED(ok);

	    // starts watching the given future
	    m_loadWatcher.setFuture(future);

 

ImageLoader::ImageLoader( QString &file, QObject * parent )
	: QObject(parent)
	, m_file(file)
{

}

QByteArray ImageLoader::startLoading()
{
	if ( ! m_file.open(QIODevice::ReadOnly) ) {
		qDebug() << "could not open file  at path:";
	}

	QByteArray imageData;

	imageData = m_file.readAll();

	return imageData;

	//emit finishedLoaading(imageData);
}