[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kphotoalbum/kf5-port] Utilities: Fixed compilation of Utils/Util.cpp
From: Tobias Leupold <tobias.leupold () web ! de>
Date: 2016-04-15 13:31:01
Message-ID: E1ar3pt-0000qp-4T () scm ! kde ! org
[Download RAW message or body]
Git commit ac528a48cd217c6e837145777b204a3af2919026 by Tobias Leupold.
Committed on 15/04/2016 at 13:30.
Pushed by tleupold into branch 'kf5-port'.
Fixed compilation of Utils/Util.cpp
M +6 -4 Utilities/Util.cpp
http://commits.kde.org/kphotoalbum/ac528a48cd217c6e837145777b204a3af2919026
diff --git a/Utilities/Util.cpp b/Utilities/Util.cpp
index 25d40f0..53710d6 100644
--- a/Utilities/Util.cpp
+++ b/Utilities/Util.cpp
@@ -22,6 +22,8 @@
#include "ImageManager/ImageDecoder.h"
#include <klocale.h>
#include <qfileinfo.h>
+#include <KUrl>
+#include <KMD5>
#include <QtCore/QVector>
#include <QList>
@@ -436,7 +438,7 @@ bool Utilities::copy( const QString& from, const QString& to )
bool Utilities::makeHardLink( const QString& from, const QString& to )
{
- if (link(from.toLocal8Bit(), to.toLocal8Bit()) != 0)
+ if (link(from.toLocal8Bit().constData(), to.toLocal8Bit().constData()) != 0)
return false;
else
return true;
@@ -444,7 +446,7 @@ bool Utilities::makeHardLink( const QString& from, const QString& \
to )
bool Utilities::makeSymbolicLink( const QString& from, const QString& to )
{
- if (symlink(from.toLocal8Bit(), to.toLocal8Bit()) != 0)
+ if (symlink(from.toLocal8Bit().constData(), to.toLocal8Bit().constData()) != 0)
return false;
else
return true;
@@ -512,7 +514,7 @@ namespace Utilities
bool Utilities::loadJPEG(QImage *img, const DB::FileName& imageFile, QSize* \
fullSize, int dim) {
- FILE* inputFile=fopen( QFile::encodeName(imageFile.absolute()), "rb");
+ FILE* inputFile=fopen( QFile::encodeName(imageFile.absolute()).constData(), \
"rb"); if(!inputFile)
return false;
bool ok = loadJPEG( img, inputFile, fullSize, dim );
@@ -664,7 +666,7 @@ void Utilities::deleteDemo()
QString dir = QString::fromLatin1( "%1/kphotoalbum-demo-%2" \
).arg(QDir::tempPath()).arg(QString::fromLocal8Bit( qgetenv( "LOGNAME" ) ) ); KUrl \
url; url.setPath( dir );
- (void) KIO::NetAccess::del( dir, MainWindow::Window::theMainWindow() );
+ (void) KIO::NetAccess::del( url, MainWindow::Window::theMainWindow() );
}
QString Utilities::stripImageDirectory( const QString& fileName )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic