SVN commit 904295 by cgilles:
set progress bar to zero at startup when scancontroller start to work. Marcel, Andi, do not forget "endl" at end of kDebug and kDwarning else sometimes, kdelibs can crash CCMAIL: [hidden email] CCBUG: 179298 M +37 -37 scancontroller.cpp M +2 -3 scancontroller.h --- trunk/extragear/graphics/digikam/digikam/scancontroller.cpp #904294:904295 @@ -7,8 +7,8 @@ * Description : scan pictures interface. * * Copyright (C) 2005-2006 by Tom Albers <[hidden email]> - * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> - * Copyright (C) 2007-2008 by Marcel Wiesweg <[hidden email]> + * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2007-2009 by Marcel Wiesweg <[hidden email]> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -78,47 +78,48 @@ { splash = 0; progressDialog = 0; + scanSuspended = 0; + eventLoop = 0; + showTimer = 0; + idle = false; running = false; needsInitialization = false; needsCompleteScan = false; - scanSuspended = 0; - idle = false; - eventLoop = 0; - showTimer = 0; advice = ScanController::Success; } - bool running; - bool needsInitialization; - bool needsCompleteScan; - int scanSuspended; + bool running; + bool needsInitialization; + bool needsCompleteScan; + bool idle; - QStringList scanTasks; + int scanSuspended; - bool idle; + QStringList scanTasks; - QMutex mutex; - QWaitCondition condVar; + QMutex mutex; + QWaitCondition condVar; - QEventLoop *eventLoop; + QEventLoop *eventLoop; - QTimer *showTimer; + QTimer *showTimer; - QPixmap albumPix; - QPixmap rootPix; - QPixmap actionPix; - QPixmap errorPix; + QPixmap albumPix; + QPixmap rootPix; + QPixmap actionPix; + QPixmap errorPix; - DProgressDlg *progressDialog; + QList<AlbumCopyMoveHint> albumHints; + QList<ItemCopyMoveHint> itemHints; - SplashScreen *splash; + QDateTime lastHintAdded; - ScanController::Advice advice; + DProgressDlg *progressDialog; - QList<AlbumCopyMoveHint> albumHints; - QList<ItemCopyMoveHint> itemHints; - QDateTime lastHintAdded; + SplashScreen *splash; + ScanController::Advice advice; + QPixmap albumPixmap() { if (albumPix.isNull()) @@ -160,7 +161,6 @@ if (setAccessTime) lastHintAdded = current; } - }; class ScanControllerLoadingCacheFileWatch : public ClassicLoadingCacheFileWatch @@ -193,7 +193,7 @@ } ScanController::ScanController() - : d(new ScanControllerPriv) + : d(new ScanControllerPriv) { // create event loop d->eventLoop = new QEventLoop(this); @@ -263,12 +263,12 @@ d->progressDialog = new DProgressDlg(0); d->progressDialog->setInitialSize(QSize(500, 100)); d->progressDialog->setActionListVSBarVisible(false); - d->progressDialog->setWhatsThis( i18n("This shows the progress of the scan. " - "During the scan, all files on disk " - "are registered in a database.") ); + d->progressDialog->setWhatsThis(i18n("This shows the progress of the scan. " + "During the scan, all files on disk " + "are registered in a database.")); d->progressDialog->setMaximum(1); - d->progressDialog->setValue(1); + d->progressDialog->setValue(0); connect(this, SIGNAL(incrementProgressDialog(int)), d->progressDialog, SLOT(incrementMaximum(int))); @@ -356,7 +356,6 @@ d->condVar.wakeAll(); } - void ScanController::run() { while (d->running) @@ -368,17 +367,17 @@ if (d->needsInitialization) { d->needsInitialization = false; - doInit = true; + doInit = true; } else if (d->needsCompleteScan) { d->needsCompleteScan = false; - doScan = true; + doScan = true; } else if (!d->scanTasks.isEmpty() && !d->scanSuspended) { doPartialScan = true; - task = d->scanTasks.takeFirst(); + task = d->scanTasks.takeFirst(); } else { @@ -586,7 +585,8 @@ CollectionLocation location = CollectionManager::instance()->locationForPath(dstPath); if (location.isNull()) { - kWarning(50003) << "hintAtMoveOrCopyOfAlbum: Destination path" << dstPath << "does not point to an available location."; + kWarning(50003) << "hintAtMoveOrCopyOfAlbum: Destination path" << dstPath + << "does not point to an available location." << endl;; return; } QString relativeDstPath = CollectionManager::instance()->album(location, dstPath); --- trunk/extragear/graphics/digikam/digikam/scancontroller.h #904294:904295 @@ -7,8 +7,8 @@ * Description : scan pictures interface. * * Copyright (C) 2005-2006 by Tom Albers <[hidden email]> - * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> - * Copyright (C) 2007-2008 by Marcel Wiesweg <[hidden email]> + * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2007-2009 by Marcel Wiesweg <[hidden email]> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -40,7 +40,6 @@ #include "digikam_export.h" #include "initializationobserver.h" - namespace Digikam { _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
On Thursday 01 January 2009 21:56:23 Gilles Caulier wrote:
> SVN commit 904295 by cgilles: > > set progress bar to zero at startup when scancontroller start to work. > Marcel, Andi, do not forget "endl" at end of kDebug and kDwarning else > sometimes, kdelibs can crash CCMAIL: [hidden email] What are the cases that missing endl would cause crash? Luka _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Luka,
I remember some crash in the past duing missing endl when we have ported digiKam to KDE4. Nice to see that it's now fixed in kdelibs Gilles 2009/1/1, Luka Renko <[hidden email]>: > On Thursday 01 January 2009 21:56:23 Gilles Caulier wrote: >> SVN commit 904295 by cgilles: >> >> set progress bar to zero at startup when scancontroller start to work. >> Marcel, Andi, do not forget "endl" at end of kDebug and kDwarning else >> sometimes, kdelibs can crash CCMAIL: [hidden email] > > Gilles, I think endl is not needed in KDE4 - I think it is now added by > kDebug() itself. > What are the cases that missing endl would cause crash? > > Regards, > Luka > Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |