Commit 8867493f authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

Use QLoggingCategory for output/logging. Four categories are defined: main,...

Use QLoggingCategory for output/logging. Four categories are defined: main, kerfuffle, kerfuffle_plugins and part. By default only qWarning and higher are output to terminal. To enable qDebug output, set the environment variable QT_LOGGING_RULES=ark.*.debug=true
parent d182df99
......@@ -26,20 +26,20 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "logging.h"
#include "batchextract.h"
#include "kerfuffle/archive_kerfuffle.h"
#include "kerfuffle/extractiondialog.h"
#include "kerfuffle/jobs.h"
#include "kerfuffle/queries.h"
#include <QDebug>
#include <KLocalizedString>
#include <KMessageBox>
#include <KRun>
#include <KIO/RenameDialog>
#include <kwidgetjobtracker.h>
#include <QDebug>
#include <QDir>
#include <QFileInfo>
#include <QPointer>
......@@ -85,7 +85,7 @@ void BatchExtract::addExtraction(Kerfuffle::Archive* archive)
Kerfuffle::ExtractJob *job = archive->copyFiles(QVariantList(), destination, options);
//qDebug() << QString(QLatin1String( "Registering job from archive %1, to %2, preservePaths %3" )).arg(archive->fileName()).arg(destination).arg(preservePaths());
qCDebug(ARK) << QString(QLatin1String( "Registering job from archive %1, to %2, preservePaths %3" )).arg(archive->fileName()).arg(destination).arg(preservePaths());
addSubjob(job);
......@@ -139,7 +139,7 @@ void BatchExtract::slotStartJob()
m_initialJobCount = subjobs().size();
//qDebug() << "Starting first job";
qCDebug(ARK) << "Starting first job";
subjobs().at(0)->start();
}
......@@ -153,12 +153,10 @@ void BatchExtract::showFailedFiles()
void BatchExtract::slotResult(KJob *job)
{
//qDebug();
// TODO: The user must be informed about which file caused the error, and that the other files
// in the queue will not be extracted.
if (job->error()) {
//qDebug() << "There was en error, " << job->errorText();
qCDebug(ARK) << "There was en error, " << job->errorText();
setErrorText(job->errorText());
setError(job->error());
......@@ -183,10 +181,10 @@ void BatchExtract::slotResult(KJob *job)
KRun::runUrl(destination, QLatin1String( "inode/directory" ), 0);
}
//qDebug() << "Finished, emitting the result";
qCDebug(ARK) << "Finished, emitting the result";
emitResult();
} else {
//qDebug() << "Starting the next job";
qCDebug(ARK) << "Starting the next job";
emit description(this,
i18n("Extracting file..."),
qMakePair(i18n("Source archive"), m_fileNames.value(subjobs().at(0)).first),
......@@ -205,7 +203,7 @@ void BatchExtract::forwardProgress(KJob *job, unsigned long percent)
bool BatchExtract::addInput(const QUrl& url)
{
//qDebug() << "Adding archive" << url.toDisplayString(QUrl::PreferLocalFile);
qCDebug(ARK) << "Adding archive" << url.toDisplayString(QUrl::PreferLocalFile);
Kerfuffle::Archive *archive = Kerfuffle::Archive::create(url.toDisplayString(QUrl::PreferLocalFile), this);
......
......@@ -19,6 +19,7 @@
*
*/
#include "logging.h"
#include "extractHereDndPlugin.h"
#include "batchextract.h"
#include "kerfuffle/archive_kerfuffle.h"
......@@ -30,6 +31,8 @@
#include <KLocale>
#include <kfileitemlistproperties.h>
Q_LOGGING_CATEGORY(ARK, "ark.extracthere", QtWarningMsg)
K_PLUGIN_FACTORY(ExtractHerePluginFactory,
registerPlugin<ExtractHereDndPlugin>();
)
......@@ -37,7 +40,7 @@ K_EXPORT_PLUGIN(ExtractHerePluginFactory("stupidname", "ark"))
void ExtractHereDndPlugin::slotTriggered()
{
//qDebug() << "Preparing job";
qCDebug(ARK) << "Preparing job";
BatchExtract *batchJob = new BatchExtract();
batchJob->setAutoSubfolder(true);
......@@ -47,8 +50,8 @@ void ExtractHereDndPlugin::slotTriggered()
batchJob->addInput(url);
}
qCDebug(ARK) << "Starting job";
batchJob->start();
//qDebug() << "Started job";
}
ExtractHereDndPlugin::ExtractHereDndPlugin(QObject* parent, const QVariantList&)
......@@ -63,11 +66,11 @@ void ExtractHereDndPlugin::setup(const KFileItemListProperties& popupMenuInfo,
const QString extractHereMessage = i18nc("@action:inmenu Context menu shown when an archive is being drag'n'dropped", "Extract here");
if (!Kerfuffle::supportedMimeTypes().contains(popupMenuInfo.mimeType())) {
//qDebug() << popupMenuInfo.mimeType() << "is not a supported mimetype";
qCWarning(ARK) << popupMenuInfo.mimeType() << "is not a supported mimetype";
return;
}
//qDebug() << "Plugin executed";
qCDebug(ARK) << "Plugin executed";
QAction *action = new QAction(QIcon::fromTheme(QLatin1String("archive-extract")),
extractHereMessage, NULL);
......
#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 */
\ No newline at end of file
......@@ -21,7 +21,7 @@
*/
#include "ark_version.h"
#include "logging.h"
#include "mainwindow.h"
#include "batchextract.h"
#include "kerfuffle/addtoarchive.h"
......@@ -31,18 +31,22 @@
#include <QCommandLineParser>
#include <QByteArray>
#include <QFileInfo>
#include <QDebug>
#include <KAboutData>
#include <KLocalizedString>
#include <kdbusservice.h>
Q_LOGGING_CATEGORY(ARK, "ark.main", QtWarningMsg)
using Kerfuffle::AddToArchive;
int main(int argc, char **argv)
{
QApplication application(argc, argv);
// Debug output can be turned on here:
//QLoggingCategory::setFilterRules(QStringLiteral("ark.debug = true"));
Kdelibs4ConfigMigrator migrate(QLatin1Literal("ark"));
migrate.setConfigFiles(QStringList() << QLatin1Literal("arkrc"));
migrate.setUiFiles(QStringList() << QLatin1Literal("arkuirc"));
......@@ -182,27 +186,28 @@ int main(int argc, char **argv)
application.connect(addToArchiveJob, SIGNAL(result(KJob*)), SLOT(quit()), Qt::QueuedConnection);
if (parser.isSet("changetofirstpath")) {
//qDebug() << "main: Setting changetofirstpath";
qCDebug(ARK) << "Setting changetofirstpath";
addToArchiveJob->setChangeToFirstPath(true);
}
if (parser.isSet("add-to")) {
//qDebug() << "main: setting filename to" << parser.value("add-to");
qCDebug(ARK) << "Setting filename to" << parser.value("add-to");
addToArchiveJob->setFilename(QUrl::fromUserInput(parser.value("add-to"), QString(), QUrl::AssumeLocalFile));
}
if (parser.isSet("autofilename")) {
qDebug() << "main: Setting autofilename to" << parser.value("autofilename");
qCDebug(ARK) << "Setting autofilename to" << parser.value("autofilename");
addToArchiveJob->setAutoFilenameSuffix(parser.value("autofilename"));
}
for (int i = 0; i < urls.count(); ++i) {
//TODO: use the returned value here?
//qDebug() << "main: Adding url" << QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile);
qCDebug(ARK) << "Adding url" << QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile);
addToArchiveJob->addInput(QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile));
}
if (parser.isSet("dialog")) {
qCDebug(ARK) << "Using kerfuffle to open add dialog";
if (!addToArchiveJob->showAddDialog()) {
return 0;
}
......@@ -216,27 +221,28 @@ int main(int argc, char **argv)
application.connect(batchJob, SIGNAL(result(KJob*)), SLOT(quit()), Qt::QueuedConnection);
for (int i = 0; i < urls.count(); ++i) {
//qDebug() << "main: Adding url" << QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile);
qCDebug(ARK) << "Adding url" << QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile);
batchJob->addInput(QUrl::fromUserInput(urls.at(i), QString(), QUrl::AssumeLocalFile));
}
if (parser.isSet("autosubfolder")) {
//() << "main: Setting autosubfolder";
qCDebug(ARK) << "Setting autosubfolder";
batchJob->setAutoSubfolder(true);
}
if (parser.isSet("autodestination")) {
QString autopath = QFileInfo(QUrl::fromUserInput(urls.at(0), QString(), QUrl::AssumeLocalFile).path()).path();
//qDebug() << "main: By autodestination, setting path to " << autopath;
qCDebug(ARK) << "By autodestination, setting path to " << autopath;
batchJob->setDestinationFolder(autopath);
}
if (parser.isSet("destination")) {
//qDebug() << "main: Setting destination to " << parser.value("destination");
qCDebug(ARK) << "Setting destination to " << parser.value("destination");
batchJob->setDestinationFolder(parser.value("destination"));
}
if (parser.isSet("dialog")) {
qCDebug(ARK) << "Opening extraction dialog";
if (!batchJob->showExtractDialog()) {
return 0;
}
......@@ -253,7 +259,7 @@ int main(int argc, char **argv)
}
if (urls.count()) {
//qDebug() << "main: trying to open" << QUrl::fromUserInput(urls.at(0), QString(), QUrl::AssumeLocalFile);
qCDebug(ARK) << "Trying to open" << QUrl::fromUserInput(urls.at(0), QString(), QUrl::AssumeLocalFile);
if (parser.isSet("dialog")) {
window->setShowExtractDialog(true);
......@@ -264,6 +270,6 @@ int main(int argc, char **argv)
}
}
//qDebug() << "Entering application loop";
qCDebug(ARK) << "Entering application loop";
return application.exec();
}
......@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "logging.h"
#include "mainwindow.h"
#include "kerfuffle/archive_kerfuffle.h"
#include "part/interface.h"
......@@ -31,7 +32,6 @@
#include <KActionCollection>
#include <KStandardAction>
#include <KRecentFilesAction>
#include <QDebug>
#include <KEditToolBar>
#include <KShortcutsDialog>
#include <KService>
......@@ -39,6 +39,7 @@
#include <KConfigGroup>
#include <KXMLGUIFactory>
#include <QDebug>
#include <QDragEnterEvent>
#include <QDragMoveEvent>
#include <QFileDialog>
......@@ -78,7 +79,7 @@ MainWindow::~MainWindow()
void MainWindow::dragEnterEvent(QDragEnterEvent * event)
{
//qDebug() << event;
qCDebug(ARK) << "dragEnterEvent" << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......@@ -93,7 +94,7 @@ void MainWindow::dragEnterEvent(QDragEnterEvent * event)
void MainWindow::dropEvent(QDropEvent * event)
{
//qDebug() << event;
qCDebug(ARK) << "dropEvent" << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......@@ -112,7 +113,7 @@ void MainWindow::dropEvent(QDropEvent * event)
void MainWindow::dragMoveEvent(QDragMoveEvent * event)
{
//qDebug() << event;
//qCDebug(ARK) << "dragMoveEvent" << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......@@ -149,7 +150,7 @@ bool MainWindow::loadPart()
if (!m_part) {
KMessageBox::error(this, i18n("Unable to find Ark's KPart component, please check your installation."));
qWarning() << "Error loading Ark KPart: ";
qCWarning(ARK) << "Error loading Ark KPart.";
return false;
}
......@@ -263,13 +264,15 @@ void MainWindow::quit()
void MainWindow::newArchive()
{
qCDebug(ARK) << "Creating new archive";
Interface *iface = qobject_cast<Interface*>(m_part);
Q_ASSERT(iface);
Q_UNUSED(iface);
const QStringList mimeTypes = Kerfuffle::supportedWriteMimeTypes();
//qDebug() << "Supported mimetypes are" << mimeTypes.join( QLatin1String( " " ));
qCDebug(ARK) << "Supported mimetypes are" << mimeTypes.join( QLatin1String(" "));
QFileDialog dlg(this);
dlg.setMimeTypeFilters(mimeTypes);
......
......@@ -26,6 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "app/logging.h"
#include "adddialog.h"
#include "ui_adddialog.h"
#include "kerfuffle/archive_kerfuffle.h"
......@@ -62,6 +63,8 @@ AddDialog::AddDialog(const QStringList &itemsToAdd,
const QUrl &startDir)
: QDialog(parent, Qt::Dialog)
{
qCDebug(KERFUFFLE) << "AddDialog loaded";
this->setWindowTitle(caption);
QHBoxLayout *hlayout = new QHBoxLayout();
......
......@@ -26,6 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "app/logging.h"
#include "addtoarchive.h"
#include "adddialog.h"
#include "archive_kerfuffle.h"
......@@ -76,6 +77,8 @@ void AddToArchive::setMimeType(const QString & mimeType)
bool AddToArchive::showAddDialog()
{
qCDebug(KERFUFFLE) << "Opening add dialog";
QPointer<Kerfuffle::AddDialog> dialog = new Kerfuffle::AddDialog(
m_inputs, // itemsToAdd
Q_NULLPTR, // parent
......@@ -87,8 +90,8 @@ bool AddToArchive::showAddDialog()
bool ret = dialog.data()->exec();
if (ret) {
qDebug() << "Returned URL:" << dialog.data()->selectedUrls().at(0);
qDebug() << "Returned mime:" << dialog.data()->currentMimeFilter();
qCDebug(KERFUFFLE) << "AddDialog returned URL:" << dialog.data()->selectedUrls().at(0).toString();
qCDebug(KERFUFFLE) << "AddDialog returned mime:" << dialog.data()->currentMimeFilter();
setFilename(dialog.data()->selectedUrls().at(0));
setMimeType(dialog.data()->currentMimeFilter());
}
......@@ -112,6 +115,8 @@ bool AddToArchive::addInput(const QUrl &url)
void AddToArchive::start()
{
qCDebug(KERFUFFLE) << "Starting job";
QTimer::singleShot(0, this, SLOT(slotStartJob()));
}
......@@ -119,7 +124,7 @@ void AddToArchive::start()
// the returns should be preceded by emitResult().
void AddToArchive::slotStartJob()
{
qDebug();
Kerfuffle::CompressionOptions options;
......@@ -131,7 +136,7 @@ void AddToArchive::slotStartJob()
Kerfuffle::Archive *archive;
if (!m_filename.isEmpty()) {
archive = Kerfuffle::Archive::create(m_filename, m_mimeType, this);
qDebug() << "Set filename to " << m_filename;
qCDebug(KERFUFFLE) << "Set filename to " << m_filename;
} else {
if (m_autoFilenameSuffix.isEmpty()) {
KMessageBox::error(Q_NULLPTR, i18n("You need to either supply a filename for the archive or a suffix (such as rar, tar.gz) with the <command>--autofilename</command> argument."));
......@@ -139,7 +144,7 @@ void AddToArchive::slotStartJob()
}
if (m_firstPath.isEmpty()) {
qDebug() << "Weird, this should not happen. no firstpath defined. aborting";
qCWarning(KERFUFFLE) << "Weird, this should not happen. no firstpath defined. aborting";
return;
}
......@@ -158,7 +163,7 @@ void AddToArchive::slotStartJob()
finalName = base + QLatin1Char( '_' ) + QString::number(appendNumber) + QLatin1Char( '.' ) + m_autoFilenameSuffix;
}
qDebug() << "Autoset filename to "<< finalName;
qCDebug(KERFUFFLE) << "Autoset filename to "<< finalName;
archive = Kerfuffle::Archive::create(finalName, m_mimeType, this);
}
......@@ -172,7 +177,7 @@ void AddToArchive::slotStartJob()
if (m_changeToFirstPath) {
if (m_firstPath.isEmpty()) {
qDebug() << "Weird, this should not happen. no firstpath defined. aborting";
qCWarning(KERFUFFLE) << "Weird, this should not happen. no firstpath defined. aborting";
return;
}
......@@ -183,7 +188,7 @@ void AddToArchive::slotStartJob()
}
options[QLatin1String( "GlobalWorkDir" )] = stripDir.path();
qDebug() << "Setting GlobalWorkDir to " << stripDir.path();
qCDebug(KERFUFFLE) << "Setting GlobalWorkDir to " << stripDir.path();
}
Kerfuffle::AddJob *job =
......@@ -198,7 +203,7 @@ void AddToArchive::slotStartJob()
void AddToArchive::slotFinished(KJob *job)
{
qDebug();
qCDebug(KERFUFFLE) << "Job finished";
if (job->error()) {
KMessageBox::error(Q_NULLPTR, job->errorText());
......
......@@ -25,6 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "app/logging.h"
#include "archive_kerfuffle.h"
#include "archiveinterface.h"
#include "jobs.h"
......@@ -40,6 +41,8 @@
#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());
......@@ -64,18 +67,18 @@ static KService::List findPluginOffers(const QString& filename, const QString& f
{
KService::List offers;
qDebug() << "Find plugin offers for" << filename << "and mime" << fixedMimeType;
qCDebug(KERFUFFLE) << "Find plugin offers for" << filename << "and mime" << fixedMimeType;
const QString mimeType = fixedMimeType.isEmpty() ? determineMimeType(filename) : fixedMimeType;
qDebug() << "Detected MIME" << mimeType;
qCDebug(KERFUFFLE) << "Detected mime" << mimeType;
if (!mimeType.isEmpty()) {
offers = KMimeTypeTrader::self()->query(mimeType, QLatin1String( "Kerfuffle/Plugin" ), QLatin1String( "(exist Library)" ));
qSort(offers.begin(), offers.end(), comparePlugins);
}
qDebug() << "Have" << offers.count() << "offers";
qCDebug(KERFUFFLE) << "Have" << offers.count() << "offers";
return offers;
}
......@@ -95,16 +98,16 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
const KService::List offers = findPluginOffers(fileName, fixedMimeType);
if (offers.isEmpty()) {
qDebug() << "Could not find a plugin to handle" << fileName;
qCWarning(KERFUFFLE) << "Could not find a plugin to handle" << fileName;
return Q_NULLPTR;
}
const QString pluginName = offers.first()->library();
qDebug() << "Loading plugin" << pluginName << "for" << offers.first()->mimeTypes();
qCDebug(KERFUFFLE) << "Loading plugin" << pluginName; // << "for" << offers.first()->mimeTypes();
KPluginFactory * const factory = KPluginLoader(pluginName).factory();
if (!factory) {
qDebug() << "Invalid plugin factory for" << pluginName;
qCWarning(KERFUFFLE) << "Invalid plugin factory for" << pluginName;
return Q_NULLPTR;
}
......@@ -113,7 +116,7 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
ReadOnlyArchiveInterface * const iface = factory->create<ReadOnlyArchiveInterface>(0, args);
if (!iface) {
qDebug() << "Could not create plugin instance" << pluginName << "for" << fileName;
qCWarning(KERFUFFLE) << "Could not create plugin instance" << pluginName << "for" << fileName;
return Q_NULLPTR;
}
......@@ -297,7 +300,7 @@ QStringList supportedMimeTypes()
}
}
qDebug() << "Returning" << supported;
qCDebug(KERFUFFLE) << "Returning supported mimetypes" << supported;
return supported;
}
......@@ -324,7 +327,7 @@ QStringList supportedWriteMimeTypes()
}
}
qDebug() << "Returning" << supported;
qCDebug(KERFUFFLE) << "Returning supported write mimetypes" << supported;
return supported;
}
......
......@@ -25,6 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "app/logging.h"
#include "archiveinterface.h"
#include <kfileitem.h>
......@@ -37,7 +38,7 @@ namespace Kerfuffle
ReadOnlyArchiveInterface::ReadOnlyArchiveInterface(QObject *parent, const QVariantList & args)
: QObject(parent), m_waitForFinishedSignal(false)
{
qDebug();
qCDebug(KERFUFFLE) << "Created read-only interface for" << args.first().toString();
m_filename = args.first().toString();
}
......@@ -91,6 +92,7 @@ bool ReadOnlyArchiveInterface::doResume()
ReadWriteArchiveInterface::ReadWriteArchiveInterface(QObject *parent, const QVariantList & args)
: ReadOnlyArchiveInterface(parent, args)
{
qCDebug(KERFUFFLE) << "Created read-write interface for" << args.first().toString();
}
ReadWriteArchiveInterface::~ReadWriteArchiveInterface()
......
......@@ -26,6 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "app/logging.h"
#include "cliinterface.h"
#include "queries.h"
......@@ -104,7 +105,7 @@ bool CliInterface::list()
bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, ExtractionOptions options)
{
//qDebug() << Q_FUNC_INFO << "to" << destinationDirectory;
//qCDebug(KERFUFFLE) << Q_FUNC_INFO << "to" << destinationDirectory;
cacheParameterList();
......@@ -116,7 +117,7 @@ bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & dest
//now replace the various elements in the list
for (int i = 0; i < args.size(); ++i) {
QString argument = args.at(i);
qDebug() << "Processing argument " << argument;
qCDebug(KERFUFFLE) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();
......@@ -156,7 +157,7 @@ bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & dest
//the password in advance.
if ((options.value(QLatin1String("PasswordProtectedHint")).toBool()) &&
(password().isEmpty())) {
qDebug() << "Password hint enabled, querying user";
qCDebug(KERFUFFLE) << "Password hint enabled, querying user";
Kerfuffle::PasswordNeededQuery query(filename());
emit userQuery(&query);
......@@ -200,7 +201,7 @@ bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & dest
QString rootNode;
if (options.contains(QLatin1String( "RootNode" ))) {
rootNode = options.value(QLatin1String( "RootNode" )).toString();
qDebug() << "Set root node " << rootNode;
qCDebug(KERFUFFLE) << "Set root node " << rootNode;
}
if (!rootNode.isEmpty()) {
......@@ -233,7 +234,7 @@ bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & dest
QUrl destDir(destinationDirectory);
QDir::setCurrent(destDir.adjusted(QUrl::RemoveScheme).url());
//qDebug() << "Setting current dir to " << destinationDirectory;
qCDebug(KERFUFFLE) << "Setting current dir to " << destinationDirectory;
if (!runProcess(m_param.value(ExtractProgram).toStringList(), args)) {
failOperation();
......@@ -252,7 +253,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()) {
qDebug() << "GlobalWorkDir is set, changing dir to " << globalWorkDir;
qCDebug(KERFUFFLE) << "GlobalWorkDir is set, changing dir to " << globalWorkDir;
QDir::setCurrent(globalWorkDir);
}
......@@ -262,7 +263,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);
qDebug() << "Processing argument " << argument;
qCDebug(KERFUFFLE) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();
......@@ -304,7 +305,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);
qDebug() << "Processing argument " << argument;
qCDebug(KERFUFFLE) << "Processing argument " << argument;
if (argument == QLatin1String( "$Archive" )) {
args[i] = filename();