Commit 6a7b7c79 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Cleanup function names from debugging output

These days Qt offers the QT_MESSAGE_PATTERN env variable, so function
names can be automatically added to each debug output line using the
`%{function}` placeholder.
parent 9c28b786
......@@ -81,7 +81,7 @@ MainWindow::~MainWindow()
void MainWindow::dragEnterEvent(QDragEnterEvent * event)
{
qCDebug(ARK) << "dragEnterEvent" << event;
qCDebug(ARK) << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......@@ -97,7 +97,7 @@ void MainWindow::dragEnterEvent(QDragEnterEvent * event)
void MainWindow::dropEvent(QDropEvent * event)
{
qCDebug(ARK) << "dropEvent" << event;
qCDebug(ARK) << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......@@ -116,7 +116,7 @@ void MainWindow::dropEvent(QDropEvent * event)
void MainWindow::dragMoveEvent(QDragMoveEvent * event)
{
qCDebug(ARK) << "dragMoveEvent" << event;
qCDebug(ARK) << event;
Interface *iface = qobject_cast<Interface*>(m_part);
if (iface->isBusy()) {
......
......@@ -210,7 +210,7 @@ void AddToArchive::slotStartJob()
void AddToArchive::slotFinished(KJob *job)
{
qCDebug(ARK) << "AddToArchive job finished";
qCDebug(ARK) << "job finished";
if (job->error() && !job->errorString().isEmpty()) {
KMessageBox::error(nullptr, job->errorString());
......
......@@ -101,7 +101,7 @@ bool CliInterface::list()
bool CliInterface::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDirectory, const ExtractionOptions &options)
{
qCDebug(ARK) << Q_FUNC_INFO << "to" << destinationDirectory;
qCDebug(ARK) << "destination directory:" << destinationDirectory;
m_operationMode = Extract;
m_extractionOptions = options;
......
......@@ -60,8 +60,6 @@ CreateDialog::CreateDialog(QWidget *parent,
const QUrl &startDir)
: QDialog(parent, Qt::Dialog)
{
qCDebug(ARK) << "CreateDialog loaded";
setWindowTitle(caption);
setModal(true);
......
......@@ -59,8 +59,6 @@ ExtractionDialog::ExtractionDialog(QWidget *parent)
: QDialog(parent, Qt::Dialog)
{
qCDebug(ARK) << "ExtractionDialog loaded";
setWindowTitle(i18nc("@title:window", "Extract"));
QHBoxLayout *hlayout = new QHBoxLayout();
......
......@@ -249,7 +249,7 @@ LoadJob::LoadJob(Archive *archive, ReadOnlyArchiveInterface *interface)
, m_dirCount(0)
, m_filesCount(0)
{
qCDebug(ARK) << "LoadJob created";
qCDebug(ARK) << "Created job instance";
connect(this, &LoadJob::newEntry, this, &LoadJob::onNewEntry);
}
......@@ -355,7 +355,7 @@ BatchExtractJob::BatchExtractJob(LoadJob *loadJob, const QString &destination, b
, m_autoSubfolder(autoSubfolder)
, m_preservePaths(preservePaths)
{
qCDebug(ARK) << "BatchExtractJob created";
qCDebug(ARK) << "Created job instance";
}
void BatchExtractJob::doWork()
......@@ -458,7 +458,7 @@ CreateJob::CreateJob(Archive *archive, const QVector<Archive::Entry*> &entries,
, m_entries(entries)
, m_options(options)
{
qCDebug(ARK) << "CreateJob created";
qCDebug(ARK) << "Created job instance";
}
void CreateJob::enableEncryption(const QString &password, bool encryptHeader)
......@@ -499,7 +499,7 @@ ExtractJob::ExtractJob(const QVector<Archive::Entry*> &entries, const QString &d
, m_destinationDir(destinationDir)
, m_options(options)
{
qCDebug(ARK) << "ExtractJob created";
qCDebug(ARK) << "Created job instance";
}
void ExtractJob::doWork()
......@@ -603,19 +603,19 @@ QString TempExtractJob::extractionDir() const
PreviewJob::PreviewJob(Archive::Entry *entry, bool passwordProtectedHint, ReadOnlyArchiveInterface *interface)
: TempExtractJob(entry, passwordProtectedHint, interface)
{
qCDebug(ARK) << "PreviewJob created";
qCDebug(ARK) << "Created job instance";
}
OpenJob::OpenJob(Archive::Entry *entry, bool passwordProtectedHint, ReadOnlyArchiveInterface *interface)
: TempExtractJob(entry, passwordProtectedHint, interface)
{
qCDebug(ARK) << "OpenJob created";
qCDebug(ARK) << "Created job instance";
}
OpenWithJob::OpenWithJob(Archive::Entry *entry, bool passwordProtectedHint, ReadOnlyArchiveInterface *interface)
: OpenJob(entry, passwordProtectedHint, interface)
{
qCDebug(ARK) << "OpenWithJob created";
qCDebug(ARK) << "Created job instance";
}
AddJob::AddJob(const QVector<Archive::Entry*> &entries, const Archive::Entry *destination, const CompressionOptions& options, ReadWriteArchiveInterface *interface)
......@@ -624,7 +624,7 @@ AddJob::AddJob(const QVector<Archive::Entry*> &entries, const Archive::Entry *de
, m_destination(destination)
, m_options(options)
{
qCDebug(ARK) << "AddJob created";
qCDebug(ARK) << "Created job instance";
}
void AddJob::doWork()
......@@ -653,7 +653,7 @@ void AddJob::doWork()
}
}
qCDebug(ARK) << "AddJob: going to add" << totalCount << "entries, counted in" << timer.elapsed() << "ms";
qCDebug(ARK) << "Going to add" << totalCount << "entries, counted in" << timer.elapsed() << "ms";
const QString desc = i18np("Compressing a file", "Compressing %1 files", totalCount);
emit description(this, desc, qMakePair(i18n("Archive"), archiveInterface()->filename()));
......@@ -701,12 +701,12 @@ MoveJob::MoveJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destin
, m_destination(destination)
, m_options(options)
{
qCDebug(ARK) << "MoveJob created";
qCDebug(ARK) << "Created job instance";
}
void MoveJob::doWork()
{
qCDebug(ARK) << "MoveJob: going to move" << m_entries.count() << "file(s)";
qCDebug(ARK) << "Going to move" << m_entries.count() << "file(s)";
QString desc = i18np("Moving a file", "Moving %1 files", m_entries.count());
emit description(this, desc, qMakePair(i18n("Archive"), archiveInterface()->filename()));
......@@ -739,12 +739,12 @@ CopyJob::CopyJob(const QVector<Archive::Entry*> &entries, Archive::Entry *destin
, m_destination(destination)
, m_options(options)
{
qCDebug(ARK) << "CopyJob created";
qCDebug(ARK) << "Created job instance";
}
void CopyJob::doWork()
{
qCDebug(ARK) << "CopyJob: going to copy" << m_entries.count() << "file(s)";
qCDebug(ARK) << "Going to copy" << m_entries.count() << "file(s)";
QString desc = i18np("Copying a file", "Copying %1 files", m_entries.count());
emit description(this, desc, qMakePair(i18n("Archive"), archiveInterface()->filename()));
......@@ -825,7 +825,7 @@ TestJob::TestJob(ReadOnlyArchiveInterface *interface)
void TestJob::doWork()
{
qCDebug(ARK) << "TestJob started";
qCDebug(ARK) << "Job started";
emit description(this, i18n("Testing archive"), qMakePair(i18n("Archive"), archiveInterface()->filename()));
......
......@@ -56,8 +56,6 @@ public:
PropertiesDialog::PropertiesDialog(QWidget *parent, Archive *archive, qulonglong numberOfFiles, qulonglong numberOfFolders, qulonglong size)
: QDialog(parent, Qt::Dialog)
{
qCDebug(ARK) << "PropertiesDialog loaded";
QFileInfo fi(archive->fileName());
setWindowTitle(i18nc("@title:window", "Properties for %1", fi.fileName()));
......
......@@ -210,7 +210,7 @@ LoadCorruptQuery::LoadCorruptQuery(const QString& archiveFilename)
void LoadCorruptQuery::execute()
{
qCDebug(ARK) << "Executing LoadCorrupt prompt";
qCDebug(ARK) << "Executing prompt";
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
setResponse(KMessageBox::warningYesNo(nullptr,
......@@ -235,7 +235,7 @@ ContinueExtractionQuery::ContinueExtractionQuery(const QString& error, const QSt
void ContinueExtractionQuery::execute()
{
qCDebug(ARK) << "Executing ContinueExtraction prompt";
qCDebug(ARK) << "Executing prompt";
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
QMessageBox box(QMessageBox::Warning,
......
......@@ -75,7 +75,7 @@ void ArchiveView::setDropsEnabled(bool enabled)
void ArchiveView::dragEnterEvent(QDragEnterEvent * event)
{
//TODO: if no model, trigger some mechanism to create one automatically!
qCDebug(ARK) << "dragEnterEvent" << event;
qCDebug(ARK) << event;
if (event->source() == this) {
//we don't support internal drops yet.
......@@ -87,7 +87,7 @@ void ArchiveView::dragEnterEvent(QDragEnterEvent * event)
void ArchiveView::dropEvent(QDropEvent * event)
{
qCDebug(ARK) << "dropEvent" << event;
qCDebug(ARK) << event;
if (event->source() == this) {
//we don't support internal drops yet.
......@@ -99,7 +99,7 @@ void ArchiveView::dropEvent(QDropEvent * event)
void ArchiveView::dragMoveEvent(QDragMoveEvent * event)
{
qCDebug(ARK) << "dragMoveEvent" << event;
qCDebug(ARK) << event;
if (event->source() == this) {
//we don't support internal drops yet.
......
......@@ -41,8 +41,6 @@
ArkViewer::ArkViewer()
: KParts::MainWindow()
{
qCDebug(ARK) << "ArkViewer opened";
setupUi(this);
m_buttonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape);
......
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