r14691 by fschmid - Made the picbrowser a bit more stable, still it tends to crash when reading dirs.
scribus-commit
scribus-commit at lists.scribus.net
Fri Feb 12 20:40:45 CET 2010
Revision: 14691
Author: fschmid
Date: 2010-02-12T19:39:12.058435Z
Commit message: Made the picbrowser a bit more stable, still it tends to crash when reading dirs.
Changeset:
M /trunk/Scribus/scribus/plugins/picbrowser/findimage.h
M /trunk/Scribus/scribus/plugins/picbrowser/CMakeLists.txt
M /trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
M /trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp
Diffs:
Index: scribus/plugins/picbrowser/picturebrowser.cpp
===================================================================
--- scribus/plugins/picbrowser/picturebrowser.cpp (revision 14690)
+++ scribus/plugins/picbrowser/picturebrowser.cpp (revision 14691)
@@ -588,7 +588,7 @@
if ( !fit )
{
fit = new findImagesThread ( currPath, nameFilters, QDir::Name, folderBrowserIncludeSubdirs );
- connect ( fit, SIGNAL ( finished() ), this, SLOT ( findImagesThreadFinished() ) );
+ connect ( fit, SIGNAL ( finished() ), this, SLOT ( findImagesThreadFinished() ), Qt::QueuedConnection );
fit->start();
}
else
@@ -680,7 +680,7 @@
//maybe the state of folderBrowserIncludeSubdirs needs to be saved when canceling the old thread
fit = new findImagesThread ( currPath, nameFilters, QDir::Name, folderBrowserIncludeSubdirs );
- connect ( fit, SIGNAL ( finished() ), this, SLOT ( findImagesThreadFinished() ) );
+ connect ( fit, SIGNAL ( finished() ), this, SLOT ( findImagesThreadFinished() ), Qt::QueuedConnection );
fit->start();
}
else
Index: scribus/plugins/picbrowser/loadimage.cpp
===================================================================
--- scribus/plugins/picbrowser/loadimage.cpp (revision 14690)
+++ scribus/plugins/picbrowser/loadimage.cpp (revision 14691)
@@ -47,9 +47,9 @@
qRegisterMetaType<ImageInformation *> ( "ImageInformation*" );
qRegisterMetaType<QImage> ( "QImage" );
- connect ( &help, SIGNAL ( imageLoaded ( int, const QImage, ImageInformation*, int ) ), pModel, SLOT ( processLoadedImage ( int, const QImage, ImageInformation*, int ) ) );
- connect ( &help, SIGNAL ( imageLoadError ( int, int, int ) ), pModel, SLOT ( processImageLoadError ( int, int, int ) ) );
- connect ( pictureBrowser, SIGNAL ( loadImageJob ( int, QString, int, int ) ), &help, SLOT ( processLoadImageJob ( int, QString, int, int ) ) );
+ connect(&help, SIGNAL(imageLoaded(int, const QImage, ImageInformation*, int) ), pModel, SLOT(processLoadedImage(int, const QImage, ImageInformation*, int)), Qt::QueuedConnection);
+ connect(&help, SIGNAL(imageLoadError(int, int, int)), pModel, SLOT(processImageLoadError(int, int, int)), Qt::QueuedConnection);
+ connect(pictureBrowser, SIGNAL(loadImageJob(int, QString, int, int)), &help, SLOT(processLoadImageJob(int, QString, int, int)), Qt::QueuedConnection);
exec();
}
Index: scribus/plugins/picbrowser/findimage.h
===================================================================
--- scribus/plugins/picbrowser/findimage.h (revision 14690)
+++ scribus/plugins/picbrowser/findimage.h (revision 14691)
@@ -27,6 +27,8 @@
//thread to search images in a folder and subfolders
class findImagesThread : public QThread
{
+ Q_OBJECT
+
public:
//parameters:
//const QString& path2: path to be searched
Index: scribus/plugins/picbrowser/CMakeLists.txt
===================================================================
--- scribus/plugins/picbrowser/CMakeLists.txt (revision 14690)
+++ scribus/plugins/picbrowser/CMakeLists.txt (revision 14691)
@@ -10,6 +10,7 @@
SET(PICTUREBROWSER_PLUGIN_MOC_CLASSES
collection.h
+findimage.h
imagedialog.h
loadimage.h
multicombobox.h
More information about the scribus-commit
mailing list