[Kde-imaging] extragear/libs/kipi-plugins/rawconverter
Gilles Caulier
caulier.gilles at gmail.com
Sat Sep 22 01:31:31 CEST 2007
SVN commit 715371 by cgilles:
kipi-plugins from trunk : RawConverter is fully ported to KDE4/QT4/CMake
CCMAIL: digikam-devel at kde.org
CCMAIL: kde-imaging at kde.org
M +1 -1 actions.h
M +23 -24 actionthread.cpp
M +3 -3 mtqueue.h
--- trunk/extragear/libs/kipi-plugins/rawconverter/actions.h #715370:715371
@@ -41,7 +41,7 @@
PROCESS
};
-class EventData : QEvent
+class EventData : public QEvent
{
public:
--- trunk/extragear/libs/kipi-plugins/rawconverter/actionthread.cpp #715370:715371
@@ -34,9 +34,8 @@
// Qt includes.
-#include <qapplication.h>
-#include <qdir.h>
-#include <qdeepcopy.h>
+#include <QApplication>
+#include <QDir>
// KDE includes.
@@ -67,35 +66,35 @@
wait();
}
-void ActionThread::identifyRawFile(const KURL& url, bool full)
+void ActionThread::identifyRawFile(const KUrl& url, bool full)
{
- KURL::List oneFile;
+ KUrl::List oneFile;
oneFile.append(url);
identifyRawFiles(oneFile, full);
}
-void ActionThread::identifyRawFiles(const KURL::List& urlList, bool full)
+void ActionThread::identifyRawFiles(const KUrl::List& urlList, bool full)
{
- for (KURL::List::const_iterator it = urlList.begin();
+ for (KUrl::List::const_iterator it = urlList.begin();
it != urlList.end(); ++it )
{
Task *t = new Task;
- t->filePath = QDeepCopy<QString>((*it).path()); //deep copy
+ t->filePath = (*it).path();
t->action = full ? IDENTIFY_FULL : IDENTIFY;
m_taskQueue.enqueue(t);
}
}
-void ActionThread::processRawFile(const KURL& url)
+void ActionThread::processRawFile(const KUrl& url)
{
- KURL::List oneFile;
+ KUrl::List oneFile;
oneFile.append(url);
processRawFiles(oneFile);
}
-void ActionThread::processHalfRawFile(const KURL& url)
+void ActionThread::processHalfRawFile(const KUrl& url)
{
- KURL::List oneFile;
+ KUrl::List oneFile;
oneFile.append(url);
processHalfRawFiles(oneFile);
}
@@ -107,13 +106,13 @@
m_outputFormat = outputFormat;
}
-void ActionThread::processRawFiles(const KURL::List& urlList)
+void ActionThread::processRawFiles(const KUrl::List& urlList)
{
- for (KURL::List::const_iterator it = urlList.begin();
+ for (KUrl::List::const_iterator it = urlList.begin();
it != urlList.end(); ++it )
{
Task *t = new Task;
- t->filePath = QDeepCopy<QString>((*it).path()); //deep copy
+ t->filePath = (*it).path();
t->outputFormat = m_outputFormat;
t->decodingSettings = m_rawDecodingSettings;
t->action = PROCESS;
@@ -121,13 +120,13 @@
}
}
-void ActionThread::processHalfRawFiles(const KURL::List& urlList)
+void ActionThread::processHalfRawFiles(const KUrl::List& urlList)
{
- for (KURL::List::const_iterator it = urlList.begin();
+ for (KUrl::List::const_iterator it = urlList.begin();
it != urlList.end(); ++it )
{
Task *t = new Task;
- t->filePath = QDeepCopy<QString>((*it).path()); //deep copy
+ t->filePath = (*it).path(); //deep copy
t->outputFormat = m_outputFormat;
t->decodingSettings = m_rawDecodingSettings;
t->action = PREVIEW;
@@ -178,7 +177,7 @@
if (info.dateTime.isValid())
{
identify.append(i18n("Created: %1\n")
- .arg(KGlobal::locale()->formatDateTime(info.dateTime, true, true)));
+ .arg(KGlobal::locale()->formatDateTime(info.dateTime, KLocale::ShortDate, true)));
}
if (info.aperture != -1.0)
@@ -209,7 +208,7 @@
r->image = image;
r->message = identify;
r->success = true;
- QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r));
+ QApplication::postEvent(m_parent, r);
break;
}
@@ -218,7 +217,7 @@
d->action = PREVIEW;
d->filePath = t->filePath;
d->starting = true;
- QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d));
+ QApplication::postEvent(m_parent, d);
QString destPath;
bool result = m_dcrawIface.decodeHalfRAWImage(t->filePath, destPath,
@@ -229,7 +228,7 @@
r->filePath = t->filePath;
r->destPath = destPath;
r->success = result;
- QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r));
+ QApplication::postEvent(m_parent, r);
break;
}
@@ -238,7 +237,7 @@
d->action = PROCESS;
d->filePath = t->filePath;
d->starting = true;
- QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d));
+ QApplication::postEvent(m_parent, d);
QString destPath;
bool result = m_dcrawIface.decodeRAWImage(t->filePath, destPath,
@@ -249,7 +248,7 @@
r->filePath = t->filePath;
r->destPath = destPath;
r->success = result;
- QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r));
+ QApplication::postEvent(m_parent, r);
break;
}
--- trunk/extragear/libs/kipi-plugins/rawconverter/mtqueue.h #715370:715371
@@ -25,7 +25,7 @@
// Qt includes.
-#include <QQueue>
+#include <Q3PtrQueue>
#include <QMutex>
namespace KIPIRawConverterPlugin
@@ -78,8 +78,8 @@
private:
- QQueue<Type> m_queue;
- QMutex m_mutex;
+ Q3PtrQueue<Type> m_queue;
+ QMutex m_mutex;
};
} // NameSpace KIPIRawConverterPlugin
More information about the Kde-imaging
mailing list