More log information.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-25 21:04:10 +02:00
parent ccd06caef9
commit 13f87b66f4
2 changed files with 18 additions and 3 deletions

View File

@ -33,6 +33,9 @@
#include "../geometry/vsplinepath.h" #include "../geometry/vsplinepath.h"
#include <QLineF> #include <QLineF>
#include <QtAlgorithms> #include <QtAlgorithms>
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(vCon, "v.container")
quint32 VContainer::_id = NULL_ID; quint32 VContainer::_id = NULL_ID;
qreal VContainer::_size = 50; qreal VContainer::_size = 50;
@ -207,6 +210,7 @@ void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val p
*/ */
void VContainer::Clear() void VContainer::Clear()
{ {
qCDebug(vCon)<<"Clearing container data.";
_id = NULL_ID; _id = NULL_ID;
d->details.clear(); d->details.clear();

View File

@ -1034,12 +1034,14 @@ void MainWindow::mouseMove(const QPointF &scenePos)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief CanselTool cansel tool. * @brief CancelTool cancel tool.
*/ */
void MainWindow::CancelTool() void MainWindow::CancelTool()
{ {
qCDebug(vMainWindow)<<"Canceling tool.";
delete dialogTool; delete dialogTool;
dialogTool = nullptr; dialogTool = nullptr;
qCDebug(vMainWindow)<<"Dialog closed.";
switch ( tool ) switch ( tool )
{ {
case Tool::Arrow: case Tool::Arrow:
@ -1171,6 +1173,7 @@ void MainWindow::CancelTool()
*/ */
void MainWindow::ArrowTool() void MainWindow::ArrowTool()
{ {
qCDebug(vMainWindow)<<"Arrow tool.";
CancelTool(); CancelTool();
ui->actionArrowTool->setChecked(true); ui->actionArrowTool->setChecked(true);
ui->actionStopTool->setEnabled(false); ui->actionStopTool->setEnabled(false);
@ -1459,18 +1462,22 @@ void MainWindow::OnlineHelp()
*/ */
void MainWindow::Clear() void MainWindow::Clear()
{ {
qCDebug(vMainWindow)<<"Reseting main window"; qCDebug(vMainWindow)<<"Reseting main window.";
delete lock; // Unlock pattern file delete lock; // Unlock pattern file
lock = nullptr; lock = nullptr;
qCDebug(vMainWindow)<<"Unlocked pattern file.";
ui->actionDetails->setChecked(false); ui->actionDetails->setChecked(false);
ui->actionDetails->setEnabled(false); ui->actionDetails->setEnabled(false);
ui->actionDraw->setChecked(true); ui->actionDraw->setChecked(true);
ui->actionDraw->setEnabled(false); ui->actionDraw->setEnabled(false);
setCurrentFile(""); qCDebug(vMainWindow)<<"Returned to Draw mode.";
setCurrentFile(QString());
pattern->Clear(); pattern->Clear();
qCDebug(vMainWindow)<<"Clearing pattern.";
doc->clear(); doc->clear();
qCDebug(vMainWindow)<<"Clearing scenes.";
sceneDraw->clear(); sceneDraw->clear();
sceneDetails->clear(); sceneDetails->clear();
ArrowTool(); ArrowTool();
@ -2038,6 +2045,7 @@ void MainWindow::AutoSavePattern()
*/ */
void MainWindow::setCurrentFile(const QString &fileName) void MainWindow::setCurrentFile(const QString &fileName)
{ {
qCDebug(vMainWindow)<<"Set current name to \""<<fileName<<"\"";
curFile = fileName; curFile = fileName;
qApp->getUndoStack()->setClean(); qApp->getUndoStack()->setClean();
@ -2048,6 +2056,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
} }
else else
{ {
qCDebug(vMainWindow)<<"Updating recent file list.";
QStringList files = qApp->getSettings()->GetRecentFileList(); QStringList files = qApp->getSettings()->GetRecentFileList();
files.removeAll(fileName); files.removeAll(fileName);
files.prepend(fileName); files.prepend(fileName);
@ -2059,6 +2068,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
qApp->getSettings()->SetRecentFileList(files); qApp->getSettings()->SetRecentFileList(files);
UpdateRecentFileActions(); UpdateRecentFileActions();
qCDebug(vMainWindow)<<"Updating restore file list.";
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList(); QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList();
restoreFiles.removeAll(fileName); restoreFiles.removeAll(fileName);
restoreFiles.prepend(fileName); restoreFiles.prepend(fileName);
@ -2135,6 +2145,7 @@ bool MainWindow::MaybeSave()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MainWindow::UpdateRecentFileActions() void MainWindow::UpdateRecentFileActions()
{ {
qCDebug(vMainWindow)<<"Updating recent file actions.";
const QStringList files = qApp->getSettings()->GetRecentFileList(); const QStringList files = qApp->getSettings()->GetRecentFileList();
const int numRecentFiles = qMin(files.size(), static_cast<int>(MaxRecentFiles)); const int numRecentFiles = qMin(files.size(), static_cast<int>(MaxRecentFiles));