Fixes: Unified debug enum in the designer plugin

This commit is contained in:
Friedemann Kleint
2009-01-21 12:07:19 +01:00
parent df92275f46
commit 31f7b0fbad
9 changed files with 54 additions and 69 deletions

View File

@@ -64,8 +64,6 @@ using ProjectExplorer::ProjectNode;
using ProjectExplorer::FolderNode;
using ProjectExplorer::FileNode;
enum { debugFormWindowEditor = 0 };
class QrcFilesVisitor : public NodesVisitor
{
public:
@@ -109,8 +107,8 @@ FormWindowEditor::FormWindowEditor(const QList<int> &context,
m_sessionNode(0),
m_sessionWatcher(0)
{
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::FormWindowEditor" << form << parent;
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << form << parent;
connect(m_file, SIGNAL(reload(QString)), this, SLOT(slotOpen(QString)));
connect(m_file, SIGNAL(setDisplayName(QString)), this, SLOT(slotSetDisplayName(QString)));
@@ -130,8 +128,8 @@ FormWindowEditor::~FormWindowEditor()
delete m_toolBar;
delete m_host;
delete m_editorWidget;
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::~FormWindowEditor" << m_displayName;
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << m_displayName;
if (m_sessionNode && m_sessionWatcher) {
m_sessionNode->unregisterWatcher(m_sessionWatcher);
delete m_sessionWatcher;
@@ -140,8 +138,8 @@ FormWindowEditor::~FormWindowEditor()
bool FormWindowEditor::createNew(const QString &contents)
{
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::createNew()" << contents.size() << "chars";
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << contents.size() << "chars";
if (!m_formWindow)
return false;
@@ -157,8 +155,8 @@ bool FormWindowEditor::createNew(const QString &contents)
bool FormWindowEditor::open(const QString &fileName /*= QString()*/)
{
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::open" << fileName;
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << fileName;
if (fileName.isEmpty()) {
setDisplayName(tr("untitled"));
@@ -240,8 +238,8 @@ void FormWindowEditor::slotOpen(const QString &fileName)
void FormWindowEditor::slotSetDisplayName(const QString &title)
{
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::slotSetDisplayName" << title;
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << title;
setDisplayName(title);
}
@@ -304,8 +302,8 @@ QWidget *FormWindowEditor::widget()
bool FormWindowEditor::generateCode(QByteArray &header, QString &errorMessage) const
{
if (debugFormWindowEditor)
qDebug() << "FormWindowEditor::generateCode";
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO;
QString tempPattern = QDir::tempPath();
if (!tempPattern.endsWith(QDir::separator())) // platform-dependant