From 13f87b66f4748f353db549d53bed2a61b897ea20 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 25 Dec 2014 21:04:10 +0200 Subject: [PATCH] More log information. --HG-- branch : develop --- src/app/container/vcontainer.cpp | 4 ++++ src/app/mainwindow.cpp | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/app/container/vcontainer.cpp b/src/app/container/vcontainer.cpp index d4a12a768..4f3f755c9 100644 --- a/src/app/container/vcontainer.cpp +++ b/src/app/container/vcontainer.cpp @@ -33,6 +33,9 @@ #include "../geometry/vsplinepath.h" #include #include +#include + +Q_LOGGING_CATEGORY(vCon, "v.container") quint32 VContainer::_id = NULL_ID; qreal VContainer::_size = 50; @@ -207,6 +210,7 @@ void VContainer::UpdateObject(QHash &obj, const quint32 &id, val p */ void VContainer::Clear() { + qCDebug(vCon)<<"Clearing container data."; _id = NULL_ID; d->details.clear(); diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 8329ed31f..9ab1a2011 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -1034,12 +1034,14 @@ void MainWindow::mouseMove(const QPointF &scenePos) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief CanselTool cansel tool. + * @brief CancelTool cancel tool. */ void MainWindow::CancelTool() { + qCDebug(vMainWindow)<<"Canceling tool."; delete dialogTool; dialogTool = nullptr; + qCDebug(vMainWindow)<<"Dialog closed."; switch ( tool ) { case Tool::Arrow: @@ -1171,6 +1173,7 @@ void MainWindow::CancelTool() */ void MainWindow::ArrowTool() { + qCDebug(vMainWindow)<<"Arrow tool."; CancelTool(); ui->actionArrowTool->setChecked(true); ui->actionStopTool->setEnabled(false); @@ -1459,18 +1462,22 @@ void MainWindow::OnlineHelp() */ void MainWindow::Clear() { - qCDebug(vMainWindow)<<"Reseting main window"; + qCDebug(vMainWindow)<<"Reseting main window."; delete lock; // Unlock pattern file lock = nullptr; + qCDebug(vMainWindow)<<"Unlocked pattern file."; ui->actionDetails->setChecked(false); ui->actionDetails->setEnabled(false); ui->actionDraw->setChecked(true); ui->actionDraw->setEnabled(false); - setCurrentFile(""); + qCDebug(vMainWindow)<<"Returned to Draw mode."; + setCurrentFile(QString()); pattern->Clear(); + qCDebug(vMainWindow)<<"Clearing pattern."; doc->clear(); + qCDebug(vMainWindow)<<"Clearing scenes."; sceneDraw->clear(); sceneDetails->clear(); ArrowTool(); @@ -2038,6 +2045,7 @@ void MainWindow::AutoSavePattern() */ void MainWindow::setCurrentFile(const QString &fileName) { + qCDebug(vMainWindow)<<"Set current name to \""<getUndoStack()->setClean(); @@ -2048,6 +2056,7 @@ void MainWindow::setCurrentFile(const QString &fileName) } else { + qCDebug(vMainWindow)<<"Updating recent file list."; QStringList files = qApp->getSettings()->GetRecentFileList(); files.removeAll(fileName); files.prepend(fileName); @@ -2059,6 +2068,7 @@ void MainWindow::setCurrentFile(const QString &fileName) qApp->getSettings()->SetRecentFileList(files); UpdateRecentFileActions(); + qCDebug(vMainWindow)<<"Updating restore file list."; QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList(); restoreFiles.removeAll(fileName); restoreFiles.prepend(fileName); @@ -2135,6 +2145,7 @@ bool MainWindow::MaybeSave() //--------------------------------------------------------------------------------------------------------------------- void MainWindow::UpdateRecentFileActions() { + qCDebug(vMainWindow)<<"Updating recent file actions."; const QStringList files = qApp->getSettings()->GetRecentFileList(); const int numRecentFiles = qMin(files.size(), static_cast(MaxRecentFiles));