@@ -76,19 +76,22 @@ void ThumbnailSource::run()
7676 args << QLatin1String (" --output=" ) + thumbnailPath << _file;
7777
7878 _process = std::make_unique<QProcess>();
79+ Base::Console ().Log (" Creating thumbnail for %s...\n " , _file.toStdString ());
7980 _process->start (f3d, args);
80-
81- // Since this is running on a non-GUI thread, poll for an interruption request while running
82- // so that external code can kill the process if necessary.
8381 constexpr int checkEveryMs {50 };
84- while (_process->waitForFinished (checkEveryMs)) {
82+ while (! _process->waitForFinished (checkEveryMs)) {
8583 if (QThread::currentThread ()->isInterruptionRequested ()) {
8684 _process->kill ();
85+ break ;
8786 }
8887 }
8988 if (_process->exitCode () != 0 ) {
89+ Base::Console ().Log (" Creating thumbnail for %s failed\n " , _file.toStdString ());
9090 return ;
9191 }
92+ Base::Console ().Log (" Creating thumbnail for %s succeeded, wrote to %s\n " ,
93+ _file.toStdString (),
94+ thumbnailPath.toStdString ());
9295 }
9396
9497 if (QFile thumbnailFile (thumbnailPath); thumbnailFile.exists ()) {
@@ -132,7 +135,7 @@ QStringList getF3DOptions(const QString& f3d)
132135 QStringLiteral (" --load-plugins=occt" ),
133136 QStringLiteral (" --config=thumbnail" ),
134137 QStringLiteral (" --verbose=quiet" ),
135- QStringLiteral (" --resolution=128,128 " ),
138+ QStringLiteral (" --resolution=256,256 " ),
136139 QStringLiteral (" --filename=0" ),
137140 QStringLiteral (" --grid=0" ),
138141 QStringLiteral (" --no-background" ),
0 commit comments