[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kphotoalbum/kf5-port] /: Get rid of some KStandardDirs usage.
From: Tobias Leupold <tobias.leupold () web ! de>
Date: 2016-04-18 18:25:45
Message-ID: E1asDrl-0001hO-8a () scm ! kde ! org
[Download RAW message or body]
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 <blackie@kde.org>
+/* Copyright (C) 2003-2016 Jesper K. Pedersen <blackie@kde.org>
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 <QDebug>
#include <QDomDocument>
#include <QMimeDatabase>
+#include <QStandardPaths>
#include <KConfig>
#include <KConfigGroup>
@@ -35,7 +36,6 @@
#include <KLocalizedString>
#include <KMessageBox>
#include <KRun>
-#include <kstandarddirs.h>
#include <DB/CategoryCollection.h>
#include <DB/ImageDB.h>
@@ -58,9 +58,9 @@ HTMLGenerator::Generator::Generator( const Setup& setup, \
QWidget* parent ) setLabelText( i18n("Generating images for HTML page ") \
); m_setup = setup;
m_eventLoop = new QEventLoop;
- m_avconv = KStandardDirs::findExe( QString::fromLatin1( "avconv" ) );
+ m_avconv = QStandardPaths::findExecutable(QString::fromUtf8("avconv"));
if ( m_avconv.isNull() )
- m_avconv = KStandardDirs::findExe( QString::fromLatin1( "ffmpeg" ) \
); + m_avconv = \
QStandardPaths::findExecutable(QString::fromUtf8("ffmpeg")); }
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 <blackie@kde.org>
+/* Copyright (C) 2003-2016 Jesper K. Pedersen <blackie@kde.org>
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 <QStandardPaths>
#include <QStringMatcher>
#include <QVBoxLayout>
+#include <QStandardPaths>
#include <KConfig>
#include <KConfigGroup>
@@ -39,7 +40,6 @@
#include <KIO/NetAccess>
#include <KLocalizedString>
#include <KMessageBox>
-#include <kstandarddirs.h>
#include <KTextEdit>
#include <DB/CategoryCollection.h>
@@ -124,12 +124,12 @@ void HTMLDialog::createContentPage()
m_html5Video->setChecked( \
Settings::SettingsData::instance()->HTML5Video() ); lay1->addWidget( \
m_html5Video );
- QString avconv = KStandardDirs::findExe( QString::fromLatin1( "avconv" \
) );
- const QString ffmpeg2theora = \
KStandardDirs::findExe(QString::fromLatin1("ffmpeg2theora")); + QString \
avconv = QStandardPaths::findExecutable(QString::fromUtf8("avconv")); + \
const QString ffmpeg2theora = \
QStandardPaths::findExecutable(QString::fromUtf8("ffmpeg2theora"));
- KStandardDirs::findExe( QString::fromLatin1( "avconv" ) );
+ QStandardPaths::findExecutable(QString::fromUtf8("avconv"));
if ( avconv.isNull() )
- avconv = KStandardDirs::findExe( QString::fromLatin1( "ffmpeg" ) \
); + avconv = \
QStandardPaths::findExecutable(QString::fromUtf8("ffmpeg"));
QString txt = i18n( "<p>This selection will generate video files \
suitable for displaying on web. "
"avconv and ffmpeg2theora are required for video \
file generation.</p>" );
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 <blackie@kde.org>
+/* Copyright (C) 2003-2016 Jesper K. Pedersen <blackie@kde.org>
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 <QPixmap>
#include <QPushButton>
#include <QScrollArea>
+#include <QDir>
#include <KFileDialog>
#include <KLocalizedString>
#include <KMessageBox>
-#include <kstandarddirs.h>
#include <KHelpClient>
#include <DB/ImageInfo.h>
@@ -306,7 +306,7 @@ void ImportDialog::next()
if ( !QFileInfo( dir ).exists() ) {
int answer = KMessageBox::questionYesNo( this, i18n("Directory \
%1 does not exist. Should it be created?", dir ) ); if ( answer == \
KMessageBox::Yes ) {
- bool ok = KStandardDirs::makeDir( dir );
+ bool ok = QDir().mkpath(dir);
if ( !ok ) {
KMessageBox::error( this, i18n("Error creating \
directory %1", dir ) ); return;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic