Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6dcc3f85 authored by Michael Pyne's avatar Michael Pyne

Port away from KTemporaryFile.

parent 2264cba4
......@@ -27,8 +27,8 @@
#include <QPixmapCache>
#include <QByteArray>
#include <QMap>
#include <QTemporaryFile>
#include <ktemporaryfile.h>
#include <kdemacros.h>
#include <kurl.h>
#include <kstandarddirs.h>
......@@ -404,16 +404,16 @@ QPixmap CoverManager::coverFromData(const CoverData &coverData, Size size)
coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, const QString &album)
{
qCDebug(JUK_LOG) << "Adding new pixmap to cover database.\n";
qCDebug(JUK_LOG) << "Adding new pixmap to cover database.";
if(large.isNull()) {
qCDebug(JUK_LOG) << "The pixmap you're trying to add is NULL!\n";
qCDebug(JUK_LOG) << "The pixmap you're trying to add is NULL!";
return NoMatch;
}
KTemporaryFile tempFile;
QTemporaryFile tempFile;
if(!tempFile.open()) {
qCCritical(JUK_LOG) << "Unable to open file for pixmap cover, unable to add cover to DB\n";
qCCritical(JUK_LOG) << "Unable to open file for pixmap cover, unable to add cover to DB";
return NoMatch;
}
......
......@@ -16,12 +16,11 @@
#include "dbuscollectionproxy.h"
#include <QtCore/QStringList>
#include <QtCore/QFile>
#include <QtGui/QPixmap>
#include <QtDBus/QDBusConnection>
#include <KTemporaryFile>
#include <QStringList>
#include <QFile>
#include <QPixmap>
#include <QDBusConnection>
#include <QTemporaryFile>
#include "collectionadaptor.h"
#include "playlistcollection.h"
......@@ -135,9 +134,9 @@ QString DBusCollectionProxy::trackCover(const QString &track)
return QString();
// We have a cover, extract it and save it to a temporary file.
KTemporaryFile tempFile;
QTemporaryFile tempFile;
tempFile.setSuffix(".png");
tempFile.setFileTemplate(QStringLiteral("juk_cover_XXXXXX.png"));
tempFile.setAutoRemove(false);
if(!tempFile.open()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment