Git commit eedf0a8efa57b08fd1a74715623aac42cb14b9f1 by Tobias Leupold. Committed on 18/04/2016 at 18:25. Pushed by tleupold into branch 'kf5-port'. Get rid of some KStandardDirs usage. M +4 -4 HTMLGenerator/Generator.cpp M +6 -6 HTMLGenerator/HTMLDialog.cpp M +3 -3 ImportExport/ImportDialog.cpp http://commits.kde.org/kphotoalbum/eedf0a8efa57b08fd1a74715623aac42cb14b9f1 diff --git a/HTMLGenerator/Generator.cpp b/HTMLGenerator/Generator.cpp index f717284..bff2e5a 100644 --- a/HTMLGenerator/Generator.cpp +++ b/HTMLGenerator/Generator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2016 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -28,6 +28,7 @@ #include #include #include +#include = #include #include @@ -35,7 +36,6 @@ #include #include #include -#include = #include #include @@ -58,9 +58,9 @@ HTMLGenerator::Generator::Generator( const Setup& setup, = QWidget* parent ) setLabelText( i18n("Generating images for HTML page ") ); m_setup =3D setup; m_eventLoop =3D new QEventLoop; - m_avconv =3D KStandardDirs::findExe( QString::fromLatin1( "avconv" ) ); + m_avconv =3D QStandardPaths::findExecutable(QString::fromUtf8("avconv"= )); if ( m_avconv.isNull() ) - m_avconv =3D KStandardDirs::findExe( QString::fromLatin1( "ffmpeg"= ) ); + m_avconv =3D QStandardPaths::findExecutable(QString::fromUtf8("ffm= peg")); } = HTMLGenerator::Generator::~Generator() diff --git a/HTMLGenerator/HTMLDialog.cpp b/HTMLGenerator/HTMLDialog.cpp index 53cb377..c90e177 100644 --- a/HTMLGenerator/HTMLDialog.cpp +++ b/HTMLGenerator/HTMLDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2016 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -31,6 +31,7 @@ #include #include #include +#include = #include #include @@ -39,7 +40,6 @@ #include #include #include -#include #include = #include @@ -124,12 +124,12 @@ void HTMLDialog::createContentPage() m_html5Video->setChecked( Settings::SettingsData::instance()->HTML5Vid= eo() ); lay1->addWidget( m_html5Video ); = - QString avconv =3D KStandardDirs::findExe( QString::fromLatin1( "avcon= v" ) ); - const QString ffmpeg2theora =3D KStandardDirs::findExe(QString::fromLa= tin1("ffmpeg2theora")); + QString avconv =3D QStandardPaths::findExecutable(QString::fromUtf8("a= vconv")); + const QString ffmpeg2theora =3D QStandardPaths::findExecutable(QString= ::fromUtf8("ffmpeg2theora")); = - KStandardDirs::findExe( QString::fromLatin1( "avconv" ) ); + QStandardPaths::findExecutable(QString::fromUtf8("avconv")); if ( avconv.isNull() ) - avconv =3D KStandardDirs::findExe( QString::fromLatin1( "ffmpeg" )= ); + avconv =3D QStandardPaths::findExecutable(QString::fromUtf8("ffmpe= g")); = QString txt =3D i18n( "

This selection will generate video files sui= table for displaying on web. " "avconv and ffmpeg2theora are required for video f= ile generation.

" ); diff --git a/ImportExport/ImportDialog.cpp b/ImportExport/ImportDialog.cpp index 53f4f1a..39ae62f 100644 --- a/ImportExport/ImportDialog.cpp +++ b/ImportExport/ImportDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2010 Jesper K. Pedersen +/* Copyright (C) 2003-2016 Jesper K. Pedersen = This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -28,11 +28,11 @@ #include #include #include +#include = #include #include #include -#include #include = #include @@ -306,7 +306,7 @@ void ImportDialog::next() if ( !QFileInfo( dir ).exists() ) { int answer =3D KMessageBox::questionYesNo( this, i18n("Directo= ry %1 does not exist. Should it be created?", dir ) ); if ( answer =3D=3D KMessageBox::Yes ) { - bool ok =3D KStandardDirs::makeDir( dir ); + bool ok =3D QDir().mkpath(dir); if ( !ok ) { KMessageBox::error( this, i18n("Error creating directo= ry %1", dir ) ); return;