Commit 5e04e640 authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

Use ecm_qt_declare_logging_category() cmake macro

This macro was introduced in ECM 5.14.0 and generates logging category
declarations. This removes the necessity of Q_LOGGING_CATEGORY calls in
cpp files. A header with Q_DECLARE_LOGGING_CATEGORY is automatically
generated, so the old logging.h file can be removed.

Also the identifier is now ARK everywhere, so all qCDebug() should be
qCDebug(ARK).

This bumps the required dep version for ECM to 5.14.0.
parent b4867566
......@@ -12,7 +12,7 @@ set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATI
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
find_package(ECM 5.14.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
......@@ -20,6 +20,7 @@ include(KDECMakeSettings)
include(KDECompilerSettings)
include(GenerateExportHeader)
include(FeatureSummary)
include(ECMQtDeclareLoggingCategory)
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
......
......@@ -6,6 +6,11 @@ set(ark_SRCS
mainwindow.cpp
)
ecm_qt_declare_logging_category(ark_SRCS
HEADER ark_debug.h
IDENTIFIER ARK
CATEGORY_NAME ark.main)
# For Mac and Windows.
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-ark.png")
......@@ -42,7 +47,7 @@ install( FILES arkui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/ark )
############ ark_extract_here plugin ###############
set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp ark_debug.cpp)
add_library(extracthere MODULE ${extracthere_SRCS})
kcoreaddons_desktop_to_json(extracthere ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop)
......
......@@ -27,7 +27,7 @@
*/
#include "batchextract.h"
#include "logging.h"
#include "ark_debug.h"
#include "kerfuffle/archive_kerfuffle.h"
#include "kerfuffle/extractiondialog.h"
#include "kerfuffle/jobs.h"
......
......@@ -20,7 +20,7 @@
*/
#include "extractHereDndPlugin.h"
#include "logging.h"
#include "ark_debug.h"
#include "batchextract.h"
#include "kerfuffle/archive_kerfuffle.h"
......@@ -31,8 +31,6 @@
#include <kfileitemlistproperties.h>
#include <KLocalizedString>
Q_LOGGING_CATEGORY(ARK, "ark.extracthere", QtWarningMsg)
K_PLUGIN_FACTORY_WITH_JSON(ExtractHereDndPluginFactory, "ark_dndextract.json",
registerPlugin<ExtractHereDndPlugin>();)
......
/*
* ark -- archiver for the KDE project
*
* Copyright (C) 2007 Henrique Pinto <henrique.pinto@kdemail.net>
* Copyright (C) 2008-2009 Harald Hvaal <haraldhv@stud.ntnu.no>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef LOGGING_ARK_H
#define LOGGING_ARK_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(ARK)
Q_DECLARE_LOGGING_CATEGORY(KERFUFFLE)
Q_DECLARE_LOGGING_CATEGORY(KERFUFFLE_PLUGIN)
Q_DECLARE_LOGGING_CATEGORY(PART)
#endif /* LOGGING_ARK_H */
......@@ -21,7 +21,7 @@
*/
#include "ark_version.h"
#include "logging.h"
#include "ark_debug.h"
#include "mainwindow.h"
#include "batchextract.h"
#include "kerfuffle/addtoarchive.h"
......@@ -36,8 +36,6 @@
#include <KLocalizedString>
#include <kdbusservice.h>
Q_LOGGING_CATEGORY(ARK, "ark.main", QtWarningMsg)
using Kerfuffle::AddToArchive;
int main(int argc, char **argv)
......
......@@ -23,7 +23,7 @@
*/
#include "mainwindow.h"
#include "logging.h"
#include "ark_debug.h"
#include "kerfuffle/archive_kerfuffle.h"
#include "kerfuffle/createdialog.h"
#include "kerfuffle/settingspage.h"
......
......@@ -25,6 +25,11 @@ ki18n_wrap_ui(kerfuffle_SRCS
previewsettings.ui
)
ecm_qt_declare_logging_category(kerfuffle_SRCS
HEADER ark_debug.h
IDENTIFIER ARK
CATEGORY_NAME ark.kerfuffle)
add_library(kerfuffle SHARED ${kerfuffle_SRCS})
generate_export_header(kerfuffle BASE_NAME kerfuffle)
......
......@@ -27,7 +27,7 @@
*/
#include "adddialog.h"
#include "app/logging.h"
#include "ark_debug.h"
#include "ui_adddialog.h"
#include "kerfuffle/archive_kerfuffle.h"
......@@ -56,7 +56,7 @@ AddDialog::AddDialog(QWidget *parent,
const QStringList &itemsToAdd)
: CreateDialog(parent, caption, startDir)
{
qCDebug(KERFUFFLE) << "AddDialog loaded";
qCDebug(ARK) << "AddDialog loaded";
m_ui = new AddDialogUI(this);
m_vlayout->addWidget(m_ui);
......
......@@ -27,7 +27,7 @@
*/
#include "addtoarchive.h"
#include "app/logging.h"
#include "ark_debug.h"
#include "adddialog.h"
#include "archive_kerfuffle.h"
#include "jobs.h"
......@@ -87,7 +87,7 @@ void AddToArchive::setHeaderEncryptionEnabled(bool enabled)
bool AddToArchive::showAddDialog()
{
qCDebug(KERFUFFLE) << "Opening add dialog";
qCDebug(ARK) << "Opening add dialog";
QPointer<Kerfuffle::AddDialog> dialog = new Kerfuffle::AddDialog(
Q_NULLPTR, // parent
......@@ -100,8 +100,8 @@ bool AddToArchive::showAddDialog()
bool ret = dialog.data()->exec();
if (ret) {
qCDebug(KERFUFFLE) << "AddDialog returned URL:" << dialog.data()->selectedUrls().at(0).toString();
qCDebug(KERFUFFLE) << "AddDialog returned mime:" << dialog.data()->currentMimeFilter();
qCDebug(ARK) << "AddDialog returned URL:" << dialog.data()->selectedUrls().at(0).toString();
qCDebug(ARK) << "AddDialog returned mime:" << dialog.data()->currentMimeFilter();
setFilename(dialog.data()->selectedUrls().at(0));
setMimeType(dialog.data()->currentMimeFilter());
setPassword(dialog.data()->password());
......@@ -127,7 +127,7 @@ bool AddToArchive::addInput(const QUrl &url)
void AddToArchive::start()
{
qCDebug(KERFUFFLE) << "Starting job";
qCDebug(ARK) << "Starting job";
QTimer::singleShot(0, this, SLOT(slotStartJob()));
}
......@@ -148,7 +148,7 @@ void AddToArchive::slotStartJob()
Kerfuffle::Archive *archive;
if (!m_filename.isEmpty()) {
archive = Kerfuffle::Archive::create(m_filename, m_mimeType, this);
qCDebug(KERFUFFLE) << "Set filename to " << m_filename;
qCDebug(ARK) << "Set filename to " << m_filename;
} else {
if (m_autoFilenameSuffix.isEmpty()) {
KMessageBox::error(Q_NULLPTR, xi18n("You need to either supply a filename for the archive or a suffix (such as rar, tar.gz) with the <command>--autofilename</command> argument."));
......@@ -156,7 +156,7 @@ void AddToArchive::slotStartJob()
}
if (m_firstPath.isEmpty()) {
qCWarning(KERFUFFLE) << "Weird, this should not happen. no firstpath defined. aborting";
qCWarning(ARK) << "Weird, this should not happen. no firstpath defined. aborting";
return;
}
......@@ -175,7 +175,7 @@ void AddToArchive::slotStartJob()
finalName = base + QLatin1Char( '_' ) + QString::number(appendNumber) + QLatin1Char( '.' ) + m_autoFilenameSuffix;
}
qCDebug(KERFUFFLE) << "Autoset filename to "<< finalName;
qCDebug(ARK) << "Autoset filename to "<< finalName;
archive = Kerfuffle::Archive::create(finalName, m_mimeType, this);
}
......@@ -194,7 +194,7 @@ void AddToArchive::slotStartJob()
if (m_changeToFirstPath) {
if (m_firstPath.isEmpty()) {
qCWarning(KERFUFFLE) << "Weird, this should not happen. no firstpath defined. aborting";
qCWarning(ARK) << "Weird, this should not happen. no firstpath defined. aborting";
return;
}
......@@ -206,7 +206,7 @@ void AddToArchive::slotStartJob()
options[QLatin1String( "GlobalWorkDir" )] = stripDir.path();
qCDebug(KERFUFFLE) << "Setting GlobalWorkDir to " << stripDir.path();
qCDebug(ARK) << "Setting GlobalWorkDir to " << stripDir.path();
}
Kerfuffle::AddJob *job =
......@@ -221,7 +221,7 @@ void AddToArchive::slotStartJob()
void AddToArchive::slotFinished(KJob *job)
{
qCDebug(KERFUFFLE) << "Job finished";
qCDebug(ARK) << "Job finished";
if (job->error()) {
KMessageBox::error(Q_NULLPTR, job->errorText());
......
......@@ -26,7 +26,7 @@
*/
#include "archive_kerfuffle.h"
#include "app/logging.h"
#include "ark_debug.h"
#include "archiveinterface.h"
#include "jobs.h"
......@@ -41,8 +41,6 @@
#include <KMimeTypeTrader>
#include <KServiceTypeTrader>
Q_LOGGING_CATEGORY(KERFUFFLE, "ark.kerfuffle", QtWarningMsg)
static bool comparePlugins(const KService::Ptr &p1, const KService::Ptr &p2)
{
return (p1->property(QLatin1String( "X-KDE-Priority" )).toInt()) > (p2->property(QLatin1String( "X-KDE-Priority" )).toInt());
......@@ -73,7 +71,7 @@ static QString determineMimeType(const QString& filename)
}
if (mimeFromExtension != mimeFromContent) {
qCWarning(KERFUFFLE) << "Mimetype for filename extension (" << mimeFromExtension.name()
qCWarning(ARK) << "Mimetype for filename extension (" << mimeFromExtension.name()
<< ") did not match mimetype for content (" << mimeFromContent.name()
<< "). Using content-based mimetype.";
}
......@@ -85,18 +83,18 @@ static KService::List findPluginOffers(const QString& filename, const QString& f
{
KService::List offers;
qCDebug(KERFUFFLE) << "Find plugin offers for" << filename << "with mime" << fixedMimeType;
qCDebug(ARK) << "Find plugin offers for" << filename << "with mime" << fixedMimeType;
const QString mimeType = fixedMimeType.isEmpty() ? determineMimeType(filename) : fixedMimeType;
qCDebug(KERFUFFLE) << "Detected mime" << mimeType;
qCDebug(ARK) << "Detected mime" << mimeType;
if (!mimeType.isEmpty()) {
offers = KMimeTypeTrader::self()->query(mimeType, QLatin1String( "Kerfuffle/Plugin" ), QLatin1String( "(exist Library)" ));
qSort(offers.begin(), offers.end(), comparePlugins);
}
qCDebug(KERFUFFLE) << "Have" << offers.count() << "offers";
qCDebug(ARK) << "Have" << offers.count() << "offers";
return offers;
}
......@@ -117,7 +115,7 @@ Archive *Archive::create(const QString &fileName, QObject *parent)
Archive *Archive::create(const QString &fileName, const QString &fixedMimeType, QObject *parent)
{
qCDebug(KERFUFFLE) << "Going to create archive" << fileName;
qCDebug(ARK) << "Going to create archive" << fileName;
qRegisterMetaType<ArchiveEntry>("ArchiveEntry");
......@@ -126,7 +124,7 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
const KService::List offers = findPluginOffers(fileName, fixedMimeType);
if (offers.isEmpty()) {
qCCritical(KERFUFFLE) << "Could not find a plugin to handle" << fileName;
qCCritical(ARK) << "Could not find a plugin to handle" << fileName;
return Q_NULLPTR;
}
......@@ -137,27 +135,27 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
QString pluginName = service->library();
bool isReadOnly = !service->property(QStringLiteral("X-KDE-Kerfuffle-ReadWrite")).toBool();
qCDebug(KERFUFFLE) << "Loading plugin" << pluginName;
qCDebug(ARK) << "Loading plugin" << pluginName;
factory = KPluginLoader(pluginName).factory();
if (!factory) {
qCWarning(KERFUFFLE) << "Invalid plugin factory for" << pluginName;
qCWarning(ARK) << "Invalid plugin factory for" << pluginName;
continue;
}
iface = factory->create<ReadOnlyArchiveInterface>(0, args);
if (!iface) {
qCWarning(KERFUFFLE) << "Could not create plugin instance" << pluginName;
qCWarning(ARK) << "Could not create plugin instance" << pluginName;
continue;
}
if (iface->isCliBased()) {
qCDebug(KERFUFFLE) << "Finding executables for plugin" << pluginName;
qCDebug(ARK) << "Finding executables for plugin" << pluginName;
if (iface->findExecutables(!isReadOnly)) {
return new Archive(iface, isReadOnly, parent);
} else {
qCWarning(KERFUFFLE) << "Failed to find needed executables for plugin" << pluginName;
qCWarning(ARK) << "Failed to find needed executables for plugin" << pluginName;
}
} else {
// Not CliBased plugin, don't search for executables.
......@@ -165,7 +163,7 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
}
}
qCCritical(KERFUFFLE) << "Failed to find a usable plugin for" << fileName;
qCCritical(ARK) << "Failed to find a usable plugin for" << fileName;
return Q_NULLPTR;
}
......@@ -177,7 +175,7 @@ Archive::Archive(ReadOnlyArchiveInterface *archiveInterface, bool isReadOnly, QO
m_isPasswordProtected(false),
m_isSingleFolderArchive(false)
{
qCDebug(KERFUFFLE) << "Created archive instance";
qCDebug(ARK) << "Created archive instance";
Q_ASSERT(archiveInterface);
archiveInterface->setParent(this);
......@@ -207,7 +205,7 @@ KJob* Archive::create()
ListJob* Archive::list()
{
qCDebug(KERFUFFLE) << "Going to list files";
qCDebug(ARK) << "Going to list files";
ListJob *job = new ListJob(m_iface, this);
job->setAutoDelete(false);
......@@ -222,7 +220,7 @@ ListJob* Archive::list()
DeleteJob* Archive::deleteFiles(const QList<QVariant> & files)
{
qCDebug(KERFUFFLE) << "Going to delete files" << files;
qCDebug(ARK) << "Going to delete files" << files;
if (m_iface->isReadOnly()) {
return 0;
......@@ -234,7 +232,7 @@ DeleteJob* Archive::deleteFiles(const QList<QVariant> & files)
AddJob* Archive::addFiles(const QStringList & files, const CompressionOptions& options)
{
qCDebug(KERFUFFLE) << "Going to add files" << files << "with options" << options;
qCDebug(ARK) << "Going to add files" << files << "with options" << options;
Q_ASSERT(!m_iface->isReadOnly());
AddJob *newJob = new AddJob(files, options, static_cast<ReadWriteArchiveInterface*>(m_iface), this);
connect(newJob, &AddJob::result, this, &Archive::onAddFinished);
......@@ -362,7 +360,7 @@ QStringList supportedMimeTypes()
}
}
qCDebug(KERFUFFLE) << "Returning supported mimetypes" << supported;
qCDebug(ARK) << "Returning supported mimetypes" << supported;
return supported;
}
......@@ -389,7 +387,7 @@ QStringList supportedWriteMimeTypes()
}
}
qCDebug(KERFUFFLE) << "Returning supported write mimetypes" << supported;
qCDebug(ARK) << "Returning supported write mimetypes" << supported;
return supported;
}
......@@ -407,7 +405,7 @@ QSet<QString> supportedEncryptEntriesMimeTypes()
}
}
qCDebug(KERFUFFLE) << "Entry encryption supported for mimetypes" << supported;
qCDebug(ARK) << "Entry encryption supported for mimetypes" << supported;
return supported;
}
......@@ -425,7 +423,7 @@ QSet<QString> supportedEncryptHeaderMimeTypes()
}
}
qCDebug(KERFUFFLE) << "Header encryption supported for mimetypes" << supported;
qCDebug(ARK) << "Header encryption supported for mimetypes" << supported;
return supported;
}
......
......@@ -26,7 +26,7 @@
*/
#include "archiveinterface.h"
#include "app/logging.h"
#include "ark_debug.h"
#include <kfileitem.h>
......@@ -42,7 +42,7 @@ ReadOnlyArchiveInterface::ReadOnlyArchiveInterface(QObject *parent, const QVaria
, m_isHeaderEncryptionEnabled(false)
, m_isCorrupt(false)
{
qCDebug(KERFUFFLE) << "Created read-only interface for" << args.first().toString();
qCDebug(ARK) << "Created read-only interface for" << args.first().toString();
m_filename = args.first().toString();
}
......@@ -122,7 +122,7 @@ bool ReadOnlyArchiveInterface::isCorrupt() const
ReadWriteArchiveInterface::ReadWriteArchiveInterface(QObject *parent, const QVariantList & args)
: ReadOnlyArchiveInterface(parent, args)
{
qCDebug(KERFUFFLE) << "Created read-write interface for" << args.first().toString();
qCDebug(ARK) << "Created read-write interface for" << args.first().toString();
}
ReadWriteArchiveInterface::~ReadWriteArchiveInterface()
......
......@@ -27,7 +27,7 @@
*/
#include "cliinterface.h"
#include "app/logging.h"
#include "ark_debug.h"
#include "queries.h"
#ifdef Q_OS_WIN
......@@ -102,7 +102,7 @@ bool CliInterface::findExecutables(bool isReadWrite)
bool execTypeFound = false;
foreach (const QString &program, m_param.value(execType).toStringList()) {
if (!QStandardPaths::findExecutable(program).isEmpty()) {
qCDebug(KERFUFFLE) << "Found executable type" << execType << ":" << program;
qCDebug(ARK) << "Found executable type" << execType << ":" << program;
execTypeFound = true;
break;
}
......@@ -140,7 +140,7 @@ bool CliInterface::list()
bool CliInterface::copyFiles(const QVariantList &files, const QString &destinationDirectory, ExtractionOptions options)
{
qCDebug(KERFUFFLE) << Q_FUNC_INFO << "to" << destinationDirectory;
qCDebug(ARK) << Q_FUNC_INFO << "to" << destinationDirectory;
cacheParameterList();
......@@ -152,7 +152,7 @@ bool CliInterface::copyFiles(const QVariantList &files, const QString &destinati
//now replace the various elements in the list
for (int i = 0; i < args.size(); ++i) {
QString argument = args.at(i);
qCDebug(KERFUFFLE) << "Processing argument " << argument;
qCDebug(ARK) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();
......@@ -192,7 +192,7 @@ bool CliInterface::copyFiles(const QVariantList &files, const QString &destinati
//the password in advance.
if ((options.value(QLatin1String("PasswordProtectedHint")).toBool()) &&
(password().isEmpty())) {
qCDebug(KERFUFFLE) << "Password hint enabled, querying user";
qCDebug(ARK) << "Password hint enabled, querying user";
Kerfuffle::PasswordNeededQuery query(filename());
emit userQuery(&query);
......@@ -239,7 +239,7 @@ bool CliInterface::copyFiles(const QVariantList &files, const QString &destinati
QString rootNode;
if (options.contains(QLatin1String( "RootNode" ))) {
rootNode = options.value(QLatin1String( "RootNode" )).toString();
qCDebug(KERFUFFLE) << "Set root node " << rootNode;
qCDebug(ARK) << "Set root node " << rootNode;
}
if (!rootNode.isEmpty()) {
......@@ -275,9 +275,9 @@ bool CliInterface::copyFiles(const QVariantList &files, const QString &destinati
QTemporaryDir tmpExtractDir;
if (useTmpExtractDir) {
qCDebug(KERFUFFLE) << "Using temporary extraction dir:" << tmpExtractDir.path();
qCDebug(ARK) << "Using temporary extraction dir:" << tmpExtractDir.path();
if (!tmpExtractDir.isValid()) {
qCDebug(KERFUFFLE) << "Creation of temporary directory failed.";
qCDebug(ARK) << "Creation of temporary directory failed.";
failOperation();
return false;
}
......@@ -309,7 +309,7 @@ bool CliInterface::addFiles(const QStringList & files, const CompressionOptions&
const QString globalWorkDir = options.value(QLatin1String( "GlobalWorkDir" )).toString();
const QDir workDir = globalWorkDir.isEmpty() ? QDir::current() : QDir(globalWorkDir);
if (!globalWorkDir.isEmpty()) {
qCDebug(KERFUFFLE) << "GlobalWorkDir is set, changing dir to " << globalWorkDir;
qCDebug(ARK) << "GlobalWorkDir is set, changing dir to " << globalWorkDir;
QDir::setCurrent(globalWorkDir);
}
......@@ -319,7 +319,7 @@ bool CliInterface::addFiles(const QStringList & files, const CompressionOptions&
//now replace the various elements in the list
for (int i = 0; i < args.size(); ++i) {
const QString argument = args.at(i);
qCDebug(KERFUFFLE) << "Processing argument " << argument;
qCDebug(ARK) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();
......@@ -420,7 +420,7 @@ bool CliInterface::deleteFiles(const QList<QVariant> & files)
//now replace the various elements in the list
for (int i = 0; i < args.size(); ++i) {
QString argument = args.at(i);
qCDebug(KERFUFFLE) << "Processing argument " << argument;
qCDebug(ARK) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();
......@@ -460,7 +460,7 @@ bool CliInterface::runProcess(const QStringList& programNames, const QStringList
return false;
}
qCDebug(KERFUFFLE) << "Executing" << programPath << arguments;
qCDebug(ARK) << "Executing" << programPath << arguments;
if (m_process) {
m_process->waitForFinished();
......@@ -500,7 +500,7 @@ bool CliInterface::runProcess(const QStringList& programNames, const QStringList
void CliInterface::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qCDebug(KERFUFFLE) << "Process finished, exitcode:" << exitCode << "exitstatus:" << exitStatus;
qCDebug(ARK) << "Process finished, exitcode:" << exitCode << "exitstatus:" << exitStatus;
//if the m_process pointer is gone, then there is nothing to worry
//about here
......@@ -533,7 +533,7 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
// Move extracted files from a QTemporaryDir to the final destination.
QDir finalDestDir(finalDest);
qCDebug(KERFUFFLE) << "Setting final dir to" << finalDest;
qCDebug(ARK) << "Setting final dir to" << finalDest;
bool overwriteAll = false;
bool skipAll = false;
......@@ -548,14 +548,14 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
// For directories, just create the path.
if (!finalDestDir.mkpath(relEntry.filePath())) {
qCWarning(KERFUFFLE) << "Failed to create directory" << relEntry.filePath() << "in final destination.";
qCWarning(ARK) << "Failed to create directory" << relEntry.filePath() << "in final destination.";
}
} else {
// If destination file exists, prompt the user.
if (absDestEntry.exists()) {
qCWarning(KERFUFFLE) << "File" << absDestEntry.absoluteFilePath() << "exists.";
qCWarning(ARK) << "File" << absDestEntry.absoluteFilePath() << "exists.";
if (!skipAll && !overwriteAll) {
......@@ -569,7 +569,7 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
overwriteAll = true;
}
if (!QFile::remove(absDestEntry.absoluteFilePath())) {
qCWarning(KERFUFFLE) << "Failed to remove" << absDestEntry.absoluteFilePath();
qCWarning(ARK) << "Failed to remove" << absDestEntry.absoluteFilePath();
}
} else if (query.responseSkip() || query.responseAutoSkip()) {
......@@ -579,7 +579,7 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
continue;
} else if (query.responseCancelled()) {
qCDebug(KERFUFFLE) << "Copy action cancelled.";
qCDebug(ARK) << "Copy action cancelled.";
return false;
}
......@@ -589,7 +589,7 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
} else if (overwriteAll) {
if (!QFile::remove(absDestEntry.absoluteFilePath())) {
qCWarning(KERFUFFLE) << "Failed to remove" << absDestEntry.absoluteFilePath();
qCWarning(ARK) << "Failed to remove" << absDestEntry.absoluteFilePath();
}
}
......@@ -597,12 +597,12 @@ bool CliInterface::moveToFinalDest(const QVariantList &files, const QString &fin
// Create any parent directories.
if (!finalDestDir.mkpath(relEntry.path())) {
qCWarning(KERFUFFLE) << "Failed to create parent dirctory for file:" << absDestEntry.filePath();
qCWarning(ARK) << "Failed to create parent dirctory for file:" << absDestEntry.filePath();
}
// Move files to the final destination.