Commit f9328bce authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

Uncomment out several qCDebug() calls.

There is no point in keeping dead code in the tree. In this case,
however, instead of getting rid of it it makes more sense to just
uncomment out most calls: most of them were commented out during the
port to KF5 in commits such as efe61f23 ("Port to qDebug") and
58b55d1a ("--kdelibs4support, extraction fixes").

A couple of comments were actually removed because they were also
commented out in the KDE4 code.
parent b4f0b58a
......@@ -114,7 +114,7 @@ void MainWindow::dropEvent(QDropEvent * event)
void MainWindow::dragMoveEvent(QDragMoveEvent * event)
{
//qCDebug(ARK) << "dragMoveEvent" << event;
qCDebug(ARK) << "dragMoveEvent" << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......
......@@ -105,7 +105,7 @@ bool CliInterface::list()
bool CliInterface::copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, ExtractionOptions options)
{
//qCDebug(KERFUFFLE) << Q_FUNC_INFO << "to" << destinationDirectory;
qCDebug(KERFUFFLE) << Q_FUNC_INFO << "to" << destinationDirectory;
cacheParameterList();
......
......@@ -977,7 +977,6 @@ void ArchiveModel::slotCleanupEmptyDirs()
beginRemoveRows(parent(node), rawNode->row(), rawNode->row());
rawNode->parent()->removeEntryAt(rawNode->row());
endRemoveRows();
//qCDebug(PART) << "Removed entry " << entry[FileName].toString();
}
}
......
......@@ -93,7 +93,7 @@ void ArchiveView::dropEvent(QDropEvent * event)
void ArchiveView::dragMoveEvent(QDragMoveEvent * event)
{
//qCDebug(PART) << "dragMoveEvent" << event;
qCDebug(PART) << "dragMoveEvent" << event;
if (event->source() == this) {
//we don't support internal drops yet.
......
......@@ -247,7 +247,7 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const QMimeType &m
// maybe there should be an option controlling this
KHTMLPart *khtmlPart = qobject_cast<KHTMLPart*>(m_part.data());
if (khtmlPart) {
//qCDebug(PART) << "Disabling javascripts, plugins, java and external references for KHTMLPart";
qCDebug(PART) << "Disabling javascripts, plugins, java and external references for KHTMLPart";
khtmlPart->setJScriptEnabled(false);
khtmlPart->setJavaEnabled(false);
khtmlPart->setPluginsEnabled(false);
......@@ -262,7 +262,7 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const QMimeType &m
void ArkViewer::slotOpenUrlRequestDelayed(const QUrl& url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments& browserArguments)
{
//qCDebug(PART) << "Opening URL: " << url;
qCDebug(PART) << "Opening URL: " << url;
Q_UNUSED(arguments)
Q_UNUSED(browserArguments)
......
......@@ -362,7 +362,7 @@ void Part::updateActions()
const QString dir = QUrl(dirHistory.value(i)).toString(QUrl::RemoveScheme | QUrl::NormalizePathSegments | QUrl::PreferLocalFile);
QAction *newAction = menu->addAction(dir);
newAction->setData(dir);
//qCDebug(PART) << "Setting action data" << dir;
qCDebug(PART) << "Setting action data" << dir;
}
}
......
......@@ -129,7 +129,7 @@ bool CliPlugin::readListLine(const QString &line)
m_entryFilename += QLatin1Char('/');
}
//qCDebug(KERFUFFLE_PLUGIN) << m_entryFilename << " : " << fileprops;
qCDebug(KERFUFFLE_PLUGIN) << m_entryFilename << " : " << fileprops;
ArchiveEntry e;
e[ FileName ] = m_entryFilename;
e[ InternalID ] = m_internalId;
......
......@@ -151,7 +151,7 @@ bool KArchiveInterface::copyFiles(const QList<QVariant> &files, const QString &d
int no_files = 0;
foreach(const QVariant &file, extrFiles) {
QString realDestination = destinationDirectory;
//qCDebug(KERFUFFLE_PLUGIN) << "Real destination" << realDestination;
qCDebug(KERFUFFLE_PLUGIN) << "Real destination" << realDestination;
const KArchiveEntry *archiveEntry = dir->entry(file.toString());
if (!archiveEntry) {
qCDebug(KERFUFFLE_PLUGIN) << "File not found in the archive" << file.toString();
......@@ -171,13 +171,13 @@ bool KArchiveInterface::copyFiles(const QList<QVariant> &files, const QString &d
dirCache << filepath;
}
realDestination = dest.absolutePath() + QLatin1Char('/') + filepath;
//qCDebug(KERFUFFLE_PLUGIN) << "Real destination 2" << realDestination;
qCDebug(KERFUFFLE_PLUGIN) << "Real destination 2" << realDestination;
}
// TODO: handle errors, copyTo fails silently
if (!archiveEntry->isDirectory()) { // We don't need to do anything about directories
//qCDebug(KERFUFFLE_PLUGIN) << "Extracting file" << archiveEntry->name();
qCDebug(KERFUFFLE_PLUGIN) << "Extracting file" << archiveEntry->name();
if (QFile::exists(realDestination + QLatin1Char('/') + archiveEntry->name()) && !overwriteAllSelected) {
......@@ -203,7 +203,7 @@ bool KArchiveInterface::copyFiles(const QList<QVariant> &files, const QString &d
}
} else {
//qCDebug(KERFUFFLE_PLUGIN) << "Extracting file" << realDestination << archiveEntry->name();
qCDebug(KERFUFFLE_PLUGIN) << "Extracting file" << realDestination << archiveEntry->name();
if (archiveEntry->symLinkTarget().isEmpty()) {
static_cast<const KArchiveFile*>(archiveEntry)->copyTo(realDestination);
......@@ -256,7 +256,7 @@ bool KArchiveInterface::browseArchive(KArchive *archive)
bool KArchiveInterface::processDir(const KArchiveDirectory *dir, const QString & prefix)
{
//qCDebug(KERFUFFLE_PLUGIN) << "Processing directory" << dir->name();
qCDebug(KERFUFFLE_PLUGIN) << "Processing directory" << dir->name();
foreach(const QString& entryName, dir->entries()) {
const KArchiveEntry *entry = dir->entry(entryName);
......@@ -272,7 +272,7 @@ bool KArchiveInterface::processDir(const KArchiveDirectory *dir, const QString &
void KArchiveInterface::createEntryFor(const KArchiveEntry *aentry, const QString& prefix)
{
//qCDebug(KERFUFFLE_PLUGIN) << "Creating archive entry";
qCDebug(KERFUFFLE_PLUGIN) << "Creating archive entry";
ArchiveEntry e;
QString fileName = prefix.isEmpty() ? aentry->name() : prefix + QLatin1Char('/') + aentry->name();
......
......@@ -241,7 +241,7 @@ bool LibArchiveInterface::copyFiles(const QVariantList& files, const QString& de
// entryFI is the fileinfo pointing to where the file will be
// written from the archive
QFileInfo entryFI(entryName);
//qCDebug(KERFUFFLE_PLUGIN) << "setting path to " << archive_entry_pathname( entry );
qCDebug(KERFUFFLE_PLUGIN) << "setting path to " << archive_entry_pathname( entry );
const QString fileWithoutPath(entryFI.fileName());
......@@ -314,7 +314,7 @@ bool LibArchiveInterface::copyFiles(const QVariantList& files, const QString& de
}
int header_response;
//qCDebug(KERFUFFLE_PLUGIN) << "Writing " << fileWithoutPath << " to " << archive_entry_pathname(entry);
qCDebug(KERFUFFLE_PLUGIN) << "Writing " << fileWithoutPath << " to " << archive_entry_pathname(entry);
if ((header_response = archive_write_header(writer.data(), entry)) == ARCHIVE_OK) {
//if the whole archive is extracted and the total filesize is
//available, we use partial progress
......@@ -512,7 +512,6 @@ bool LibArchiveInterface::addFiles(const QStringList& files, const CompressionOp
}
int header_response;
//qCDebug(KERFUFFLE_PLUGIN) << "Writing entry " << fn;
if ((header_response = archive_write_header(arch_writer.data(), entry)) == ARCHIVE_OK) {
//if the whole archive is extracted and the total filesize is
//available, we use partial progress
......@@ -625,7 +624,6 @@ bool LibArchiveInterface::deleteFiles(const QVariantList& files)
}
int header_response;
//qCDebug(KERFUFFLE_PLUGIN) << "Writing entry " << fn;
if ((header_response = archive_write_header(arch_writer.data(), entry)) == ARCHIVE_OK) {
//if the whole archive is extracted and the total filesize is
//available, we use partial progress
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment